Thursday 12 March 2009

Quadrature optical encoders for my motors

The two motors on the wheel chair are fitted with a braking system. This system lock the motors when no power is applied to them. I guess, you do not want the chair to move out of control when the battery is flat. But for me, these brakes are not required and need to be removed.
The good thing, it that I will be able to fit quadrature optical encoder where the brakes were and fit the protection back.
The encoder will provide position, and speed to the PID controller. The PID requires signals from the motors so it can control the motor in acceleration, speed and position with great accuracy. This is the idea:



Two sensors will detect the increment of the disc fitted on the motor's axis. The difference between the signal provide the sense.



A quadrature encoder provides 2 signals, frequency provide the speed. A search on google will provide much more details. I could have built them myself, but I found 3 of these encoders on eBay for a pound, so better this way. Here is one of them:
In fact, I build similar encoder a couple a year ago with infrared led and sensor. It was working, but they were big and not as good as these one.

This is how I am planning to fit them:

And this is how they fit:

For the control, I will then use the PID controller from Gamatronix and the motor controller MD03 for more power. The PID controls the MD03 in 0-5v + sense. The encoders send back the signals to the PID. The PID are controlled via a I2C bus linked to the computer. Here is how it works:

I started to test this solution. So far, so good. I can control the wheels speed and position. I am planning to control the wheels using position mode so like this, if the PC crash, the PID will stop at some stage as no new position is received. The PID also include switch limit input that will be linked to a front and back bumper. This way, the PID will stop the motor if the robot crash into something without the need of the program on the PC to take action.

No comments:

Post a Comment