Measuring angle of object in front of you
August 5, 2011
So I have 0 experience in building robots, and so far this robot is just in my head, but when I have money to start buying parts I plan to build, and document the build. Basically I'm making a cheap Tamiya tank-tread based robot. Eventually I want this to be able to go play outdoors semi-autonomously on some local 4-wheeler trails (I say semi-autonomous because said trails are surrounded by river, so I want to keep an eye on it).I want it to be able to decide on its own whether or not it is capable of going up a certain incline. This can be a set number, I can experiment to find what sort of incline it can do safely, but from a lot of reading I can't decide how I want to do this.
I originally throught that maybe I could use an accelerometer to make it back up if it inclined too far, but it turns out that the ability of my phone to tell me what angle it is comes less from raw sensor data and more from complex filtering of data (ie: Kalman filtering). From what I've read using a full IMU is ideal, but this is something I'm trying to do on a very limited budget, and I don't like copy and paste coding, I prefer to understand the code I'm writing and all that code for a Kalman filter is beyond me.
The second option I thought of was using two distance sensors (likely sonar, since my understanding is that ir is useless in full sunlight), or one that could move up and down on a rack to measure the distance at two different points, and use simple geometry to measure the angle. However from what I have read the sonar signal tends to have trouble returning to the receiver when bouncing off of an angled surface, which defeats the purpose. This also has the issue of only having one axis, which would help only in the ideal situation that I am hitting the hill straight on.
I've also considered maybe using two whiskers at different heights, with their lengths making them form the set angle I mentioned before. If the top one hits first it is unsafe, and I should turn around. If the bottom one hits first, I am safe. This obviously has the same single axis problem as before, and additionally is going to end up bending/breaking thw whiskers (since they have to hit the hill to measure the angle, they will also push against the hill as the robot moves forward until the chassis is at a great enough angle to lift them above the ground).
I've also considered that maybe I could build two boxes, each with a pendulum having its axis of rotation on a potentiometer, which would essentially give me fairly precisde feedback on both the pitch and yaw of my bot (these would be mounted with one going fore to aft, and the other left to right). This is the one option I've come up with that I could do on the cheap and give me reliable two axis feedback so long as I only made measurements while I was stopped. The primary issue I'm having (in my mind) is that these might be kind of large, and are a decidedly mechanical and non-roboty method of doing things.
I've seen some mechanical tilt sensors, but to my understanding these all use mercury in a glass tube, and I'd rather not have mercury involved (while the bot is running I will be warmly embracing trees in my arms).
So does anyone have any advice? I realize that an IMU could be built relatively cheaply, but I have no PCB experience, and feel that building the entire board might be a bit over my head as a beginner. Is there an easy solution that I've missed in my research? Are my pendulum-pot-boxes a revolutionary invention that will likely change the entire world for the better? Should I just keep my bot indoors, and let it aimlessly wander my house not risking life-and-limb (microprocessor and chassis?) in the wild blue yonder?