Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

dc motor controler Ic?

Status
Not open for further replies.

kentken

New Member
Is there a Ic out there that I can send a PWM into and will keep a dc motor running at the same speed as the battery supply lowers?
Is there a good way to do this with just a Pic micro? What would I need?

Thank you
Kent
 
kentken said:
Is there a Ic out there that I can send a PWM into and will keep a dc motor running at the same speed as the battery supply lowers?
Is there a good way to do this with just a Pic micro? What would I need?

You need some kind of feedback signal from the motor, so you can tell how fast it's currently turning - a simple way is to use another motor as a generator, producing a voltage dependent on it's speed.

Monitor the output of the generator (using an A2D inside the PIC) and adjust the PWM to keep the speed constant.
 
What I have is a 19v gear motor, like those used in RC airplanes, running from a car battery.
A controler that has a timer and rate settings.

I need a feedback that is a 'sensorless', because the motor is a length from the controler, and the size constrates.
It needs to adjust the speed as the battery voltage drops.

I have seen things about this, but not how to inplent it.

Thanks
Kent
 
Without Feedback of some kind, You have a real problem.

As an Alternative, make a Step-up circuit from your battery to maintain and regulate your supply voltage. If it is reasonably low current that shouldn't be too large or difficult

Gary
 
The motor speed is not going to change a lot, the battery is 12.6 volts fully charged and about 11 volts fully discharged. The speed change will be 13 percent with no feedback. The amount of energy that can be recovered below 11 volts is not worth the trouble.

Having said that, a simple way to speed control is to monitor the motor voltage between pulses, using PWM for control. The motor generates a voltage that is proportional to speed when it is not being pulsed.
 
If the drop wont make that much difference, well hmm. I think it will need something to keep it close to the set speed.
Having said that, a simple way to speed control is to monitor the motor voltage between pulses, using PWM for control. The motor generates a voltage that is proportional to speed when it is not being pulsed.

How would I do this?
I am using a 16F872 for now.

Thanks
Kent
 
Nigels suggestion was to use a separate motor as a generator to read the speed of the motor. Russlk's suggestion is to use the motor itself as a generator to read speed. As a motor spins faster it actualy generates a voltage that opposes the voltage being applied to the motor. This voltage is called back electroto motive force (back EMF) and is proportional to speed. With PWM you can measure this voltage in between pulses. You could also use a current sensing resistor to measure the current the back EMF generates this method would let you measure back EMF durring the PWM on pulse.

Another option is to build a cheap optical encoder. These devices use a chopper wheel to block and unblock a LED - photodiode interrupter switch. This gives a nice digital output that would give you fair accuracy at higher speeds.

Hope this helps

Brent
 
kentken said:
I need a feedback that is a 'sensorless', because the motor is a length from the controler, and the size constrates.
It needs to adjust the speed as the battery voltage drops.

There's no way to keep the speed constant without some kind of feedback, as mentioned you 'may' be able to use the motor as a generator during PWM null periods - but it sounds fraught with difficulties, the most obvious of which is what happens when your PWM approaches 100%.

Another way is to monitor the motor current, as the brushes cross over the gaps in the commutator it causes current spikes - but you probably can't monitor these while using PWM.

If you need to 'adjust the speed as the battery voltage drops', as opposed to keeping the speed constant, you could do this quite easily by monitoring the battery voltage and increasing the PWM as the battery voltage falls.

However, this wouldn't keep the speed constant, it would keep the power supplied to the motor constant - which would be the same thing, IF THE LOAD IS CONSTANT!.
 
This all sounds good, I think that I have enof room for a simple encoder.
What do I need to know?

I have also heard about the LMD18200 or LMD18201.
Do these chips work well? Tips?

Thanks for all the feed back
Kent
 
You can't measure voltage between pulses with a PIC... not only does the acquisition time prohibit this, it's unnecessary.

The average PWM voltage will regulate the speed as long as the load is fairly constant. If this is an RC plane, prop load is fairly constant. In some cases, current regulation is also useful, but voltage is what you're looking for.

So, what you need here:
1. Take the voltage on the motor and feed it through a voltage divider, about 3:1 (output can't be over 5V). Output impedance needs to be a max of 2.5k. Add a filter cap of the proper value for the PWM frequency so that you have an average DC value of the output.
2. PWM output needs to go to a driver, a low side driver won't work with the divider, so you'll need an NMOS, a PMOS, and a resistor.

A simpler solution would be to sense the power supply voltage with the divider, and base your PWM solution on that. In this case, you can use only a single NMOS for the PWM driver. This provides somewhat poorer regulation than output sensing, but if this is an RC plane the weight is the critical factor.

Now keep in mind that the PWM can only lower the average output voltage. It can't boost voltage. That is, if you want it to run as fast at 11V as it does as 13V, the solution is to leave it 100% on at 11V and pulse it about 85% "on" when you've got 13V so it appears as 10V to the motor.
 
So, what I need to do is set the 100% speed at the lowest voltage, and adjust it down for the high voltage, right?

THanks
Kent
 
Exactly. There are ways to boost voltage, but they do require inductors, and ones which deliver high current have significant size, weight, cost, and require a bit more design knowledge.

I thought you'd said you were doing an RC plane- now I see it was only a motor "like" an RC plane. We could give better recommendations if you'd be clear on exactly what you want to do. You may need better regulation than what I suggested will provide. You may be able to use other features such as low voltage shutdown or alert too.
 
Ok, what i need is a way to control the speed of a 19v gear motor that turns a 5/8" screw. This meters out a dry chemical into water

The controler will have 20 different speed settings. It will run off of a 12v car battery.

I would like the motor to keep about the same speed, with diferent loads and a lowering battery voltage.

I don't know if this will change the speed enof to worry about?

Thanks
Kent
 
Best would be to come up with a tach feedback and a low side NMOS driver. You could even rig up something optical.

Otherwise, use the high side driver, and a divider/filter on the motor voltage. The PMOS will have its source tied to 12V, a resistor connection the gate to 12V. An NMOS's drain is also connected to the PMOS gate. NMOS source connected to ground, gate connects to PWM output. Note that this inverts the output, duty of 0% leaves the motor full on.

A motor may not run reliably so far below its rated voltage. That's what makes the tach feedback much more reliable in this scenario, it will be guaranteed not to stall.

Don't try to run the motor at high freq. A few hundred hz may do it. The high side driver's turnoff time is limited by the resistive pullup, you could also use an inverter to drive the PMOS gate which would probably be quicker.
 
Thanks for the feedback, that will work geat. If you have the time a sch would be helpful.

I think that I will use some kind of simple optical incoder. How should it be hooked up? How often should the program check it?

If there is anything else that you can think of

Thanks again
Kent
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top