Need help using arduino and ir reciever

Hi, so I’m fairly new to Arduino, and I am trying to build a car using two motors and some transistors to control the direction of the motors. Everything seems to be working fine, except for the IR reciever. It works perfectly when both motors are off, but as soon as the motors start any IR codes I send from my phone (Samsung Galaxy S4) are shown as random numbers on the serial monitor.
I’m using tsop38238 as ir reciever, arduino uno microcontroller, and cheap 3V motors I got on amazon. Does anyone have any idea of what’s causing the problem? (I tried using a seperate 9v battery to power the motors, and running the ir reciever off the arduino’s 5V pin but that didnt solve anything) If anyone knows anything and can help me it will be greatly appreciated!!

Give us the program and wiring diagram.

If you use LEDs in place of the motors, what happens?

Weedpharma

I am having the same exact issue as you. Have you found a solution?

Hi,
Have you got bypass capacitors on the terminals of the motors, 0.1uF capacitors may help.
The IR is probably getting interference from the motor brushes.

Keep the IR receiver wires well away from the power wires and wire going to the motors.

Hope this helps..Tom.... :slight_smile:

You must never share ground or power between a motor circuit and sensor circuits - the motor supply and
sensor/microcontroller supply normally intersect at one point only, ground, right at the microcontroller.

Motor wiring and motor supply wiring carries loads of interference and should always be twisted pair, screened
or screened twisted pair. Keep such wiring well away from the sensors and their wiring.

Never connect ground to the chassis at the motors, always at the common ground point. You can add 0.1uF
caps directly across the motor terminals (ceramic caps are best).

Twisted pair is easy to make with a handdrill or cordless drill and a small desk vice.