August 24, 2011 by Ralphxyz This is for my Water Curtain project. So far I have been tripping the transistor directly from the mcu now I am trying to use a MC74HC595 Shift Register. Here is my working setup: Now I am using the shift register and I have changed the solenoids. The solenoids I am now using apparently pull 100ma when energised. I do not know if this is just the initial pull and then they hold at lesser amperage as some solenoids do. I believe I want to maximize the current pull in order to get the fastest solenoid action. So how would I do this? The transistors I am using are BC337 at least they are what I used for the 24 volt solenoid I started with, and what I have on hand. Now the solenoids are 12 volt, I do not know if that will make a difference. I am planning to use the same wiring as illustrated above, will that work? It works fine for my 24 volt solenoids. Now what about maximizing the current? Should I even worry about that? Noter had advised me to use a 2.2k Ω resister between the Base and mcu to limit the current. The current passed through the transistor is proportional/dependent upon the current being fed to the Base correct? The Shift Register has DC Output Current, per pin (IOUT) +-35ma. Do I need a resister between the Shift Register and Base? How do you figure the size of the resister? If I used the 2.2kΩ resistor what would the solenoid current be? Boy this is fun, hopefully I will not emit any of the magic smoke. Ralph Find the transistor datasheet that shows the saturation current graph and you'll have your answer. That family of transistors, with a collector current of 100mA, needs between 1mA and 10mA of base current. Rule of thumb for regular BJTs is the base-emitter voltage drop is about 0.7V, so the base resistor would drop 4.3V. That gives you a base current of about 2mA, so it should mostly saturate. The datasheet also shows the max base current allowed. Ralph, Because you are using the BJT as a simple DC switch and not really as an AC signal amplifer, you do not need to know anything about characteristic curves (in or out), load-line, base-biasing, etc. All you care about is that you find a transistor that will help you deliver the proper collector current, at the desired voltage, WITHOUT exceeding the transistor's power-dissipation factor. Since Ec (Collector Voltage) is to be 12 volts, and your solenoid (you said) pulls 100mA (Ic = Collector Current), that exceeds what the transistor can handle (by about twice): ``````P = .100 * 12 P = 1.2W `````` So, my question becomes, how do you know it's sinking 100mA, and at what voltage? Does the transistor get warm? What is the lowest voltage and current necessary to fire the solenoid- did the vendor provide you with any other info? What load does the solenoid present (as that will affect the transistor as well)? BM Well this works, I might play with it further but not sure if I can improve it. I am trying to maximize the speed of the solenoid. On my other solenoids the speed is really improved by using fly-back diodes (IN914) so I added diodes to the new solenoids, I did not test them just did it. The solenoids pull at max 94.8ma, the BASE current to the BC337 transistor is 3.ma at max. Both currents vary widely these are the max values seen. For the BASE current I have the Shift Register (74HC595) output going to a Yellow LED with a 390Ω resistor in series to BASE of the BC377 transistor. The transistor is "ON" for 5 - 25 mili seconds possible 50 times a second. As of the moment neither a solenoid or transistor has failed but I have not run them all day long. They do not heat up. I still have not built any comprehension of the BC377 transistor data sheet so I am still in the "by guess and by golly" mode of operation. I guess this is progress, as it works. Ralph Ralphxyz- How much voltage is dropping across your solenoid- Can you trap (using trigger and hold) the waveform on your scope when you energize the solenoid? Thank you BM I hadn't used my scope. I really should, just to learn how to use it for things like trigger and hold. Of course I just need to learn how to use a scope in general. Ralph Ralphxyz, Okay, I was finally able to sit down and evalute the BC337 (I sat down and did the math for all the stuff to calculate dissipation, saturation, linearity, cutoff, etc. What you're doing is fine, and should pose no problem. I was off by a decimal point mentally in my back-of-the-hand thinking regarding being about twice the dissipation. Please disregard. BM "By golly it works" it appears my guess was correct. I really wish I knew what I was doing, but I am learning so much thanks to all of the help. Ralph Ralph, I thought I'd provided this, but hadn't. Your Power Dissipation with the BC337 for what you've described is 66.4mW. Just slightly over a 10th of the capability of the transistor. BM