Intermittent motor control and singing motors

Just got my Picoborg Reverse wired in to the PI using the supplied cables. I have a 6v DC supply courtesy of 4AA batteries plugged into the board, with the correct polarity.

I have followed the instructions, enabled I2C and installed the software.

Running the desktop program with the 2 sliders does allow both M1 and M2 to turn, and reverse.

However, M1 is intermittent. Sometimes it will not move at all. Leave it for a while to "cool down" and then it works for a short time.

Also, it doesn't work as it says, in that the further you push the slider the faster the motor rotates (ie more voltage applied). What happens is that between 1 and 39 the motor does turn slowly, with a strange singing sound. After 39 the motor does not turn, and the pitch of the "singing" increases.

I am no expert, but I suspect the output to the motors is not strictly DC, and there may be some sort of wave form at play here.

Can you advise what I should be checking to ensure a pure DC signal to my DC Motors, and why M1 is intermittent?

Thanks in advance.

piborg's picture

The speed control is performed using a technique called Pulse Width Modulation (PWM)
In simple terms PWM works by turning the output on and off at a fast rate, simulating a reduced voltage.
If you want a better explanation of PWM check out this video: Circuit Skills: PWM.
For a detailed explanation see the Pulse Width Modulation Wikipedia page.

Under most circumstances the motor itself provides enough smoothing to the PWM signal that it would behave the same as the equivalent DC level.
You can use a capacitor to smooth the PWM out to a DC level, but it should not really be necessary here.
See this blog post for a guide to getting a DC level from a PWM output: Converting PWM to a Voltage.

Based on your previous posts I am presuming that you are trying to control the yellow motors which come with a PiCy kit.
If that is the case they are really intended for 3V operation, which would be 50% of the 6V input.
They will work fine at 6V, but it will shorten the lifespan of the motor, particularly the gearbox.

As for the actual problem the screeching / singing suggests three likely candidates:

  • The batteries are not providing enough power to the PicoBorg Reverse
    This is causing it to briefly "shut down" when the motors try to draw power
  • The chip on the PicoBorg Reverse is detecting a problem and limiting the output
  • The gearbox in the motor has worn out and is generating far too much friction

If you could check the following and tell us what happens it will help narrow the problem down:

  1. Are you using rechargeable AAs?
    If so rechargeable AAs are rated at 1.2V, which would only supply 4.8V, not enough to run PicoBorg Reverse
  2. Can you try a power source with more voltage?
    While the PicoBorg Reverse should work with a 6V supply we would recommend a minimum of 7.2V
  3. Does the singing noise appear to be coming from the motor itself or the PicoBorg Reverse?
  4. Are any of the chips on the PicoBorg Reverse getting rather hot?
  5. If you swap the motors so they are on the other outputs does the intermittent problem stay on M1 or swap to M2 as well?
  6. Do both motors have the singing problem, or just one of them?

Thank you very much for such a detailed response at such short notice. And on a Saturday as well!

Firstly, following you're advice, it is now working famously. :)

Now some answers to your questions :

Yes it is indeed the yellow motors.

The power to the board was provided by 4AA non-rechargeable batteries, of questionable origin. The PD was <6v, so this was swapped out for a PP3 borrowed from the smoke alarm. This had a profound difference, no more singing and it was possible to put the motors to "full chat" briefly, while understanding that the lifespan at 9v would be even more reduced!

The singing noise was coming from the motor.

I have not noticed any of the chips getting hot.

Both motors were singing with the weak <6v power source.

I didn't need to swap the motors as the PP3 fixed the problem.

Subscribe to Comments for &quot;Intermittent motor control and singing motors&quot;