The most complicated sensor on the wheelchair is also the most important. A rotary encoder measures the rotation of a wheel and with a bit of math and physics can measure real world data like distance traveled, the current speed, and even the direction of the wheel.
For this project I am using two photo sensitive resistors to build the rotary encoder. One of them is visible in the picture, the other is hidden by the spoke on the bottom of the chair. These sensors can detect the changing light levels caused by the spokes moving past them.
If I only had one sensor, I could measure the speed of the chair, the distance it has traveled, and when it is accelerating or braking. Although either one of the sensors can make these measurements, I am using the "Brake Sensor" to make these measurements.
The purpose of the "Reverse Sensor" is to work with the Brake Sensor to determine when the wheel is moving in reverse. Since they are offset from each other, one of the sensors will always be covered by a spoke before the other one.
The graph shows troughs as the spokes pass the light sensitive resistor. When moving forward you can see that the trough for the forward sensor happens a few microseconds before the reverse sensor is blocked by the spoke on the chair. When reversing, the brake sensor will be covered just before the reverse sensor (you can picture this if you imagine the graph going from right to left). The Arduino is sensitive enough to detect this minute difference.


No comments:
Post a Comment