Shop OBEX P1 Docs P2 Docs Learn Events
DC motor speed control — Parallax Forums

DC motor speed control

romanroman Posts: 3
edited 2005-11-16 03:37 in General Discussion
· hi·

···· my project in school is to control a dc motor speed and take the
·····feedback from motor to microcontroller (BS2) and display on computer
···· the speed at which the motor is rotating .
····· i am facing difficult in finding a model·for this and i want a lowcost
····· model.it would be good if some one having the code and the parts
······ description can help me in this regard

······· hope to hear some thing good

···

·

Comments

  • John R.John R. Posts: 1,376
    edited 2005-11-12 18:23
    I'm guesing this is for high or middle school, and if so, how about the following:

    Set up your STAMP to control a drive motor. This doesn't need to be a big motor, but ideally bigger than the following one.

    Take another DC, Permanent Magnet motor (like the small hobby motors) and using belts, gears, or even an o-ring or rubber band, have your drive motor also drive this motor. This motor then becomes a generator, and the faster it turns, the higher the output voltage will be. This can be a very small motor.

    Using and A/D (Analog to Digital) converter, you can take the output from the second motor, and use this as your feedback.

    For a really "neat" experiment, you might want to disaply the voltage and current (Amps or milliamps) that the drive motor is using, and also have a way (possibly as simple as a clothespin you can squeeze to increase the friction on the shaft) to apply a variable load to the drive motor.

    What this doesn't do, at lease without extra work, is provide any direct feedback on what the actual RPM is, but if you had access to some type of tachometer, you could calibrate the output of the generator.

    Another more direct method might be to attach a small magnet to the shaft, gear or something on the drive shaft of your drive motor, and then use a Hall Effect sensor to count the revolutions. This would eliminate the need for the second motor. Parallax has a Hall Effect sensor at: http://www.parallax.com/detail.asp?product_id=605-00005

    The same thing could be done with a dark (or light) stripe and a light sensor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • romanroman Posts: 3
    edited 2005-11-13 03:52
    ·thanks for ur reply john

    ·i want the information regarding the pulse width modulation chip i can

    ·use for varying and controlling the motor , let me know the lowcost chip

    please

    waiting for ur reply



    bye

    ···

    ·
  • metron9metron9 Posts: 1,100
    edited 2005-11-13 05:58
    I was about to order the TSL230 Light to Frequency Converter to measure the speed of the dc motors I am playing with
    I am using a propeller and i was thinking of mounting the chip just behind the spinning prop

    If there is light in the room it should pick up a frequency of the pulsing light
    or
    by painting the back of the prop white and using a white LED next to the chip it could pick up reflected light

    But I don't have one yet but it might work.

    http://www.parallax.com/detail.asp?product_id=27924
  • MikeKMikeK Posts: 118
    edited 2005-11-13 18:28
    The TSL230 will convert the light striking the sensor to a frequency proportional to the intensity of the light. With a fan in front of the sensor, I believe that what you'll get out of the TSL230 is a varying frequency output depending on the position of the fan blades. I have a TSL230, but I haven't had a chance to try this yet (I'm interested in the outcome, as well).

    To use it as any kind of absolute speed sensor, you'd either have to isolate it from ambient light or calibrate it every time you moved it.
  • metron9metron9 Posts: 1,100
    edited 2005-11-13 23:18
    The same thing John said about using 2 motors can be done with the motor you are running by measuring the voltage output of that motot.

    You need to shut off the voltage going to the motor for a few milliseconds, measure the voltage of the still spinning motor.

    I suppose an NPN PNP Transistor setup could give you a switch that switches off one circuit and switches the other on.

    So if you are pulsing the mortor with PWM, you can read the voltage it produces during the OFF time of the PWM.

    Cool ea...
  • Jim RicheyJim Richey Posts: 82
    edited 2005-11-15 13:16
    I believe you will find that the voltage output of the second motor,acting as a generator,will not be linear in relation to it's RPM.Better to devise a method of counting pulses,as with the idea of metron9.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks, Parallax!
  • japerjaper Posts: 105
    edited 2005-11-16 00:54
    hello
    fan
    5 volt very small computer fan
    simple solution for speed control
    transistor with "PWM". most DC motors controlled this way now
    simple solution for "RPM" Called Optisensor used like hall effect
    led, photoresistor, aperture, a/d converter. the frequency of high voltage to return would be your Varible
    or a hall effects sensor
    small amount of parts
    simple solution

    japer
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2005-11-16 03:37
    One "trick" that involves modifying the motor a bit, is to alter one of the coil windings
    by placing a low value resistor in parallel with the coil.

    From here you can read a pulse as the motor is powered by setting up a simple current
    monitor ( series resistor to measure voltage across) and a DC blocking filter (capacitor).
    One drawback is that you can not use PWM. Instead you can use an adjustable linear
    voltage regulator ( with a digital potentiometer perhaps) to regulate motor speed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.