Pages: 1 2 [3]   Go Down
Author Topic: DC motor control with PID  (Read 59581 times)
0 Members and 3 Guests are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why do you have "PID" and "PID_comp"?? is "a" a tuning factor (as my "K") ??
Yes, one motor responses quicker/more than the other. I know this is sad, I didn't know it accepts -255 to 255. I though it was only 0-255.
 
Quote
Also if your loop is fixed time, you can omit the dt factor
I am unsure how you can exclude dt, my dt is not constant. How do you make it constant?

How did you find your P, I and D values? Well, their gains, kp, ki, kd?

Quote
Please let me know which Acc and Gyro models are buit on your specific Sparkfun board
I am using the generic 5DOF sensor which has a ADXL335 and IDG500, I think.

Forgot to add, I uploaded my pictures in my topic, to avoid cluttering your topic with my ugly system
« Last Edit: September 16, 2010, 08:26:20 pm by gibby623 » Logged

0
Offline Offline
Sr. Member
****
Karma: 11
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284650649/0#0
Your bot is really sophisticated, you should have spent a lot of time on this project

Quote
Is there any reason why the gyro is placed at the bottom? Intuitively I would think it was better to place it near the 'top'.

Feel free to correct me, I read somewhere it eliminates uncertainty with the readings.
You are right, we want to measure gravity angles, not movements.
IMU board should be located near the weels (axe of rotation) to reduce noise sensors

Quote
Hardware: 2 x 29:1 12V Gearmotors,  SN754410NE H-Bridge, Arduino Nano 3.0, Sparkfun 5DOF IMU.
For the expensive parts (IMU, motors), You have the right hardware smiley

Quote
Yes, one motor responses quicker/more than the other. I know this is sad, I didn't know it accepts -255 to 255. I though it was only 0-255.
My left motor is 10% slower than the left one, that the nature of the beasts, this is adjusted within function "Drive_Motor(int torque)" in the Motor Module, this adjustment is not PID related.
The motors accept only 0 to 255, the sign determines the direction of rotation
Again, this will be treated in "Drive_Motor(int torque)"


Gibby663, I suspect that your signal aquisition and processing is not adequate.
For you and possibly additional lurkers, I am willing to start from the very begining and rebuild the bot together
I am sure you already know most of the info to come, just look for the details
For convenience, you will have to remove you breadboard from the bot (I did)

Ready ???  OK!!!

Disclaimer:
I invented nothing
I read A LOT and went by trial and error



 [size=16]      ** Balancing robot for dummies **[/size]

Part one: sensor, setup and fixed time loop

Stay tuned, I will open, later this afternoon, a new thread with a more relevant title than "DC motor control with PID".  8-)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Gibby663, I suspect that your signal aquisition and processing is not adequate.
I suspect that too!!!

Quote
Your bot is really sophisticated, you should have spent a lot of time on this project
What do you mean sorry? It is rather generic though; IMU, H-bridge, microcontroller...

Quote
For convenience, you will have to remove you breadboard from the bot (I did)
Do you mean I should??? I don't have much time to solder everything to PCB. Does the breadboard introduce a lot of noise?

Thanks for taking some time to help smiley
Logged

0
Offline Offline
Sr. Member
****
Karma: 11
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the new topic I just opened for further discussions
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284738418/0#0

Please do not post anymore in this thread

Thanks
« Last Edit: September 17, 2010, 11:02:51 am by kas » Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Always learning!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd love to build smething like this, only I don't have the money. (or intelligence!)
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Offline Offline
Full Member
***
Karma: 1
Posts: 200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'd love to build smething like this, only I don't have the money. (or intelligence!)
Begin with a small project (or part of the project) and then advance slowly to more advanced projects.
Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Always learning!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am planning on building a similar robot soon, so I was wondering where you got the wheels? (A UK supplier would be nice!)
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

0
Offline Offline
Sr. Member
****
Karma: 11
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi onions,

This thread is not active anymore, please join us here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284738418
Logged

Pages: 1 2 [3]   Go Up
Jump to: