Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
Hi,Im adding IR range finder to my $50 robot. i want my range finder to detect objects rather than tracing a object. for that i want my scan servo turn 0 position 90 (neutral) position and 180 position. i have already modified my $50 robot to use 8MHz clock because a added UART functionality to it. i tried to control my scan servo angle as follows,servo_scan(232); // (23/0.992)*1.25*8servo_scan(278); // (23/0.992)*1.5*8servo_scan(325); // (23/0.992)*1.75*8void servo_scan(signed long int speed){ PORT_ON(PORTD, 4); delay_cycles(speed); PORT_OFF(PORTD, 4); delay_cycles(1600);}but servo doesn't work as i hoped please let me know how can i control my servo in the way that i wantThanks
Hi,Doesn't it move away from the neutral position at all, no matter the code?Have you tried it with more than one servo?If you have access to an oscilloscope, look at the signal going to the servo (servo not connected).
[...] now it moves here and there, but still i don't have clear idea about the values those i should pass to servo_scan() tomove my servo sharply 0degree, 90 degree and 180 degree.
Hi,Quote from: kalu125 on October 03, 2010, 06:49:34 PM[...] now it moves here and there, but still i don't have clear idea about the values those i should pass to servo_scan() tomove my servo sharply 0degree, 90 degree and 180 degree.Just increase and decrease the outer values in say 5 a time until you get the wanted response - don't go any further, as the servo will then try to break the end stops (and perhaps burn the windings or snapping a cog or two while trying).Don't have it go to a multitude of positions, just have it go to one (low) value, stay there a second or two, then to another (high) value - start and return at or near neutral position.Then increment and/or decrement as needed and try again.