EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Motor Noise, Decoupling techniques

Started by Peter Q. February 24, 2008
Hello All,
    I'm building a small vehicle that uses a couple of optical sensor
as navigation. There are two MCUs, both Freescale HC08 family. The
motors are just small 5V DC brush ones that's been driven at 7.0V,
PWMed to 70% (PWM Frequency 800Hz). There are two motors for a
differential drive setup.
    I'm measuring a total idle current of 800mA on the motors, the
load current is about 1.2A, and the stall current at 3.5A.
    I'm supplying this system with 5x1.5V AA alkline batteries, the
electrical system is regulated using a 5V regulator. The motors are
driven via a H-Bridge.
    During the test, the electrical system appears to be functional
without the motor running. When the motor turns on, the electrical
system fails. Noise riding on the ground lines or VCC lines could be
the problem. Sensors start to provide false output. The two MCUs fails
to communicate with each other using the SPI interface.

    Therefore I'm wondering what are some of the techniques to
decouple the motors from the electrical system. I'm about to separate
the circuit VCC out from the 5 AA batteries and use a single 9V batt
to supply the electrical power. I'm wondering if this is a standard
technique?
    Also, what are some typical PWM periods been used on small DC
vehicles?

    Regards,

PQ
Peter Q. wrote:
> Hello All, > I'm building a small vehicle that uses a couple of optical sensor > as navigation. There are two MCUs, both Freescale HC08 family. The > motors are just small 5V DC brush ones that's been driven at 7.0V, > PWMed to 70% (PWM Frequency 800Hz). There are two motors for a > differential drive setup. > I'm measuring a total idle current of 800mA on the motors, the > load current is about 1.2A, and the stall current at 3.5A. > I'm supplying this system with 5x1.5V AA alkline batteries, the > electrical system is regulated using a 5V regulator. The motors are > driven via a H-Bridge. > During the test, the electrical system appears to be functional > without the motor running. When the motor turns on, the electrical > system fails. Noise riding on the ground lines or VCC lines could be > the problem. Sensors start to provide false output. The two MCUs fails > to communicate with each other using the SPI interface. > > Therefore I'm wondering what are some of the techniques to > decouple the motors from the electrical system. I'm about to separate > the circuit VCC out from the 5 AA batteries and use a single 9V batt > to supply the electrical power. I'm wondering if this is a standard > technique? > Also, what are some typical PWM periods been used on small DC > vehicles? > > Regards, > > PQ
Measure the battery voltage with the motor stalled, and check if the 5 V regulator drops out (because the raw feed is not enough for it to be able to control). My guess is that you cannot get that kind of current from so small batteries. -- Tauno Voipio tauno voipio (at) iki fi
On Feb 24, 2:28 pm, Tauno Voipio <tauno.voi...@INVALIDiki.fi> wrote:
> Peter Q. wrote: > > Hello All, > > I'm building a small vehicle that uses a couple of optical sensor > > as navigation. There are two MCUs, both Freescale HC08 family. The > > motors are just small 5V DC brush ones that's been driven at 7.0V, > > PWMed to 70% (PWM Frequency 800Hz). There are two motors for a > > differential drive setup. > > I'm measuring a total idle current of 800mA on the motors, the > > load current is about 1.2A, and the stall current at 3.5A. > > I'm supplying this system with 5x1.5V AA alkline batteries, the > > electrical system is regulated using a 5V regulator. The motors are > > driven via a H-Bridge. > > During the test, the electrical system appears to be functional > > without the motor running. When the motor turns on, the electrical > > system fails. Noise riding on the ground lines or VCC lines could be > > the problem. Sensors start to provide false output. The two MCUs fails > > to communicate with each other using the SPI interface. > > > Therefore I'm wondering what are some of the techniques to > > decouple the motors from the electrical system. I'm about to separate > > the circuit VCC out from the 5 AA batteries and use a single 9V batt > > to supply the electrical power. I'm wondering if this is a standard > > technique? > > Also, what are some typical PWM periods been used on small DC > > vehicles? > > > Regards, > > > PQ > > Measure the battery voltage with the motor > stalled, and check if the 5 V regulator > drops out (because the raw feed is not > enough for it to be able to control). > > My guess is that you cannot get that > kind of current from so small batteries. > > -- > > Tauno Voipio > tauno voipio (at) iki fi
That is correct - hence I'm thinking about dual battery, one for the analog system, one for the digital system. I'm just wondering if this is a standard technique, and what kind of problems will arise. Regards, PQ
On Feb 24, 2:34=A0pm, "Peter Q." <pmous...@gmail.com> wrote:

