Difference of servo motor and DC motor

Very simple question, but I am confused for that.

I don’t know what is the difference between sevo motor and DC motor.
Why the servo only need 1 PWM pin and the DC motor need 3 pins?
Is the servo motor usually used for controlling the directions?
For motor driver, I see the M+ M-, what is it mean? the pwm is used to control the speed?
Stupid question but just don’t understand

a servo is a positional device versus a rotational device. the duty cycle of the PWM signal determines the fixed position of the servo.

a dc motor rotates continuously, in a clockwise or counterclockwise direction, at am adjustable speed.

An RC Servo uses a special encoded PWM signal. It tells it to go forward or reverse and to what position by changing the period of the PWM signal.

A servo needs 3 connections:+,-,Signal.

A DC motor has two connections M+ and M-. Put + on M+ and - on M- and it will run clockwise. Put - on M+ and + on M- and it will go the other way.

A microcontroller can’t directly control a DC motor because it doesn’t have enough power. It needs a control board… And that usually connects with 4 wires… +,-,Run/Stop,Direction.

A more general description of a motor would be that it is a device that converts some form of energy, say electrically or compressed air, and converts it into motion. What ever the power source of the motor is, when you apply power it just moves, you can vary the strength of the power source or turn the power on or off but that is the limits of your control. With a simple motor you may have a control board but there is no feedback mechanism.

A servo motor can be thought of as any type of motor that has some form of feedback that is used to control its position, velocity, etc. To provide this control we now have three main components: The motor, the feedback mechanism, and the motor controller.

A DC-PM motor uses a set of strong permanent magnets and electricity to generate a rotary motion. As other have mentioned you can control the direction the motor spins by which direction you connect the motor leads to the power source. If you want to control the speed of the motor you can vary the voltage applied to the motor, a motor hooked to a 12V source will spin about twice as fast as when hooked to a 6V source. Another common method of controlling the motors speed is to turn the voltage source on/off very rapidly so the motor sees an average voltage that is in proportion to the on/off ratio (duty cycle). Since there is no feedback mechanism this type of control is referred to as ‘open loop’.

A servo mechanism has some sort of feedback mechanism built in, like an optical encoder or a small potentiometer as in the case of hobby servos. This feedback device allows the control board to monitor the angle of the motor shaft and precisely control its velocity/position. Some types of motors controllers may make use of the characteristics of the motor itself and how the motors operation distorts the electrical flow through the the motor as the feedback mechanism. This is common in things like brush-less DC motors, even though there is no external ‘sensor’ there is a feedback loop from the motor that the controller board is using to control the motor.

The type of interface the motor control board provides us can vary quite a bit. As has been mentioned two common types are the hobby servo which uses the duty cycle of an applied PWM signal to indicate both direction and speed/position. Another common type uses a PWM signal to indicate speed and a direction signal to indicate which way the motor should rotate. So called digital servos and stepper controllers commonly accept step and direction inputs. The faster you pulse the step signal the faster the motor moves.

This may be a bit of a long winded explanation but the main thought is that a servo is just a motor with a feedback mechanism that is used to help control the motor. The motors controller board (which could be built into the motor as is the case with a hobby servo) may accept a variety of different types of control signals that require us to interface with them in different ways.

Thank you guys, I learn many.
Now I can try my first motor application.