Connect with us

does this seem right?

Discussion in 'General Electronics Discussion' started by gingerneering 101, Sep 21, 2014.

Scroll to continue with content
  1. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    I am New to circuit building and this circuit doesn't make sense to me. I want another opinion because the 12v supply is a car battery powering a wiper motor. I've already tested stall amperage at 13amp. What I don't understand is the pull up resistors on the 339 output. I am using one 339 and two hbriges so these are the parts I ordered. 4 irf 9540 p channel 23 amp MOSFET, 4 irf640 n Channel MOSFET 18 amp, 1 lm339 comparator, 1 10k ohm .5 watt pot, 1 14 pin ic socket, 1 100ct 3k ohm .5 watt resistors.[​IMG]
     
  2. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    The pullup resistors are needed because the LM339 has open-collector outputs that pull low but don't pull high.

    I wouldn't use that design - not at 12V, anyway. As the LM339 outputs are transitioning from 0V to 12V or from 12V to 0V, there will be a point where both MOSFETs are ON simultaneously. For example when the LM339 output is at 6V, each MOSFET will see 6V of gate-source voltage, and will conduct. This will at least cause a burst of "shoot-through" or cross-conduction current, and that current may be high enough to blow the crap out of the MOSFETs; an automotive supply can provide hundreds of amps!

    You would be better to use an H-bridge MOSFET driver IC. These usually drive all N-channel MOSFETs, which have better performance than P-channel MOSFETs. Unfortunately, all the ones I can find at the moment use a bootstrapping method to generate the positive voltage for the high-side MOSFET and this only works if the MOSFETs are being switched continuously, not for steady-state drive.

    You can add an external circuit to generate the high-side driver supply voltage. I can draw up a circuit or find one on the web. For initial testing, you can just use a 9V battery. Have a look at the data sheet for something like the HIP4082 (see http://www.digikey.com/product-detail/en/HIP4082IPZ/HIP4082IPZ-ND/821447) and have a think about it.
     
  3. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    The h bridge is for a beefy sentry gun project. Its open source software driving servos through an arduino. If I change the code so it delays the direction change would that prevent the shoot through if so what kind of delay would I need. I think I can go to 1/1000sec in timing. I'm on a tight budget and telling my wife I need more parts on an "unnecessary" project wouldn't be fun. Thank you for your fast reply as the creator of the diagram is rather arrogant and not the least helpful. He did have a video of this running but he does come to stop before reversing direction.
     
  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    No, delaying the change in direction won't prevent the shoot-through. It occurs because the gates of the MOSFETs are connected together. It's the same problem you get in CMOS gates. See https://en.wikipedia.org/wiki/CMOS#Dynamic_Dissipation in the sub-section titled "Short circuit power dissipation".

    What do you mean by "sentry gun"?

    Did you look into the HIP4082 data sheet?
     
  5. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Two things...
    Would using identical MOSFETs be a solution if he tied the top left and bottom right together for example... Surely this would allow for a delay to allow those gates to turn off completely before switching direction.

    And the sentry gun may be the control mechanism for automatically aiming something like a paintball marker or nerf gun. I've seen a number of these projects lately using OpenCV for image recognition to aim and shoot at non-friendlies, or for motion tracking.
     
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    No, because if you use N-channel MOSFETs in the high-side position, you need a voltage higher than the supply rail to bias them ON, but the bias voltage for the low-side MOSFETs is just relative to 0V. Using four N-channel MOSFETs is a good idea, and I suggested it earlier, but you need two high-side drivers and two low-side drivers.
    Could be. I hope he will tell us.
     
  7. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    He had it right on. Its open source image recognition and targeting. I needed bigger servos but when you cross a size price goes up dramatically. My setup is a ball shaped turret that opens and pushes forward ten custom airsoft guns in two vertical stacks. The wiper motors are the price and power I need to pan and tilt, while having speed and mechanical advantage to stop on a dime.
     
  8. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    Would you mind drawing a circuit that would work with parts listed or just one that would work.
     
  9. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    You can find schematics in the data sheets. You just need to know where to look. I've listed some devices that look suitable further down in this post. But I want you to understand what you need, so you can be sure these devices will do what you want.

    You have a requirement to be able to drive the motor in either direction for an arbitrarily long time - seconds, at least. This seems pretty obvious, but there are many drivers that can't do this. The reason is in how the positive bias voltage for the high-side MOSFETs is generated.

    If you use two P-channel MOSFETs and two N-channel MOSFETs, like the design you posted in post #1, this is not an issue, because both MOSFETs can be driven by signals that range from 0V to 12V, which can be generated easily.

    But if you want the best performance from your MOSFETs (i.e. high current capability, and low loss voltage and therefore minimal heatsinking requirement), it's best to use all N-channel MOSFETs, because they're just better than P-channel MOSFETs. But that requires an extra supply voltage, called the boost or bootstrap voltage, about 10V higher than the positive supply voltage, to provide the voltage needed for the gates on the high-side MOSFETs (the top two).

    This voltage has to be generated somehow if you're going to use N-channel MOSFETs.

    A common way to generate it is using "bootstrap capacitors" that are connected to the outputs of the H-bridge. They store a charge, and provide power for the high-side MOSFET driving circuitry. But they disharge after a short time. So both sides of the H-bridge need to be changing state fairly quickly. In many designs this already happens, because PWM (pulse width modulation) is used to give exact control of the motor speed. PWM drives the moto with a voltage that alternates between 0V and full voltage, usually at least 100 times per second, with a duty cycle that determines how fast the motor will run.

    If you want a simple forwards/backwards control without PWM, you can't use these drivers that rely on bootstrap capacitors connected to the H-bridge outputs. In this case, you're forced to use a PMOS/NMOS H-bridge, unless the boost/bootstrap voltage is generated independently. There are a couple of devices listed below that actually do this. So they have the advantages of an all-NMOS H-bridge without needing PWM.


    You actually have quite a few choices.

    The Microchip TC4469 (http://www.digikey.com/product-detail/en/TC4469CPD/TC4469CPD-ND/115363 USD 3) will drive your existing two P-channel and two N-channel MOSFETs. It includes logic to prevent cross-conduction (shoot-through). The data sheet includes a schematic that shows how they should be connected.

    The rest of these devices have built-in MOSFETs. This makes them a bit more expensive, but they're compact and easy-to-use.

    The Allegro A4950 (http://www.digikey.com/product-detail/en/A4950KLJTR-T/620-1470-1-ND/3305807 USD 4) is a complete full H-bridge in a little SO-8 (SMT) package with a heat transfer pad. It includes a continuous boost/bootstrap generator and an all-NMOS full bridge. It's rated for 40V and 3.5A.

    The Allegro UDN2998 (no longer available from Digi-Key)is an older design with two complete H-bridges, rated for 50V and 3A (not sure if that's 3A per H-bridge or 3A total). It uses transistors not MOSFETs so there is significant voltage drop. It's a 12-pin SIL package with heatsinking tab.

    The Infineon BTS7960 is also not stocked by Digi-Key or Mouser, which is a shame because it's a very impressive half-bridge driver with built-in MOSFETs, designed for automotive applications. You would need two of them.

    The Infineon TLE5205 (http://www.digikey.com/product-detail/en/TLE5205-2G/TLE5205-2GINCT-ND/1557940, SMT only, USD 8) and TLE5206 (http://www.digikey.com/product-detail/en/TLE5206-2S/TLE5206-2S-ND/128308, THT, USD 7) are full H-bridge ICs that are rated for 5A continuous. The difference seems to be in how they handle the four possible combinations of input signals.

    The On Semiconductor STK681-320 (http://www.digikey.com/product-detail/en/STK681-320/STK681-320OSCT-ND/3598311 USD 11) is rated for 5.2A.

    STMicroelectronics make a range of devices with integrated MOSFETs but some of them aren't designed for continuous output (they use a bootstrap capacitor which requires that the outputs toggle regularly). You can investigate them if you want to. Start with the L6201~6208.

    Texas Instruments make several motor driver ICs as well. Check out DRV8840 and DRV8842; they have built-in charge pumps that are permanently active.


    If you just want a suggestion, I suggest you start with the Infineon TLE5206 (http://www.digikey.com/product-detail/en/TLE5206-2S/TLE5206-2S-ND/128308, THT, USD 7) which is rated for 5A continuous. Study the data sheet carefully to make sure it will do what you want.
     
  10. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    I greatly appreciate your help. I went to the library to find books on circuitry so I can better understand the advice. The products you listed are only rated for around 5amp and my motors run around that continuously so they won't really work. If all else fails I can try rewriting the software to control MOSFETs independently and use a pot for position. I just wanted to take the easy route of hacking a servo before writing more code. Just noticed you're from new Zealand and I love your laws regarding suppressors. I'm still waiting for my paperwork here in the US.
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Have a look at the Microchip TC4469 (http://www.digikey.com/product-detail/en/TC4469CPD/TC4469CPD-ND/115363 USD 3). As I said in post #9, it will drive your existing two P-channel and two N-channel MOSFETs. It includes logic to prevent cross-conduction (shoot-through). The data sheet includes a schematic that shows how they should be connected.

    I didn't think NZ had any laws regarding suppressors. Suppressors of what?!
     
  12. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    Firearm suppressor like for a 22. Your country doesn't have laws against them because it cuts down noise pollution. Here its up to a nine month wait and a $200 tax. Unrelated to this forum I know but I always thought that was kinda cool of new Zealand.
     
  13. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Ah, yes. It's part of the NZ Government's policy to encourage immigration of gangsters and hitmen. They would be happy to know that their efforts are appreciated. :-/
     
  14. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    If you ever had to live near a police training facility with an outdoor firing range, you would appreciate it ;)
    There are always two sides of a coin though
     
  15. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Police and army have reasons to be using firearms. Civilians, not so much.
     
  16. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    That's a movie myth very rarely are they used for crime. Its more of noise pollution to animals and people. They are far from silent. I will read more of the parts you recommend after work.
     
  17. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    upload_2014-9-23_18-37-51.jpeg If this is the diagram you mentioned I don't understand how I could use the motor outputs of my servo to drive this.
     
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Well, since you haven't given us any information on the servo controller you want to use, I can't be very specific! But as you can see, that control chip has two inputs: direction and PWM. The PWM input is the ON/OFF control. So if your servo controller provides an ON/OFF signal and a direction control signal, you can connect them directly together. If it provides some other combination of signals, such as a forwards enable and a reverse enable, for example, some logic will be required to convert that signal to direction and enable.
     
  19. gingerneering 101

    gingerneering 101

    15
    0
    Sep 21, 2014
    The servo is an digital mg995. Terrible servo my wife ordered trying to help so oh well I'm using it. It has only the motor leads that when stationary sit a 2.5v. That's why the guy who made the first circuit said to use the lm339 so it outputs only 0 or 5v.
     
  20. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    According to the page at http://www.servodatabase.com/servo/towerpro/mg995 that has a motor built in. And I guess the connections to it would be power and control inputs. Not outputs that you can use to control an external H-bridge. What am I missing?
    I don't know what you mean.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-