Hi
I've published a camera panorama robot rig at:
http://www.instructables.com/id/Camera-Panorama-robot-head-panograph/
This has two servo's controlled by the AXE024 servo board. I have some timing issues that I need to resolve.
The servo board literature states that servo noise could cause erratic behaviour & I'm seeing that.
In my code I'm moving the camera to 30 discrete locations, 5 in the x axis & 4 in the y axes. two servo motors position the camera. In my code, I was hoping to put a pause in before giving the instruction to fire the camera shutter (pause to allow the camera to steady after moving). So, if I place the pause before firing the shutter, the circuit behaves erratically. The first shutter does not fire, then subsequently the shutter fires immediatley after a move. It seems to me that the servo's operating affect the internal clocking of he picaxe?
I understand the AXE024 has certain ways to reduce noise: diode protecting the picaxe from supply line with servo's. Two tant caps to reduce the effect of servo loading. decoupling caps (100nF) on supply line to picaxe & across supply pins of servo's. I have added some ferrite coils to reduce HF noise also.
Any help or thoughts appreciated. I've enclosed my code below:
symbol servo_delay = 60 'recommended delay between servo movements
symbol top = 160 'max y position
symbol bottom =220 'min y position
symbol left = 180 'min x position
symbol right = 100 'max x position
symbol vstep = 20 'vertical increments
symbol hstep = 20 'horizontal increments
symbol pic_delay = 100
symbol camera_steady_delay = 4000 'delay to steady camera after movement
main:
GOSUB Init
for b2 = top to bottom step vstep
for b1 = right to left step hstep
servo 1,b1
pause servo_delay
GOSUB take_picture
pause camera_steady_delay
next b1
servo 2,b2
pause servo_delay
next b2
end
take_picture:
high 4
pause 30
low 4
return
Init:
servo 2,top
low 4
return
I've published a camera panorama robot rig at:
http://www.instructables.com/id/Camera-Panorama-robot-head-panograph/
This has two servo's controlled by the AXE024 servo board. I have some timing issues that I need to resolve.
The servo board literature states that servo noise could cause erratic behaviour & I'm seeing that.
In my code I'm moving the camera to 30 discrete locations, 5 in the x axis & 4 in the y axes. two servo motors position the camera. In my code, I was hoping to put a pause in before giving the instruction to fire the camera shutter (pause to allow the camera to steady after moving). So, if I place the pause before firing the shutter, the circuit behaves erratically. The first shutter does not fire, then subsequently the shutter fires immediatley after a move. It seems to me that the servo's operating affect the internal clocking of he picaxe?
I understand the AXE024 has certain ways to reduce noise: diode protecting the picaxe from supply line with servo's. Two tant caps to reduce the effect of servo loading. decoupling caps (100nF) on supply line to picaxe & across supply pins of servo's. I have added some ferrite coils to reduce HF noise also.
Any help or thoughts appreciated. I've enclosed my code below:
symbol servo_delay = 60 'recommended delay between servo movements
symbol top = 160 'max y position
symbol bottom =220 'min y position
symbol left = 180 'min x position
symbol right = 100 'max x position
symbol vstep = 20 'vertical increments
symbol hstep = 20 'horizontal increments
symbol pic_delay = 100
symbol camera_steady_delay = 4000 'delay to steady camera after movement
main:
GOSUB Init
for b2 = top to bottom step vstep
for b1 = right to left step hstep
servo 1,b1
pause servo_delay
GOSUB take_picture
pause camera_steady_delay
next b1
servo 2,b2
pause servo_delay
next b2
end
take_picture:
high 4
pause 30
low 4
return
Init:
servo 2,top
low 4
return