Transistor to drive solenoid & trigger voltage

I'm working on a project where I want to control motors and solenoids from the parallel port on a computer. I plan to take the TTL from the port to a darlington array IC (ULN2003), then take the output from the IC to transistors which will switch the loads on and off, with diodes to catch the back EMF. I plan to use some kind of transistor in a TO-220 case. The motors and solenoids will need between 22 and 28 volts DC, at an amp or so of current. What kind of transistor would be best to use to switch these, and what voltage should I drive them with from the darlington array?

Reply to
Eric Belshaw
Loading thread data ...

You have a wide array of choices, all of them reasonably good.

Why do you feel you need the Darlington array?

What OS are you using? You _are_ aware that both Windows and Linux put pretty hefty barriers between you and the parallel port -- easy bit-banging out of parallel ports pretty much went out with DOS.

If you use 74HCT (or 74ACT) logic at the printer port end then you could drive a logic-level FET gate directly, as long as you don't ask for too much speed.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

I'd use MOSFETs here, with Rdson values in the tens of milliohms. That way nothing gets hot unless you switch them at a frantic pace. 10-12V would be nice to switch them with.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

I don't know about Windows, but in Linux it's not that hard to access the parallel port from a user application.

Here's some documentation:

formatting link

Reply to
Arlet Ottens

On a sunny day (Tue, 07 Dec 2010 14:52:12 -0800) it happened Tim Wescott wrote in :

Linux does not really put any barriers. If you want to bit bang the par port, and I do it all the time, just rmmod the par port related modules that load by default, and write to it If you go to my FPGA page,

formatting link
you can download
formatting link
IIRC I describe which modules to kill. That is safe as these days no par port printers and stuff like that are likely to be in use. The thing to keep in mind is always the task switch delay though.. So forget about very accurate fast timing in a multi tasking system via the par port, in that case use a PIC via RS232 or USB and do the timing locally in the embedded part.

For the above reasons I recommend using i2c via the par port. The i2c protocol is not sensitive to occasional delays, and can address multiple chips remotely. You can drive a PCF8574 IO expander to give you 8 in and / or outputs, or a PCF8591 ADC / DAC from 3 par port data pins, like I do here for example with a very complex teletext chip:

formatting link

Of course a PIC on RS232 is much simpler and more versatile, but requires programming.

Reply to
Jan Panteltje

Cool. The nice thing about being a pessimist is that you're always happy to be wrong!

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

My project is to drive an impact dot matrix print mechanism from a computer. I'm going to be doing this in assembly language under DOS. For the solenoids in the print head, the transistors have to be able to switch very, very fast. I had read that larger transistors may require a significant current to the base to switch them (i.e. bring them into saturation), due to them typically having a lower hFE value. Since TTL signals on the parallel port are very low current, I think I would need to amplify that first with a darlington array, then channel the signals into the large transistors. Also, I don't want to connect anything to the port that will demand any significant current to avoid risk of damaging my computer.

Reply to
Eric Belshaw

Use FETs. You won't be happy with regular BJTs here. Also, check whether a 12V supply engages the solenoids fast enough. Releasing them rapidly might require a zener-style flyback. It all depends on your solenoids and the speed you need.

That's a good thing. Else a channel-to-gate breakdown could cause your LPT port to let off a puff of smelly smoke.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

put

ld

o

I'm wondering why you dont just generate a graphic image from your pixels and send that to the printer. Dot matrix printer drivers are still in use on OSes today.

NT

Reply to
Tabby

If Eric needs one amp (!) for each solenoid that sounds more like a monstrous medieval chisel-driving printer that can engrave granite :-)

You know, the ones that are close relatives to hammer drills ...

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

"Very very fast" is not an engineering term. Even when you repeat the "very". It can become sort of an engineering term when used as a comparison (if you need fast, then 'very fast' is safer than 'fast', and 'very very fast' means you really don't have to worry*)

To a continent, a snail is "very very fast". To a snail, a human is "very very fast". To a human, a Piper Cub is "very very fast". To a Piper Cub, a Concord (remember those?) is "very very fast". To a Concord -- etc.

If you're driving solenoids, then regular old transistors will probably be quite sufficiently "very very fast" compared to the electrical and mechanical time constants involved.

What Joerg said about FETs. If you're paranoid about back-feeding nasty electrical signals to your printer port then consider opto-isolation. Opto-isolators are very very slow compared to a good fast transistor, but are still fast, or perhaps even very fast, compared to your solenoids.

  • And every experienced engineer knows that not worrying is usually what leads to disaster. So if you know you don't have to worry -- worry.
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Then there's half-fast ;-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I used to think I was fast. Then I realized I was just half-fast.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Objection, your honor. According to a National Semiconductor databook I have here the term "damn fast" _is_ an engineering term. Well, until someone complained that the language wasn't appropriate and it was removed. They used it in the datasheet for the LH0063 buffers.

Then there is the auto mechanic terminology of "Shazam, that was faiaist, wodn'it?" (Guber, at his gas station in Mayberry)

But you'd have to pump tens of milliamps into the bases. Those big old NPNs don't have a whole lot of beta.

A guest from Malta read a poem at our wedding party. She titled it "Me no worry". I only remember the end:

And if he die me no cry me just marry another guy!

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

I think like an 18-year-old. Then I fall asleep :-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

True. But then, I was talking speed, not the (undeniable) difficulty of driving old low-HFE transistors. There's some newer bipolar transistors with much better beta and saturation voltages -- but I don't know if there are any "TO-220 sized" ones, and if there were I don't know if they'd be available in through-hole.

An older Darlington may work there, if you pay attention to polarity when you drive it. It depends on what you're designing for.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

The NXP PBSS4350S comes to mind. It comes in TO-92 package.

It has VCEsat = 170mV @ Ic=1A, and beta of >200 at the same current. If the solenoids are 1A, they'd be dissipating 170mW, which seems reasonable.

If surface mount is not a problem, there is some more choice in the same family, for example the PBSS4540Z, which comes in SOT-223 (easy to solder by hand), with VCEsat = 120mV @ 1A, and beta > 300, and better power dissipation through package.

Reply to
Arlet Ottens

It can be done but that will become quite toasty. With FETs you can pick some that are cheap and will barely get warm. On a client project we control a motor that draws over 5A in PWM fashion with a SO8 package FET and nothing gets warm.

Either way, the ULN2003 isn't so cool. With FETs it may be ok but that depends on speed. With BJT you constantly burn lots of power in the pull-up resistors. Better to use a real driver.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Thanks to everyone for their valuable input. I think I'll try a FET, probably a power MOSFET, since they're fast, have high impedance at the gate, and are voltage controlled rather than current controlled as in BJTs. I may consider opto-isolators, but I think they may not be necessary when using the darlington array chip. Since timing is critical, I want to minimize propogation delay through the numerous signal stages. Sorry that I did not have the proper engineering term for the speed, but I only know at this point the solenoids will be energized and de-energized every 2ms. I don't know how long the pulse will be to the solenoid yet, but it will be much shorter, on the order of microseconds.

Reply to
Eric Belshaw

Microseconds? Over the LPT port? Wow! Ok, then the ULN drivers are too slow plus you can't possibly swing the 500pF of gate capacitance unless using

Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.