Motion Sensor logic mod for Ambery Security Camera Switcher

 

The goal of this project was to modify this Ambery 4-channel security switcher by replacing the internal piezo buzzer — activated by motion sensor logic — with a 5V logic output signal. I previously used this device as a 4-channel video switch for performance applications, as a cheap way of getting multiple video signals into my LZX system. I gained inspiration for this modification while reading Peter Frank’s essay, Video Art Installations: The Telenvironment, found in Video Art: An Anthology (1975). I began pondering how I could repurpose my existing equipment to exploit the time-space dynamic of video, and recalled the motion sensing capability of this switcher: perhaps I could use the event of a person walking into frame to trigger another time-related event.

motion_settings
Motion Setup page for Channel 1. Shows mask which ignores motion, and a visual preview of detected motion. Sensitivity and Velocity may be altered to taste.

As shown in the animation above, the motion sensing of Channel 1 may be active on a timer or indefinitely, and the user has control over parameters to qualify what visual elements are detected as motion. In this example, the system detects my head turning, but ignores movement in the right half of the image by applying a mask. Below, I demonstrate the on-screen motion notification when Channel 1 is active (menu closed). Notice the “M” icon in the lower part of the screen:

onscreen
Notice the “M” icon in the lower part of the screen when the system detects motion.

Missing from the above gifs is the pulsating, on-off sound of an internal piezo buzzer when motion is detected. Exploiting the buzzer circuit was key to modifying this device for other applications — I opened the enclosure and discovered a transistor amplifier drove the buzzer, with the transistor gate being fed a pulse signal from a microcontroller upon detected motion. My theory: replace the buzzer circuit with a pulse wave output to serve as a logic/gate signal for other devices.

To realize this, I looked at the parts I had on hand, and identified an infrared LED and phototransistor pair (ON Semiconductor QSE-133 and QSE-113, respectively). I decided I could build a makeshift optoisolator circuit by swapping out the buzzer with the infrared LED, whose light causes the gate of the phototransistor to open a source-drain current channel. The phototransistor would basically serve as an on/off switch for a 5V source at the source to connect to some other input at the drain.

optoisolator_circuit
Infrared LED/phototransistor pair making eye contact.

After a bit of testing the two semiconductors, checking the 5V output signal with the analog input of an Arduino, I arrived at a circuit that I was ready to solder to protoboard and install in place of the buzzer. I installed a 3.5mm TRS jack in place of one of the audio input jacks as an interface for external devices. The tip carries the 5V pulse output, the ring supplies the 5V switched by the phototransistor, and sleeve is tied to ground. It’s not the most robust solution as it requires external power from the “read” device, and could be improved upon in the future; but, it works!

 

 

I wrote a simple Arduino script that checks when the signal exceeds 2.5V by polling an ADC channel. If it detects a value greater than 2.5V, it will turn an LED on and print to the serial monitor. If the value is less than 2.5V, it will turn the LED off. See example animation below:

 

motion_led_demo_boomerang_1
Testing the Arduino sketch that turns an LED on or off when motion is or is not detected.

At the time of writing, this is as far as the project has come along. I am particularly excited to combine the motion sensing circuit with the IR remote control capabilities of the Arduino. My initial application was to set up a display and camera pointing at the viewer area, and to use IR commands to trigger the record/playback functionality of a VCR upon detection of a viewer in the video frame. For instance, when a viewer walks into frame, the Arduino will playback recorded tape from earlier that day, while simultaneously recording the viewer as they observe the playback. When the next viewer comes along, they will see the previous viewer, and so on.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s