Friday, January 6, 2012

Arduino, ESC = Noise, Noise, Noise - Problem Solved

Noise, Noise, Noise - only it wasn't in the end.

My projects have been stuck for two weeks while I have read up on decoupling, shopped for components, scanned through my code, rebuilt my circuits, twisted all my wires together etc etc etc all in the hope of tracking down and eliminating a problem I have with noise when my Arduino is connected to the ESC (Electronic Speed Controller).

The problem only occurs when the Arduino is PWMing (Pulse Width Modulation) the ESC, I can PWM a servo in place of the ESC and all is fine, but as soon as I try to drive the ESC with PWM I start getting a garbage pulse every 6th pulse or so.

Now that my board is loaded up with decoupling capacitors, the problem is finally solved - with a resistor.

 330 Ohm Resistor Show a resistor of 560 Ohms is being used in the project at present. The resistor is connected between the PWM Pin and the signal pin of the ESC.

I had a nagging idea that I might be damaging the PWM Pin by pulling too much current from it into the ESC so I added a 560 Ohm current limiting resistor and my rogue pulse vanished, not what I was expecting to happen but a very welcome development.

Thanks to this gentleman for the idea - http://www.thebox.myzen.co.uk/Site/Welcome.html look for the 'school box', all good stuff which has helped.

I got the idea for the resistor from reading the section about LED current draw slowly damaging pins even if it looks as if its working. It looks as if the ESC was was drawing too much current.


