drew, · ·· If you’re trying to run the motor by connecting it directly to the I/O pin then that is your problem.· You cannot drive a motor directly from an I/O pin.· The I/O pin won’t supply enough current, and the motor could also damage the I/O pin.· Please confirm your connections.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
drew1 said...
thanks , how does the stamp power the dc motors in a servo.
It doesn't. It provides the data signal to tell the servo which direction to turn and how much(through one of its pins) but not the power which actually drives the dc motor (although the same power supply which powers the stamp might also power the (single, small, unloaded) servo (or if more power is required, the servo(s) would be powered by a separate, larger-capacity regulated power supply (sharing ground with the stamp's ground), but the stamp pins themselves are not providing that power).
Check out the wiring / circuit board diagrams and manuals available from Parallax's website real closely, to see how the servos and stamp are connected to the power supply(s).
A 'servo' is a very neat small device, which packages a small pulse-width-comparator and some drive electronics along with an electric motor and some gears, and a variable resistor tied to those gears. The intended use of this is to connect it to an RF reciever in a model plane or car. The RF reciever puts out a pulse -- 1 mSec to 2 mSec, depending on how the joysticks are oriented on the RC remote -- and repeats this pulse every 20 mSec.
Now, the comparator in the servo looks at the incoming pulse, and compares it to a pulse being generated by a circuit in the servo using the variable resistor to tell it the position of the output shaft. The servo electronics then command the motor to move the gears (and the variable resistor) to match the 'commanded' input pulse width. The result of this is an electrical device, which when commanded will move a mechanical shaft so you can control your plane.
Now, some brilliant person figured you coud set the variable resistor to the middle of its range, and then disconnect it from the gears, and then modify the gears so they could rotate continuosly (that's the "Modified" part of "Modified Servo"). The result was a small, powerful, self-contained robot wheel motor, that could be command to spin forward, backward, or stand still with ONLY a "PULSOUT" command, repeated every 20 mSec.
So, you provide +5 to +6 volts on the 'red' servo voltage supply wire, connect the black wire to Vss (AND your supply ground -- usually the same) and connect the white 'signal' wire to a BS2 pin. And you have your robot wheel motor.
Now -- there are two other 'motors' types. The first is a 'pure' DC motor (supply 1.5 volts, 3 volts, or 6 volts depending on the motor) (oh, and a LOT of current) which you typically control with a transistor, or an "H-Bridge" if you want it to be reversible, and a PWM signal if you want to control its speed.
The second is a 'stepper' motor. This motor has multiple windings inside of it. Each winding will 'snap' the motor shaft to a particular position. Depending on the order in which you energize those windings, you can make a very precise positional motor out of this.
But both of these 'other' motors are MUCH more difficult to interface and control than the "modified servo".
Do take the "MUCH more difficult" with a grain of salt. Controlling a servo is very easy as described. Controlling a DC motor is not hard if you just want to turn it on and off and control its speed. The "What's a Microcontroller?" text (see the Parallax website) describes how to use a transistor switch to do this. Reversing a DC motor is harder, but you can buy a ready-made motor controller that will do it for you easily. A stepper motor is much harder, but, again, you can buy a controller that does the hard work for you. If you want to put the effort into learning how to make an H-bridge work or control a stepper motor, the information is available here and around the internet.
Comments
·
·· If you’re trying to run the motor by connecting it directly to the I/O pin then that is your problem.· You cannot drive a motor directly from an I/O pin.· The I/O pin won’t supply enough current, and the motor could also damage the I/O pin.· Please confirm your connections.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support·
Check out the wiring / circuit board diagrams and manuals available from Parallax's website real closely, to see how the servos and stamp are connected to the power supply(s).
PAR
Now, the comparator in the servo looks at the incoming pulse, and compares it to a pulse being generated by a circuit in the servo using the variable resistor to tell it the position of the output shaft. The servo electronics then command the motor to move the gears (and the variable resistor) to match the 'commanded' input pulse width. The result of this is an electrical device, which when commanded will move a mechanical shaft so you can control your plane.
Now, some brilliant person figured you coud set the variable resistor to the middle of its range, and then disconnect it from the gears, and then modify the gears so they could rotate continuosly (that's the "Modified" part of "Modified Servo"). The result was a small, powerful, self-contained robot wheel motor, that could be command to spin forward, backward, or stand still with ONLY a "PULSOUT" command, repeated every 20 mSec.
So, you provide +5 to +6 volts on the 'red' servo voltage supply wire, connect the black wire to Vss (AND your supply ground -- usually the same) and connect the white 'signal' wire to a BS2 pin. And you have your robot wheel motor.
The second is a 'stepper' motor. This motor has multiple windings inside of it. Each winding will 'snap' the motor shaft to a particular position. Depending on the order in which you energize those windings, you can make a very precise positional motor out of this.
But both of these 'other' motors are MUCH more difficult to interface and control than the "modified servo".