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 ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

Australia
#1  

Woops. I don't know how I put this thread in the wrong catergory. I will copy it right away

PRO
Synthiam
#2  

It's not a robot project. It's related to script/ARC, belongs in here :)

Project showcase is for a video/pics of a working robot (i.e. project)

Australia
#3  

Ahhhh. Sadly I already copied it to Project Showcase. Can you use your spectacular admin powers to delete it?

PRO
Synthiam
#4  

I wish i had admin powers. I have hax0r powers. There is no admin interface for this:) We go right into the database and delete haha

Australia
#5  

It's already gone. That was fast. You do have powers then and not just ones that affect the computing world. Can you predict the numbers for the next lottery?

Australia
#7  

Perhaps you can build a robot that can. Hack one of this old fair-ground fortune tellers and you will know everything

Australia
#8  

Does anyone have any suggestions on how I will be able to extend the programming of my camera or add to it?

PRO
Synthiam
#10  

I'd like to take a look at this maybe tonight :)

Australia
#12  

I had the idea of mounting the camera and servos on tracks. I plan to abandon the scan left and right scripts and replace them with pan left and right. Where would I purchase these tracks and what would be most effective method of moving the camera along them?

PRO
Synthiam
#13  

Tracks? Like a train?

Australia
#14  

I see it more like a single rail

PRO
Synthiam
#15  

Ah I see. Hmmmmmmmmm

A single rail that would have teeth? And then a gear that will move. You can do it that way.

Or, attach it to a rubber band with a pulley on oneside, and a servo on the other.

How long would the rail be?

Australia
#16  

I think the pulley concept would be easier. I was planning to make the rail one to three metres in length. I would like to have it circular in shape but I think that would be more difficult with the rubber band. Perhaps I could use guides

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?