The electronics consist of an Atmel ATMega328P-PU a.k.a barebones Arduino. The AVR is run on 16MHz and driven by 5V from a 7805 regulator. It can be bootloaded using something like this. Two optocouplers drives the camera (shutter and focus). I guess any optocoupler will do, but I used 4N35. Besides from a reset switch and some filtering caps here and there, thats it.
The stepper motors are driven by easydriver stepper motor drivers. I made room for three of these on the board, so it can drive a camera dolly in addition to pan and tilt.
The schematics was created in Kicad. This was my first project in Kicad, and since I was impatient, I used the autorouter in Kicad according to the instructions at Wayne and Layne. I think the autorouter performed well for this small project.
When the board seemed fine, I created the gerber files using this guide at Toymaker Television. Notice the "mirror X-axis" when creating the drill file. Finally, I submitted the gerbers to OSH-park. The project can be found at OSH-park if you are interested.
The PCBs have excellent quality and the soldering goes like a blast.
Two Easydriver stepper motor drivers are fitted on the PCB (room for one more).
The user interface is simply a TM1638-based 8x7segment display with control buttons. It was ordered from China and can be found everywhere on the interweb. I soldered some wires going from the TM1638 PCB to my own panel mounted control buttons.
In the above picture you can see the extremely simple user interface. It works as follows:
- Use the buttons to pan and tilt the head to the desired start position.
- Press P1 (programs the start position).
- Use the buttons to pan and tilt the head to the desired end position.
- Press P2 (programs the end position).
- Press Start. The Pan/Tilt head will now return to the start position and will start shooting.
This is extremely easy, but it works. The display shows the number of pictures shoot and the current pan/tilt position. I choose to use a 7-segment display just because I like the old school looks of it. A 20x04 LCD with a rotary encoder would, of course, be more sensible.
I did some mistakes while building the control unit. If you want to build something similar, you should try to avoid these.
First of all, the 12V power header for the stepper drivers was was reversed on my PCB layout, meaning that the driver did not initially get any power.
Hence, I had to modify the mounting of the easydrivers a bit (notice the white wire on the above picture). No big deal, but it means that you should not order these boards from OSH-park, even if the board was selected amongst the staff picks of the week. :-)
A second error on the board is that there is no protection whatsoever on the 12V DC. No diode, no polyfuse, no fuse. Nothing. At least a diode should be placed in there, somewhere.
A third thing that I was not aware of is that the easydriver board must be connected to a load. Without a load (i.e., a stepper motor), the driver IC will burn up. Totally stupid, but I burned up two boards this way, and had to wait forever to get some new boards from Shenzhen, China. Thankfully, they are easy to replace.
Ok. Thats it. I learned a lot while building OpenPanTilt. And, best of it all, it works. If you want to build something similar, or have comments, please let me know. I know Josh Sheldon was inspired by OpenPanTilt and has developed some of the ideas further, and I must say, with impressive results.