Friday, August 6, 2010

DC Motor Speed Controlling?

i have a DC motor that i need to control it's speed, the motor is for an R/C car am using for my project


the motor operates at 6V so i supplied it with a 6V battery, and it turned and everything went great


i thought that i can decrease the speed by adding a resistance before the 6V input to the DC motor


so i added into the circuit a 500k ohm resistance (since the 10K didnt have almost any effect on the output voltage), this 500k gave a 3V output so i thought that the motor will run half speed as it used to be


but when i connected the DC motor to the circuit it didnt work!!


so i connected the DC before the 500k (at the 6V) and it ran fine, but when i reconnected it back after the 500k it just stopped!!


does any1 have any idea what might be the problem?!


or do u have any idea about how to control this DC motor speed?


i want to connect it to a PIC16F877A and use it to control the flow of the voltages supplied to the DC to control its speed...that was my idea, but if the DC wont be able to run at lower voltage than 6V then i guess am having a big problem


can any1 help me? plzzzzzzzzzzzzzzzzzzzzzzzzzzzzDC Motor Speed Controlling?
The problem is your resistance is way too big. (Let me guess, you are using a mechanical voltmeter and you measured 3V with just the battery and resistor connected to the voltmeter.) Ohm's Law says 6V into 500K惟 gives only 12碌A of current, so it's not surprising your motor didn't run like that! A few tens of ohms of resistance should be plenty to reduce the speed. You need to measure the voltage at the motor while it's actually in circuit with the resistor.





If you're using a microcontroller, though, consider pulse width modulation. This works by supplying the motor with 6V for awhile, then turning off the supply; and repeating the whole thing over and over again, with a cycle time of a few tens or hundreds of microseconds. The proportion of time spent ';on'; determines the speed; but since the full 6V is applied to the motor, the full starting torque is available.





This is easily achieved with a loop and a two 1-byte registers. One register is used as a counter and gets incremented each time you go around the loop. Turn the motor output OFF when the counter reaches a threshhold value stored in another register (which you can change to set the speed) and ON when it overflows from 255 to 0 (you can test for this happening because it will set the ';carry'; flag in the status register). The bigger the number in the threshhold register, the longer it will take for the counter to reach that value and so the longer the output will remain ';on';.





Note that many modern microcontrollers have the ability to do pulse width modulation in hardware; when enabled, you just write a number to a register and you get an automatic PWM output on one of the I/O lines, the bigger the number the longer the ';on'; time.DC Motor Speed Controlling?
The resistor is way too high. You can control the speed by adding a resistor in series, but it needs to be related to the current and the voltage by ohms law. R = V/I.





If you use a multimeter to measure the current, use a 2A range or higher, otherwise the multimeter will add so much resistance that it confuses the measurement.





If there is 150mA flowing for example, the motor would be the equivalent of a 40 ohm resistor. However this is a fairly useless way of controlling permanent magnet motors, as the energy lost in the resistor is wasted, and the load on the motor varies so the voltage varies etc. The potentiometer has to have a sufficient current and power rating to suit the job. A suitable one is hard to find, and It is better to use other ways. Cheaper too. Just takes more knowledge and effort perhaps.





You can vary the speed with less loss using Pulse Width Modulation (PWM), especially suited to a microcontroller. Some have a PWM device built in, others you can do it with software. Simply, the motor is switched on and off rapidly. If it is on for half the time, then half the speed, and so on. A few hundred Hertz is usually fast enough. A diode needs to be connected across the motor in reverse to protect the transistor used to switch the motor on and off. For a uContoller I/O connection, better to use a small power FET, or a CMOS gate as a driver for a transistor. Look up PIC and PWM, I am sure you will find the method that suits yuour particular desires. You could use a small 8 pin PIC if that is all it has to do. If you wish to control teh speed externally, you would probably use push buttons (up/ down/ stop).





There is another way, use remote control radio equipment. There are motor speed controlls that connect to the receiver. This method uses off the shelf plug in modules, but you have to buy a transmitter and receiver and speed control that all go together. Maybe an el cheapo toy Radio Controlled model car is the way to get this setup, including a motor etc.





You can also use a 555 timer for PWM with a knob to control it. This would be a very good project for experience, and the link below shows how to do it, from the basics almost. It is what you wanted to do, but works better.

No comments:

Post a Comment