Here’s my latest obsession: A clock-driven intervalometer with an LCD interface for both still and video cameras (with remote control!) I call it the ‘Multicam’ board. Its mission is to run all of my camera control software on a single board, plus provide a nice interface to control it.
This has been the most complicated hardware project for me so far, involving two separate PCB’s (one for the system, one for the interface) and fitting into a case.
I’ve just now got the first PCB’s back from iTeadStudio, and brought up the first unit. Now I can start testing it in the real world. Results of those tests and more details on the software will be topics for future posts. For now, the hardware…
‘Unattended Operation‘ The basic scenario for this device is when you want to program a camera in advance to take pictures or shoot video when you cannot be there in person. It was inspired by Robert C. Fisher’s problem of shooting footage for Space Shuttle launches, where the launch area is physically closed off to humans. The machines can be there, but people cannot. Read about my breakfast with Bob.
‘Clock-Driven‘ Programing the camera to operate according to a certain timetable is important. Maybe you want to shoot time lapse photography of the sunrise without bothering to get up at 5:30am. We can say, “Shoot from 5:30am to 6:30am taking one photo every minute”. Likewise, I once had a lady who used to steal my newspaper on random mornings. We finally caught her by getting up at 4:00am and watching carefully for her to come. But if I had this device, I’d say, “Record video every day from 4:00am to 7:00am.”
‘Video and Still Cameras‘ Currently, Bob has one hardware platform to control LANC-based video cameras, and a separate one to control optocoupler-driven still cameras. The goal here is to control either one with a single piece of hardware.
‘Untethered to a PC‘ We want to test the cameras and tweak the settings (even set the clock) without lugging a laptop around and plugging it in.
‘Expandable‘ Undoubtedly something else will come up we need to do with the unit. Rather than wait another month or so for another PCB re-spin and reassembling new units, let’s try to think ahead a little bit and leave some expandability for unseen future needs.
- ‘LCD Display‘. 16×2-line display to see what’s going on with the unit.
- ‘Buttons‘. 4 buttons, up down left & right, for navigating the menus. I hate these buttons, but just could not find any PCB-mount buttons that were short enough to work with the 0.25-inch standoff on this case. Still hoping to solve this for V2 though.
- ‘LEDs‘. 3-general purpose LED’s that the software can use for anything to communicate the state of the system at a glance.
- ‘Piezo‘. The top cover also includes a connector for a piezo, so the unit can be used to trigger camera events based on sound. I haven’t figured out physically where that should be positioned yet, however.
- ‘Power Connector‘. 2.1mm center-positive plug. I couldn’t decide if this should be a 6-16V input for large batteries or a 5V input for smaller battery packs, so I left two places to hook up power, and then I can always tie it to the correct line. The advantage of the 5V input is that it bypasses the (current-sucking) regulator. The down side of course is that if you give it 6V+, maybe you destroy the MCU.
- ‘Still Camera Connectors‘. The two left-most connectors are 2.5mm 3-conductor plugs for still cameras, capable of controlling a Sony DSLR or other cameras that use the same interface. See Controlling a Sony A100 DSLR using Arduino. With two connectors, the unit is capable of shooting stereo.
- ‘Video Camera Connector‘. The right-most connector is a 2.5mm 3-conductor plug for a LANC connection. This can plug directly into a Sony Handycam or anything else that supports the LANC control protocol.
Machining the Case
After much trial and error, I settled on the “stylish trapezoidal design” of the JB-35 case from Polycase. It’s quite handy with mounting bosses for a PCB on the top and on the bottom.
The only problem was, how to position the holes in at the exact right place? And worse, how to cut the opening for the display exactly right? Initial attempts with the drill press and chisel were not encouraging. So in the end, the guys at Metrix Create Space in Seattle were gracious enough to stink up their shop with the smell of freshly-cut ABS, and cut the case for me using their laser cutter.
To specify the needed cuts, I brought in an SVG file, saved out from Inkscape. The exported bitmap of it is what you see above. Originally, I cut a segment of acrylic which matched the footprint of the case, intending to use it as a template for the drill press and router. In the end, they were willing to cut the case itself right there which was super helpful. To ensure correct alignment with the PCB underneath, I marked up the cutting lines directly in Eagle on my board file, using the ‘milling’ layer. Then I set the CAM to export the milling layer into EPS, finally pulling that into Inkscape to set the colors correctly.
- ‘ATmega1284p Microcontroller‘. Arduino-compatible MCU with 16K RAM and a few extra GPIO lines–just enough to control the rest of this.
- ‘DS3234 RTC‘ High-precision clock module, from Sparkfun.
- ‘Dual Dual Optocoupler Circuits‘. The still cameras are controlled through optocouplers, one each for each camera’s focus and shutter lines.
- ‘LANC Circuit‘. This is a very simple LANC circuit, as described by Matrin Koch
- ‘RF Receiver‘. Using the nRF24L01+ (of course!) because I have plenty software to control this! Using a Sparkfun FOB, see Nordic FOB and nRF24L01+ for details. Frankly, I don’t have any pressing use cases for the RF remote, but I’m hopeful that something turns up 🙂
- ‘Power Regulation‘. Includes both 5V and 3V regulators, and allows external power to come in on either side of the 5V regulator.
- ‘Interface Connector‘. Takes 20 lines up to the top board.
- ‘External Expansion‘. Two additional lines plus power are broken out to headers, just waiting to be connected to SOMETHING, through the other side wall. Could be used for relays, or even MIDI connectors.
- ‘Internal Expansion‘. Added a single connector with SPI, I2C, UART1, and 5V/GND for connecting other peripherals in the future.
Software Interaction Design
More details on the software, including the code itself, will come in future posts once I get it more fully developed. For now, here are some organizing principles around how it will be used. Note that the screen grabs are from the software running on the PC, where it’s easier to take screen shots than on the actual hardware.
How to Control the User Interface
The software is built around a common navigation paradigm to make it consistent and straightforward to use. There are two basic things you will encounter when navigation the system: Menus and Edit Controls.
Menus present a long list of items for you to choose from. There are only two items on the screen at once, but many more could be waiting just above or below the current screen.
There is an arrow “>” with a flashing cursor to identify the current menu option. Press the up or down buttons to move the cursor up or down through the list of items. Press right to select that menu option. What happens next depends on what option you chose; often it will be another menu with more detailed options related to the larger thing you chose. Press left to go ‘back’ out of that menu.
Sometimes you will need to edit values, for example, setting the current time, or setting the time an event will fire. In this case, you press right or left to move the cursor between the various values to edit, for example, between the month, day, hour, minute and second values. Press up or down to change the value under the cursor. When you’re done editing, press right until you move past the last value to edit, which will take you back to the menu where you came from.
How to Control the Cameras
The system is built around three basic concepts: Events, Sequences, and Actions.
An action directly controls one of the systems on the unit at the lowest level. For example, there is a focus and a shutter line for Camera 1, so there are four Actions for Camera 1:
- Focus 1 High
- Focus 1 Low
- Shutter 1 High
- Shutter 1 Low
These actions can be combined into sequences (as explained below), or controlled directly to test the operation of the connected cameras.
Sequences allow you to string together many actions which happen along a certain timeline. For example, in the case of Camera 1, we do not want to independently control each line, we want to do this:
- Immediately set Focus 1 High, then
- After 1 second, set Shutter 1 High, then
- After 250ms, set Shutter 1 Low, and
- Immediately set Focus 1 Low
We might call this “Camera 1 Shoot”.
Events are the only thing triggered by the actual clock. A simple event is simply a date/time plus a sequence to start at that time. For example,
- Thursday at 12:00pm do Camera 1 Shoot
- Thursday at 1:30pm do Camera 1 Shoot
- Thursday at 2:40pm do Camera 1 Shoot
- Thursday at 3:00pm do Camera 1 Shoot
This would be a way to take pictures at arbitrary times.
Events can also be more complex, with a start, end, an interval, AND a sequence:
- Thursday at 12:00pm do Camera 1 Shoot every 00:05:00 (5 minutes) until 1:00pm.
Or a start and end sequence
- Thursday at 12:00pm do Start Video Record until 1:00pm, then do Stop Video Record.
Finally, the system has helpers which can play a user-defined role. These helpers are the LEDs and the radio control buttons. One can assign a certain LED the role of turning on & off when a certain action happens or when a sequence is running
- Red LED is on when Camera 1 Focus High, and off when Camera 1 Focus Low
- Green LED is on during Camera 1 Shoot.
Radio control buttons can be assigned independent meanings:
- Center button triggers Camera 1 Shoot
- Left button triggers Video Start Record