Assembly of the first prototype is completed. I made one error in
placement, resulting in the holes for the opto components for the
center pushbutton being in the wrong position. This necessitated a bit
of an ugly hack to make up for the traces I needed to drill through in
order to allow the components to sit where they need to sit, but no
functional difference, or visible difference from above.
This is what it looks like assembled:
The switches work well in a dark room, but the translucent plastic,
and room lights are enough to cause trouble. The next version will
have the phototransistors more protected from ambient light, and black
plastic should help. I should also be able to improve the situation
by using a smaller resistance to ground on the outputs of the
This is the circuit:
Here is a scope trace of the micro input as keys are scanned:
There is one electrical phenomena which I do not understand: When the
74238 output turns on, it drives one LED and phototransistor pair.
The transistor seems to turn fully on momentarily after voltage is
applied to it's collector. Simply waiting for 200 microseconds before
reading the key state is enough to ensure a good reading. So, while
this presents no problem to proper operation, it is something of a
puzzle which would be nice to understand.
Here is a scope trace showing a good data eye:
The next things to work on include:
- Actually sending keystrokes over USB... (should be easy to adapt dhteensy),
- Trial-and-error on the emmitter resistor to ground to get better immunity from ambient light
- Update the 3D-model to better hide the phototransitor from ambient light.