PDA

View Full Version : I/O Circuit - Overkill?



txmarsh
05-28-2010, 08:18 AM
This is my first attempt at using a micro-controller (i.e., the propeller) to control a solenoid.
Out of an abundance of caution I decided to implement an opto-isoltor.· The circuit is attached.
Does this look like overkill to those of you who are experienced with controlling real world devices?
The solenoid has 28.8 volts DC applied and pulls 5.2 Amps.·

I appreciate any thoughts.· I want a robust output design (that I will copy about 30 times for all the sols) but don't want to over complicate things.

Thanks!

Tim

Phil Pilgrim (PhiPi)
05-28-2010, 09:06 AM
R2 and R3 are unnecessary.

-Phil

ElectricAye
05-28-2010, 09:40 AM
Are you using an opto-isolator for safety reasons or just because? If safety is not an issue, then I think you could directly drive a MOSFET with the Prop. I'm thinking an IRF3708 might work, unless, of course, you've got other reasons for the isolator. I've used IRF3708's to run stepper motor coils and heater coils and so far I've never had a problem. The only thing that seems weird to me is that their metal heat sink tab is electrically "hot" (instead of grounded).

search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IRF3708PBF-ND (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IRF3708PBF-ND)

Ariba
05-28-2010, 09:51 AM
.. and the value R1 is too high. R1 is not for protection but to set the current thru the LED. With 1k you get only around 1.5 mA.
I would use 220 Ohm or so.

txmarsh
05-28-2010, 10:26 AM
Thanks for all the feedback.

I added the opto-isolator thinking that it would protect the propeller... nothing to·do with·personal safety.

Years ago I worked with Programable-Logic-Controllers (PLCs) in a manufacturing plant and·I noticed that their I/O modules were almost always opto-isolated (at least according to the module documentation)... I guess I just assumed that there was a good reason for it.·

What does everyone think about the idea of driving the FET directly from the propeller output?

Thanks again!

Tim

Phil Pilgrim (PhiPi)
05-28-2010, 12:59 PM
The nice thing about using an optoisolator is that your two grounds are not connected together. This can eliminate a lot of problems that can occur when too much load current flows through the logic supply return (as will happen in poorly wired designs). Optoisolators may add a little to the overall cost, but they do simplify things, especially for those less familiar with the nuances of of controlling non-isolated, high-current loads. Since this is your first attempt at controlling such a load with a micro, I'd stick with the opto.

-Phil

Addendum: BTW, there are photovoltaic optoisolators available that are designed for driving MOSFETs. The Panasonic APV2121S (http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=255-2658-ND) is one such example.

Post Edited (Phil Pilgrim (PhiPi)) : 5/28/2010 6:07:37 AM GMT

Toby Seckshund
05-28-2010, 01:22 PM
@ ElectricAye

The reason that some output devices have their tag non-isolated is so that there is a direct bond to the outside world to get better heat, and therefore power, ratings. Isolated ones are more convieient at the expence of Wattage.

Addition

Is the 1A diode enough to stiffle the back EMF on a 5A coil ????

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point

Post Edited (Toby Seckshund) : 5/28/2010 6:55:08 AM GMT

heater
05-28-2010, 03:31 PM
A while ago I was called in to debug serial communications between two pieces of equipment. Eventually I discover the RS422/488 whatever drivers were blown. I dig out a scope and find one end of this link is floating up and down by 60v with the mains frequency! This despite the two units being in the same cabinet separated by only 1m of cable. Dodgy ground on one end.

Mutter, curse, aren't the hardware guys supposed to take care of this kind of thing?

I think optos are a great idea:)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

Peter Jakacki
05-28-2010, 06:25 PM
Some quick comments:

PLCs are designed to be connected to "who knows what" sometimes, so therefore optos are used as you just can't trust those sparkies you know. If you know what you are connecting to as you do in this case then there is absolutely no problem using an IRF3708 or similar rather than the unnecessarily complicated opto circuit which as has been pointed out is incorrect. Sure you can use an opto but you know exactly what you are connecting to. Also the darlington emitter follower configuration you have chosen for the output will drop at least 1.2V from the 5V supply which is starting to affect the ON resistance of the MOSFET chosen. I wouldn't recommend this configuration.

