Photos courtesy of Faye Montgomery
FIGURE 2. Arduino program listing to push a single button on the
universal remote.
this might be a job for an Arduino. I had the long-term
goal of making the Arduino a “smart” universal
remote, but I knew I wouldn’t have the time to do it
that night. My immediate solution was much simpler.
I went out and bought a $5 universal remote
control and removed it from its case. After
programming it as directed to work my cable box, I
experimented with a couple of alligator clip cables to
see what connections had to be made to activate a
particular button.
In an effort to just solve the current evening’s
problem, I used the remote to go to the two channels
of interest, one after another. At that point, all I
needed to do was to have the Arduino control the
“last” button. Many remotes have this feature that
allows you to switch back and forth between two
channels by just hitting the same button repeatedly. I
used the CD4066B quad bilateral switch IC (less than
a dollar) for this. If you haven’t used a switch like this
before, it allows you to use a +5V signal to turn a
switch on or off. I simply connected the two alligator
clips to the two switch ends, and the Arduino to the
control pin (Figure 1).
The program (Figure 2) to time the switch was
incredibly easy. I wrote a simple loop that does nothing
except “delay(60000);” which gives a 60 second delay
and runs from 0 to x. When the loop concludes, the
Arduino drives the control pin to +5V, holds it there for
a short time ( 50 ms or so), returns it to the low state,
and then goes into an infinite
loop doing nothing. The
recording program (always
recording channel 4, of
course) would turn on for two
hours at 8 PM, turn off, and
then turn on for another hour
at 11 PM. Sometime between
10 PM and 11 PM, the
Arduino has to change the
channel. In the program listing,
you can see that I was leaving
at 7: 40 PM and started the
program with a value of 170
for the delay variable x. The
Arduino was then supposed to
change channels for me at
10: 30 PM in preparation for
the 11 PM recording.
Although this worked, I knew it was a simple and
not particularly powerful solution. If I ever wanted to
record shows on three or more different channels, it
would not do the job. My long-term goal was to remove
the switch and universal remote carcass (which was
FIGURE 3. The Comcast remote control
and digital tuner used in this project.
February 2012 33