> That is correct - hence I'm thinking about dual =A0battery, one for the > analog system, one for the digital system. > I'm just wondering if this is a standard technique, and what kind
It's a very standard technique to have separate power supplies for the control system vs. locomotion. The current drain you're talking about is hard to sustain on alkalines; if you were using a NiMH pack you'd find it supplies this demand better, due to lower (and more consistent) internal resistance.
On Feb 24, 3:06 pm, larwe <zwsdot...@gmail.com> wrote:
> On Feb 24, 2:34 pm, "Peter Q." <pmous...@gmail.com> wrote: > > > That is correct - hence I'm thinking about dual battery, one for the > > analog system, one for the digital system. > > I'm just wondering if this is a standard technique, and what kind > > It's a very standard technique to have separate power supplies for the > control system vs. locomotion. > > The current drain you're talking about is hard to sustain on > alkalines; if you were using a NiMH pack you'd find it supplies this > demand better, due to lower (and more consistent) internal resistance.
I suspect that the 1A current drain is due to the PWM period being too low (800Hz). The motor has to restart every cycle. I will increase the PWM period into the 10kHz range and see if there is any different. Thanks for the suggestion! Regards, PQ
On Feb 24, 3:11=A0pm, "Peter Q." <pmous...@gmail.com> wrote:

> I suspect that the 1A current drain is due to the PWM period being too > low (800Hz). The motor has to restart every cycle. I will increase the
If that is really the case, then your PWM sounds like it's under- filtered. What does the output look like (under load)?
Peter Q. wrote:
> Hello All, > > Therefore I'm wondering what are some of the techniques to > decouple the motors from the electrical system. I'm about to separate > the circuit VCC out from the 5 AA batteries and use a single 9V batt > to supply the electrical power. I'm wondering if this is a standard > technique?
Yes, and you should certainly develop that way. 9V may also allow better gate drive levels, for lower losses. If the 9V has size/weight impact, then when it's all working, and field proven, then you could check the Lower Rail profile, to see the sag-times, vs battery age, and see if it is possible/worthwhile to replace the 9V with an Up Converter/Supercap type combination to emulate the 9V battery. You will need to 'ride-thru' some serious sags on the Motor Rail. -jg
On Sun, 24 Feb 2008 11:34:39 -0800 (PST), I said, "Pick a card, any
card" and "Peter Q." <pmouseca@gmail.com> instead replied:

>On Feb 24, 2:28 pm, Tauno Voipio <tauno.voi...@INVALIDiki.fi> wrote: >> Peter Q. wrote: >> > Hello All, >> > I'm building a small vehicle that uses a couple of optical sensor >> > as navigation. There are two MCUs, both Freescale HC08 family. The >> > motors are just small 5V DC brush ones that's been driven at 7.0V, >> > PWMed to 70% (PWM Frequency 800Hz). There are two motors for a >> > differential drive setup. >> > I'm measuring a total idle current of 800mA on the motors, the >> > load current is about 1.2A, and the stall current at 3.5A. >> > I'm supplying this system with 5x1.5V AA alkline batteries, the >> > electrical system is regulated using a 5V regulator. The motors are >> > driven via a H-Bridge. >> > During the test, the electrical system appears to be functional >> > without the motor running. When the motor turns on, the electrical >> > system fails. Noise riding on the ground lines or VCC lines could be >> > the problem. Sensors start to provide false output. The two MCUs fails >> > to communicate with each other using the SPI interface. >> >> > Therefore I'm wondering what are some of the techniques to >> > decouple the motors from the electrical system. I'm about to separate >> > the circuit VCC out from the 5 AA batteries and use a single 9V batt >> > to supply the electrical power. I'm wondering if this is a standard >> > technique? >> > Also, what are some typical PWM periods been used on small DC >> > vehicles? >> >> Measure the battery voltage with the motor >> stalled, and check if the 5 V regulator >> drops out (because the raw feed is not >> enough for it to be able to control). >> >> My guess is that you cannot get that >> kind of current from so small batteries. >> >That is correct - hence I'm thinking about dual battery, one for the >analog system, one for the digital system. >I'm just wondering if this is a standard technique, and what kind of >problems will arise.
It is, indeed, a standard technique and a recommended practice. Also, consider using opto-isolators in front of the H-Bridge to completely separate the motor circuit from the logic side. At that point you only need worry about any physical shielding that may be required. I also recommend that you use decoupling caps on the motor just to be safe. Ask your motor manufacturer for their recommendations as far as the value of the caps. -- Ray
On Sun, 24 Feb 2008 11:34:39 -0800, Peter Q. wrote:

