Shop OBEX P1 Docs P2 Docs Learn Events
Servo problems again — Parallax Forums

Servo problems again

RandiRandi Posts: 8
edited 2010-01-14 02:55 in BASIC Stamp
OK... This one got me.

What I got is a BS2 with two servos on it.
The servos have their own 6v power supply.
When I control the two servos with random movements, they work just fine.

But I am building an audio animatronic creature and have inputs coming in from a DTMF board.
Basically it's sending 5v to the pins based on a tone.
The BS2 and DTMF circuit are both being ran by a 9v battery.

The code is so basic and I have looked over it and can't find anything wrong with it.
It's nothing more than checking the pin for HIGH and the running the PULSEOUT.

Every input works, except for two.

One...
When the BS2 receives this certain input, the whole BS2 restarts.
I have switched tones... that didn't fix it.
I have played with the pulse value for the servo, that didn't fix it.
I switched which pin is the input, that didn't fix it.

The other input doesn't do anything.
Played with it too... doesn't work.

It seems like I am running out of power, and that is what is restarting the BS2.
When I remove the batteries and let them set for awhile, then go try it.. it works for one round.
But then goes back to not working.

I tried using a separate 9v for the DTMF board, but that didn't help.

Any suggestions?

Randi

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Randi

http://www.randirain.com

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2010-01-14 01:37
    Randi

    Sounds like a brown-out. Try a wall-wart and see what happens!

    I think you have made a power hog. But I think its cool in moderation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA

    Post Edited ($WMc%) : 1/14/2010 1:48:03 AM GMT
  • RandiRandi Posts: 8
    edited 2010-01-14 01:53
    Nope.. that can't be the answer.
    It's a stage prop.. must use batteries.

    Randi

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Randi

    http://www.randirain.com
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-14 01:57
    Try New 9v's.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-01-14 01:57
    Randi
    Have You tried a dry run with a AC power supply to insure it runs OK?

    If so. Get bigger batterys

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-14 02:03
    9V batteries are notorious for running dry quickly. You'd be much better off running the Stamp from another 6V or 7.5V supply (4 or 5 AA or AAA alkaline cells).

    You might also check your program. Restarts are often due to executing a RETURN without a matching GOSUB.
  • RandiRandi Posts: 8
    edited 2010-01-14 02:09
    Ok.. Sometimes I don't think things all the way through.

    I switched the input pins that wasn't working.
    Then one was working and the other wasn't.
    The one that was resetting still resets.

    I looked over my code, and forgot I was using the pin I changed to for something in the future, for random movement.
    So it was switching to random, but when I let up on the tone... it was programmed to reset.
    I blocked that bit of code and now it works.

    So the real question was why did I have to change those pins?
    I checking conductivity and they were good.
    Have they gone bad?

    The problem I am having now is that some of the inputs cause the other servo to move for no reason.

    Not sure what that is.

    Should there be any caps or diodes across the servos?

    Randi

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Randi

    http://www.randirain.com

    Post Edited (Randi) : 1/14/2010 2:29:48 AM GMT
  • $WMc%$WMc% Posts: 1,884
    edited 2010-01-14 02:22
    Randi

    I would look for a faulty device in this group. Since You have ruled out the Battery's with a power supply.

    The code You posted isn't much to go buy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
  • RandiRandi Posts: 8
    edited 2010-01-14 02:28
    Yeah.. edited the above post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Randi

    http://www.randirain.com
  • RandiRandi Posts: 8
    edited 2010-01-14 02:55
    Ok.. Solved all the problems I think.

    If you are wondering...

    The head is removable, and pops into connectors that rub on it as it moves.
    Even though my connectors are all spring loaded and a work of art, they are still not perfect.
    When I get any kind of non-connection, it effects the servos.

    But thanks everyone for your help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Randi

    http://www.randirain.com
Sign In or Register to comment.