4

I am trying to make a remote control car using an Arduino Uno and IR receiver modal VS1838B. The system worked as planned except that IR receiver gets erratic after any one motor spins.

  • upon starting up, all functionalities works as planned
  • after 1 motor spins , the IR receiver will barely receive.The light on the receiver will stop blinking until the motor stops.
  • If I disconnect the motors, the IR receiver will receive normally.

I suspect that there is a current affecting it after the motor starts spinning

I've included my circuit diagram below.

  • Pin 11 connects to IR receiver
  • Pin 5 activates the transistor for the left wheel
  • Pin 6 activates the transistor for the right wheel
  • The power source for the IR receiver is different from the motor
  • All the ground actually connects back to the UNO ground. Simplified it below.

enter image description here

EDIT:

  1. So I did an experiment to isolate and check if it was the motor/EMI that might be causing the IR receiver not to receive properly. I changed one motor with a light bulb and tested if activating the light bulb will affect the receiver. The result was that activating the light bulb did not affect it while activating the remaining motor affected it. Hence I am quite sure that the motor/EMI is causing the receiver to be erratic.
  2. I am not sure how to place the ceramic capacitor, so I drew a diagram of what I think it could be. Is this correct?

enter image description here

Joshua
  • 73
  • 4
  • 1
    Great block diagram. Now please put some details about what there is connected to IR receiver. Any other components not shown? Filter on IR power supply? Pull-up resistor on IR data pin? Is it a bare IR module or some board with the aforementioned components built-in? – Justme Apr 07 '20 at 13:31
  • Your diagram is deeply flawed, the connections you show between the Arduino and the IR receiver cannot be right. And you need to supply full details about the power source for the receiver and arduino. – Chris Stratton Apr 07 '20 at 13:54
  • @ChrisStratton: I think he's got it connected right, and that he just made a quick block diagram without precise connections specified. I can see that he flipped the polarity on the IR, and connected the negative side of the IR to the positive 5V on the MCU. – Edin Fifić Apr 07 '20 at 14:04
  • 2
    Brushed DC motors emit a lot of EMI noise. It radiates and conducts. The best thing is to contain it at the source (the motor). Add EMI filtering to the motors. – Aaron Apr 07 '20 at 15:37
  • 2
    @Joshua: Have you tried my suggestions? Which one of them made the difference? I would really like to know. – Edin Fifić Apr 08 '20 at 10:09
  • 1
    @EdinFifić Thanks a lot for your extremely helpful reply. I have done a quick experiment which I've shared above. I have also edited the question with a new question on the placement of the capacitor. Would love to know if its accurate. – Joshua Apr 08 '20 at 12:16
  • 1
    @Aaron I updated the question with a question on capacitor placement at the motor. Thanks for the help. – Joshua Apr 08 '20 at 12:18
  • 1
    Yes, that is a correct placement of the capacitors. Just try 100nF ceramic disc first to see if it's enough, then move to higher values. – Edin Fifić Apr 08 '20 at 13:47
  • @Joshua yep that's the correct placement. Try to get them as close to the terminals as possible with as short of leads as possible. Every millimeter counts. – Aaron Apr 08 '20 at 17:43
  • @Joshua there is also this question, which covers the motor capacitor topic: https://electronics.stackexchange.com/questions/19517/why-connect-capacitors-to-motor-body – Aaron Apr 08 '20 at 17:46
  • @EdinFifić sorry for the very late reply. It works extremely well now. – Joshua Jan 03 '21 at 10:58

1 Answers1

4
  • My first suggestion here is to place at least 100nF ceramic disc capacitors across the motors to reduce the EMI emissions. You could also place additional 1-10µF capacitors in parallel with the ceramic capacitors.
    If that doesn't help, you could add small inductors (one to the positive, and one to the negative side to each motor) and the 100nF caps towards the controller side (4 inductors and 2 capacitors in total; basically an EMI filter).
  • You should also add at least a 100nF capacitor across the supply lines right next to the IR receiver if there isn't one already. Same with the micro-controller supply pins.
  • You also need at least 100nF across the battery terminals or the positive side of the motors and the ground. You can go as high as 100µF or even 220µF here if necessary. It's possible that the motors are causing voltage "dips" when starting and thus confusing either the IR, the MCU, or both.
  • Finally, the grounds need to be separate and ONLY come together next to the power supply, to prevent ground loops. If the ground line is very thick/wide or you have a good ground plane, this may not be necessary.
Edin Fifić
  • 5,188
  • 7
  • 24
  • i noticed that in past experiments that you have to connect the grounds of other power source back to the arduino ground, any idea why that is the case? – meow Apr 08 '20 at 15:54
  • If you give me a block diagram or a schematic where that's being done, I could give you a more precise answer, but all I can think of now is the prevention of ground loops, where a ground in one part of the circuit would have either AC, DC or both voltages on it, and it wouldn't be a clean 0V reference. Sensitive circuits (that deal with small signals, rather than with power or larger signals) pick up that small ground potential and amplify it. Less sensitive circuits usually have no problem with small ground potential variations. – Edin Fifić Apr 08 '20 at 17:17