Shop OBEX P1 Docs P2 Docs Learn Events
Problem with Ping + Servo + IR — Parallax Forums

Problem with Ping + Servo + IR

danielcho88danielcho88 Posts: 2
edited 2009-11-20 15:01 in Accessories
I'm trying to get a PING mounted on a standard parallax servo to look left, front, and right (in a loop) and see if there are objects ahead. There are IR sensors also mounted, and the loop goes as such using subroutines:

Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Left
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Right
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)

and so on and so forth:

SOMETIMES I would turn on the system and everything will work, but then by surprise I find that my servo twitches and stays "stuck" but the ultrasonic sensor picks up things and the IR sensor picks up things. And then I will return to the circuit a couple hours later after giving up, and everything will work again. Then the next morning, things are back to twitching servo and stuck servo [noparse]:([/noparse]

any ideas as to what is happening? This is urgent!
·

Comments

  • dandreaedandreae Posts: 1,375
    edited 2009-11-20 15:01
    What are you using to power your circuit?· If you are using batteries I would check the voltage with a voltmeter.· Servos consume a lot current.

    Dave

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

    Parallax Tech Support·
Sign In or Register to comment.