Grounding 3.3v & 24v?
Kirk Fraser
Posts: 364
I want to use a Prop to drive an IRL530 with a 24v coil attached. I've learned, burning out 2 BS2's, that both the low voltage 5v and higher 24v must have the same ground or the IRL530 signal will be erratic but there is greater risk a short will blow out the chip apparently feeding current in from the grounded I/O pins. Moving up to a Prop, there's 3.3v and 24v at the ground. Should I use a resistor between grounds to enable the IRL530 to both know its input signal and its output signal ground on the same pin, yet reduce risk of blowing the Prop? What value of resistor? Thanks.
Comments
If the 3.3V GND and the 24V GND are connected together this is OK. Whenever you would make contakt from +24V to the now common ground of 3.3V and 24V a big shortcut-current would flow through the wire coming from the +24V.
But the whole voltage of 24V drops down to 0.0000 V across this wire. The GND will stay at 0.0000 V.
It is exactly opposite if you insert a resistor between the 3.3V GND and the 24V GND.
If you connect +24V through a wire (or whatever is conductant) to the 24V-GND and there is a resistor towards the 3.3V-GND then the voltage drops NOT down to 0.000 V. There will remain a voltage-drop across this resistor causing problems.
In normal use with a resistor between the two GNDs the GNDs do NOT have the same potential and this can cause problems too.
If you don't believe me about that take a 12V halogen-lamp and a 6V car lamp (to have two different voltages) and measure voltage-drops across the wires.
By the way does your circuitry include a flyback-diode to protect the IRL530 against high voltage-spikes coming from the coil if the coil is switched off`?
As you already burned two BS2 I recommend learning more about electronics. A good online-source is lessons in electric circuits.
http://openbookproject.net//electricCircuits/DC/DC_2.html
best regards
Stefan
Perhaps you could follow your own advice instead of annoying the adults on this forum.
Here, the two grounds are connected at one point only: the source of the MOSFET. This prevents excess ground current from running through the logic side of the circuitry and possibly causing erratic behavior or even damage.
Also, for direct driving by a Prop output, the IRF3708 is a better choice than the IRL530, since it's characterized at lower gate voltages.
-Phil
If the student cannot get on with arithmetic then there's no sense in moving on to algebra.
If the apprentice cannot manage a coping saw then he cannot move him on to the band saw.
If a simple switching transistor (or FET) with a Stamp cannot be managed or understood then how can an attempt at the same only with a Propeller have a different outcome?
Luck, Faith, and Optoisolators?
The answer given above was productive and informative without being devaluing anybody. There isn't any solid reason TO devalue anybody. Please enlighten me, if I happened to have missed a day in school somewhere on that.
Another answer reinforced that a bit, expanding on things, also suggesting a starting point to help with the problem on a basic level.
None of that was presented in a way that devalues anybody, nor in a way that closes doors, or introduces barriers. And, if we expand the scope of value loss incurred by your post, the conversation in progress is actually quite informative to newbies, lurkers, and people just getting started, who may not be building that right now, but who can pick up on the potential danger and at the least, know to ask. I am one of those people, and I find those conversations over time extremely valuable, except when they get derailed... That is expensive humor. The dynamic I just outlined is exactly why online forums have the value they do. Being able to tap into a group for some direction isn't something to be taken lightly. You might need such a group one day, and don't you wonder how you would be received, after this kind of thing? I would.
Look at the post Phil did, essentially translating one of the ones above, detailing WHY things happen, with perfect consideration given to the person trying to get something done, and have some fun doing it, at the least feeling GOOD about it. That's quality, and very high value.
Your comment, on the other hand, diminishes the forum, you personally, and puts up a barrier for the OP, in that now they have to worry about unfavorable judgement, and where it might come from next, while the rest of us are frustrated over ONE rather selfish person seeking entertainment at our collective expense.
Do you feel good about that? I sure wouldn't. If it were me with that gaffe on my record, I would edit it.
To the OP: (Kirk, original poster) No worries. This does not happen often. There is a good, sharp, passionate crowd here you can learn a lot from. Please carry on. I will not contribute further to the mess on the thread. Cheers, PH.
A few made vague suggestions about optoisolators. But connections to optoisolators have to be done right, too.
Phil's laid it out there, as have I, as a thousand other examples like it around here, and for the umpteenth time.
I'm sure that the OP has more self-esteem than you credit him.
If the OP doesn't like the cut of my jib then why not leave that to him?
They kept telling me to keep my head down ("keep your head down!") or I'd slice and that "maybe golf ain't your game." If I'd had a conceit then I would have got indignant and run crying to my car. Why should this be any different? I didn't call the OP names or impute his character.
User set to ignore.
Don't you mean "impugn"?
Did I misuse impute? Go ahead, I can take it.
Maybe you should've PM'd me? Or at least put in a good word for optoisolators?
If I could make a donation button appear which would give half my donation to the forum host (Parallax) and half to the author of the best post on the thread, I'd chose Phil. Such a system may tend to encourage great posts and discourage those from the darkside whose outer darkness displays his inner darkness. Perhaps church attendance would help instill some light.
That's two out of three.
Well, here's for the Trifecta -- "Good Luck!"
If you think you want to go the opto route, there are photovoltaic optoisolators designed for driving MOSFETs, like this one from Panasonic. I picked this particular unit as an example, because it has an internal shunt for sinking charge from the MOSFET gate quickly when it turns off, obviating any need for a gate pull-down resistor.
But, again, if you're planning on PWMing the gate, an opto would be a poor choice without some additional circuitry.
-Phil
See:
2 Blue LED opto coupler
Duane
Now you're talking about PWMing with 12-bit accuracy. This is entirely new information that wasn't included in your original post and has a tremendous bearing on the circuitry chosen. What exactly are you driving with the MOSFET? What is your PWM frequency?
-Phil
I have another concern with your circuit. If you check the IRL530 data sheet you will see that the claimed Vth is 2.0V, implying that the propeller can drive the FET. However, the FET will NOT be fully saturated. If you look at figure 2 on the International Rectifier data sheet (http://www.irf.com/product-info/datasheets/data/irl530nspbf.pdf), you will see that you can only reliably achieve an IDS of 5A or so at 3V Vgs. What happens is that the Rgs is higher than you'd expect and power dissipation increases markedly - perhaps resulting in a smoking FET if your heat sink is not primo.
If you want to switch a big FET fast using the prop, please consider using a buffer IC. If this is not to your liking, consider a totem pole driver. I've included a couple of screen captures of an idea - but let me explain what's going on. On my bench right now I am driving a APTM20DAM04G MOSFET module to 200A at 96V using a propeller. In the circuit model, the components L1, CGD, CGS, and CDS all represent parasitics of the MOSFET module. Q1 and D1 are a "speedup" circuit and may be omitted. The heavy lifting of getting current into and out of the FET gate really fast is done by Q2 and Q3. Q4 is used as a buffer, since the Q2/Q3 totem pole is unity gain, you need to "step up" the 3.3V out of the prop to 15V or so to saturate the power FET. R4 limits the current out of the prop pin, and the 3.3V zener is present to make sure the prop has a slight chance of survival if the driver network turns into a smoking ruin.
By the way, I learned a very important lesson about optoisolators last month - when you get them above 75-80DegC the leakage through the output transistor may be high enough for your load to turn on, irrespective of the LED state. If you go the opto route, make SURE that you design across all your temperature and part corners!
Lastly -- I've included a spreadsheet which helps you translate the C_ISS, C_OSS, and C_RSS parameters from a MOSFET data sheet to CGS, CGD, CDS parasitics and permits you to bound your gate drive losses and estimate the amount of current you need to *efficiently* switch a power FET.
Good luck!
Mike Young
I'm driving two 1A coils on a hydraulic valve to get proportional servo-control for my robot. I don't know anything about a PWM frequency - the feedback loop for position and any other sensors must cycle at least 200Hz. I'm just at the stage of having my first Prop recognized by the computer. I asked the first question based on my experiences with BS2's so I hopefully will avoid burning out a Prop. If there is a better solution please tell me. I tried the bitShift to a D/A with OpAmp to a IRL530 and couldn't get it to work many times. I don't yet know how to do either PWM or bitShift on a Prop but hope the download for BS2 functions will help. Thanks.
Mike,
The smoking FET is rare, with my 1A coils I don't need 5A or 30A but will use IRF3708 to get gate matching 3.3v as Phil suggested. I also have adequate heat sinks if they become needed. I'll look over you attachments more carefully tomorrow. Thanks.
Kirk
When switching a MOSFET for proportional control, be sure to use real PWM at around 20 KHz or so, not the DUTY-mode output provided by the Props' counters or BASIC Stamp style "PWM" (which is also DUTY-mode output). The reason is that the MOSFET won't switch fast enough with DUTY-mode input and will spend to much time in its linear region, possibly overheating. The OBEX has several true PWM objects to choose from.
-Phil
I agree with Cluso...many Industrial interfaces (which run from 24V) are optically isolated from their control signals. With optical isolation the 3.3V and 24V grounds do not need to be tied together.
If you do decide to go the optoisolator route, be sure to use a circuit that can keep up with the PWM switching speed. I'm not optimistic about this approach, though, given your design constraints. If you are trying to achieve 12-bit precision with, say, a 20 KHz PWM, the MOSFET needs to switch in less than 12 ns. This just isn't possible with an optoisolator (and, actually, is unrealistic with a direct connection to the MOSFET). If you can live with less precision, an opto might be feasible, but you will have to add some additional circuitry. With a plain phototransistor-style opto, a grounded-base transistor amplifier is essential:
This keeps VCE of the opto output constant, reducing the Miller effect, which slows things down if VCE is allowed to vary. But even this topology will switch too slowly for PWM. Even with 8-bit precision, it has to switch in 200 ns or less. Finding an optoisolator that can switch that fast will be a challenge. I've yet to see one, but that deosn't mean they don't exist.
-Phil
thank you very much for your clarification about grounding. It showed me that I have a gap in my knowledge about grounding.
You talked about
For a current to flow - in my level of understanding - there must be a voltage-difference. Where does the voltage difference come from?. Is the low resistance of a quite big wire high enough to
create a relevant amount of voltagedrop? Or does it come from other effects. I appreciate it very much if you could go more into detail about this
or posting a link where I can read about myself.
best regards
Stefan
Board traces will show a voltage drop with current going through them. For example, 5A running through a 0.2-ohm trace will drop a full volt. This may not be much for the power side of the circuit, but if that current runs through the logic ground, that ground could be "lifted" by a volt. Perhaps even more important is trace inductance. When the high power load switches on and off, it causes a voltage spike which, due to trace inductance, may not cause current to flow immediately. This causes a much greater ground shift than would be caused by ohmic effects alone.
-Phil
thank you very mch for explaining this. best regards
Stefan
Now, how did I not notice the 20kHz specification...?
Kirk, I am not clear on what type of hydraulic valve you are trying to control. Is this a standard solenoid valve, a proportional valve, or a servo hydraulic valve?