I am working on the self-driving car as a final year project. I want to map the steering wheel motor angles with frames captured via a camera of the track. In order to generate the dataset, I am looking for a motor, whose angle can be read at any instant, so that I can create a database where each frame is mapped with its steering angle. After training, each frame will predict the steering angle and steering wheel motor has to turn accordingly.

That means a special kind of motor is required, whose angle could be read while training the car and also it could be turned at any angle via a microprocessor while testing the car.

I know that DC motor angle can neither be read (required during training) nor it can be turned at a specified angle via a microprocessor(required during testing). Encoder DC motor angle can be read at any instant but it can't be moved at a specified angle via a microprocessor. Stepper motor can be moved at any angle by a microprocessor but its angle can't be read, likewise for servo motor.

Please educate me if there is any lacking. I have on purpose explained the application where I want to use the motor, so that you may have better insights about which motor to use?

  • \$\begingroup\$ I wouldn't rule out stepper motors or servos just because the angle cannot be "read". In the case of a stepper you know where it is as long as you homed it once, and keep track of the steps. For a servo you just need to trust that it is where you've commanded it to be. You can create a transfer function before hand in the case of non-linearity. \$\endgroup\$
    – Drew
    Commented Jun 15, 2020 at 20:46

2 Answers 2


You are looking for a servo motor with encoder feedback. The motor itself could be any type and position control done by, for example, a PID controller and feedback from the encoder. Many modern vehicles already have steering angle sensors.

enter image description here

Figure 1. Some vehicles are fitted with steering-angle sensors. It may be possible to read these over CANbus. Image source: Orchid-Tech.

I want to map the steering wheel motor angles with frames captured via a camera of the track. In order to generate the dataset ...

This seems a poor control strategy as it will be skewed by cross-wind, road camber, tyre wear, understeer, oversteer, etc. Instead work out the basic relationship between steering wheel and front wheel - you might want to read up on Ackerman angle - create an equation and use that as your first estimate of required steering input. You then use feedback from subsequent frames to bring the error to zero. That's the way humans do it too.


A motor can be combined with an encoder (attached to the shaft) in a single unit. There are many such products. The encoder can be absolute or incremental, depending on requirements. Or there can be both.

Or an encoder (or other method of measuring rotation angle or displacement) can be attached elsewhere in the system, which is often advantageous since it can measure a variable that is closer to what you are trying to actually control.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.