Go Down

Topic: Need help getting IR sensor to trigger Servo motor (Read 6473 times) previous topic - next topic

Groove

Servos don't normally rotate non-stop; sooner or later they hit the end-stops.
Are these R/C servos modified for continuous rotation?
Per Arduino ad Astra

zephyr2112

nope. I bought them as continuous rotation servos from adafruit.
here's the link if you need it: http://www.adafruit.com/index.php?main_page=product_info&cPath=34&products_id=154

Groove

#17
Dec 17, 2010, 11:58 am Last Edit: Dec 17, 2010, 12:13 pm by GrooveFlotilla Reason: 1
Also, difficult to see how an analogueRead returns 3000.

Cut out all the servo driving stuff and concentrate on getting the sensor readings looking sensible, just using prints. Tackle one thing at a time.
[edit] Let's be clear on one thing; whatever they were described or sold as, those are not servos.
How are you powering them? Not from the Arduino, I hope [/edit]
Per Arduino ad Astra

zephyr2112

oh no, of course not. I figured that the arduino wouldn't be able to power them. they're being powered externally by a 9v battery pack, which seems to be working fine. although they drain the battery pretty fast, but thats expected.

Groove

Why are you powering 6V motors from 9V?
Didn't you read the spec?
Per Arduino ad Astra

zephyr2112

is it 6? i probably miss read it  :-/
but i somewhat doubt that might be the main factor thats giving the problem. but then again, im new to this.

Groove

Best to get as much of the simple stuff correct as soon as possible.

Assuming the motors are ex-servos, and looking at the product you linked, it doesn't make much sense to step 0-180 then back; that's not how they work.
Either 0,90 or 180 for reverse, stop and forward.
Per Arduino ad Astra

newman

Quote
To control with an Arduino, we suggest connecting the white control wire to pin 9 or 10 and using the Servo library included with the Arduino IDE (see here for an example sketch). Position "0" (1.5ms pulse) is stop, "90" (2ms pulse) is full speed forward, "-90" (1ms pulse) is full speed backwards. [glow]They may require some simple calibration, simply tell the servo to 'stop' and then gently adjust the potentiometer in the recessed hole with a small screwdriver until the servo stops moving[/glow].
For more information, check out the Parallax Datasheet

This is something important hope u didnt miss that i found it in the link you gave us  :)

newman

#23
Dec 17, 2010, 01:11 pm Last Edit: Dec 17, 2010, 01:12 pm by newman Reason: 1
THAT Means you need to send a 1.5 ms pulse and see if it stops  else CALIBERATE it

Go Up