View unanswered posts | View active topics It is currently Wed Jul 23, 2014 2:35 am






Reply to topic  [ 9 posts ] 
VEX/Robotc balancing robot with new video and code 
Author Message
Rookie

Joined: Sun Nov 20, 2011 12:06 pm
Posts: 14
Post VEX/Robotc balancing robot with new video and code
Here is the robot I made from VEX parts and robotc:

Robot in action: http://youtu.be/iTceFfr1_Ss

Closeup of the robot parts (actually not much to it:) http://youtu.be/VKmyDMTzyBE

I've attached my robotc code and also the scilab code i used for design and simulation.

One of the problems i'm having is getting data from the live robot when it is moving.
I used the debug stream to test the individual parts but that's not practical with the real time system. (I crashed the bot trying!)
If anyone has any ideas on this, i sure would appreciate it!


Attachments:
scilab_code.zip [1.91 KiB]
Downloaded 710 times
robot_2w_12.c [8.37 KiB]
Downloaded 800 times
Mon Jan 30, 2012 6:32 pm
Profile
Rookie

Joined: Fri Jan 27, 2012 6:57 pm
Posts: 40
Post Re: VEX/Robotc balancing robot with new video and code
Wow, that is really cool!
What kind of control feedback loop are you using? It looks like a Derivative controller, but I'm not sure. Have you considered using a PID Controller? Would that be suitable to this application?
Also, good code comments! Try to use more descriptive variable names if you can though ;-)

Good job overall, though, with building a VEX Segway! I don't think I've ever seen one made with VEX parts before.
P.S. You have a ton of PWM cables! :-)


Tue Jan 31, 2012 2:33 am
Profile
Rookie

Joined: Sun Nov 20, 2011 12:06 pm
Posts: 14
Post Re: VEX/Robotc balancing robot with new video and code
Before I started this project, I looked at the "inverted pendulum on a cart" problem in which there is a ton of stuff on the net. Well, one of the articles "http://www.engin.umich.edu/group/ctm/examples/pend/invPID.html", showed PID control for the problem and its shortcomings. Most people were using full state feedback, so that is what I used.
Thanks for the nice comments!


Tue Jan 31, 2012 8:23 am
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:44 am
Posts: 439
Location: Pittsburgh, PA
Post Re: VEX/Robotc balancing robot with new video and code
Looks great again hmoor14!

Do you mind if I put this up on our blog?

Also, if you're fine with it, can you answer the following questions so I can add it?

1) What inspired you to build this robot?
2) How long did it take you to make this?
3) What are your future plans with the robot?

And if you have any descriptions you want to add, feel free. Thanks!

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Use the ROBOTC Ticketing system

Robotc.net| Robomatter Store | Robotics Academy | CS2N


Tue Jan 31, 2012 3:49 pm
Profile
Rookie

Joined: Sun Nov 20, 2011 12:06 pm
Posts: 14
Post Re: VEX/Robotc balancing robot with new video and code
No, I don't mind - not at all!

1) What inspired you to build this robot?
I wanted to start learning about robots and how to control them. So, when I saw a video on a balancing robot, I decided I would try that project.

2) How long did it take you to make this?
This was my first robot, so it probably took longer than it should have!
I pretty much did it over the Christmas holidays and then some. So about a month part time. Most of the time was not actually spent building the actual robot but learning how to design it and test the pieces. Just getting around the deadzone in the motors took me a few days.

3) What are your future plans with the robot?
I'm fixing to take it apart, I need the parts for my next robot:(
But, I am going to keep what I've learned (which was so, so much).


Tue Jan 31, 2012 11:51 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:44 am
Posts: 439
Location: Pittsburgh, PA
Post Re: VEX/Robotc balancing robot with new video and code
Thanks so much! I'll put this up on our blog.

_________________
Vu Nguyen
Software Training Development Team | Webmaster
Need more support? Use the ROBOTC Ticketing system

Robotc.net| Robomatter Store | Robotics Academy | CS2N


Wed Feb 01, 2012 10:12 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: VEX/Robotc balancing robot with new video and code
hmoor14, you're project is awesome!

I'm in the process of creating a self balancing robot myself, but am also having to compensate for the deadzone in the VEX motors. How did you come up with your mapping - something semi scientific or guess and check?

Any advice is greatly appreciated!

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Fri Apr 06, 2012 9:38 am
Profile
Rookie

Joined: Sun Nov 20, 2011 12:06 pm
Posts: 14
Post Re: VEX/Robotc balancing robot with new video and code
Sorry for the late response (school just gets in the way).

Here is how I came up with the mapping.
1) I set the robot sideways on a table and strapped a 5 lb weight to the wheel (see the attached pic).
2) Then I used a program to measure the steady state speed for the following motor settings (50ms for 1st value and 50ms for second value):
20, -15
20, -10
20, -5
20, 0
20, 5
20, 10
20, 15
20, 20
30, 30
40, 40
50, 50
60, 60
80, 80
100, 100
110, 110
120, 120
127, 127
3) From the above table, I made a mapping table: (mv1,mv2) = mapTable(desired_speed) to linearize.
4) I tested the table and then tweaked (this was somewhat trial and error and hampered by the battery voltage. I should have included the battery voltage in the mapping but I was tired of fooling with it by then, and at the time, I wasn't sure the whole thing would work anyway!)

Some things I am going to try for next robot:
a) include battery voltage
b) try different weights

If you find a better way of doing this, please post it. I know I could use the help!
Thanks


Attachments:
File comment: Here is the code for testing the motor with 5 lb weight.
motor_params_test9.c [1.24 KiB]
Downloaded 567 times
File comment: Here is the 5 lb weight strapped to the wheel.
motor_test_setup.jpg
motor_test_setup.jpg [ 170.92 KiB | Viewed 8801 times ]
Fri Apr 13, 2012 3:28 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: VEX/Robotc balancing robot with new video and code
Quote:
Sorry for the late response (school just gets in the way).


Thanks for the response! Very slick.

Honestly, I probably won't be able to get back to it for a few weeks, but I'll be sure to share what I do find (work just gets in the way, too).

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Apr 16, 2012 10:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.