0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #90 on: November 12, 2010, 04:56:38 pm » |
[size=14]Announcement:
The complete Balancing robot tutorial is now hosted on Patrik's blog It will be updated on a regular basis.[/size][/color] This thread will stay alive for some time as a "support forum". The thread has now been read over 10,000 times Thanks for your ongoing (but rather silent  ) interest
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #91 on: November 12, 2010, 05:02:34 pm » |
I'm then measuring the angle of the robot manually, and when I apply 45 degrees from equilibrium, the integrated angle is about 15-20 degrees. Hi Jon D, wellcome aboard  I suspect you have a scaling problem. You may also be trying to mix oranges and bananas (degrees and radians). Finally make sure your gravity compensation for the "vertical" accelerometer is OK Back to the basic, go there: http://www.x-firm.com/?page_id=189Print your raw data (ACC_a, ACC_b, GYR) using the serial monitor  Can you reproduce this data layout ?? Is your gyro sign correct ?? Hopefully, Gibby623 will jump in and share his experience.
|
|
|
|
|
Logged
|
|
|
|
|
West Yorkshre UK
Offline
Newbie
Karma: 0
Posts: 16
faster, smaller, more beautiful
|
 |
« Reply #92 on: November 12, 2010, 06:57:03 pm » |
10K hits and still no commertial product, in the last 12 months of work I have learned its still very difficult to get a stable balance. but what then, mapping, prediction and recognition. we have had 4-wheeled non balancing robots for years but only hoovers .Mapping is the next hurdle.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #93 on: November 13, 2010, 10:18:43 am » |
Hi guys, I've been following this thread for a while. Any news on how to add remote control, with say PC USB Gamepad and Xbee. That would add icing to the cake.
//uncle_tom Hi uncle_tom Are you looking for that ???   10K hits and still no commertial product, in the last 12 months of work I have learned its still very difficult to get a stable balance. but what then, mapping, prediction and recognition. we have had 4-wheeled non balancing robots for years but only hoovers .Mapping is the next hurdle. As you can see above, the project is moving The road is long but fascinating and really educational
|
|
|
|
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Full Member
Karma: 0
Posts: 144
Arduino rocks
|
 |
