Arduino not giving signals to LN298 or mistaken wiring

Hello all, I am using arduino nano for my project and I try running motors with ln298. The problem is that the motors are not starting to run and I see the onboard led on the arduino flashing every second and clicking noise from the arduino.
The wiring is this: digital pins 2,3,4,5 are used for controling left forward, backward; right forward backward; vin is supplied with 9v and on the same breadboard rail I use ln vin too; gnd is from battery, arduino gnd and ln298 gnd are on the same breadboard rail as the battery supplied gnd.
I am providing a picture of the wiring:

And my code: //#include <SoftwareSerial.h>//pins for left motorint outputPinSix = 2;//sig -

Posting photos of the wiring of a project is almost always a waste of time as it is in this case. Please post a schematic of the wiring. A photo of a pencil and paoer drawing is good enough

As for your code

The easier you make it to read and copy your code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

1 Like

Where is your +12V source?

1 Like

Is that a 9V smoke alarm battery that I see there? Those batteries cannot supply enough current for a motor. Better would be a 6 AA (1.5V) cell pack if you need 9V.

Besides the fact that the ancient and very inefficient L298 is a really crappy motor driver by today's standards. The L298 drops 2 to over 4 Volts of the motor supply as waste heat. Not so good for a battery powered device.

Pololu has a good line of motor drivers.

1 Like

Thank you for the advice I will try to provide a schematic.

I am using 9v battery, no 12v source.

Hello, thank you for the information! I have a nest for 4 1.5V AA batteries and I tested the configuration at first with it and it was behaving well. I have also LIPO batteries(3.7V) and I will connect two of them in series and use the 7.4V from them. As for the driver I do have one pololu driver that I have not used by now not even once. I might try using that. thank you again!

the motor board has 12v connector, i assume for motor power, no?

The input voltage for the motor driver can be from 5-35 Volts. So driving it in 9 Volts is okay, but as the other person mentioned the battery is not supplying the needed current. So I changed the battery with 2 Li Po batteries each 3.7 Volts and suming them both I get 7.4 Volts, which is plenty. So everything is okay.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.