Shop OBEX P1 Docs P2 Docs Learn Events
Grounding 3.3v & 24v? — Parallax Forums

Grounding 3.3v & 24v?

Kirk FraserKirk Fraser Posts: 364
edited 2011-05-24 13:03 in Propeller 1
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.
«1

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-21 22:07
    Hi Kirk,

    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
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-05-21 23:02
    Since you have found that the BS gets destroyed, I might be easier to isolate your circuit with and optoisolator.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-21 23:54
    I agree that an optoisolator is worth looking at. Have two circuits - the low current low power propeller/ stamp side, and the high power, large flyback voltages. Use two separate supplies.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-22 05:51
    Of course, there's always golf, carpentry, stamp collecting.
  • kwinnkwinn Posts: 8,697
    edited 2011-05-22 08:10
    I agree with Cluso99 and Dr_Acula regarding use of an optoisolator. It may also help to provide more drive voltage to the IRL530 gate. In looking at the data sheet it appears that it needs about 10V to fully turn on.
  • kwinnkwinn Posts: 8,697
    edited 2011-05-22 08:15
    PJ Allen wrote: »
    Of course, there's always golf, carpentry, stamp collecting.

    Perhaps you could follow your own advice instead of annoying the adults on this forum.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-22 08:28
    I agree that, as long as switching speed is not an issue (e.g. as it would be with a fast PWM), an optoisolator is a good idea. That said, however, let's address the original question: the case without an intervening opto. Both supplies must share the same ground. But a lot depends upon where the two grounds are connected, not just whether they're joined or not. This schematic shows the proper way to do it:

    attachment.php?attachmentid=64181&d=1254549366

    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
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-22 09:41
    You know, I just don't see how adding layers of complication helps (at all.)
    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?
  • potatoheadpotatohead Posts: 10,261
    edited 2011-05-22 13:56
    So what is the end game on that? Seriously.

    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. :)
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-22 14:34
    PotatoHead,

    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.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-05-22 14:39
    PM sent ........

    User set to ignore.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-05-22 14:52
    Isn't this where moderation kicks in?
  • LeonLeon Posts: 7,620
    edited 2011-05-22 14:59
    PJ Allen wrote: »
    PotatoHead,

    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.

    Don't you mean "impugn"?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-22 15:05
    Leon,
    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?
  • Kirk FraserKirk Fraser Posts: 364
    edited 2011-05-22 15:32
    Based on other threads, all the personal non-technical stuff will get deleted sooner or later, thank God. Until then thanks very much to Phil for his excellent detailed advice and thanks to others who posted about opto-isolators but unfortunately with no drawing or part numbers.

    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.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-22 16:01
    I just knew we'd get around to "faith".
    That's two out of three.
    Well, here's for the Trifecta -- "Good Luck!"
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-22 17:06
    Kirk,

    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
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2011-05-22 18:38
    This works pretty nicely with IRF3708 MOSFETs.
    See:
    2 Blue LED opto coupler

    Duane
  • Kirk FraserKirk Fraser Posts: 364
    edited 2011-05-22 19:02
    I'd like to get 12 bits or 4096 positions of accuracy out but I worked so long on trying to get 12 bits to work on a Stamp with SerOut to a D/A and OpAmp that I'm resigned to using PWM since it does work with the IRL530, coil, and diode. I just ordered the IRF3708's and a batch of LED's. The Digi-key LED indexes showed blue but on the actual order tables I only saw red.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-22 19:49
    Kirk,

    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
  • madrfskillsmadrfskills Posts: 24
    edited 2011-05-22 21:12
    Sir,

    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
  • Kirk FraserKirk Fraser Posts: 364
    edited 2011-05-23 00:10
    Phil,

    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
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-23 06:56
    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-05-23 08:11
    Cluso99 wrote: »
    Since you have found that the BS gets destroyed, I might be easier to isolate your circuit with and optoisolator.

    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.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-23 08:54
    Kirk,

    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:

    attachment.php?attachmentid=81436&d=1306165888

    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
    426 x 333 - 3K
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-23 09:56
    Hi 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
    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.

    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
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-23 10:06
    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
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-23 11:02
    Hi Phil,
    thank you very mch for explaining this. best regards

    Stefan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2011-05-23 14:26
    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.
    -Phil

    Now, how did I not notice the 20kHz specification...? :innocent:
  • kwinnkwinn Posts: 8,697
    edited 2011-05-23 14:42
    Phil,

    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

    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?
Sign In or Register to comment.