Hello everyone,
I am using arduino uno with a l298N motor driver.I connected 2 DC motors with it.I used 4 (1.5V AA batteries)+3.7 Li-ion battery in series with it ,making it a 9.7V battery.The system worked fine when there the batteries were used to drive the motors only.When i used the arduino and uploaded my code(arduino taking power from pc,motor taking power from batteries) the motor actually worked according to my code.But whenever i disconnected my pc from arduino and took power from the batteries to power the arduino also, the motors worked for a few seconds and then stopped working.It was during that time the programable LED of arduino uno kept on blinking for some unknown reason.Can anyone help me??I can also provide the video of what happened with system if anyone wants in order to solve my problem.My code-
Make and post schematics of the troubeling setup. Words telling "connect" ..... tells nothing. By the way, connecting different batteries like that will spell diaster for the li-ion battery quite soon.
ON BREADBOARD:
Driver +12V pin-took power from the battery combination(9.7V) +added arduino Vin pin to it
Driver GND pin-connected to bread board+connected arduino uno GND pin to it as well
Driver +5V pin-Didn't use it,left as it is
ARDUINO CONNECTION:
ENA-PWM No.3 pin on arduino
ENB-PWM No.10 pin on arduino
In1-no.5 pin on arduino
In2-no.4 pin on arduino
In3-no.8 pin on arduino
In4-no.9 pin on arduino
Used M-M,M-F,F-F jumper wires for all the connections
Please post a schematic. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.
Your pictures are useless, there is way to much clutter in them. When the Li battery becomes a fire ball take a picture of that. Save all of us a lot of time and post a schematic. Also post links to "Technical information" on the hardware items. Your choice of parts is far from the best. If you have a trash can that is the perfect place for the L298N, get a bridge with MOSFET outputs. Use your multimeter and measure the voltage at the battery then at the motor you should then understand what is happening.
But why is the arduino rebooting in the middle of running the code?Its not executing the the full code yet executes some part and after some time doesn't even do that as well.Can you tell me why?
First time posting in the forum,didn't know all the rules of posting .Well i get that people are of different attitudes.By the way thanks for being brutally honest.About the clutter and trash can part-I am a new learner
Certainly. Easy. The Arduino power, voltage or current, is being vastly reduced or completely turned off for an instant. When you have drawn a schematic or even a block diagram of how you have all this project wired together, perhaps the source of the problem will be found.
If even one of your non-rechargable cells has a high internal resistance, the Arduino voltage will drop below the minimum necessary to operate. Check the total voltage of your battery string while trying to run the motors.