Show Posts
Pages: [1] 2 3 ... 12
1  Topics / Robotics / Re: PID controlled motor controller (based on measured RPM instead of PWM) on: October 18, 2012, 07:19:11 am
Thanks for all the replies!!

I think I'll use the current sense function to detect motor stall or motor overload.

At the moment I have two magenets/wheel. I can increase this to four? It will give a more accurate reading at low RPM, but I don't know if the interrupt can handle (12.000 pulses/minute max.)?

PID is starting to make more sense to me smiley Maybe I'll try to incorporate specific PID settings is certain ranges (like CodingBadly proposed).

EDIT: Maybe I can better use:

http://arduino.cc/playground/Code/PIDLibrary

and

http://arduino.cc/playground/Code/PIDAutotuneLibrary

I am still working on the library... I can post a preview version (not fully tested) if people are intrested?


Cheers.
2  Topics / Robotics / Re: PID controlled motor controller (based on measured RPM instead of PWM) on: October 17, 2012, 12:55:01 am
@ Codingbadly: i'll start with two magnets for each wheel. This mainly because i don't know if the interrupst can handle that much pulses (6000/min for each motor)?

@ lefty: thanks for you reply. I did some reading yesterday and noticed no extra parameter are use in a real PID algorithm. Your explanation really convinced me smiley
3  Using Arduino / Programming Questions / Creating variables at runtime or not? on: October 16, 2012, 05:53:54 am
Hello,

Does it make a difference (in speed) if a variable ia created at runtime or on top of a sketch? I want to optimize a library foor speed at the moment and was curious what the best and fastest way is smiley

Cheers.
4  Topics / Robotics / Re: PID controlled motor controller (based on measured RPM instead of PWM) on: October 16, 2012, 04:12:26 am
Some Characteristics:

  • PWM input: -255 to +255 (where the negative range is reverse and the positive range if forward).
  • RPM range: 0 - 3000 (the encoder are mounted directly on the motors but a reduction will take place afterwards (using a timer belt) 3:1 to increase torque). After the gear ratio, the effective RPM will become 1 - 1000. But all calculations are done based on 0 - 3000!
  • Current sensing is done from 0 to 2000 mA (probably not necessary but worth to mention smiley

I know I can use PID with current RPM and desired RPM as input and simply map this to a PWM value. This is no problem if the load on the motors is constant (I am building an UGV so terrain properties change over time).

But when the resistance on the tracks increase more PWM needs to be delivered to reach the desired RPM. I know that taking the old PWM value and adding the PID part to it will work but I don't know if that is the best way to go?

So I thought that I might can use the current draw bu the motors.

Example:

  • The motors both rotate at 1000 rpm with no load going (mA value 200 mA) from 1000 to 2000 rpm takes relatively not that much extra PWM.
  • But what if both rotate at 1000 rpm with a load going (mA value 1000 mA) from 1000 to 2000 rpm takes more PWM (If the max RPM can actually be reached!).

So I thougt: what if I know the actual RPM and current value? Maybe I can optimize the PID algorithm with the extra data?

Maybe I first have to do some testing to see what really happens......

Cheers.
5  Topics / Robotics / Re: PID controlled motor controller (based on measured RPM instead of PWM) on: October 16, 2012, 02:36:25 am
you got me thinking smiley-wink I think I need RPM but I don't know If I even need the mA value for that?

So my first awnser is RPM (but it might change based on member input).

Cheers.
6  Topics / Robotics / Re: PID controlled motor controller (based on measured RPM instead of PWM) on: October 15, 2012, 04:17:13 pm
I've finished the library. I'll hope to be able to test it tomorrow and post a draft version of the library.

BTW it is a continuation of this library:

http://arduino.cc/forum/index.php/topic,38009.msg281583.html#msg281583

Cheers.
7  Topics / Robotics / PID controlled motor controller (based on measured RPM instead of PWM) on: October 15, 2012, 07:48:33 am
Hello,

I have bought the following motor driver: http://www.canakit.com/dual-motor-l298-h-bridge-control-ck1122-uk1122.html.

Using two motors and two hall sensors (Hamlin - Hall-sensor 55100-3H-02-A, http://www.hamlin.com/specsheets/55100%20IssueAG.pdf) and a few magnets, Ive build a small test setup that is capable of measuring the RPM and current of each motor.

At the moment I control the motors using PWM and read the RPM but I want to give a desired RPM so a PID algorithm calculates the optimal PWM value based on the current RPM and current (mA).

When the motors are running freely the current usage and RPM are really stable (as expected). When force is applied to the motor(s), the RPM value decreases and the mA value increases.

I think that a PID algorithm might be enough to calculate a new PWM value but for a more accurate value I think it might putting the used current into the equation migth be a good idea. But how......?

Is there anyone with some experience or good ideas before I reinvent the wheel?

I will post the code of the library I am making later smiley

Cheers.  
8  Topics / Device Hacking / Read USB data on: August 09, 2011, 02:33:06 am
Hello,

What Software-tools can I use to read data I/O on an USB port?

Thanks in advance!
9  Forum 2005-2010 (read only) / Forum / Re: Upload image on: January 19, 2010, 02:44:31 pm
Well Fritzing was just an example. Can be Eagle, CAD or your pet off course !! smiley-wink
10  Forum 2005-2010 (read only) / Forum / Upload image on: January 19, 2010, 02:41:32 pm
Hello,

I donĀ“t know if this feature has already been requested?

Maybe it is a possibility to give the user the option to upload an image. I usually want to add an schematic overview of a circuit (fritzing) to make my problem more clear. The size of the image (KB) should off course be limited as well as the supported formats.

The problem is always where do I upload this image? I know there are lots of sites out there that will host you images but this is sometimes time limited etc...

Cheers smiley

11  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino 0019 download problems on: September 13, 2010, 01:39:21 pm
I've tried Google Chrome (my default browser) and IE7. Using both browsers the download is corrupt. I think my cell phone provider has set as download limit to a single file (small downloads work OK). I'll have to wait until I have access to my DSL line again.

I don't know if 85 mb for the IDE is big? I can remember the days that my first HD had a capacity of 45 mb (including the Ping Pong virus) smiley and a few years later I had internet... Pretty impressive for that time (3 Kb/sec). pfffff I am getting old smiley-sad

/me


12  Forum 2005-2010 (read only) / Troubleshooting / Arduino 0019 download problems on: September 13, 2010, 11:56:41 am
Hello,

I am trying to download the new arduino IDE from the google code page. The download stops at 67 mb instead of 85 mb, because of this the library is corrupt? I've tried the download four times now  smiley-sad

I am downloading the IDE using my cell phone as a modem because I don't have access to a DSL line at the moment. Maybe the cell phone modem is the problem?

Is there an alternative download location (official torrent)?

Thanks in advance.

/me
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Can't get Arduino to wake from sleep on external i on: April 24, 2010, 07:23:04 am
Ok, I am not a programming guru but should :

Code:
void enterSleep(void){

not be changed in:

Code:
void enterSleep(){
??

Cheers.
14  Forum 2005-2010 (read only) / Troubleshooting / Re: Tab question on: October 05, 2009, 01:58:06 pm
sorry... Already found the error.

Thanks.
15  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Be able to set regions in the Arduino Code on: July 19, 2010, 03:58:48 pm
Your suggestion sounds great. I really would like to see this feature being implemented.

/me
Pages: [1] 2 3 ... 12