Hello , first thank you for taking the time to read this ;
i am trying to run 6 brushed DC motors using 3 L293D microchips ; the 3 chips are connected to 2
74HC595 shift-registers ; the shift registers are commanded via Arduino SPI (an Atmega328 with arduino bootloader) ; here is a screenshot of the full schematic :
for the motors ; i am using a 12V power supply (12V , with 5A maximum current output) .
the arduino , 74HC595 chips and the L293D logic are powered with an independent sector isolated 5V input (1Amp maximum output current) . the 12V power supply and the 5V power supply share a common ground as do all of the components of this system .
i can command each of the motors individually ; the motors work perfectly according to their respective datasheets , i can run up to 2 motors this way and they function correctly . i would also like to note that all of the motors are connected to gearboxes and they function under load at all times .
the problems start when i try to get more than 2 motors working at the same time . once i trigger a third motor to run the arduino immediately reboots (i can tell that it reboots because i monitor the functioning via Serial communication , the program prints "boot" when it boots so thats how i tell that it reboots) ; the circuit is otherwise stable and functions correctly and it only reboots when a third motor is triggered .
My trouble-shooting attempts :
- when i remove the 12V power supply ; and connect the 5V power supply to the motor power supply line (which means i connect the 5V power supply to both the arduino/micro-chip logic and the motor power supply line in the L293D ; which means that the same 5V power supply would power everything) in this case ; i can run all the motors at the same time (all 6 motors) they just run at a very slow speed ; the arduino doesn't reboot in this case the program continues to run . but motor speed is too slow and the motors cannot give enough force for my application
2)- when i remove the load from the motors (i remove the gearbox and all other forms of load) and allow the motors to turn freely ; with the 12V power supply in place . all 6 motors run correctly and the arduino doesn't reboot . when i put the load back on ; the arduino reboots when 3 motors are triggered to run at once
3)- i added a 1000uf electrolytic capacitor in parallel with the 12V line : it didn't solve the problem
i then added a 0.1uf ceramic capacitor in parallel with that : it didn't solve the problem
i then added an additional 100uf electrolytic capacitor in parallel with both of those : it didn't solve the problem
i then removed the 0.1uf capacitor and still problem not solved
4)- i tried all of the elements in attemp3 but with additional decoupling capacitors added in parallel with the 5V line as-well; still didn't solve the problem
5)- i don't have an oscilloscope at home , but i tried measuring things with a voltmeter : when any new motor starts running the voltage on the 5V line (which is a constant 4.95 without any motor running) drops by about 0.15 to 0.25V whenever any motor starts to run ; the motors being powered with the 12V line . i can't explain this .
it seems that when the current draw on the 12V line gets to a certain level (my guess around 1.2A) it causes some sort of interference that i can't understand ; and this interference causes the arduino to reboot . or there might be some sort of current spike happening on the 12V line .
the 12V line and 5V are fully independent and only share a common ground .
at this point i honestly don't know what to do ;
thank you for your attention .