I am starting new with L298n. I connected microcontroller with the L298n with following parts
microcontroller
L298n motor driver board
12v dc supply adapter
12v dc motor
connectors
When I checked the motor with 12v dc adaptor directly, it works.
When I checked the inputs to the L298n on IN1, IN2 pins for changing directions of the motor, they are getting high correctly.
When I check the output at OUT1 & OUT2, and connect them to the dc motor, the output is zero and motor doesn't move.
The ground wires of the microcontroller and the L298n supply are the same. They are connected together.
The schematic of the setup is attached as image with this post.
Please add a link to the exact driver board you're using.
And your schematic is kinda weird, please add a hand drawn schematic with all the connections (don't forget anything!), and possibly attach a picture of the real circuit.
Why? He already said:
The ground wires of the microcontroller and the L298n supply are the same. They are connected together.
A connection to the enable pin is missing in your schematic. As @docdoc already suggested show a really complete schematic which shows all connections.
I created a hand sketch and clicked picture of the actual circuit. Please find them attached.
I made one modification, I connected ENA pin also with D2 of the microcontroller, although that may not be required, as ENA was connected by jumper on the L298n.
The circuit made no progress, the motor i tried connecting to OUT1/OUT2 and OUT3/OUT4 as well, but there is no movement.
I did the same for testing L298n and found that OUT1/OUT2 were always getting no output, probably the board L298n with me is broken for these ports or what else could be the reason.
But then I tested for OUT3 & OUT4 and they displayed voltages.
Then I modified my circuit
and instead of IN1/IN2, I connected my microcontroller outputs to IN3/IN4 and connected the motor to OUT3/OUT4. And my circuit is working as intended.
Probably the OUT1/OUT2 have manufacturing fault as this is a new board, just out of packing.
Btw, thanks for your inputs, it really triggered me to try out few more things.
GND of microcontroller and L298n should be same ( I had it already, but for the purpose of someone, who might find it useful )
ENA/ENB need not be connected to microcontroller unless you are interested in managing speed of the motor/s, the default jumpers are good enough for max speed
L298n has enough current/voltage to power the 12v dc (2A) motors ( already there in the L298n specs )