Best solution to regulate voltage to a motor? - Page 1
Forum section: electronics / beginners

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: January 24, 2013, 01:37:26 am
content: So Ive been looking in to buying a robot chassis kit, and the motors are 7.2v 4.5amp stall. I would like to implement a system where I supply a constant 8.2v to the hbridge. I was thinking about just using a buck or boost regulator (depending on battery pack) but it sure seems hard to find an adjustable switching regulator that can handle amps of out put, in buck or boost styles. I dont really have an affordable way to do SMT stuff, so I was just searching ebay for regulators on a board already. Ive put together many switching circuits, but I dont think there is a DIP solution that can pull this many amps.Im looking at either stepping down from a 22v nimh, or stepping up from a 6v sla. I dont necessarily have to do this using a switching regulator, its just the best way I know of. I was hoping maybe someone would have some insight on a way to get this done that wont break the bank!

author: c4757p
author_rank: Super Contributor
timestamp: January 24, 2013, 02:44:17 am
content: Quote from: rwgast_lowlevellogicdesin on January 24, 2013, 01:37:26 amWhy not? You can solder it with a standard soldering iron and some flux onto a homemade PCB rather easily.It's not going to be easy. No way in hell you can use a linear regulator for that, and you're right, few off the shelf regulators handle that much current intrinsically. You're pretty much going to have to use a generic SMPS PWM controller and design the entire circuit around it yourself, and at those power levels it's going to be tricky. Any way you can get the voltage directly? Two 3.7V batteries give 7.4V, is that acceptable? (At 4.5A you'd probably have enough loss to make up the difference anyway...) I'd avoid having to convert the voltage if possible.

author: Kremmen
author_rank: Super Contributor
timestamp: January 24, 2013, 07:10:26 am
content: You are controlling the motor using a H bridge. That already chops the motor voltage using pwm modulation. If you have a current sense/limit circuit in the control loop, then don't worry too much about the exact rail voltage to the H bridge. The motor coil inductance will create a current ramp and you can cut the pulse when reaching max current.You don't say whether this is a DC motor or a stepper but since you only mention "a" H bridge, i am assuming DC. You do know that for an ideal DC motor the speed is directly proportional to the armature voltage, and the torque is directly proportional to the armature current?For a DC motor the H bridge essentially acts as a buck regulator. The pwm duty cycle directly determines the average output voltage and thus the (ideal) speed of the DC motor. Add to this a way to control the armature current and you are essentially done. Ifthe rail voltager is significantly higher that the nominal voltage of the motor, that only means your pwm modulation must be limited to something less than 100% in order to avoid overvoltage/overspeed.In practice the often done thing goes like this: the motor speed control circuit outputs a base frequency modulated by the voltage pwm. This controls the H bridge according to the selected switch control scheme. Assocaited with this is the current controller that cuts a pwm pulse when current limit is reached/exceeded. Often the current controller consists of an oscillator, RS flipflop and current comparators. The oscillator frequency is significantly above the base pwm frequency. What happens is that (say) the rising edge of the oscillator output sets the RS flipflop enabling the pwm output. The motor current starts to rise and should it reach the set limit, the current comparator wakes and resets the RS. Now the pwm is disabled causing motor curent to start ramping down. The next oscillator edge set the RS ff again and the cycle repeats.This way the bridge rail voltage does not really matter, as long as a) you don't exceed the motor coil insulation max voltages and b) the max pwm ratio is still sufficiently large for proper control.Regarding SMD, 1206 size components are dead easy for anyone with near normal eyesight and reasonably steady hands. I do 0806 all the time and could do smaller but don't usually bother. SOT and SOP packages can be soldered dead bug or you can get these adapter boardlets cheaply from eBay. No reason to run from SMD, it is the way to go these days.

author: rwgast_lowlevellogicdesin
author_rank: Frequent Contributor
timestamp: January 24, 2013, 08:49:25 am
content: Im sorry I should have been a little more specific with my question and intentions. I got the only answer I really wasn't looking for, which would be anyone's first solution to the problem.Now I am by no means an expert so tell me if im wrong, or just not understanding something.Now lets give some firm project info before I get in to regulation vs PWM as soulution to my problem. Ok there are two plain old DC motors running a robot chassis in differential drive with an omni wheel skid. The only info I can find on the motors is they are 7.2v nominal, 4.5amp stall, the kit is listed herehttp://www.parallax.com/Store/Robots/AllRobots/tabid/755/ProductID/601/List/0/Default.aspx?SortField=ProductName,ProductName. Now I will probably use STMl6205s H bridge chips in parallel, this will spec my h-bridge at 5.6amp continuous and 11amp peak. This chip needs a minimal of 8 volts to operate, but drops about a volt of power. I would like to use a 22v 2450mah nimh battery pack I built a while back along with a charger and switching regulation for logic lines.Now, if I use switching regulation to send my h bridge 8.2v from the 22v battery there are tons of benefits. First one is I get a ton more than 2450mah because everything has been stepped down using switching regulators and nothing is drawing over 8.2v.Secondly if I down convert to 8.2v this will fill the h bridges requirement of needing at least 8v, and after it drops its 1v I will be getting 7.2v to the motors which is there nominal voltage. I will never have to worry about the motors slowing down because the batteries are dying, since the voltage is regulated from such a high voltage source. And I will have no need for extra code or circuitry to sense the current since the motors will never see more than nominal voltage, the only thing I need to implement for the motors sake would be stall detection.Third, and this is the MOST IMPORTANT reason to me, not to rely on PWM to scale the voltage to the motors. Robots use all kinds of precise means for navigation from wheel odometry to inertial sensors. The more exact you can be with any control the better results you will get from all systems. This includes speed control. If you use your pwm to chop the battery voltage to a safe zone you lose that percentage of speed control, so now you can only set your duty cycle from lets say 1 to 60% oe else your motors will be over nominal voltage. If your h bridge only puts out 7.2v max this means you get 1-100% of your duty cycle for speed control. Thats what bugs me about the above method the most, but so many people recommend it I feel like maybe in my newbness to this hobby im misunderstanding something.