7805 type regulators are the only TO220 package I know of that had the tab grounded and this is only because the substrate of the regulator is ground. Nothing is weird about the tab being connected to the substrate of the silicon die as this is what it is mounted on. It is probably far more weird that some devices have tabs that are ground.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*

txmarsh
05-28-2010, 07:17 PM
Thanks again everyone.

Phil, thanks for tip about the Panasonic device.

Toby, your right... I should verify the sufficiency of the diode. I basically lifted this part number from my pinball machine which drives very similar voltage & current though sols but there very well may be a better option.

"Heater", I'm not sure I understood everything you said but the "great idea" part is loud and clear... thanks!

Peter, your description about the PLC makes sense. Also, I did notice the approx. 1.2 voltage drop and that did concern me. I still have some trouble reading the data sheets on FET devices so I was hopeing that a logic level FET would be okay at 3.8-4V. Hope is not a good design method... I will go back to the drawing board... I suppose I could just supply 6 ot 7.5 volts instead of 5 since this power supply is only used to drive the FETs.

All: At this point I think I will go with the opto since the small additional cost isn't a problem for this personal project... does anyone think there is a better option than the type of opto I selected?

Many, Many thanks!

tim

heater
05-28-2010, 07:26 PM
However be warned. Optos don't necessarily cure all interference problems.

I have in front of me an industrial PC with an internal 8255 based parallel I/O card driving a whole bunch of external opto-isolated solid state relays. It also accepts inputs from a bunch of opto isolators on an external card.

Despite having no copper connection between that PC and anything else in the world. It can be run from an UPS battery pack with mains unplugged. And despite the optos everywhere and shielded cables from PC to opto cards. The I/O chips in the PC can still be reset by turning on a nearby bench power supply !!

As yet we have not figured out how/why this happens.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

Peter Jakacki
05-28-2010, 08:36 PM
Heater, the interference you are seeing is because it is based on a 8255 of all things. The weak bus-hold outputs on these have to be very well shielded otherwise an EM pulse could flip their outputs but the trouble is more often than not they are used on PC I/O cards via long IDC cables !&^%$(*&!!!

The 8255 was the absolute worst choice that could be made for an I/O chip interfaced via IDC cable and the only reason it was probably used was that it had lots of I/O and everyone else used em so they had to be good, hey??

Tim, KISS - skip the opto, just use the IRF3708 with a pull-down on the gate and run the ground of the MOSFET back to the supply and not the Propeller.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*

Toby Seckshund
05-28-2010, 08:51 PM
Tim, if a pinball machine is ok, for a long time, with a 1A diode then I think that that is a sufficient test. Those solenoids are certainly worked hard and would find any deficiencies preaty fast.

I was just pondering about 5A in, 5A out at the switching point. Perhaps it is within the peak rating of the 1A device (as that is the average rating that is quoted )

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point

bill190
05-28-2010, 09:29 PM
Generally I've seen·"front line" electronic devices fail, but rarely the microprocessors or microcontrollers.

And the "front line" devices being the first components which connect the PCB to the outside world. Power in. Or output to a motor, building wiring, etc.

And when I have seen microcontrollers fail, it was because there was a design flaw. A company might make 40 different models of something with different processors. One particular model will frequently need the processors replaced. All the other models *never* have the processor fail.

heater
05-28-2010, 09:44 PM
Peter Jakacki: Thank you for confirming my suspicions re: the 8255s. I've been campaigning for my company to forget this thirty year old junk for a whole year now. Not until the things started failing in the field did anyone start to listen. In our case we cannot shorten the cables and shielded cables only help a little. The environment they have to live in is, well, hostile.

Now they are all keen on using some new ARM boards and I'm going to get decent opto isolated parallel I/O via serial or USB if I have to build all the cards by hand myself. There will be Propeller(s) in there.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.

txmarsh
05-29-2010, 04:47 AM
Okay Peter... You make a good point about following the KISS philosophy.
Thanks everyone!