Motor Control with Encoder


I want to control a DC motor with a closed loop system to be nice and accurate.

So far I have controlled a stepper motor using a bunch of components so that all the arduino board needs to do is pulse on one line for one step and control direction on a second line.

I like this kind of system, where the arduino board is not bothered with thinking about the inside of the problem. It can just send instructions. It would be even better if I could send some serial instruction like 'turn to 120 degrees'.

I'm interested if anyone has any advice or recommendations for closed loop motor control??

As always, I want a good system for cheap ;)

I notice on the Arduino site, there are plans for a motor control shield. Does anyone have any experience on building and using this shield? Does this shield deal with the logic of motor control or is that left for the Arduino board program to deal with??

Any advice would be great

Thanks /Jonathan

If you put a rotary optical encoder on the shaft of the motor (nice, but very expensive ), you will get a fairly exact reading of the motor's position. You have to budget some of Arduino's CPU time to measuring the pulses of the encoder though.

The cheap solution is to get an RC servo...

hello jonathan

i am using stepper motors from it's an L5618 actuator: ( it costs about 80 euro. they have also encoders for the motors.

the motor driver i am using is the smc-11: it costs about 30 euro. it can be controlled by a pulse from 0 to 200 khz via a digital port of the arduino board.

i had some major problems generating a fast enough pulse. it worked great when i only generated the pulse without doing anything else. but reading ports and sending serial data slowed the pulse down. right now i am using an arduino board just for generating the pulse and sending digital 1/0 (direction) to a wiring board that reads a pressure sensor and sends the data to the computer. i hope i can use only one moto and a kind of pulse generator later.



Thanks for the replies ;D

Daniel --> from what i understand of servo motors, if they are hacked for continuous rotation, you loose the ability to accurately control the position. After the hack, the pulse controls direction and speed.... Is that right?? (I've never actually tried it.)

Michael --> thanks for all those details. The problem you are having is exactly why I would like a solution that takes the work away from the Arduino board.

Everyone! --> what I am really looking for is a system that handles the encoder off of the arduino board. So that the board's brain power is not being sucked up. Also, I would like a system like Arduino, ie, disposable!! (i'm a dreamer!)

Also, i'm still really interested to know if anyone has some experience of using the arduino motor shield.

Thanks again guys!

This post on hotmodding an ir into an OE does that i think, all processing is done according to the lazer wheel, so minimal processing load?

I am doing the same thing. For the servo I use this

You need a serial port for each servo. I have mine basically communicating right now but there is a bunch of work to be done to get everything working correctly.