Software > Software

2WD Robot with pid

<< < (2/2)

Vendra:
The question here is How can I make those changes? I don't want to do something that I already did before. I want to learn something new: PID, dead reckoning, AI and so on. My problem is I don't know where to start.

I'd know how to begin with Arduino, the problem is it can't handle PIDs and too much stuff so i needed more "power".

My main question is: How can I write a draft code which let me communicate all those boards toghether and will let me to implements features step by step?
I want to improve my robot without rewrite the code again agai everytime I want to add something. I'd like to add a "block" each time. Beginning from the PID/QEI and then going on with other stuff like sensor and some cool algorithms.

waltr:

--- Quote ---I'd know how to begin with Arduino, the problem is it can't handle PIDs
--- End quote ---
Did you google for this? Lots of examples, tutorials and even an arduino PID library out there.

Did you google PID and study to learn how this works?
I've even done a PID controller for two motors using software generated PWM  in a 4MHz PIC16F84 (1990's PIC). So you really do not need a lots of processing power.

jwatte:

--- Quote ---I'd know how to begin with Arduino, the problem is it can't handle PIDs and too much stuff so i needed more "power".

--- End quote ---

PID is super easy. An Arduino can do that no problem.

The main problem you're going to have is how to read the signal that comes out of the encoder of the motor, which is more of an electrical-signal-interface problem than a software problem. In fact, if the signal is properly conditioned, you can probably read the quadrature encoder using pin change interrupts, and still keep up.

There are AVR variants with quadrature decoders built-in; there are also various ARM development boards with quadrature decoders (such as the later version of the Tiva (formerly Stellaris) Launchpad.)

Navigation

[0] Message Index

[*] Previous page

Go to full version