DC Motor Control

11 Nov 2009 . Edited: 11 Nov 2009

I have decided it's time to share my final year project with you all. I am a student at Anglia Ruskin University and am designing a unit to provide precise movement control for a small brushed DC motor.

I decided on a brushed motor over a stepper (jerky movement) or a brushless (cost, commutation) . The Mbed has been great to work with, and a big step up from the PICs that I'm use to.

So far the project consists of an etched board housing the Mbed along with an ADC chip (the Mbed ADCs were too coarse), an H-bridge (operating at 50 kHz), a Nokia 6610 screen (for display), and some voltage regulators to power the motor and Mbed. The output shaft of the motor is connected to a magnetic encoder IC.

Here's the (somewhat cheesy) video.

 

The movement is defined by supplying an end position and move time via hyperTerminal. The system will then move to the desired position in the allocated time. The resolution of the system is 13-bit (0.04°) and initial testing shows it to be very repeatable.

Next I want to add some kind of manual positioning method (like a pot) to allow the user to move it manually.

11 Nov 2009

Hi Martin, looks great.

I'm at ARU as well, just started using the mbed. Doing an independent module on steppers and servos as well, so this is quite interesting.

11 Nov 2009

Hello Martin,

sounds good ... when is the report about the hardware and software on the internet?

Regards Herman.

12 Nov 2009
herman moons wrote:

Hello Martin,

sounds good ... when is the report about the hardware and software on the internet?

Regards Herman.

The project needs to be finished by Easter, so expect a few more posts betwen now and then. Which 'bit' were you interested in?

05 Jan 2010

What't the response time to a step from A to B?

08 Jan 2010

Hi Igor,

Not sure what you mean. The motor has a mechanical response time of about 12ms. The position loop is running in this video at 1kHz, so the response time should be <13ms.

Is this what you mean?

Martin

11 Oct 2010

very interested in your project files.  I am looking to work with a motor and h-bridge also.  How did you do the move time?  Did you segment the larger move into several smaller moves on a per time basis?

Thanks and cool project

12 Oct 2010

Hi Matt,

I guess by your interest in this and your other post on encoders that you are working on a very similar project to this?

The move time was input into the mbed via Hyperterminal. I then ran a function that calculated the required velocity and position at amy point during the move cycle, and used a Ticker (at 100Hz) to decrement to remaining move time. A tacho was used to monitor the velocity and an encoder to monitor the position. I then fed this information into a nested PID loop to control the speed of the motor via PWM.

This worked pretty well but had a tendany to judder very slightly at very low speeds (<1 degree/sec), due to the tacho's poor SNR at those speeds). I was going to have an encoder fitted to the motor to get a better measure of velocity but ran into the problem of not being able to read the count in quick enough at high speeds (e.g. 10000 RPM).

I have not worked on this project for some time, but if you crack the encoder problem I might reserect it!

Cheers

Martin