You can use a sample-hold to read the back EMF from the motor during the time the IRF151 is off. This voltage is proportional to the motor speed - essentially the motor acts as a generator during this time. I'm assuming the motor is a permanent magnet type.
The sample-hold can be a 4066 analog switch, a capacitor and an opamp configured as a voltage follower or non-inverting amplifier. Be sure to use a series resistor and a 15V zener across the input to the 4066 or it won't last long.
Load the voltage with 1K or so and sample a few microseconds after the transistor turns off to reduce pickup of transients. Then lowpass filter the voltage and amplify it so you can read it with a DAC. Use that to control the PWM. The lowpass filter can just be a resistor and a cap, 10K and .1uF might do for a start.
I used this with a 12V 1/4HP motor with 1KHz PWM and the results were quite good, the motor speed stayed constant around 2% over the full range of loads.
A possibly simpler way would be to use a toothed disk mounted to the motor shaft with a slotted photosensor on the edge, you could read the time between pulses and use that to adjust the PWM.
Or if that's not practical, you could mount a tiny magnet to some rotating part such as a pulley (often nonmagnetic) and use a hall effect sensor to pick up the time between rotations. This will work up to around 15,000 rpm. Radio Shack sells small cobalt-samarium magnets (about 1/8" diameter), these should work OK. Digi-Key has a variety of Hall-effect sensors, pick a sensitive one so you don't have to place the sensor too close to the rotating part.
Wagner Lipnharski says:
The most common way is measuring and controlling speed, but it is not the best you can do. Lets see why. Suppose the motor is rotating at 1000 rpm, and the variable load increases, what will happens here is that the motor will consume more current.
You can say, ahhha, I will measure the motor current delta variations and will regulate by this feedback. Ok, it works too. But still not good enough. Why?
Question: What is the first thing that happens when the load increases? It creates more drag to the motor belt, pulley, whatever is being used to transfer power. So, if you can measure the actual torque at the motor belt, pulley, shaft, by analyzing the element stress, as torsion for example, your control circuit will be correcting the power applied to the motor, before the motor will start to drain more current, so the correction will be smooth and clean as a walk in the park.
Everything mechanical have a slack. For example, the automobile air bags use a front accelerometer installed near the front bumper, and it feels the crash impact much sooner than your head hits the panel or worse, the windshield. In real, this mechanical slack saves your life by exploding the air bag as fast as possible. In your DC motor control is the same. If you measures the delta current, is the same as installing the air bag sensor at the windshield, it will only detonate after you rip your ears off (and something else) at the broken windshield. So, as close to the load you install the sensor, more smooth and perfect will be your speed or torque control.
There are few ways to do that.
- Using strain gages and measuring the effective "torsion" of the shaft or pulleys. Even that it is somehow difficult to install and adjust, including extra electronics around the SG's, it is one of the most precise and "scientific" way to do that, you can call yourself updated to the best technology if you do that. Prepare yourself for general headaches and surprises, but it *is not* impossible.
- Using opto sensors and slotted disks. Install an opto sensor with a slotted disk right at the motor shaft, close to the motor, and another, exactly the same sensor and disk as close as possible to the load. By adjusting once, and then measuring the time difference between both pulses, your controller can anticipate changes in the load much before the motor even feels it. Solutions like that is used around, and a slack element is inserted in purpose to amplify this delta torque, as a rubber coupler or something like that. This solution is cheap, easy to instal and works pretty nice. Its accuracy and resolution will depend mainly in how small are the disk slots. The problem with this solution is that your mechanical can not has slipering transferring power as an oily belt or something like that. Timing belts or even gears are the best power drive elements for this solution. Both disks have tinny slots at the disk edge. One extra slot is made at the inner of the disk, and it is to be used as one revolution sync, so your microcontroller doesn't get lost between timing changes from both disks pulses. This solution is totally digital, so no strange little analog insects on the board, exception if the opto sensors are not sensible enough to drive a digital signal, but even in this case a simple LM358 or LT1413 (DIP 8) fix it easily. This solution has the advantage of inform your control circuit the actual rpm of the motor, or better, the rpm at the load, so you can control it in both ways.
In both solutions, it should have a special "power start" routine to allow a different power control to the motor, until it reaches the "cruise speed and torque". Special programmed routines can handle different actions to different torque changes, so it will not damage the motor or power drive elements, as for example a "soft start" to save energy and mechanics, and also a possible "break" action when the load decreases.
|file: /Techref/io/motor/regulate.htm, 7KB, , updated: 2010/12/6 04:11, local time: 2019/6/19 19:23,
|©2019 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/io/motor/regulate.htm"> Motor Regulation</A>
|Did you find what you needed?|
PICList 2019 contributors:
o List host: MIT, Site host massmind.org, Top posters @20190619 RussellMc, David Van Horn, AB Pearce - UKRI STFC, Dwayne Reid, Bob Blick, Jason White, David C Brown, James Cameron, Allen Mulvey, Jim,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!