What is the best way to control about 20 lamps on a pinball playfield using mbed.
What I want is simple:
1 Ball hits switch -
2 Mbed registers switch x is closed
3 Mbed tells lamp x to turn on
I've tried connecting the lamps to the digital out pins through transistors. This hasn't worked.
Too little current going into base of transistor.
I'm a bit a an mbed noob.
Help my pinball machine come to life.
You can use an SPI relay driver. See http://focus.ti.com/lit/ds/symlink/tpl9202.pdf or http://www.maxim-ic.com/datasheet/index.mvp/id/4999. You can also use similar IC's made for driving LED's. The advantage of LED's is you won't need to bother with relays. This depends on your application though. You can find small SPDT relays such as this
Edit: You can also try this
I hope that helps!
The answer really depends on the type of lamps you are using, and their power source.
1. If running low-power incandescent lamps off of DC voltage (e.g., 12 volt automotive-style instrument lamps), a transistor driver should work. If base drive is skimpy, you could use a Darlington transistor like a TIP100 http://www.fairchildsemi.com/ds/TI/TIP102.pdf; or use an FET with a low threshold voltage http://www.diodes.com/datasheets/BSP75G.pdf.
2. If running lamps off of AC voltage, you will want a TRIAC and an optical trigger. See http://www.fairchildsemi.com/an/AN/AN-3006.pdf for some hints.
The mbed output 3v3 / 40mA is more then enough to drive a Darlington . 40mA is anything but skimpy base drive .. at hFE= 2.500 min for a typical darlington you can count on driving theoretically tens of amps. The schematic probably need to be reconsidered.
Also pay attention that you cannot drive at 40mA all outputs simultaneously. There's a power dissipation limit of 400mA for mbed outputs. Use max 10 outputs at once or if the "drive" is smaller ..say 20mA use max 20 outputs .. and so on.
The LPC1768 can only drive 4mA before voltage falls of the edge. 40 mA is short-circuit current, not "drive-current"
You're right .. but even at V0H=2V (enough for any darlington) the output is near 20mA .. enough again for this kind of drive.
20mA * 20 lamps.. I don't think that will work...
Here are my ideas.
For input a analog pin with a ladder of resistor . With a simple read and a simple operation we will know what switch is close. For output a maxims o microchip port expander in I2C . Only one condition : must be only one ball in pinball at the same time. The driver for lamp : integrated darlington ULNxxxx connected to port expander.
If this is OK I explain it more deep.
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top