A two wheel balancing bot

A while a go i was trying to build a robot that would balance on two wheels (kind of like a seguay or how ever you spell it) but I just couldn’t get any tips on how to make one?

Here is a balancing robot built with lego:

http://www.teamhassenplug.org/robots/legway/

Here is a very nice balancing bot:

[http://www.tedlarson.com/robots/balancingbot.htm#autonomous

I haven’t seen one built out of VEX only parts. If it can be done with Lego, I imagine it can be done with VEX, with added circuitry like an infrared distance sensor. If you are looking for specifics on how to do this with VEX, I don’t think you will find that info.](http://www.tedlarson.com/robots/balancingbot.htm#autonomous)

if your wanted to do this you would probally need a gyroscope like the segway to keep your bot on two wheels i really don’t think that you could build one just out of vex parts though i don’t really know that much about segway other than that

Here is another thread that is related:

https://vexforum.com/t/noob/12501/1

i cant figure out how to do this with VEX. i have tried ultrasonic(not enough detail), light detection(didn’t work) and optical shaft encoders(doesn’t count backwards). None of these work :(. i will keep tring though.

Yeah that two wheel bot is what I was hoping to build with vex.

i know that if you use the ultrasonic sensor the same way the LEGO one used the IR distance sensors you should be able to make a robot that balances on level surfaces

Would I need to use one or two ultrasonic sensors on the robot (one on each side or just one) also if I could find some continuos rotating servos that would be compatible with vex would those work better than the motors?

Here is a balancing bot with VEX wheels and a VEX controller:

http://robotphotos.org/v/members/first/greg+needel/vex/balance/?g2_GALLERYSID=71c4024465eab74d12a944f6df8d7a22

My gut feeling is there may be too much slop in the VEX square drive shaft and bearing system to create a balancing robot.

Here is another LEGO guy kicking our VEX butts in robot balancing:
http://www.techeblog.com/index.php/tech-gadget/nxt-way-the-self-balancing-lego-bot

Mike

Those are both very cool! mike B so ypur thinking that in order to make a two wheel balancing bot you would have to create cutom drive shafts and bearings?

Using this as your goal:
http://www.youtube.com/watch?v=e6S5quqxjYI

I think the best place to start is to get an infrared distance sensor, one that has an analog output, like this one:

http://www.junun.org/MarkIII/Info.jsp?item=9
(Backordered, seems to be popular…)

Or this one:

[http://www.junun.org/MarkIII/Info.jsp?item=73

Then learn how to read back the analog value with an AD input on the VEX controller.

Then, point the sensor at the floor in front of the bot.

Then, the most simple control loop is like this:

#define MIDBRIGHT 512

int InfraredOutputBrightness;

while(1)
{
InfraredOutputBrightness = GetInfraredOutput();
if(InfraredOutputBrightness > MIDBRIGHT) //
{
DriveForward(); // Get bot to tip backwards
}
else
{
DriveBackward(); // Get bot to tip forwards
}
}

Then, watch your robot balance for 2.5 seconds, and fall on its face :slight_smile:
I may have to try this. It sounds like fun!

Mike](http://www.junun.org/MarkIII/Info.jsp?item=73)

Here is a balancer similar to VEX, using hobby servos:

http://homepage.mac.com/sigfpe/Robotics/equibot.html

It uses this sensor:

http://www.acroname.com/robotics/parts/R48-IR12.html

i think he might be right. the square dirve shafts allow for a little movement without turning the axles. i have given up on building a VEX balancer, and now i am trying to do it with an XBC for BotBall (via a NASA course). and yes, the SHARP sensors that you mentioned are very good at setting a value between 0 and 255 for the controller i am using,

you know that you wouldnt exactly have to use two sensors. look at the one made out of LEGO it only uses one sensor on one side. you can measure the distance between the floor at the beggening of the program and then the robot can decide if its too far away or too close to the floor, and then react accorkingly with the wheels. and i dont think you can do much better than the Servos that VEX gives us. they are easy to mount, first off, they have the square bar input, and they give a considerable amount of tourqe and control. from my expirience you can only get more or less power/speed out of a servo. the controllers are all the same. and plus, the high-speed high-power servos usually cost ALOT. so if you cant get enough power just put two servos on each wheel…

Thanks I am just not clear about on thing do mean servos or motors?

I’m starting to build the balancing robot. I have a good Idea on how to do it but the programing is probably going to take it a while. at first I’ll have “training wheels” on it that way it won’t completey fall over if the program doesn’t work. I’ll post on my progress later.
PS: Thanks for all of the good tips and pics :smiley:

i have given up, i dont think vex is custom enough, in that the peices are ready made and the size of the electronics, the programming in EasyC was just not working for me.

well it is worth a shot I have general idea on how i am going to build it.

  1. I’m going to have “training Wheels” on it until if figure ou the programing
  2. The robot is going to have a solid axel first until i’m sure I can safely make it turn
    I hope that it will work but if not I won’t be crushed.

Do you plan on using an infrared sensor? If so, which one?

Actually I’m going to try the ultrasonic sensro and if it doesn’t work then I will buy the infared ummm i’d put pics of what ive built so far but i don’t know how to.