strange behavior when 2 or more motors are connected

Hello,

I have build up a simple circuit with HD44780(LCD), L293B and 4x this motors:http://www.robotshop.com/world/dfrobot-6v-180-rpm-micro-dc-geared-motor-with-back-shaft.html, powered at 5V. With a only 1 motor connected it works great, but when I connect 2 or more motors everything go mad (whole circuit starts reset itself, LCD print strange marks and words, motors works how they want to). A current draw looks fine (250mA per 1 motor); L293B is powered externally and there should be no short circuit. I tried to add 100nF capacitor between Vcc1 and GND (internal logic) and 1000uF between Vcc2 and GND (motor supply). Maybe a very little progress here, but still it not working. Does anybody know, what should be wrong with it, please?

Thanks.

nevar91: Hello,

I have build up a simple circuit with HD44780(LCD), L293B and 4x this motors:http://www.robotshop.com/world/dfrobot-6v-180-rpm-micro-dc-geared-motor-with-back-shaft.html, powered at 5V. With a only 1 motor connected it works great, but when I connect 2 or more motors everything go mad (whole circuit starts reset itself, LCD print strange marks and words, motors works how they want to). A current draw looks fine (250mA per 1 motor); L293B is powered externally and there should be no short circuit. I tried to add 100nF capacitor between Vcc1 and GND (internal logic) and 1000uF between Vcc2 and GND (motor supply). Maybe a very little progress here, but still it not working. Does anybody know, what should be wrong with it, please?

Thanks.

As always - schematic and code for us...

Also - what happens when you just have the LCD connected (nothing else)? What about just a motor, then two, then three, etc?

Also - L293B... hmm - one version of the L293 has back-emf diodes built-in for the motors, while a different version doesn't (you have to add them externally); maybe that's the issue?

Also - you mention the L293 is powered externally - by what? What are the specs of this power source (and did you connect the grounds together to the Arduino)?

Also - what happens when you just have the LCD connected (nothing else)? What about just a motor, then two, then three, etc?

Same problems…

Also - L293B… hmm - one version of the L293 has back-emf diodes built-in for the motors, while a different version doesn’t (you have to add them externally); maybe that’s the issue?

I tried both L293B and L293D versions…

Also - you mention the L293 is powered externally - by what? What are the specs of this power source (and did you connect the grounds together to the Arduino)?

It is powered directly from 78S05…

I uploaded schematic to here: http://img824.imageshack.us/img824/7894/schematicz.jpg. It is a circuit with ATmega644P…
The code is here:

#include <LiquidCrystal.h>

LiquidCrystal lcd(25, 24, 20, 21, 22, 23);

void setup() {

digitalWrite(12, HIGH);
digitalWrite(13, HIGH);

lcd.begin(20, 4);
lcd.setCursor(1, 0);
lcd.print(“ROBOTICKE VOZITKO”);
lcd.setCursor(0, 2);
lcd.print(“SPSE a VOS Pardubice”);
lcd.setCursor(0, 3);
lcd.print(“Stanislav Jirak-4.B”);
delay(2500);
}

void loop() {
digitalWrite(16, HIGH);
digitalWrite(17, LOW);
digitalWrite(18, HIGH);
digitalWrite(19, LOW);
lcd.clear();
lcd.print(“go forward”);
delay(3000);

digitalWrite(16, LOW);
digitalWrite(17, HIGH);
digitalWrite(18, LOW);
digitalWrite(19, HIGH);
lcd.clear();
lcd.print(“go backward”);
delay(3000);

}

I guess the problem is with capacitors, but I dont know what values to choose. I was also thinking about 100nF for each motor, but I am not sure with it. Pls, help anybody....

It is powered directly from 78S05..

What is supplying the power to the 78S05?

I powered it from voltage adapter mostly, but the some problems it do, when its powered from battery.

What is the voltage and current rating of the power adapter? What is the voltage and size of the battery?

I suspect they are not providing enough power to run 2 or more motors and the arduino is resetting or otherwise being unstable.