Shop OBEX P1 Docs P2 Docs Learn Events
How to make a servo motor out of 12 volt dc scooter motors & control the motor' — Parallax Forums

How to make a servo motor out of 12 volt dc scooter motors & control the motor'

simpsonmichael1simpsonmichael1 Posts: 13
edited 2008-12-13 05:42 in BASIC Stamp
Good Evening All,


I am new to using the basic stamp. I have two 12 volt DC forward/reverse capable scooter motors. I want to covert these two motors into a larger version of a servo motor. The motors have only two wires, a positive and negative wire. This means I need to build a circuit to interface with the basic stamp microprocessor and error control circuit for the motor. I searched on the web for internal servo schematics, but all I've seen are schematics for servo controllers, which I do not need. I need to know how average servo motors are wired internally. Can anyone help me out on this one? Please advise.

//signed//
Mike Simpson
simpsonmichael1@hotmail.com

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-04 04:22
    You need what's called an H-bridge to control the motor itself. You might look at some of the DC motor controllers that Parallax sells. They sell their own design (HB-25) which looks like a servo to the Stamp (or other microcontroller). Parallax also sells DC motor controllers from Pololu which interface to the Stamp over a serial connection. Look at the documentation on Parallax's website (or Pololu's) for details.

    Standard servos have a potentiometer on the motor shaft that provides position feedback either to an analog control circuit or, in newer "digital" servos, to a special purpose microcontroller that feeds an H-bridge or similar circuit to actually drive the motor. Have a look at the Wikipedia for articles on servos and R/C Servos.
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-12-04 04:54
    Mike, I've been hoping someone would post an explanation like that. Servos are an area in which I know nothing at all, and your post is a start at correcting that. Thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Project5kProject5k Posts: 58
    edited 2008-12-04 15:20
    servos are a whole world in and of themselves.. the digital feedback system that your talking about is called an encoder. and depending on what your trying to position, or how accurate you need the feed back to be will define the count of the encoder. a higher encoder count will be more accurate, but will cost you more.. something else that you might want to think about is when your building your controller, it should have some kind of a fault state. newer servo drivers are smart enough to know that if the feedback isnt keeping up with the drive command section that if it gets far enough behind that it will fault out and halt the system. It should also be smart enough to know that if its say 20 counts behind that it needs to increase the drive effort a little, but if its 400 counts behind, that it has some major catching up to do and that it needs to increase the drive force a bunch.. that is if it hasnt faulted out yet by being too far behind.

    Understand that my experience with servos is from the CNC world, so when i'm using servos its to move something like a cutting head to a very precisice position.
  • remmi870remmi870 Posts: 79
    edited 2008-12-04 21:28
    there are two inheirent problems with doing what you want to do, one is that the motors for scooters normaly are dc permanent mangnet, applying dc will make the motor turn but there is realy no efficent way to hold or lock the motor which is important when making a servo. If you dont lock the motor it can freewheel with inertia past the point you want the servo to stop, which can cause the motor to reverse back to the point and keep overshooting. This can be easily solved by using a worm gear on the motor, makes it very hard to keep spinning and can give a good resolution.

    the second problem is the resolution, depending on how much resolution you want, you may need to find a encoder that can handle your rpm and resolution needs, a 100 final rpm with a 10:1 ratio means the motor is a 1000 rmp motor, a encoder with 20 pulses per revolution would need 33.3 pulses per second resolution, but if you wanted a beter resolution, you could put the encoder on the motor, yeilding 333.3·pulses per second, however you need to be able to register the 3ms pulse gap, some encoders are 200 pulses per revolution at 600 rpm would net a .5 ms resolution, which would be too much for the BS2 to handle, so you must match the encoder pulses to the capabilities of your chip.
  • $WMc%$WMc% Posts: 1,884
    edited 2008-12-06 02:01
    I think the HB-25 motor controller is for You. This is were power is needed over position accuracies and I think You want a full rotation servo for speed control and FWD. or REV. rotation and large current draw.


    _______Just A Thought____$WMc%_____
  • Project5kProject5k Posts: 58
    edited 2008-12-06 08:04
    Remmi does have a good point, if you wanted to use it to position something, and the desired position landed between positions on the encoder, it would hunt or oscillate back and forth just a little trying to get to that point.
  • simpsonmichael1simpsonmichael1 Posts: 13
    edited 2008-12-13 05:42
    I thank everyone for there input and will research the problem a little more. Thank you once again.

    Mike Simpsonhttp://forums.parallax.com/forums/posticons/icon5.gif
Sign In or Register to comment.