[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SIGMusic] circuit2



i couldn't tell if everyone got the message. 
fwd=========

Hi,

I don't mean to butt in here, but I can't resist.

You can't use the PIC to drive the solenoids directly, since it can only drive 5V.  You could use an open-collector buffer (7406) to handle the voltage, but they can only handle maybe 20 mA of current.  The solution is to drive the solenoids with transistors.  Connect the PIC output pin to a 100 ohm resistor, and connect the other end of that to the base of an NPN transistor.  Connect the transistor emitter to ground and the collector to the solenoid.  The other end of the solenoid gets 24 V.  You have to put a reverse-biased diode across the solenoid as well (the arrow points towards 24V) to keep it from destroying the transistor with inductive voltage spikes.

The 2n3904 and 2n2222a are general-purpose all-around decent transistors.  Find a copy of Horowitz and Hill (Art of Electronics) for better suggestions.  There used to be a copy in 1110 Siebel.

The 24V->5V conversion for the PIC can be done with a 7805 voltage regulator, but it's generally not a great idea to drop 19 V across a regulator, since all that power gets dissipated as heat.  If the regulator gets too hot, you can buy simple switching (buck) dc-dc converters that are almost drop-in replacements for the 7805, but they'll cost $20 or so and be a bit larger.

I would have posted to the mailing list directly, but it thinks I'm at a different email address that I can't send from.

-Joel Jordan (former chair of SigArch)