ir controlled relay

I used a ir receiver and a remote control a double relay module provided with the kit and extra two motors.The program is working but the two motors are not working.

The relay is only working when motors are not connected to it.please help me in it .
Thanks in advance.
connection and programs are given below.

ir car.txt (1.9 KB)

Hi,
I see no connection details, so don't know what your doing, controlling motors via relays is a bit old hat!! A driver module based on something like a DRV chip from TI would be better and a lot smaller then 4 relays.

So let us see the wiring and how are you powering the relays and motors.

Mel.

My module is using a 12 v motor so I am using relays.
The mega cannot give out lot off power to controll.

Hi,
If you're trying to power relays or motors from the Arduino! then you SHOULD NOT! always power from say 4-6 xAA's pref good, high capacity rechargeables. Still no connection details, we can't work in the dark! the DRV8833 motor driver will work with motors up to about 20-40Volts, just don't let it near your arduino (40volts that is).

Need to see your wiring etc, to help more.

Regards

Mel.

The program is in the topmost link.The connection is given below.As you said using relays is a old thing.
But I just wanted to know about it.

Hi,
You can't power relays and motors from the Arduino, the pins can only supply 40Ma Max, the motors want 100's of Ma or even Amps. You will damage your Arduino or even blow it... A big demand like that will pull the arduino's 5v line down causing other problems and odd resets, etc.

Take a look at my website herewww.melsaunders.co.uk under Electronics, I can help but you need to get the right stuff and do it right!! Use 4-6 AA's with power to the pos side of the relays, then also to the Vin pin on the arduino, this goes to the builtin 5V regulater so the arduino is powered correctly.

regards

Mel.

Its working .I powered the supply for the motor from an separate cell.Thanks for your explanation.
Thanks once more.

Hi,
That's good news, glad it's working. Please give me some Karma? We are here to help, what are you going to add next??

Good luck,

Mel.