Let's Make Robots!

Making my robot tell when it's fallen over

Hi everyone! I have a question about sensors for making my robot realize it's fallen over. I see it now in a couple of robots and semi robots, where a bot can determine if it's fallen over. I did a bit of research and found a couple of options, but i'm not sure which one would be best. I saw an acellerometer, buthose are expencive, tilt sensors look more like what I'm after cuase they seem cheap and are not as dangerous as mercury switches. I'm not exactly sure what would be best or if I'm missing something. I figure if they made rumble robots and soldthme for 30 dollars, there has to be a really cheap and effective way ot make my robot tell it's fallen over. it's also suppsoedot tell which way it's fallen over, and I figured out how ot do it with three wit the mercury or turn sensors. it's humanoid in shape with two arms, a head that turns, torso and wheeled legs. The bot is also an estimated 5-6 inches tall, so it's not too large.

Thanks for any help, I've been trying to figure this out for a bit. I'm also using the pickaxe and the 28x1 supplied in the start here robot.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

This is the absolute simplest way to tell if your bot has fallen over. One digital (or analog) input

Full Make-article here

As Telefox suggested, tilt sensors are the most practical. If you are having trouble buying them then they are dead simple to make.

Get a ball bearing and put in a small plastic tube such as a drinking straw or the body of a pen. Seal the ends of the tube with two electrodes at one end. Contact bounce can be a problem but a simple RC filter can usually fix that and by experimenting with the shape of your electrodes so they form a funnel you can eliminate a lot of the bounce.

My caterpillar robot used two tilt sensors mounted at 45° to tell if it was right side up, fallen left, fallen right or upside down. By using resistors and an analog input, one input pin was all that was needed.

Oooo! Or I could use tw opaper clips or some other conductive material so that the metal ball just makes contact and completes a circuit. Perhapse bend two paper clips or a copper wire into shape and pop it in the inside.

 

Thanks so much for your help! And everyone else too!

I saw these two DIY solutions last night and thought they were quite nice:
Tilt Activated Switch
Motion Sensor

The second one is pretty much exactly what you described, with two pairs of electrodes =)

I like that second one, very clever because it is so simple.

light sensor under the robot, enclose, it to be dark... read it into a variable and compare... if more light, its fallen

Tilt switches are indeed what you probably want to use here, since they're cheap and require virtually no coding to integrate. It looks like you've already figured out that you can tell whether you've fallen left/right/forward/back/upside-down with only 3 switches aligned at different angles.
They're harder to find, but you can also get multi-axis tilt switches which use a little metal ball inside a nice housing. One or two of these would be easier to add than 3+ single-axis tilt switches if you can find them.

If you connect one terminal of each tilt axis unit to a digital input (with internal pull-up resistors) on the PICAXE, and the other terminal to ground, you will have a very simple and effective way of setting up the circuit.

Also had an idea to use various resisters to send different signals so I only have to use one port. Not sure if that would work, unless I used the code that's used in the rf sensor and modified it to detect specific ranges. But if you know where to get those multi-axis tilt switches, that would be awesome! The less room I use on my robot, the better! :D

 

Thanks for your help!

If you use an analog input instead of a digital input you can definitely use a resistor arrangement to detect which tilt switches are on/off.

I'll have a look around my usual suppliers and see if they stock multi-axis tilt switches - what county do you live in?

Meant to say that I've been trying to locate tilt sensors, but am having trouble. Sorry about that.