We went into production line mode exploiting the readily available child labour!
Result!
For our Visual Field Test equipment, we also want the lights to be out most of the time and only come on when we press the button - this is kind of the opposite of the MASH circuit which shows the light most of the time and cycles round when we press the switch. It needs a bit of logic changing!
The MASH circuit holds the ENABLE pin 13 of the 4017 counter high most of the time by connecting it to +5V by a 100k resistor which means the counter is stopped and only one LED is lit and stays lit. When we poke the yellow wire to earth, that pulls the ENABLE pin to earth (0V) which lets the counter go again and the lights start to flash round. Instead, we want the ENABLE pin to normally be connected to earth (by a little resistor) and pull it high (ie stop) when we press the switch to connect it directly to 5V. That's an easy rewiring.
Finally, we also want the LEDs to be off whilst the 4017 counter cycles round and round, and only the randomly selected LED to be lit when we press the switch. This is trickier, but if we just think about the logic levels, we want the LED anodes to NOT be earthed most of the time and only connect to earth when we press the switch. We could easily connect them all to the switch instead of earth, but the switch for the INHIBIT pin is normally earthed and goes high when we press it which is the exact opposite to what we want! The answer is to put an invertor in between which changes 5V to 0V and 0V to 5V. We could do this with a chip but there isn't much space and the easier way is to use a Transistor Resistor Logic (TRL) inverter circuit - shown below. It works for us with a 2N3904 transistor and Rbas 100k and Rcol 10k.
Finally (really finally!) we can use all the outputs of the 4017 instead of just 6 of them by changing the reset pin to connect to pin 11 instead of pin 5.
No comments:
Post a Comment