> On Feb 24, 2:28 pm, Tauno Voipio <tauno.voi...@INVALIDiki.fi> wrote: >> Peter Q. wrote: >> > Hello All, >> > I'm building a small vehicle that uses a couple of optical sensor >> > as navigation. There are two MCUs, both Freescale HC08 family. The >> > motors are just small 5V DC brush ones that's been driven at 7.0V, >> > PWMed to 70% (PWM Frequency 800Hz). There are two motors for a >> > differential drive setup. >> > I'm measuring a total idle current of 800mA on the motors, the >> > load current is about 1.2A, and the stall current at 3.5A. >> > I'm supplying this system with 5x1.5V AA alkline batteries, the >> > electrical system is regulated using a 5V regulator. The motors are >> > driven via a H-Bridge. >> > During the test, the electrical system appears to be functional >> > without the motor running. When the motor turns on, the electrical >> > system fails. Noise riding on the ground lines or VCC lines could be >> > the problem. Sensors start to provide false output. The two MCUs >> > fails to communicate with each other using the SPI interface. >> >> > Therefore I'm wondering what are some of the techniques to >> > decouple the motors from the electrical system. I'm about to separate >> > the circuit VCC out from the 5 AA batteries and use a single 9V batt >> > to supply the electrical power. I'm wondering if this is a standard >> > technique? >> > Also, what are some typical PWM periods been used on small DC >> > vehicles? >> >> > Regards, >> >> > PQ >> >> Measure the battery voltage with the motor stalled, and check if the 5 >> V regulator drops out (because the raw feed is not enough for it to be >> able to control). >> >> My guess is that you cannot get that >> kind of current from so small batteries. >> >> -- >> >> Tauno Voipio >> tauno voipio (at) iki fi > > That is correct - hence I'm thinking about dual battery, one for the > analog system, one for the digital system. I'm just wondering if this is > a standard technique, and what kind of problems will arise. > > Regards, > > PQ
But you shouldn't be doing it based on a guess. You should take your voltmeter and _measure_, to make sure that the effort you're spending is going to do any good. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
On Sun, 24 Feb 2008 11:09:22 -0800, Peter Q. wrote:

> Hello All, > I'm building a small vehicle that uses a couple of optical sensor > as navigation. There are two MCUs, both Freescale HC08 family. The > motors are just small 5V DC brush ones that's been driven at 7.0V, PWMed > to 70% (PWM Frequency 800Hz). There are two motors for a differential > drive setup. > I'm measuring a total idle current of 800mA on the motors, the > load current is about 1.2A, and the stall current at 3.5A. > I'm supplying this system with 5x1.5V AA alkline batteries, the > electrical system is regulated using a 5V regulator. The motors are > driven via a H-Bridge. > During the test, the electrical system appears to be functional > without the motor running. When the motor turns on, the electrical > system fails. Noise riding on the ground lines or VCC lines could be the > problem. Sensors start to provide false output. The two MCUs fails to > communicate with each other using the SPI interface. > > Therefore I'm wondering what are some of the techniques to > decouple the motors from the electrical system. I'm about to separate > the circuit VCC out from the 5 AA batteries and use a single 9V batt to > supply the electrical power. I'm wondering if this is a standard > technique? > Also, what are some typical PWM periods been used on small DC > vehicles? > > Regards, > > PQ
Isolating your processor power rail from your drive power rail is a good thing. If you're using a 7805 regulator then you don't have much, if any, overhead from your input to output voltages -- the 7805 needs between 1.5 and 2V more on the input than the output to stay in regulation. Even if you are already using a low drop-out regulator, if your battery voltage is bouncing around from the motor then the regulator may have problems. Consider also that both dry cells and NiXX batteries aren't really fully discharged until you're down to about 0.9V/cell at moderately high current. For your batteries this means that you can expect them to be fully discharged when you're getting 4.5V out of them -- and that's lower than what your computer needs. With five cells your computer will go on the fritz long before you've squeezed the last coloumb out of the batteries. For a prototype system it's not a bad idea to power the signal processing and power electronics from different batteries. This is probably the least-engineering way to get the job done. One battery pack is certainly cleaner from a product design point of view, but I see a lot of RC toys that separate the two, so I can't say it's not an accepted method. If you do want to decouple them while running off the one battery pack then you're going to have trouble with the number of cells. Taking the processor power through a Schottkey diode into a capacitor will prevent the processor power from dropping suddenly when a motor comes on, but it won't keep the processor rail from dropping below 5V when the batteries permanently sag. Using six batteries will help a bit there, but then your motor drive gets excessive. Using a buck/boost switching regulator would be the bees knees, but it may be more expensive than a 9V battery, and would certainly be more trouble to design. -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html

The 2024 Embedded Online Conference