Monday, November 23, 2015

Switching from hall effect sensor to reed switch to 3-axis accelerometer/magnetometer

We tested the hall effect sensor and attached it to 3pi robot. The robot works fine but the problem is that the size of sensor and magnet are both quite small while the magnetic field can only be detected when they are placed closely. This makes it very difficult as the robot cannot go straight along the line of magnets all the time. So we decided to try the reed switch as it is like a bar which might be helpful detecting more area. We changed the circuit we built on the robot and attached a reed switch.



I even tried to connect two reed switches in parallel to extend the area they can detect. But it didn't help too much. Because the primary problem is the robot will deviate eventually and the deviation accumulates as it goes. 



The robot system is now open loop and it is very hard to make it go straight by purely adjusting the speed of two motors as the actual behavior depends not only on the rotating speed of wheels but also the mass on the body. I tried to add some mass on the rear of the body to make the robot even. This helped a bit but trying to close the loop and adjust the behavior along the way should be the best solution. Therefore we picked a 3-axis accelerometer/magnetometer IMU and we'll connect it with mbed using SPI instead.



No comments:

Post a Comment