Balancing bot with ultrasonic sensor - no gyros

Posted on 24/10/2014 by mikerr
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

Here's my slightly unusual balancing bot. Normally balancing bots use motors and gyros,but my minimal bot uses just servos and an untrasonic distance sensor.   Used an old boe-bot platform: 2x continuous rotation servos Aluminium base The boe-bot came with a a basic stamp MCU, so I replaced that with an Arduino Uno Boe-bot's are normally rover type bots, but I moved the servo/wheel mountings to the edge and stood it up on its end to make a balancing robot. You need accelerometers and gyros ...


Balancing bot with ultrasonic sensor - no gyros

Here's my slightly unusual balancing bot.

Normally balancing bots use motors and gyros,but my minimal bot uses just servos and an untrasonic distance sensor.

 

Used an old boe-bot platform:

2x continuous rotation servos

Aluminium base

The boe-bot came with a a basic stamp MCU, so I replaced that with an Arduino Uno

Boe-bot's are normally rover type bots, but I moved the servo/wheel mountings to the edge

and stood it up on its end to make a balancing robot.

You need accelerometers and gyros for a balancing bot, right ?

Not here - I just used a HC-SR04 ultrasonic distance sensor pointed at the floor:

 

shorter distance = falling forward,

longer distance = falling backward.

 

Feeding that into a PID loop got some balancing, at least for several seconds,

and longer with some tuning (0:14 onwards in the video)

 

Connected the ultrasonic like this:

HC-SR04

 

 

The two servos on top are just for weight

- balancing works better with the centre of gravity  higher up

 

I've put the full arduino source code on github here:

https://github.com/mikerr/SonicBalancer

Balances without gyros - arduino, hc-sr04, continuous servos

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post