Shop OBEX P1 Docs P2 Docs Learn Events
Help Stamp in class homework board turns off — Parallax Forums

Help Stamp in class homework board turns off

CordcoleCordcole Posts: 16
edited 2010-05-04 19:29 in Learn with BlocklyProp
My stamp in class turns off every 3 seconds and its NOT the battery. I have just replaced it.

thanks

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-03 23:25
    Code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2010-05-03 23:44
    Hello Cordcole,

    What code/circuit are you running? Your board could be resetting due to a short somewhere in your circuit. With more information, we can definitely help you pinpoint your problem.

    -- Jessica

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jessica Uelmen
    Education Department
    Parallax Inc.
  • CordcoleCordcole Posts: 16
    edited 2010-05-04 01:37
    the code is
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    DO
         DEBUG ? IN0
          IF (IN0 = 1)THEN
    Counter         VAR     Word
    
    DEBUG " counterclockwise 10 o'clock", CR
    
    FOR counter = 1 TO 30
      PULSOUT 1, 1000
      PAUSE 1
    NEXT
    
    DEBUG " counterclockwise 10 o'clock", CR
    
    FOR counter = 1 TO 30
      PULSOUT 2, 1000
      PAUSE 1
    NEXT
    
    DEBUG " counterclockwise 10 o'clock", CR
    
    FOR counter = 1 TO 30
      PULSOUT 3, 1000
      PAUSE 1
    NEXT
    
    DEBUG " counterclockwise 10 o'clock", CR
    
    FOR counter = 1 TO 30
      PULSOUT 4, 1000
      PAUSE 1
    NEXT
       ENDIF
       LOOP
    
  • CordcoleCordcole Posts: 16
    edited 2010-05-04 01:38
    This is a program that once a switch is triggered for servos go off for a short amount of time
  • FranklinFranklin Posts: 4,747
    edited 2010-05-04 01:59
    Your pause time is too short and should be closer to 20 rather than 1

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • TobiTobi Posts: 5
    edited 2010-05-04 09:58
    Hello Cordcole,

    are you using an original parallax servo?

    My hobby servo shows the same effect, but if I play arround with the value of the pulsout signal (set it lower than 1000), i can fix it.

    - Tobi
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-05-04 13:15
    How do you have the button wired? It's possible you're creating a short, which will drain any 9-volt pretty quickly. Do you have a volt-meter? Hook it up to measure the current being drawn from the battery -- it should be 5 mA or less, unless the Servo is moving, where it can jump to 750 mA.

    Usually, I don't recommend driving a servo with a 9-volt battery -- a 9-volt usually can't supply that much current because of "internal resistance" in the battery.
  • CordcoleCordcole Posts: 16
    edited 2010-05-04 19:29
    no the switch was not connected but i just figured out how to fix it. I reprogrammed the basic stamp which seemed to work.

    thanks who all helped me turn.gif
Sign In or Register to comment.