Shop OBEX P1 Docs P2 Docs Learn Events
hitec HS-300 servo issue... — Parallax Forums

hitec HS-300 servo issue...

WhelzornWhelzorn Posts: 256
edited 2004-08-20 16:41 in BASIC Stamp
I am a pretty noble beast, and I feel like an idiot asking this one, but i have been stumped for hours. I have an hitec HS-300 servo, standard if you diddnt already know, and attached it to P0 on the bs2. The servo moves, but the problem is when I run the simplest of simple programs to it: PULSOUT 0, 500 (next line) END. How much simpler/failproof could that be? it works fine with the standard servo parralax provided me with the "what is a microcontroller?" kit, but the hitec one will turn once, then about 1 secont later, turn again, then again, then 999^9 (or whatever) more times, and never stop, the program has clearly been ended, what in the name of bob is going on here?
thanks in advance,
Justin

Comments

  • cabojoecabojoe Posts: 72
    edited 2004-08-13 03:32
    Are you using a separate power supply for the servo? Sounds like the stamp is resetting itself and doing it over and over. More info pls.
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 03:35
    No, I am not using a seperate power supply, the gnd is attached to Vss, and the +, red wire, is attached to Vin
    thanks

    [noparse][[/noparse]edit] Oh, I forgot to mention that the status (power) light on the board does not blink when the servo turns the second, third, etc. time. It does blink when the program first starts though... puzzling...

    Post Edited (Whelzorn) : 8/13/2004 3:42:50 AM GMT
  • cabojoecabojoe Posts: 72
    edited 2004-08-13 03:57
    Are you saying that the red wire of the servo is connected to the Vin of the stamp?
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 03:58
    yes, but I think you accidentally created a new post for it [noparse];)[/noparse]
    [noparse][[/noparse]edit] not only that, but I have 2 of these servos and they do the same exact thing...
  • cabojoecabojoe Posts: 72
    edited 2004-08-13 04:01
    Try connecting the red servo wire to Vdd. Sorry about the extra post.
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:06
    hmmm... red wire to Vdd... does no good, same exact thing... this is strange...
  • cabojoecabojoe Posts: 72
    edited 2004-08-13 04:09
    Some servos are wired differently so they will work with different radios. Did you buy those servos with a radio per chance?
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:12
    no, I baught them straight from hitec... and as far as I know they are no different, but if the "parallax" standard servo is really just a plain ol' "standard servo", then mabe these arent...
    [noparse][[/noparse]edit] (carry on from accidental topic) My leads are black, red, yellow, so I think that black and red are pretty standard gnd, +V leads, and the yellow seems to be signal, judging by other servos...

    Post Edited (Whelzorn) : 8/13/2004 4:17:21 AM GMT
  • Dave_hDave_h Posts: 4
    edited 2004-08-13 04:15
    Try changing the Duration argument in your PULSOUT statement. I have severaL hitec SERVOS that I've used, but they don't react the same with the numbers that parallax uses for their own servos. For instance, to center, one takes PULSOUT 15, 808, the other takes PULSOUT 14, 821. You may have to play around to find the numbers that work for you.
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:19
    well, I dont think thats the problem, because regardless of what pulsout I send to it, it moves again and again and again...
  • cabojoecabojoe Posts: 72
    edited 2004-08-13 04:19
    Try with a separate supply for servo...5 volts, and tie grounds together. Also you could insert a debug statement before the End statement...something like debug "test",CR
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:27
    well, It appears to be a servo only thing, because "debug" only returns the message the first time the servo turns, and then never again...
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:30
    uhh... problem... when pulsout is set to 500, the "debug" returned a really screwed up rendition of the word test, using different characters and such, mabe a bad connection, it only did it once...
  • cabojoecabojoe Posts: 72
    edited 2004-08-13 04:33
    I'm miffed...prolly best to walk away from it for a bit and think about it...lol
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 04:53
    Ooo! I got it! the potentiometers inside the servos were not moving with the gears, so they were not telling the servo to stop! why the hell they came like that, I dont know... anyway I installed some solder to sort of key the potentiometer and they work now... mabe the key in the shaft fell out? coincidence that they happened to both though...
    thanks again for everyones help!
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 16:16
    aah, sorry to bring this topic back up, but this isnt the end of this problem. I guess all fixing the potentiometer did was let it be controlled. The "non-stop" problem still resides. I have determined a bit more now though. This is very strange. I have an LED running at the same time and on the same IO line as the servo. The LED picks up the signals from when the servo is supposed to be moved, but stops when the program stops, and doesn't ever blink when the servo moves itself mysteriously. Also, if I remove the signal wire from the IO pin after the program is over, the servo does NOT move itself, even if I put it in another IO port, so it seems that the servo is recieving something from the IO port even when there is nothing coming out of it (???). Also, If I connect power, but do not have the signal wire in the IO port, and then touch the signal wire with my finger, the servo will move continuously in one direction... I am completely puzzled at this one... I would appreciate ANY help with this one, regardless of how dumb it may be...

    oh, and if the above is at all unclear, please ask for clarification, I did my best describing this...
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2004-08-13 19:36
    PULSOUT 0, 500

    END

    What happens if you change the END to:

    Done:
    · Goto Done


    Kenny


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --

    Kenny Gardner
    GAP Development Company
    http://www.gapdev.com/
    ·
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 21:03
    well, that does work... nice... However, I would like the program to actually end... not loop forever... I am puzzled because this works with the parallax standard servos but not these... its rather odd... But unless I figure out another way, this will work. Thanks!
    although if anyone has any further suggestions I would live to hear them...
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2004-08-13 21:44
    The End statement is actually indirectly pulsing the servo (see online Help). The HiTech 311 must be more sensitive to the pulses than the Parallax servos. The only solution is to either not use the End statement or switch servos.

    Kenny







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --

    Kenny Gardner
    GAP Development Company
    http://www.gapdev.com/
    ·
  • K de JongK de Jong Posts: 154
    edited 2004-08-13 21:50
    Maybe try a pull down resitor at your servo pin? 'END' makes all pins INPUT, I guess.

    Klaus
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-13 21:53
    wait... if this is true, then how come the LED showed no response from the pin?
    [noparse][[/noparse]edit] sorry, I diddnt see yours klaus... and to answer that, I already tried the resistor, and it doesnt work either... thanks for the suggestion though.
  • QShifterQShifter Posts: 4
    edited 2004-08-19 07:14
    I had the same glitching problem with my servo too, but your line in the code below works great for me, it stops the servo·solid.

    thanks,

    QShifter
    Kenny Gardner said...

    PULSOUT 0, 500

    END

    What happens if you change the END to:

    Done:
    · Goto Done


    Kenny


  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2004-08-19 10:22
    You know, I've had problems with HiTec servos also...but never with Futaba....strange...

    LosT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-19 13:20
    You can change END to STOP so that the program ends but the BASIC Stamp doesn't enter lowe power mode (which gets interrupted by the watchdog timer and allows the outputs to float periodically).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • WhelzornWhelzorn Posts: 256
    edited 2004-08-20 01:04
    hmmm... thanks for the suggestion jon, STOP works fine, but the main problem is I want it to enter low power mode. I tried the pull-down resistor again, and noticed that it works on only one of the servos. Possibly the reason hitec doesnt make these anymore is because they dont work at all? well, If anyone has had success with futaba servos, I will buy those next time, they appear to be alot less spastic. Thanks for everyones help!
  • frasencifrasenci Posts: 34
    edited 2004-08-20 01:18
    hey lostboy ,...
    although I fly Hitec Tx Rx & servos myself and have happily manage to toy around with some 1980 futaba servos ( mod or not ) ,.... after knowing that Parallax stocks "specialized mod servos " wich include an centering potentiometer ,... I do not think about any other better solution than that . Especialy if you are new to it. ( you want to mow some grass ore something and put some $$$ together to grab some ) , je je
    hope this helps you
  • gremlingremlin Posts: 6
    edited 2004-08-20 16:41
    How about taking the "control" pin low just before terminating the program. The servo will respond to much smaller pulses than LED can see.
Sign In or Register to comment.