Vegway, Balencing Vex Robot

I’ve been working on this robot called Vegway, which is a balencing Vex robot.

Here are pictures of Vegway (sorry that they are so blury)

You can find more pictures here srobot | Flickr

Here are two videos of Vegway

Vegway part 1,

Vegway part 2,

You can find my other videos here http://youtube.com/srobot

Here is the code that is used in the video above, in “C”

http://www.mediafire.com/?1irjhynuor1

And here it is in EasyC

http://www.mediafire.com/?cmnchzxnjdj

You may post link to the above code, pictures and video, and/or use use the code at events, but please, do not take it as your own, or upload it to any sites.

I’m going to be inproving the code that Vegway uses, so check out my website ( [http://www.ribo-labs.com ) for updates.

All the best,
–Scotty](http://www.ribo-labs.com ) for updates. )

I thought it was called segway? Are you talking about the one you stand up on?

What do you use to balance it?

The Segway is what was my inspiration, but the one is Vegway because it is made with Vex.

I used the Vex line follower sensor.

–Scotty

Ok well I haven’t looked at the code yet but from the pictures it would appear that the robot must balance by trying to keep the line sensor the same distance from the ground which it would measure by the amount of reflected light, right? Anyways very cool. :slight_smile:

Here is the robot with better coding.

Yes it trys to keep the proximity/line follower sensor (“prox” in the code) at value 700.

looks a little unstable.it needs smaller wheels.

yeah, i tried this amazingly hard project awhile back… i was never able to get it to balance on its own, which looks like you havent either. suggestion: slow down the motors A LOT, it is way too jerky, and try to make different “zones” at which the robot is tilted in a way that the sensor values are in a range to make the motors move at varying speeds. eventually i gave up because i couldnt get the vex sensors/motor to be accurate enough.

Cool, I’ve never thought/known they could be used like that. I’ll have to try something like that out.

i tjust seems that if you slow it down it would be ok because right now it reacts with too much speed. I really dont think the sensors read fast enough though, i could be wrong.

You have to make the motor speed proportional to the amount of tilt. That’s called Proportional Control.
And you have to make the motor speed change with the rate of change of the tilt, ie, how fast is it approaching the balance point. That’s called Derivative Control.
And you have to adjust the motors so that the sum of all tilt measurements over time add up to zero. That’s called Integral control. Together, it’s called PID control, and it is a whole discipline unto itself.

I tried this a few months ago. I could never get it to balance. I think the 55mS processor loop speed is a little slow, and the backlash in the motors caused lots of problems.

Cool use of the line follower as a distance measurement. Keep it up, you might get it to balance.

The sensor reads about 100 times in five seconds, so it will work.

I’m not trying to be rude or anything but I have a simple question based on that comment. I like the robot and the concept but, why doesnt it work?

i think it is just that the motors are moving too fast…:cool:

Using the non-linear adjustment schemes your refer to under the PID moniker are not required; but they are one way to get the job done…

My first thought is that your motion is Very Quick… I wonder if adding a “balancing tool” would help… (re: Tightrope Walker)

Make Note of the “Biomechanics” section from the above Wikipeda article:

“A wire-walker may use a pole for balance or may stretch out her arms perpendicular to her trunk in the manner of a pole. This technique provides several advantages. It distributes mass away from the pivot point and moves the center of mass out. This reduces [angular velocity because her center of mass is now swinging through a longer arc. It takes longer to sweep out the same angle because the center of mass has a longer distance to go. The result is less tipping. In addition the performer can also correct sway by rotating the pole sideways. This will create an equal and opposite torque on her body.
Sometimes the pole is weighted and has a dip at the ends. This provides additional stability by lowering the center of mass.”

I think this would let you “react slower” to your direction changes for your Vegway…](“Angular velocity - Wikipedia”)

Very cool!
I’m excited to see a member of our community create such an impressive machine.

Kudos,
John

A easy (I doesn’t look hard at first glance) step in this direction would be putting the heavy battery at the bottom of the machine instead of at the top (unless having it at the top is part of the challenge…).

Blake

Thank you every body, for encouraging me on this idea I had. I knew that this has never been done with Vex before, but I had no idea that there would be so much demaned for this type of thing.

Thanks for your input! I have been working on the code for proportional speed control in the last two days. Yes the 55 ms loop is slow for this type of robot put I think it can be done.

It does not work at this time because I have not profected the programming.

Thank you for this link, and the input on the ballancing of a short object VS. a tall/long object. I think I will try making the robot taller today.

Thank you.

Yes, this is part of the challenge. I want to make a true balancing robot, NOT the type “Ducttape444” made some months back, altho that robot was pritty cool.:cool:

Thanks again every body for the input on Vegway.

–Scotty