Shop OBEX P1 Docs P2 Docs Learn Events
Puttering Around With Parallax Servo Motor — Parallax Forums

Puttering Around With Parallax Servo Motor

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2018-11-26 06:22 in BASIC Stamp
There was a holdup with running code from Standard Servo manual.

I had to go over to What's a Microcontroller servo chapter to see how to connect servo to BOE.

Found out Standard Servo is a 180 degree servo.

Got the Boebot chassis out to see what kind of servos are on it. You can't see label when they are bolted to chassis.

Have to figure they are continuous rotation. Would take reading Boebot manual to confirm that or unbolting them.

I'm probably more interested in continuous rotation servos than a 180 one. Really DC motors but will do this lesson.

EDITFound Parallax lessons on DC motor control. In Process Control manual. Chapter 5

https://www.parallax.com/sites/default/files/downloads/122-28176-Process-Control-Text-v1.0.pdf

They look pretty good.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2018-11-23 20:29
    Yep ... continuous rotation ... how else to spin wheels? Have fun puttering.

  • What does the servo driver circuit consist of on the BOE?

    And on the Stamp Professional board?
  • PublisonPublison Posts: 12,366
    edited 2018-11-23 22:39
    There is no "driver" for the servo. just pulses.
    https://www.parallax.com/downloads/continuous-rotation-servo-basic-stamp-code

    On the BOE and Stamp Board make sure red on the servo pins has enough voltage to drive a servo. Around 6 volts VIN.
    Please read the manuals.

    https://www.parallax.com/downloads/stampworks-experiment-kit-manual

    https://www.parallax.com/product/28125
  • Effectively the motor driver is built into the servo itself. That's how a servo gets away with requiring only logic level control pulses (and power).
  • microcontrolleruser,

    The servo ports on the BOE can be used for more than just servos.
    Anything that has power. ground, and a signal or control line can be connected to the servo port.
    A Serial LCD can be connected to the servo ports since there are only 3 connections, just like a servo.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-24 00:48
    Thank you Publison Mike and Genetix

    "There is no "driver" for the servo. just pulses."

    Okay. I was overthinking what it is doing when you put the jumper on VNN with BOE.

    It just opens a circuit to the board power supply voltage.

    Now a driver circuit is similar in that it carries voltage different from board logic voltage. Right?

    EDIT The BOE VNN circuit is like a driver circuit because it carries different voltage than the board voltage. Right?

    Just that a bonafide driver circuit does more than that?

    Just turned on power supply. Moved switch from position 1 to 2 and motor moved. Why did motor move without any

    program running?

    "Please read the manuals."

    I am reading the manuals.

  • The servo power supply jumper allows you to select what power supply voltage you're providing to the servos, either the supply voltage plugged into the BOE or 5V provided by the voltage regulator on the BOE. Issues: The servos work well to a little over 6V. Lower voltages produce somewhat less torque and a bit less top rotational speed. Higher voltages cause increased arcing of the brushes in the DC motor in the servo. This shortens the life of the brushes, hence the servo itself. 6-7.5V is best in my opinion which you can get from an AC adapter or 5 AA fresh Alkaline batteries in series.

    The twitch you get when you turn on power to the servo is produced by the servo driver circuitry as it's initializing itself. It doesn't matter whether a program is running.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-24 04:24
    Thank you Mike

    Have to finish with servo motor and move on to continuous rotation servo.

    Read a little bit of Process Control chapter or User Guide and it said 1-50 rpm.

    That should be interesting.

    Here's the code from the little manual on Standard Servo.
    ' CenterStdServo.bs2 
    ' {$STAMP BS2} 
    ' {$PBASIC 2.5} 
    counter VAR Word 
    FOR counter = 1 TO 220 
      PULSOUT 12, 750 
      PAUSE 20 
    NEXT
    


  • There were a few little problems running that code on servo. Nothing worth mentioning.

    On to the Continuous Rotation Servo little manual. Little manual is document in Downloads on page where the product is.

    On the BOE servo connectors why does it have clip on there?

    Looks like it is to connect double servo connectors. We don't have any Parallax item that has 4 servos with those connectors.
  • The 3-pin female headers used for servo connectors can be used for many things. You could have the usual two wheel servos plus a servo for a Ping bracket and use a 4th header for the Ping itself providing power for the Ping and the signal line needed. Other sensors could be attached to the remaining two headers. For example, the ActivityBot's wheel encoders use two headers ... signal only ... since they already get power from the motors' headers.
  • There were a few little problems running that code on servo. Nothing worth mentioning.

    On to the Continuous Rotation Servo little manual. Little manual is document in Downloads on page where the product is.

    On the BOE servo connectors why does it have clip on there?

    Looks like it is to connect double servo connectors. We don't have any Parallax item that has 4 servos with those connectors.

    You are asking about the jumper next to the servo ports, right? That allows you to select a regulated 5V or Vin (whatever input voltage is connected to the 2.1mm barrel jack connector. For the Boe-Bot, the performance is best at 6V (4AAs) but the servos still run well at 5V. Sometimes our customers don't want power restrictions on these ports. The Vin for servo power is only a problem if you're using our wall-wart switchers, which could dump 12V into your motors (good chance you'll see, smell or hear the results!).

    Ken Gracey

  • Thank you Mike and Ken

    " For example, the ActivityBot's wheel encoders use two headers'

    So it might be for the Activity Bot. Good enough.

    Thank you Ken

    "The Vin for servo power is only a problem if you're using our wall-wart switchers, which could dump 12V into your motors (good chance you'll see, smell or hear the results!)."

    I have seen that phrase 'switching' when they talk about power supplies.

    Are you saying it may say "Output 7.5 volts" but it can pop up to 12v ?




  • Are you saying it may say "Output 7.5 volts" but it can pop up to 12v ?

    Whatever you plug into the 2.1mm jack will be present on the servo headers if the jumper is in the Vin position. If your wall power supply is 7.5V, expect that voltage. If you plug in 1KV you'll see that too.

    Ken Gracey


  • Ken

    You made it sound like any wall power adapter that says switching can spike up to a higher voltage.

    I will work on continuous rotation servo tonight or tomorrow.

    Probably unbolt it from chassis. Put a piece of masking tape on for pointer.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-24 17:40
    Publison

    This one . Plain old countinous. Two of them from BOEbot.

    https://www.parallax.com/product/900-00008

    Are you going to buy me the other ones for Christmas?:)
  • "You made it sound like any wall power adapter that says switching can spike up to a higher voltage"
    Noooo. The two main classes of regulated power supplies are linear and switching. A linear supply typically uses a transformer and rectifier (a couple of power diodes) to produce a low DC voltage from the AC "mains". These days there are power ICs that will take this and produce a well regulated lower voltage (say 5V). A switching supply will first convert the AC to DC, maybe 150V, filter it, then use switching transistors to chop this back into high frequency pulses (maybe 100KHz) usually with the pulse width tied to the DC voltage. This is run into a transformer (now much smaller due to the high frequency) to provide something close to the voltage you want, then filtered to provide the 3.3V or 5V you really want. Unless the regulator breaks down, you won't get "spikes" of a higher voltage. The Wikipedia has much better discussions of the various types of low voltage power supplies. Look there if you have more questions

  • Thank you Mike

    Let me jump over to DC motors and driver circuits.

    I think I already have a driver circuit. This Futurlec board.

    http://www.futurlec.com/Mini_DC_Motor.shtml

    So I just disconnect DC motor on board and connect my own motor?
  • The L293 is a pretty standard part for controlling small DC motors. There are others, for example from Adafruit.

    Yes, just connect your own motor in place of the one provided. Make sure your motor is designed to work on the sort of supply voltage provided (< 600mA current, < 36V (stick to max. 12-15V)).

  • Thank you Mike

    Good!

    Have some more questions about that but I will save them for later and get back to the servo.

    Will work on servo tonight.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-25 05:51
    Ready to roll with Continuous Servo!

    Using this manual.

    https://www.parallax.com/sites/default/files/downloads/900-00008-Continuous-Rotation-Servo-Documentation-v2.2.pdf

    After running calibration here is the code to run.
    ' RotateParallaxCrServo.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    counter VAR Word
    servoPin PIN 12 ' change I/O pin for servo signal here
    FOR counter = 1 TO 100 ' Rotate counterclockwise for ~3 seconds
    PULSOUT servoPin, 850
    PAUSE 20
    NEXT
    

    Anybody know when to use a servo like this and when to use a DC motor?

    What's the rule about that?
  • There's no "rule". Servo motors like the regular ones you've seen and the continuous rotation one you've been playing with are simple and straightforward. These days they come in a variety of sizes. They're originally for use in remote control models ... ships, planes, robots, etc. You can get them with built-in position encoders. They're based internally on geared DC motors.

    DC motors can be very large and very small. They can have controllers using PWM to vary speed without losing torque at low speeds (like some of your variable speed home appliances). What do you need?
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-25 06:48
    "What do you need?"

    I'm more or less set right now.

    Will just do lessons and think about it.

    Process Control has DC motor lessons.

    Can a continuous rotation servo be rotated by hand or is that bad for it?

  • Ran calibration program last night.

    The motor rotates AND makes noise. It is not supposed to do either. So it needs adjustment.

    Will do this:

    1 remove motor from chassis to get to adjustment screw hole.

    2 Run calibration program and adjust.
  • Mike GreenMike Green Posts: 23,101
    edited 2018-11-25 16:52
    "Can a continuous rotation servo be rotated by hand or is that bad for it?"
    Yes and no (if you're gentle with it). Remember that there's a gearbox in there
    ... and permanent magnets ... and that will create a lot of resistance ... don't force it.
    If power is applied, you may not be able to move it, particularly with regular servos.

    "The motor rotates AND makes noise"
    The calibration process is intended to adjust the internal driver circuitry so that it
    doesn't rotate when the 'neutral' pulse width is applied (1.5ms). Servos are normally
    fairly noisy ... mostly from the gears.

  • Thank you Mike

    Have motor off chassis.

    It is a Continuous Rotation servo.

    Will do calibration routine tonight.

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-26 05:13
    Ready to roll!

    Have program loaded in editor.

    Have hardware out and tools(Phillips screwdriver, correct size)

    It will always make noise? Right?

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-26 06:22
    Ran program from manual.

    Rotates one direction, stops and runs the other direction.

    Works perfectly!

    Figure out what to putter with next.
Sign In or Register to comment.