Shop OBEX P1 Docs P2 Docs Learn Events
need help with servos and bs2p40 — Parallax Forums

need help with servos and bs2p40

FlyingFishFingerFlyingFishFinger Posts: 461
edited 2005-08-30 02:44 in BASIC Stamp
Hello!
My servo (Hitec HS 805BB) is not doing what I want.
I said pulsout 1270 (that's neutral, right?) then it bounces back and forth between neutral and one extreme and then it freezes somewhere in the middle and started sqealing.
Any other pulsout values and my other servos give equally weird results.
The servo works fine with a regular R/C reciever.
I am using a regulated 6V power supply from a 12V SLA.
Thanks
Rafael

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 21:50
    Hello,

    ·· That's pretty close to neutral...My guess would be you're not putting a PAUSE 20 in the loop or that there is not a common ground between the servo supply and the BASIC Stamp.· Can you post the code you're using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:00
    welll, tha pause almost did the trick.
    My old servos now work, but the brand new Hitec servo doesn't.
    My code (just testing)
    do:
    pulsout 0,1270
    pause 20
    goto do
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 22:05
    Hello,

    ·· Unless you're not using the PBASIC 2.5 directive, you really shouldn't (can't) use DO as a label, since it's a keyword.· What is the servo doing now?· What happens if you change the DO to Main and your goto to GOTO Main?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:09
    OK, the "main" thing didn't help, the servo is now bouncing through the full ROM
    ????????
    Rafael
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-08-25 22:12
    flyingfishfinger-

    The figure you're using of 1270 may work for one servo and not another. Since you're obviously in the ballpark, try 1265 or 1275. One of those numbers should improve the situation. Just keep narrowing it down until you get exactly what you need.

    Regards,

    Bruce Bates
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 22:13
    Okay,

    ·· That doesn't make sense...All that was changed was the label.· Is this what you're using?· Try the following...

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
     
    DO
      PULSOUT 0, 1875
      PAUSE 20
    LOOP
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 8/25/2005 10:12:33 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 22:15
    Also note that I checked the PULSOUT value and it was incorrect, so I replaced it with the correct one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:17
    Yes, that;s exactly what I have...
    Rafael
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:21
    I'm not sure if this has anything to do with it, but I noticed that my regulator is just about going up in smoke (almost too hot to touch. it's one of those all-tin-can 7806 with 2 holes to screw down)...
    Rafael
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 22:26
    ·· I just wanted to confirm that you got the changes to my code above, since that's not what you had before.· I switched to PBASIC 2.5, DO...LOOP and a different pulsout value.· It should be correct or there's something else wrong, such as no common ground or something.· Where are the servos getting their power from?· Where is the BS2p40 getting it's power from?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:32
    Yes, I hadn't noyiced that the editor does not use PB 2.5 as default, it didn't recognize DO/LOOP as keywords before
    This is my system:
    Breadboard with 2 regulators on it (5V for the Stamp, 6V for the servo, both powered from my 12V SLA so its common ground), the Stamp with power to VDD (pin 37) and the servos (one or the other)... that's it.
    Rafael
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-25 22:35
    Rafael,

    ·· I'm not clear on your connections...But is it working now?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:38
    No, it's still bouncing. It works when I change to my other servos (just switching plugs).
    Do the Hitec and Futaba servos have different pin arrangements?
    Also, I thought of current draw, but there's no load, so that should't be an issue...
    Rafael
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-25 22:42
    I'll try my circuit again
    6V regulator can=GROUND=5v regulator heatsink
    I'm getting good voltages from both of those, the stamp works fine, the futaba servos too.
    I've double-checked my wiring, looks O.K
    Rafael
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-26 16:21
    No, still bouncing...
    Is it possible that this has something to do with my regulators?
    Rafael
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-26 16:24
    Perhaps a bad servo...You said two others work.· It's really hard to say.· This servo that's bouncing works on the R/C system?· Try this...
    [size=2][code]
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
     
    LOW 0
     
    DO
      PULSOUT 0, 1875
      PAUSE 20
    LOOP
    


    [/code][/size]


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-26 20:14
    OK, this is weird. Once it didn't bounce anymore, but it liked neutral at pulsout 2075 (???). It still shook a little bit but stays in position..maybe due to low voltage, I'll check. The next time it went back to bouncing. Connections are O.K, though. Perhaps noise on the cables?
    Yeah, it works on the R/C system, too...
    Thanks
    Rafael
  • dandreaedandreae Posts: 1,375
    edited 2005-08-26 23:34
    How many servos are you trying to control?· How long are your servo cables?

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com



    Post Edited (Dave Andreae (Parallax)) : 8/26/2005 11:35:37 PM GMT
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-26 23:40
    Voltage was O.K.
    Just one servo at a time for now on my breadboard, I keep swtching cables on the same pin (just trying to get the stupid Hitec beast to work).
    In future I may need about 3 at a time...(but that's a long way away, I have to get the steering of my robot working first)
    Rafael
    P.S: For Manuel from the other post, I can't afford to add more battery weight to my robot, sorry.
  • ManuelManuel Posts: 105
    edited 2005-08-26 23:42
    To use this alredy made forum i want to ask a question. I use pause 20 when i use my BS2, I also have a BS2sx, must i use a pause 50(20 * 2.5) instead of the pause 20?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-26 23:46
    Manuel, how did you solve your hitec problem?
    My servo cables are just that what comes out of them (12")
    Rafael
  • dandreaedandreae Posts: 1,375
    edited 2005-08-26 23:47
    Try putting a debug statement at the top of your code to see if the stamp is resetting?· It maybe that you are drawing too much current?

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-26 23:55
    No, it's not resetting.
    Behaviour this time: Wobbling around at one end of ROM and then going all the way to the end and whining.
    I thought all the stamps had the same pause units so wouldn't it also be PAUSE 20 on the BS2sx for Manuel?
    Rafael
  • dandreaedandreae Posts: 1,375
    edited 2005-08-27 00:00
    Yes, it is pause 20 for all stamps.· Is your servo driving anything at the moment?· Make sure·to test it with nothing attached.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2005-08-27 00:03
    There was never anything attached because it displayed weird behavoir right from the first test, so I didn't install anywhere yet.
    Rafael
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-08-30 02:44
    flyingfishfinger said...
    Hello!
    I still haven't worked out why my Hitec servo (HS805BB) behaves weirdly on the Stamp and normal on an RC system.
    It's just that I can't exchange it because it's only supposed to work on the RC system originally and it does, and it's too expensive to get another one.
    Is there a difference between the pulses a rc reciever uses to control servos and those a Basic Stamp uses to control servos?
    Can I control servos with a Stamp not using the pulsout command or PSC's?
    Rafael

    NOTE:· This message was from another thread and moved here for consistency. Apologies for putting it in the wrong thread earlier, but you keep starting new threads on the same topic, and I am having trouble tracking them all down and moving them back to this one.· Please keep this discussion in this thread.· Each time you start a new one, the same questions get asked all over again.

    We've never had any complaints about anything like this regarding incompatibility with standard servos.· Have you tried different values in your PULSOUT statement?· The two devices put out virtually identical signals.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.