2
\$\begingroup\$

I have this simple circuit to drive a 5v solenoid. I made it all except that Q1 is a C2328A transistor I pulled out of an old power supply and C2 is a 220uF cap. D1 is just a diode I took out from another power supply, not sure what it is.

enter image description here

Basically the solenoid rings a bell. THis worked for about 2 weeks but now it will ring once (2 rings) then the next time only 1 ring and its dead. The solenoid will just not move anymore though the program is running and is triggering the transistor.

It works of USB power and is triggered by RTS using a USB to SERIAL dongle. The COM port stays reactive.

I wonder if this circuit is flawed and possibly caused damage to the cap or the transistor?

\$\endgroup\$
2
\$\begingroup\$

I assume your magnet does not draw a large current, let's say up to 200mA or so.

Q1 can be replaced by almost any transistor, the one you mention should do fine.

The effect that you describe could well be cause by D1 not working (failed open). The high-voltage pulse caused by switching the relay off would not be dissipated by D1 but instead destroy Q1.

\$\endgroup\$
  • \$\begingroup\$ Yes, the solenoid about 200ma that is correct. This USB bell is plugged into power 24/7. The problem is after it rings a few times now it just stops working and I need to unplug it and plug it back into USB. Then it works a few times again :( I might need to debug software- maybe something is wrong there. \$\endgroup\$ – Piotr Kula Aug 30 '13 at 13:30
2
\$\begingroup\$

That's quite a transistor for such a small package. It is probably much more expensive than the 2N2222 you are replacing if you were to buy it, but since you already have it go ahead and use it. It can support significantly more collector current than the 2N2222, but it still has a minimum gain of 100. It should work fine in this role.

However, look at the pinout closely. Note the different order of C and B than the 2N2222. You may have this transistor hooked up backwards.

R1 also needs to be the right value. You say the coil draws 200 mA. The transistor has a minimum guaranteed gain of 100, so that means you need to supply at least 2 mA base current, although a bit more would be good for some margin and to guarantee that the transistor is solidly in saturation when trying to turn on the coil. If the left end of R1 is driven by a 0-5V digital signal, then there will be about 4.3 V accross R1 when the coil should be on. 4.3 V / 2 mA = 2.15 kΩ. That means R1 should be no more than 2 kΩ. I'd probably use 1.5 kΩ. However, make sure the digital output can sustain 5 V when it is sourcing 4.3 V / 1.5 kΩ = 2.9 mA. Most digital outputs will be fine with that, but not if this is coming from a board with series resistors on the output for protection, for example.

\$\endgroup\$
  • \$\begingroup\$ Thanks Olin. I made sure to wire up C2328 transistor as described in the schematics. I did notice the pinouts are different. I think I am using 1kΩ resistor. I pulled this transistor out of screen power supply board- it was free :) But I was scared that because of its amplification properties it might be doing something unintended in this circuit. It must be something with my program then :( Possibly COM port closing down or not responding in a timely fashion. \$\endgroup\$ – Piotr Kula Aug 30 '13 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.