Shop OBEX P1 Docs P2 Docs Learn Events
Best way to regulate voltage supply that with hi current draw? — Parallax Forums

Best way to regulate voltage supply that with hi current draw?

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2013-01-15 19:25 in General Discussion
Ok so let me put this in context first. Ive been looking at buying a parallax sting ray bot, the motors are 7.2v. Now the motor control chip I use needs 8v, so thats not a big deal really as far as over volting the motors.

But heres the issue say Im running a 12v battery to prevent the the h bridge from browning out, among other reasons what would be the best way to go about regulating a straight 8v to the h bridge. Id also like to regulate the voltage to make sure the motors always have 8v available to them. Anyways the sting ray motors stall at 4.5 amps, so i would need to set up regulation capable of 15 amps, I did a quick search for LDOs that can handle 15 amps and didnt find any, plus I dont think an LDO is the best way to go in this situation. I personally would rather use a switching regulator, but im not even sure if thats the best way. I know theres systems out there that regulate there voltage down for motors im just not sure exactly what the best approach is.

Comments

  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-01-14 13:53
    Please give us the part numbers or specifications of the motor controller and the motors.
    I suspect you don't want to regulate 15A gown to 8V. Very wasteful of power.

    Duane J
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-01-14 14:08
    You typically do not need to regulate a motor's voltage. The important thing to regulate is current, and this is done by PWMing the H-bridge while monitoring the voltage on a current-sense resistor to set the duty cycle. In this configuration, it's perfectly fine -- and very efficient -- to drive a 7.2V motor with a 12V H-bridge.

    -Phil
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-14 14:27
    Im just using the l6205 hbridge in parallel

    http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00002345.pdf

    with a 22v battery.

    The motors would be what ever is in the parallax stingray kit, i havent been able to find much info besides they are 7.2v nominal.

    @Phil
    I thought about doing it that way but then you would not get the full range of your PWM signal.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-01-14 14:52
    I thought about doing it that way but then you would not get the full range of your PWM signal.
    So what?

    Seriously, it doesn't matter. By selecting a current and using the monitored current as feedback to keep it constant, you will be varying the duty cycle dynamically. In the process, you will have very fine control over the current regulation -- finer than the nominal precision of the PWM itself.

    OTOH, if you don't want to monitor the current, you can still make use of the PWM's full precision simply by leaving an extra gap between pulses.

    -Phil
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-14 16:22
    Wow im really not understanding something. So lets say you have a pwm signal going out at 100% duty cycle you then sense the current is way to HI, so you back down to 75% duty cycle and the current is just right. You can now only use 75% of the pwm signal. So lets say you set pwm 1-255 now you can only use 1-191 if you want to keep the motor with in its current limits.

    Now obviously im missing something here...
  • Mark_TMark_T Posts: 1,981
    edited 2013-01-14 16:44
    I think the point it you don't set the PWM directly at all - you tell the feedback loop what current you want and let it handle the PWM.

    Of course pure torque control like this isn't actually very useful for many purposes, speed control is much more natural (with current/torque
    limiting). PWM roughly controls speed - but for current limiting a current-feedback loop needs to apply when the current is high.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-01-14 16:57
    Wow im really not understanding something. So lets say you have a pwm signal going out at 100% duty cycle you then sense the current is way to HI, so you back down to 75% duty cycle and the current is just right. You can now only use 75% of the pwm signal. So lets say you set pwm 1-255 now you can only use 1-191 if you want to keep the motor with in its current limits.

    Now obviously im missing something here...
    That's pretty close. Although simple PWM control, (no current feedback), actually controls the output average voltage.
    Basically voltage defines the speed and the load defines the current.

    Duane J
  • lardomlardom Posts: 1,659
    edited 2013-01-14 22:38
    I want to learn about current sense resistors. With my last project I used an 8 ohm ceramic resistor to dissipate heat from a 12V lead acid cell.
  • ErlendErlend Posts: 612
    edited 2013-01-14 23:27
    Instead of using a heat dissipating resistor, why not use a solid state current sensor? I got this one for a similar purpose: ACS714 Current Sensor Carrier -5 to +5A. Bought it from http://skpang.co.uk. Also, it is much easier to interface.
  • garyggaryg Posts: 420
    edited 2013-01-15 00:22
    I'm not current with LOTS of current technology terminalogy.
    What exactly is LDO?
    Sorry for my not understanding this, BUT:
    Motor control is not very easy to understand.
    I've built 2 motor controllers
    One of them uses the 2N3055 power transistors from Radio Shack.
    This controller did work for a time, but the drive current needed to drive the 2N3055 transistors was more than the
    1/2 watt base control resistors could handle. The 3 Volt drop occuring at the transistors caused them to run very hot.
    I'm planning on revisiting that failure. It should work even if it's not very efficient.

    The 2nd controller used IRF510 MosFets from Radio shack.
    This should have been very simple parallel connected MosFets (4 of them)
    That project did not work out at all, I don't know why.

    I tried a few other things also that did not work out, but I ended up using a strategy of
    Diode voltage drops to regulate my speed to my 7.2Volt drill motor.

    My Next endever will more than likely use a Parallax HB-25 motor controller, BUT
    It appears that the Max voltage supplied ot the HB-25 is 16 voltsDC.

    I'm needing to connect to 18V DeWalt battery.

    Concerning motor control,
    I would guess that the duty cycle of the PWM would control the Voltage applied to the motor.
    The current drawn by the motor is a result of the motor design.
    SO:
    As long as the Average voltage applied to the motor through the PWM does not exceed the design spec of the motor
    The motor should work, whatever motor you choose.

    Am I incorrect about this?

    Just my two cents worth.
  • kwinnkwinn Posts: 8,697
    edited 2013-01-15 01:18
    garyg wrote: »
    I'm not current with LOTS of current technology terminalogy.
    What exactly is LDO?
    LDO stands for Low Drop Out. That is the smallest voltage between the input and output of a regulator you can have and still have the output voltage regulated.
    Sorry for my not understanding this, BUT:
    Motor control is not very easy to understand.
    I've built 2 motor controllers
    One of them uses the 2N3055 power transistors from Radio Shack.
    This controller did work for a time, but the drive current needed to drive the 2N3055 transistors was more than the
    1/2 watt base control resistors could handle. The 3 Volt drop occuring at the transistors caused them to run very hot.
    I'm planning on revisiting that failure. It should work even if it's not very efficient.

    The 2N3055 is not a good choice for switching circuits. It is more suited to linear circuits.
    The 2nd controller used IRF510 MosFets from Radio shack.
    This should have been very simple parallel connected MosFets (4 of them)
    That project did not work out at all, I don't know why.
    Fets are a better choice for PWM motor control but you have to select a suitable one and provide the proper drive voltage and current to get the best results from them.
    I tried a few other things also that did not work out, but I ended up using a strategy of
    Diode voltage drops to regulate my speed to my 7.2Volt drill motor.

    My Next endever will more than likely use a Parallax HB-25 motor controller, BUT
    It appears that the Max voltage supplied ot the HB-25 is 16 voltsDC.

    I'm needing to connect to 18V DeWalt battery.
    You should be looking at a controller that is rated for a 24V input for that.
    Concerning motor control,
    I would guess that the duty cycle of the PWM would control the Voltage applied to the motor.
    The current drawn by the motor is a result of the motor design.
    SO:
    As long as the Average voltage applied to the motor through the PWM does not exceed the design spec of the motor
    The motor should work, whatever motor you choose.

    Am I incorrect about this?

    Just my two cents worth.

    True up to a point, but it also depends on the motor. Higher than rated instantaneous voltages can cause arcing and high frequency PWM can cause inductive heating if the motor is not designed for those conditions. While I might run a motor rated for 7.2V from a 12V supply with PWM to control the current I would not want to go much beyond that.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-15 15:33
    Can anyone reccomend a shunt I can use to monitor motor current? I would like to monitor a motor that is drawing 10amps at 24max. So I guess I would need something that is .1ohm and 10 watts correct? Thats what I get using I*I*R, but if you multiply v*i you get 220watts so im a bit confused about what I would actually need. Im gonna assume 10watts is the right answer here just because 220watts seems a bit extreme.
  • Mark_TMark_T Posts: 1,981
    edited 2013-01-15 15:49
    Some of the current sense modules use a 0.002 ohm resistor or so and an op-amp in differential mode to boost the signal.
    This reduces heat dissipation a lot. For instance http://www.coolcomponents.co.uk/catalog/attopilot-voltage-current-sense-breakout-p-433.html

    Incidentally I think such sensors generate less noise than hall-effect sensors, but don't have as good isolation performance.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-15 16:49
    Well I dont need the highest accuracy solution here, im just looking to monitor the current to the motors as easily as possible. If I can only get within 10-100mA or so thats probably fine. I was thinking I could just use a regular quarter watt 1 ohm but I dont think thats going to happen. My h bridge chip has current sensing pins on it but I dont understand the documentation, it only shows resistor choices for monitoring 1.5amps and below.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-01-15 17:17
    Can anyone reccomend a shunt I can use to monitor motor current? I would like to monitor a motor that is drawing 10amps at 24max. So I guess I would need something that is .1ohm and 10 watts correct? Thats what I get using I*I*R, but if you multiply v*i you get 220watts so im a bit confused about what I would actually need. Im gonna assume 10watts is the right answer here just because 220watts seems a bit extreme.

    Volts across the dropping resistor is not related to volts on the motor. So V=IR is 10*.1 which is 1V. Then you can work out watts in the dropping resistor two ways = W=IV which is 10 x 1 = 10W, or IIR which is 10x10x0.1 which is also 10W and that provides a double check that the number is correct.

    You can use lower value sense resistors if you like. 1V won't need any amplification and you might be able to send that into a propeller or something. Or if you don't want to waste 10W, you can use a lower value resistor. Or even a bit of wire, and an op amp amplifier. I've even used the wire going to the motor as the current sense resistor.

    There are other options like Mark_T says.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-15 17:21
    How would I use the straight wire going to the motor? 22v will surely kill the ADC. Tapping the wire directly sounds like the cheapest, easieest solution, that doesnt waste a ton of power so if you could elaborate a little more on how this could be done id greatly appreciate it
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-01-15 17:37
    All wires are resistors, just different values. So battery => wire => motor => wire => battery. You can use either of those wires - the high side or the low side. Each will drop some volts. Maybe the wire is 0.01 ohms for argument's sake. So 10A flows, and you start with 22V and so on that high side wire you have 10A and 0.01R so V=IR and so that wire drops 0.1V. So you have 22V on one side and 21.9V on the other side. So you can sense this with two thinner wires, one on the battery and one on the motor. These sense wires can be thinner as they are hardly carrying any current. Or you could use the low side power wire, and relative to the battery negative, you will have 0.00V and 0.1V.

    Then you need what is called a differential amplifier. This is an op amp with four resistors and it measures the difference between voltages. So the input does not care that it is 21.9V and 22V. All it cares is there is difference of 0.1V. And by changing the resistors you can amplify the signal as well. So you can get a gain of 100 if you like. So with one op amp and four resistors you can have a 0-1V output, and you can sense the current either on the high side wire or the low side wire.

    The other little challenge is calibration. But you can easily do that with a known current (eg 1 amp as it makes all the calculations easier). Put 1A through your motor wires, start with a gain of 100 on the op amp, then adjust the gain resistors till you get the volts you want (eg 0-3V if you want to feed into a propeller).

    If you use the motor wires as the current sense resistors you don't waste any power as the wires were going to be there anyway.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-01-15 18:19
    Ill have to do some more reserch in to this when im ready, I didnt know that this was even possible. Ive only seen shunts, or hall effect sensors used. Would an LM358 work for this?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-01-15 19:25
    A LM358 will work - but there is a catch with the 741/324/358 type amps in that neither the inputs nor the outputs can swing rail to rail. So for instance, the output can't go within about 1.25V of the supply voltages.

    There is a good solution in the CA3140 op amp which can swing rail to rail. I saw this used first in the current sense of a power supply, and I recall in the magazine some discussion in the article about how the rail to rail limitation of many op amps can be a problem. The current sense for power supply is the same problem as sensing current for a motor. It won't matter if you use the high side or the low side wire as the CA3140 supply can go up to 36V.
Sign In or Register to comment.