Hardware Reference
In-Depth Information
Just one more thing you need to look at before you can start making your control box, and that
is the detector that allows you to erase the drawing when you turn the control box upside
down. For this the simplest thing to use is a tilt switch. In the old days this was made with
mercury sloshing about in a tube that made an electrical contact with two wires mounted in the
end of the tube. Now, however, the use of mercury is frowned upon, and it is even banned in
certain classes of electronic equipment although you can still buy mercury tilt switches as a
component. Although those are undoubtedly the best form of tilt switch, for this project a low-
cost alternative will do quite nicely. his consists of a very small ball bearing sealed in a tube
with contacts at one end; as the ball rolls to the end it shorts out the contacts. he problem with
this sort of switch is that occasionally sometimes the ball fails to short out the contacts, but all
that means in this context is that you need to shake it to bash the ball into the contacts.
Now that you know about all the parts you need, it is time to put them together in a control
box. Figure 15-4 shows the schematic of the control box. Basically the two encoders have three
connections, and the centre is connected to ground as is one side of the tilt switch. hen all the
other wires go to input pins on the PiFace board. Remember the inputs are numbers 0 to 7 -
not 1 to 8. he encoders occupy the top four bits with the tilt switch being connected to the
next one down, input 3. Note that inputs 2, 1 and 0 are not used in this project. I built this in a
low-cost, ready-made black plastic box and wired it up with a length of ribbon cable stripped
back to six connectors. I cut a small notch in the wall of the box to allow the ribbon cable to pass
through when the lid was screwed on. his is shown in Figure 15-5. Finally the lid was screwed
on and became the base of the unit, and four small self-adhesive feet of felt pads were attached
and two knobs attached to the shafts. he inal unit is shown in Figure 15-6.
Figure 15-4:
he schematic
for the
roto-sketch
control box.
Search WWH ::




Custom Search