Hello everyone,
I am doing a pan-tilt system and i need position control on the pan. The problem is these system is going to be conected to a batery and i want it to consume the least amount of battery power. In addition, it needs to maintain the position in case it power off.
I was thinking on a servo for these case but i want it to rotate 360º so i tried a winch servo (SW5513-6MA from kingmax) but it makes a 360º rotation for every 194-200μs. The problem is it only moves every 4,7μs and between 8-10º. It is not enough resolution and i dont know other types of motors that would fit for these problem.
Also i dont know if there is a problem about the program i have done so i am going to post it here. I am using a raspberry pi 4 and it is python:
import pigpio
import time
def angle_to_percent(angle):
start=1520
end=2000
#1980=Number of turns it can make 5,5 turns 360º each turn.
ratio=(end-start)/1980
return start+angleratio
servo=12
frequence=50
pwm=pigpio.pi()
pwm.set_mode(servo, pigpio.OUTPUT)
pwm.set_PWM_frequency(servo, frequence)
try:
print(“Moving to 0º”)
pwm.set_servo_pulsewidth(servo, angle_to_percent(0))
time.sleep(5)
print(“Moving to 360º”)
pwm.set_servo_pulsewidth(servo, angle_to_percent(620))
time.sleep(5)
finally:
pwm.set_PWM_dutycycle(servo,0)
I havent tried a stepper motor yet because in case of power loss it can move a little bit and change the position but i am open to the idea.