Hello,
I have a 12v sevomotor 180 degrees, so I need a L298N to connect to the Arduino Uno.
My question is the next one: If I connect L298N to arduino by the PWM and GND, I will be allowed to control the position (0-180 degrees) from my servomotor?
If you are talking about a hobby servo like is use to move model aircraft control surfaces, there is no motor driver required. You will need an external power supply capable of supplying the current require by the servo. This is despite the widely and mistaken method of powering with the Arduino. It may work but it has a good chance of not working and damaging the Arduino.

Use the servo library to control the servo.
The ancient L298 motor driver is really not good for much of anything. Modern drivers are so much better.
Hey groundFungus, thanks for your answer!
So which would be the best way to power and control a 12v servomotor (180 degrees) with arduino?
I have no experience with a 12V servo. Most hobby servos work with 4.8V to 7.2V and can be controlled by a 5V signal. Do you have a data sheet for the servo? What exact servo is it (part number)?
It is possible that a 5V servo signal can control a 12V servo, though that is a guess at best.
Yes I also not sure that a 5V servo signal can control a 12V...
The servo I need is the next one: ds51150
Here a link where to see the datasheet: https://spanish.alibaba.com/p-detail/High-60840843021.html?spm=a2700.8699010.29.12.4d246580SsCjTG
iI found this image as part of an AliExpress ad. that suggest that the signal for that servo is a regular 3.3V to 5V servo signal.

So you would wire it in accordance with the diagram in post #2. I suggest that you use the writeMicroseconds() function of the Servo library to control it instead of the write() function. You will be able to get the full movement that way and with finer resolution.
Thanks!!!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.