Author Topic: My robot is making an odd low noise when it shouldn't  (Read 4106 times)

0 Members and 1 Guest are viewing this topic.

Offline emmannuelTopic starter

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
My robot is making an odd low noise when it shouldn't
« on: May 29, 2008, 11:19:38 PM »
Hiya,

I've been working on a little robot that I started this semester for a class.  Been working great but its making an odd low noise which is coming from the dc motors.

I'm controlling the Tamiya Twin-Motor Gearbox Kit from the TI SN754410.  After the little hell that was soldering everything it came out pretty good and motors do work how I expected them and everything.  When the robot is on and the motors are turned off, it makes that noise.

I checked across the wires that are sent to the motor and it looks like its getting 0.001 Volts to the motor so I know that has something to do with it. 


I don't have a cap across the motor wires, would that solve my problem?

Offline Nyx

  • Robot Overlord
  • ****
  • Posts: 204
  • Helpful? 0
Re: My robot is making an odd low noise when it shouldn't
« Reply #1 on: May 29, 2008, 11:33:13 PM »
I don't have a cap across the motor wires, would that solve my problem?

Try and see? It's always better to have a capacitor for your motors anyways.

Offline emmannuelTopic starter

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: My robot is making an odd low noise when it shouldn't
« Reply #2 on: May 30, 2008, 12:27:42 AM »
Try and see? It's always better to have a capacitor for your motors anyways.

Is a 100nF cap ok? I have lots of those, or would i want a higher or lower value?

Offline Nyx

  • Robot Overlord
  • ****
  • Posts: 204
  • Helpful? 0
Re: My robot is making an odd low noise when it shouldn't
« Reply #3 on: May 30, 2008, 12:34:52 AM »
No expert, but I'd go for a higher value.... I would think the higher value, the more filtering you get... But I might be wrong.
« Last Edit: May 30, 2008, 07:38:53 AM by Nyx »

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: My robot is making an odd low noise when it shouldn't
« Reply #4 on: May 30, 2008, 01:56:50 AM »
0.1 uF caps are pretty standard for motor noise suppression and usually work well.  It's not always the case that larger caps are better noise suppressors.  Smaller caps have higher frequency response than larger ones and hence can do a better job at filtering out high-frequency noise.  This is why you often put both large and small caps in parallel across your power lines (rather than just adding up the values and using a single larger capacitor).

If I had to guess at what your problem is, I'd venture that when your motors are off they're still getting periodic glitches on the control lines, and what you're hearing is at the frequency of those glitches.  Are you using a PWM to drive the motors and if so, are you sure it's 100% off when your motors are off?

- Ben

Offline emmannuelTopic starter

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: My robot is making an odd low noise when it shouldn't
« Reply #5 on: May 30, 2008, 02:13:51 AM »
Thanks for your guys input.  it does look like the enable pin on the SN754401 is getting 0.022 volts which it shouldn't.

I'll go ahead and take a look at the solder just in case but its most likely I've got some issue with the PWM timer.  I am using the atmega8 and I'm not used to its 16bit timer so I probably have some register setting is wrong.

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: My robot is making an odd low noise when it shouldn't
« Reply #6 on: May 30, 2008, 02:27:31 AM »
It might not be a wrong setting.  One annoying aspect of AVRs is that when you set a PWM to 0 duty cycle (e.g. OCR1B = 0), you will get tiny glitches (very short pulses) every time the counter overflows (i.e. at the frequency of your PWM).  You can get a clean 0 by using an inverted PWM, but then you get tiny glitches when you try to run at 100% duty cycle.  My guess is that you're hearing a sound produced by these glitches.  I can think of two ways you can investigate this further:

1) What PWM frequency are you using?  Does the pitch of the sound coming out of your motors sound like it could be at that frequency?  Try changing the PWM frequency and see if it has an effect on the sound.  Try turning off Timer1 altogether and see if the sound goes away.

2) If your motor driver's enable line has an internal pull-down, you can get a glitch-free signal by making the PWM pin an input while you want the motors off.  This will put the pin in a high-Z state, even with the PWM still running.  To re-enable the PWM output, just make the pin an output again.  So in short, try making the pin an input and see if the sound goes away.


- Ben

Offline emmannuelTopic starter

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: My robot is making an odd low noise when it shouldn't
« Reply #7 on: May 30, 2008, 02:56:54 AM »
Thanks for answering again ben.

I tried putting it to the lowest div frequency and I still was getting noise.  I then changed the PWM pins for input but that just made the motor take off but I turned it off real quick so I don't think there was any problem.

From your comment about it being a common issue with AVRs glitching I decided to do something I didn't think off before, I turned off the 16bit timer since its only being used for the PWM while the PWM isn't in use.  Worked pretty well, and silent while its not meant to be moving :D

Thanks Nyx and bens for your help!

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: My robot is making an odd low noise when it shouldn't
« Reply #8 on: May 30, 2008, 02:47:44 PM »
I tried putting it to the lowest div frequency and I still was getting noise.  I then changed the PWM pins for input but that just made the motor take off but I turned it off real quick so I don't think there was any problem.
Heh, I guess your enable pin didn't have an internal pull-down after all.  I'm glad this test didn't break anything (e.g. by driving your robot into a wall).

Quote
From your comment about it being a common issue with AVRs glitching I decided to do something I didn't think off before, I turned off the 16bit timer since its only being used for the PWM while the PWM isn't in use.  Worked pretty well, and silent while its not meant to be moving :D
I'm glad to hear that turning off the timer took care of the noise.  I think that's pretty solid evidence that while not enough to move your motors noticeably, the glitching was still enough to produce a sound.  That's a worthwhile thing to be aware of.


- Ben

 

SMF spam blocked by CleanTalk