20 comments:

  1. can yo post a schem.
    I am having the same problem with a pic16f684

    ReplyDelete
  2. Hi,

    In the 14 months since I originally posted this, I have found many more causes of noise in my RC Projects, if you can give me a few details of what your problem looks like, I can suggest a few possible causes to look at.

    Duane B

    ReplyDelete
  3. Thanks for the quick reply.
    I am currently uploading all the Data on to a web sight I created. It will include a brief history of the project, the noise issue, Schems., source code,
    pictures and a video sample of the test motor
    behavior. I should have most every thing uploaded in the next couple of days. Then I will post the link here to the sight so you can get a clear picture of what is happening.

    ReplyDelete
  4. http://pekc1961.wix.com/project-sara

    Here is the link. I hope I have all the required information uploaded.

    Thanks

    ReplyDelete
  5. Hi,
    it does not look like you have a decoupling capacitor soldered across the motor terminals, try this using a .1uf capacitor soldered directly across the motor and also twist the motor power wires around each other.

    Let me know what happens

    Duane B

    ReplyDelete
    Replies
    1. Ok I will give it a shot and let you know.

      Delete
  6. some improvement.
    Inalled the Cap. Twisted the wires. but Motor convultions are still happening but not as strong. Worse is when I change drection to fast. It realy hops then. I think thats to be exped. But Runs rough in one direct and smooth in tho other. Posted here.

    http://www.youtube.com/watch?v=j-OgN9rM7bs&feature=youtu.be

    ReplyDelete
  7. Hi,

    Some people recommend three caps on a motor, one across the two terminals like you already have, then one from the motor + to the metal motor case and another from the - to the metal case.

    Do you have a .1uf capacitor on your vcc/gnd of the 293 chip as well ?

    Duane B

    ReplyDelete
  8. I have seen this setup with caps before in fact I had that with my first H-bridge version before I switched to the sn754410 half bridge. I will try it and see if there is any change.
    I do have a .1uf cap between the 12v/Gnd and one on the 5v/Gnd. as shown on my schem.
    On new thing I just found and it just confirmed my suspicions is, when I run the motor in the rough running direction pick it up and move it around underneath the table away from the RX while it running I can find sweet spots where it would run smooth but then rough again when moved to the left or right of that spot.

    ReplyDelete
  9. Along with the additional caps I am going to try the old wives tale of wrapping the RX in Aluminum foil as a shield. Maybe even wrapping the motor as well

    ReplyDelete
  10. Hi,
    On my 293 build I also added .1uf capacitors between the 293 outputs and ground, you can see the blue caps here - http://rcarduino.blogspot.ae/2012/05/rc-arduino-robot.html

    Everything else in your design looks well decoupled, other than the additional caps on the motor driver outputs the last few suggestions I can make are -

    Keep the motor wires as short as you can get away with.

    Keep the receiver, receiver wires and arial as far as possible from the motor and motor wires.

    Duane B

    ReplyDelete
    Replies
    1. Thanks for all the input.
      The added caps on the motor did make a little improvement but still not completely cleaned up. I agree the best solution is to decrease the motor leads and keep the RX as far away as possible from the motors.. So looks like I will be mounting it in the head. Toymax must have had similar problems with there cheap RC set up because there RX and antenna were also in the head. The farthest position away from the motors. I have been trying to solve this problem for the past year and this is the closest I have gotten short of buying a different TX and RX. (expensive). Its time to move on. I am going to finish the decoupling for both the right side and left side motor and mount it in the robot base then just work on the issue from the RX side.

      Delete
    2. Incidentally I saw a couple of errors on my Schem. : Missing a ground
      on the PIC decoupler and the pins were incorrect on the VR's. Probably should not call out pin numbers on VR's anyway. Better just to show Vin
      Vout and Gnd. then it will not be confused with a transistor.

      Delete
  11. Hi,
    Two last suggestions -

    A lot of the noise will be coming from poor contact between the motor brushes and the commutator, you could try

    1) New motors
    2) Or run the motors connected to a 1.5v battery in a cup of water. The water acts as an abrasive and will bed the brushes to the commutator for a better fit which should lead to less noise.

    If the motors are two far gone water dipping might be then end of them, otherwise it just might solve your problem.

    The following link relates to RC Racing motors, but the same concept will apply to yours. I have used this with RC Motors, but not with toy motors so if you chose to try it, its your choice.

    http://www.rcuniverse.com/forum/m_5583008/anchors_5588915/mpage_1/key_/anchor/tm.htm#5588915

    Duane B

    ReplyDelete
    Replies
    1. Thanks.. The test motor is brand new from Jameco Electronics http://www.jameco.com
      The toy motors that were mounted in the Robot base were replaced with 12 volt motors from a car door lock. That’s another strange story. One car door lock motor has absolutely no noise problems but the other does. I thought it would be due to one motor being possibility worn more than the other.
      I even pondered the thought of going back to the junk yard and getting several more door motors to find another noiseless one. Only they charge 6 bucks for one door motor and electronic stores charge a buck and a half.

      Cheers...

      Delete
    2. I just had a thought..
      We use ferrite cores at my work on the cables for amps to block EMI
      I am woundering if I should try one on the motor wires.

      Delete
  12. Its worth a try, I had one RC Car motor where I tried everything I could get my hands on. The eventual solution was to swap the motor - I didn't have any ferrite cores or beads to try so let me know how you get on.

    Duane B

    ReplyDelete
  13. hello i have the same problem i putted a 220 ohm and 440 ohm resisotr and nothing changed. I keep getting throttle with noise from my TX-RX. Any other ideas? :/

    ReplyDelete
  14. Couple of suggestions -
    1) Make sure your receiver ariel is fully extended
    2) Make sure the receiver ariel is as far as possible from the motor
    3) Move any other signal wires as far as possible from the motor and battery
    4) Do not coil any wires around other wires
    5) If 1-4 make no difference, try another motor, I have one motor that is particularly bad due to sparking as it runs, I could not find a way to overcome the noise from this motor other than swapping it for a similar one. Obviously this is more work and expense than 1-4 so make sure to try 1-4 first.

    Duane.

    ReplyDelete
  15. Did you know you can shorten your links with AdFly and get $$$$$$ for every visit to your short links.

    ReplyDelete