Go Down

Topic: DC motor control with PID (Read 87 times) previous topic - next topic

Gibby623

#30
Sep 17, 2010, 03:25 am Last Edit: Sep 17, 2010, 03:26 am by gibby623 Reason: 1
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

kas

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 :)

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-)

Gibby623

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 :)

kas

#33
Sep 17, 2010, 06:00 pm Last Edit: Sep 17, 2010, 06:02 pm by kas Reason: 1
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

Onions

I'd love to build smething like this, only I don't have the money. (or intelligence!)
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

novice

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.

Onions

I am planning on building a similar robot soon, so I was wondering where you got the wheels? (A UK supplier would be nice!)
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

kas

Hi onions,

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

Go Up