Shop OBEX P1 Docs P2 Docs Learn Events
Low Voltage output? — Parallax Forums

Low Voltage output?

UlrichUlrich Posts: 11
edited 2007-12-17 06:18 in BASIC Stamp
I'm using a BS2 chip and command PULSOUT for my program and my understanding of this command is that it is supposed to output a pulse of 5V to a certain pin for a certain amount of time. It seems to output about .66V to about .93V. Any ideas on what to do about getting the signal pulse to 5V? I demo the circuit on Thurs. so I would like to get it working as soon as possible. Thanks, Brice

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-12-10 20:23
    Hello,

    How are you measuring the pulse? If you’re using a multi-meter that won’t work. It cannot respond fast enough to the changing voltages. If you have a scope you should be getting what you expect. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-12-10 22:29
    Also, what is the pin connected to on the outside? The 0.66 volts sounds like it might be connected directly to a diode or to the base of a transistor with no limiting resistor.

    What is the "certain amount of time"?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • UlrichUlrich Posts: 11
    edited 2007-12-11 06:09
    The pin was connected to a LED which I was using as an indicator to check for signal. I took that out and it seemed to help. I checked my signal voltage with a scope and it seems to be 5 volts. I tried connecting a small digital servo to the output and when it gets a signal it doesn't move, but acts it's moving so fast and such small rotation that it seems like it freezes up and I even move it with my fingers. When it isn't receiving a signal, I'm able to move it with my fingers. I connect the larger servo and nothing at all happens. Am I correct in saying the signal required for the small digital servo (outputs about 96 oz. inches) and the larger servo (outputs about 220 oz. inches) should be the same? And, the difference is only in the current draw from the power supply? Thanks.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-12-11 15:32
    If you're using an LED for light output, you MUST put a current limiting resistor in-line with it (like 470 ohms).

    The smallest pulse you're likely to 'see' is about 10 mSec, though.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-12-11 17:42
    The pulse to the servo should be in the range of 1 to 2 milliseconds long, repeated roughly once every 20 milliseconds. Center is 1.5 ms. Typical of Parallax servos anyway. The signal for the small and large servos should be the same, a signal only, no power, and yes, the bigger one will draw more current from the power supply, so be sure the power supply can handle it. The LED certainly does the resistor in series. Wire it up and control it as in the "Motion" chapter in "What's a Microcontroller".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • UlrichUlrich Posts: 11
    edited 2007-12-13 17:36
    I understand that it is recommended that servos from parallax are used with the BS2. I have one that I'm able to get to work with it. The problem is it only has 47 oz inches available. I need about 160. I have a servo that will provide 208 to 250 depending on the voltage; the equiv. servo of the Hitec HS-5745MG Digital 1/4 scale. I have been able to get a digital servo to work with this circuit, but not move in the right direction at the right time. The large servo doesn't work at all. Are there any suggestions on how to tell if the large servo is dead? I think if I could get the small digital servo to work, the large would work the same way, assuming the large one is working to begin with of course. Any suggestions on getting the digital servo to work? Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-13 18:04
    A Stamp should be able to control any standard servo that accepts its control as a logic level pulse from about 1ms to 2ms in width repeated roughly every 20ms. That's what all the sample programs assume. Parallax recommends that people use their servos because they support them.

    That said, it's easy to test a servo. Write a little program that produces a pulse starting at 1ms in width and increases slowly to 2ms, then back again. If the servo is working, it should move from approximately one end of its range to the other. Servos vary in terms of what pulse width will produce a particular movement. There is no absolute standard. You will have to experiment to see what pulse width you need.
  • Desy2820Desy2820 Posts: 138
    edited 2007-12-14 12:22
    What are you using for a power source?· If you're using the Stamp's on-board regulator (eg, Homework Board) or a 9V battery, they more than likely can't supply enough current for the larger servos.· There are several posts and examples about using seperate power supplies or battery packs to operate servos.· Also, adding a large value capacitor across the power supply may help, as·servos tend to draw spikes of current when they start moving.

    Brief summary:
    Don't exceed the servos max input voltage.··This rule is a little flexible,·for example,·you can run a six-volt servo from a 7.2 volt battery pack, but you will shorten the servo's life-span.··Better choices are four AA batteries or a lantern battery.

    Connect the two power supply negatives together,·but do this only once, in one place.

    I hope this helps!
  • UlrichUlrich Posts: 11
    edited 2007-12-14 18:07
    As far as the power source: I am using the Vin pin. I have 6.5 Volts going through a 270 Ohm resister to make it about 6V, the regulator takes care of bringing it down to the right voltage. The power supply itself can source up to 1A for the servo at 6volts. It's a Triple output DC Power Supply that plugs into the wall. Would you still suggest a capacitor somewhere to prevent power spikes (i.e., large cap between the power and ground)? What size cap? I have many 100uF I could try. Thanks.
  • Desy2820Desy2820 Posts: 138
    edited 2007-12-16 13:48
    If I'm understanding what you've posted, you an a regulated 6.5 volt DC supply, through a·resistor, then to the Stamp's VIN (Voltage In) pin.

    Your servo should only have three wires:· typically, red, black, and white or yellow.· Red and Black will go directly to your power source.· The white or yellow wire will connect to a stamp pin.··Also, most servos will twitch or move when you apply or remove power, does yours?

    Try this, connect the servo directly to the power supply, not through the resistor.· Add a capacitor across the power supply, and add another as close to the servo as you can get.· Try your code, any better?

    Double check your connections and your code.· You are putting the PULSOUT on the correct pin, right?· Remember, the stamp pins start at·zero, not one!· (Been there, done that.)· Check your PULSOUT durations, do they match the stamp module you have?· Different stamps will have different values for the duration, check the PBASIC reference manual on pages 351-353, especially page 353, with the programming template.

    If still no joy,·try another power supply or battery, or battery pack.· For six volts, you can try a lantern battery.

    Hope this helps!
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-12-16 15:10
    Ulrich -

    One other thing to consider is that with a separate voltage supply for the servos, you MUST connect the (-) or ground side of the power supply to the GRD (ground) connection of the Stamp. Otherwise the servo will not operate properly.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • UlrichUlrich Posts: 11
    edited 2007-12-17 05:10
    "Add a capacitor across the power supply, and add another as close to the servo as you can get. " Would 100uF be big enough or too big? across the power supply would be directly across the positive & negative; so would I simply have two in parallel? Clarification would be helpful. Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-17 06:18
    100uF is big enough. Up to 1000uF is reasonable. Make sure the rated voltage is as high as the highest voltage you will connect to it. For a 6V or 7.5V supply, a 10V rating is fine.

    You can connect capacitors in parallel. The capacitance adds in parallel.
Sign In or Register to comment.