Australia
Asked — Edited

Servo Mounted Security Camera (2-Axis)

I am well on the way in the programming of my security camera. Camera servo tracking is enabled for the two servos- the horizontal and vertical axis. When one of the two servos moves to follow movement the alarm will be activated, starting both the Alert and Snapshot scripts. Here are the scripts I have written for the camera:


System On Script

ControlCommand("Security Script 1", ScriptStart)
ControlCommand("Security Script 2", ScriptStart)
ControlCommand("Camera", PauseOff)

Security Script 1*

Servo(D1, 35)
Sleep(1)
Say(Security System Active)
WaitForServoMove(D1)
ControlCommand("Security Script 2", ScriptStop)
ControlCommand("Movement Detected Script", ScriptStart)

*Horizontal axis

Security Script 2*

Servo(D2 ,35)
Sleep(1)
WaitForServoMove(D2)
ControlCommand("Security Script 1", ScriptStop)
ControlCommand("Movement Detected Script", ScriptStart)

*Vertical axis

Movement Detected Script

ControlCommand("Alert Script", ScriptStart)
ControlCommand("Snapshot Script", ScriptStart)

Alert Script

ControlCommand("Alert Script", ScriptStop)
ControlCommand("Snapshot Script", ScriptStop)
ControlCommand("Camera Snapshot", PauseOn)
Say(Security System Off) 

Snapshot Script

ControlCommand("Camera Snapshot", PauseOff)
Sleep(2001)
ControlCommand("Camera Snapshot", PauseOn)

Stop Script

ControlCommand("Alert Script", ScriptStop)
ControlCommand("Snapshot Script", ScriptStop)
ControlCommand("Camera Snapshot", PauseOn)
Say(Security System Off)

Continuous Scan Script

ServoSpeed(D1, 35)
: Start
Sleep(100)
Servo(D1, 1)
Sleep(3000)
Servo(D1, 70)
Sleep(3000)
Goto(Start)

Scan Left Script

ServoSpeed(D1, 35)
Servo(D1, 1)

Scan Right Script

ServoSpeed(D1, 35)
Servo(D1, 70)

Scan Stop Script

ControlCommand("Scan Script", ScriptStop)
Servo(D1, 35)
ServoSpeed(D1, 25)

NB: I am unsure what speed the values in the ServoSpeed command represent. The current values are merely estimates

There are all the scripts neccessary for the camera functionality. There are others but they are simply for the joystick and other components.

After a while I decided that I would use a joystick to start and stop certain scripts, toggle the pause on the camera and camera snapshots and also to rotate the two servos. But because of the commands I have used in the Security Script when I overide the camera servo tracking it activates the alarm. I could just stop the script every time I wanted to rotate it but I will wait until DJ includes the Motion Found and Lost functions of the Camera.


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

PRO
Synthiam
#17  

That sounds like it will be very interesting! Looking forward to pics of your design

Australia
#18  

I have been considering using a portable screen for my camera and have decided that using an app on the iPad would be the best option. Sadly I don't have any programming skills outside ARC and don't now how to achieve this. I have envisaged it having controls for the servos and the camera view. Does anyone have alternatives or suggestions on how I can achieve this?