Planning to built an inverted pendulum. However, don't know how to measure the angular position of the pendulum (even not sure if measuring the angular position is the best option to control such a system).
Using a gyroscope sounds good but just wanted to get your opinions.
What would your solution be ?
MEMS gyroscopes measure angular rates of rotation, not a position.
Old mechanical gyros measure position against the reference frame they were locked in.
You may try MEMS accelerometers - they give you a position (tilt) against the Earth's center of gravity (but only when they are still or move without any acceleration).
For playing with inverted pendulum you most probably need both - gyro and accelerometer - and you have to do some kind of data fusing. The simplest approach could be the accelerometer used as tilt meter, but any nonlinear movement will introduce an acceleration added to the tilt.
There are also ICs (e.g. AS5030) that will sense the rotational position of a magnet placed over them. Offhand I can't seem to find any retail breakouts for them. The least expensive option but also the most difficult to implement.
There are also ICs (e.g. AS5030) that will sense the rotational position of a magnet placed over them. Offhand I can't seem to find any retail breakouts for them. The least expensive option but also the most difficult to implement.
Do I need an encoder as I am using potentiometer ?
Chagrin:
A potentiometer would probably be easiest if you can find one that's durable enough and allows continuous rotation.
Do I need an encoder as I am using potentiometer ?
No, you just need an encoder or a pot. Personally I've never seen a potentiometer used for continuous rotation and would expect them to be expensive; encoders seem better suited to this type of purpose.
You might also look into hall effect sensors if you want your inverted pendulum to run for long periods of time, and don't want to worry about a potentiometer wearing out.