« Reply #94 on: November 13, 2010, 04:47:06 pm » |
Hey Kas,
I finally got time to work on my robot. My old sensors are 5V (they support 3.3V but it's easier for me to use 5V) and have different sensitivity.
The Accelerometer is a 5g ADXL320, 312mV/g at 5V, so I have calculated the "zero" to 63. The X axis is horizontal with positive towards the front of the robot. The Z axis is vertical with the positive towards the top of the robot.
The Gyro is a 300deg/sec ADXRS300, 5mV/deg/sec, so I have calculated the "rate" to 2.777777 . The Gyro axis is parallel with the wheel axle with the positive rotating towards the front of the robot.
I have problems with the signs of the Acc axes. For instance, I have for 0degrees (bot standing upright): AccX=0, AccZ=63 for +90 degrees (bot tilted towards front): AccX=63, AccZ=130 for -90 degrees (bot tilted towards back): AccX=-67, AccZ=125 for 180 degrees (bot upside down): AccX=0, AccZ=193
What do I need to do (in software!) to make it right?
Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #95 on: November 14, 2010, 02:02:54 am » |
I have problems with the signs of the Acc axes. For instance, I have
for 0degrees (bot standing upright): AccX=0, AccZ=63 for +90 degrees (bot tilted towards front): AccX=63, AccZ=130 for -90 degrees (bot tilted towards back): AccX=-67, AccZ=125 for 180 degrees (bot upside down): AccX=0, AccZ=193 Hi Ro-Bot-X sensorZero[ACC_Z] -= 100; // Sensor: horizontal, upward Gravity correction sign is wrong You added 63, should be substracted. You will then obtain: 0 degrees: AccX=0, AccZ=-63 +90 degrees: AccX=63, AccZ=4 -90 degrees: AccX=-67, AccZ=-1 180 degrees: AccX=0, AccZ=67 65 would probably be a better value for gravity correction
|
|
|
|
« Last Edit: November 14, 2010, 06:00:45 am by kas »
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 55
Arduino rocks
|
 |
« Reply #96 on: November 14, 2010, 02:16:44 am » |
Announcement:
The complete Balancing robot tutorial is now hosted on Patrik's blog It will be updated on a regular basis. [size=24]I saw that it was the wrong link in the announcement... This is the right link:[/size] http://www.x-firm.com/?page_id=145
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #97 on: November 14, 2010, 02:27:34 am » |
Thanks Patrik 
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 2
Hobbyist
|
 |
« Reply #98 on: November 15, 2010, 03:21:21 pm » |
Has anyone tried this project with stepper motors? Would this make the task easier or more complicated?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #99 on: November 17, 2010, 01:41:21 am » |
@Ro-Bot-X I have used the xBees for a wireless serial link and also for wireless code uploading. I am currently working on wireless debugging using Xbee and Patrik's Balancing Bot GUI. The two ways communication between bot and PC is OK, but I didn't succeed wireless code uploading sofar. I understand additional components are needed to force reset, please elaborate. Is your bot balancing now ?? @RWehner Has anyone tried this project with stepper motors? Would this make the task easier or more complicated? I have seen lots of balancing bot using continuous rotation servo motor or DC motors (with or w/o encoders). I have yet to see a working implementation based on stepper motors. I am not to familiar with stepper motors, but I clearly see the interest of your question. Others will certainly jump in with additional info.
|
|
|
|
« Last Edit: November 17, 2010, 02:49:35 am by kas »
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 55
Arduino rocks
|
 |
« Reply #100 on: November 17, 2010, 03:56:25 am » |
I have now uploaded a new version of the GUI and bot code where you now can change the values of the following parameters: setPoint K Kp Ki Kd http://www.x-firm.com/?page_id=145I'm working on the 1.3 version where I have cleaned up the code a lot and also added the possibility to change the STD_LOOP_TIME. And also see the values of the lastLoopUsefulTime, lastLoopTime and error.. I will also have added a setting for screen size so the controls should adapt to the screen size so the GUI should look the same regardless which screen size you have.. @kas Are you happy with the xbee kit? How are you implementing it on the kas bot? Do you have the shield on the bot and the USB explorer card in the PC?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 2
Arduino rocks
|
 |
« Reply #101 on: November 17, 2010, 11:15:20 am » |
Great progress on the balancing part, but is anyone working on remote control for this Arduino robot? I built several balancing robots using NXT and VEX kits and this is a great learning project, but I hesitate to spend $400 until I see that someone has implemented remote control of some kind. I think that just the robot without RC is not complete.
keep it up guys, you are doing a good job!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 157
|
 |
« Reply #102 on: November 17, 2010, 02:08:47 pm » |
How are you Kas? I just wanted to thank you again for your post *balancing robot for dummies* it helped me a lot, and want you to be the first one to see my improvements: this is using a complementary filter and PID with a sparkfun IMU... going to use encoders soon and then RC control. I was wondering, is this any good? how much better can I get without using encoders? why is it drifting like that when I push it harder? Tunning more P or D doesn't help! any comments about it would be greatly appreciated thank again! Nahua Hi Nahua, welcome Thanks for your PM and the nice words your bot is balancing pretty well, congratulation  P(i)D tuning seems optimal The forward/backward drift is typical and normal, it will disappear with your encoder implementation Are you still using EMG30 motors?? can you quantify backlash ?? Oh... one last comment. Don't be shy, make it taller 
|
|
|
|
« Last Edit: November 17, 2010, 02:59:56 pm by kas »
|
Logged
|
|
|
|
|
Toronto, Canada
Offline
Full Member
Karma: 0
Posts: 144
Arduino rocks
|
 |
« Reply #103 on: November 18, 2010, 07:39:20 am » |
Hi Kas, I have an odd motor driver controller on my shield and because of that, my motors have a "resistance" to change state, that is if they are stopped, they need a PWM value over 90 to start and if I tell them to stop it takes time to do so, but they stop spinning for a PWM value less than 30. It works fine for regular robots, but in this case it's hard to compensate. I will hack the driver to change it to regular and see what happens. If it works, I'll redesign the driver. Regarding the xBee code uploading, sometimes it works, sometime it doesn't. It seems that the original bootloader isn't good for wireless uploading. I should try optiboot and report back. I am using SF regulated boards for code uploading, one on the robot, connected to the FTDI connector, one connected to the FTDI basic board (5V) through an Tx-Rx inverter (just wires swapped). The DTR line is hardwired to the D3 on the regulated boards, so no hardware modifications needed. But I think the problem is the 3.3V logic voltage that sometimes is not registered as High by the microcontroller. I found this tutorial usefull to set up the xBees: http://www.ladyada.net/make/xbee/arduino.htmlAnyway, I had better success with ATmega168 (uploading at 19200) than with ATmega328 (uploading at 57600). Currently, my xBees are set to 19200 and the signal from the Acc and Gyro looks clean. For the moment, I upload code with the regular FTDI board and after that plug the xBees to see the data on the screen. BTW Patrick, I can't get your new revision of the wonderful processing sketch... the link is broken...
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 55
Arduino rocks
|
 |
« Reply #104 on: November 18, 2010, 09:31:42 am » |
@Ro-Bot-X
I found some serious bugs that made the loop time take up to 60 milli/seconds in the Arduino, so I will fix that later this day and upload a modified version there this is fixed.
You will also see the loop time in that version and be able to set how often the Arduino should send information to the pc. (Update rate of the GUI).
I will also try to add the possibility to change the motor offset on line if your motors behave differently..
If you find any bugs or improvements for the KasBot V1.x serial code and the Balancing bog GUI please post it here...
|
|
|
|
|
Logged
|
|
|
|
|
|