A Simple R/C PAP Rig (Updated December 2013)
At KAPiFrance in October 2013 I gave a talk about using 433MHz radios for KAP and PAP. When I was demoing my PAP rig, smoke appeared - a contact had come loose and caused a short, damaging both the radio and video boards.
On my return to the UK, I took advantage of this to update the rig:
- I bought a new, cheap 2.4GHz video transmitter for less than £8
- I bought a
new 433MHz transmitter/receiver pair for £12
The new receiver has two advantages over the old one
- it had a 'learn' button, allowing it to be used with any hard-wired transmitter
- it could be made momentary, rather than toggle or latched, by soldering a jumper across two pads
By making the receiver 'momentary' the script for the Pololu Maestro could be considerably simplified and the tilt motion made smoother by reducing the size of the 'step' each button press makes (roughly 2.5° per button press).
The new script looks like this:
init # initialise things begin # main loop 0 channel 1 equals if down endif 1 channel 1 equals if up endif # 2 channel if 1 power else 0 power endif repeat sub init 10 tiltservo speed 10 tiltservo acceleration mid tiltservo servo # set tilt servo to midpoint return sub tiltservo 3 return sub channel # return 1 if channel on stack is high get_position 500 greater_than # check if channel high return sub up tiltservo dup get_position dup horiz less_than if not yet horizontal, tilt up tup swap servo else drop drop endif return sub down tiltservo dup get_position dup vert greater_than if not yet vertical, tilt down tdown swap servo else drop drop endif return sub tup # go up 73 or about 2.5 degrees 73 plus return sub tdown # go down 73 or about 2.5 degrees -73 plus return sub horiz 5200 return sub vert 8000 return sub mid 6600 return
and the new circuit looks like this:
Below is the original content of this page. Externally the rig has not changed.
August 2013 Version
The pictures below show my PAP rig, designed to sit atop a 10 metre carbon-fibre carp pole. Remote live view is provided and while panning is done by twisting the pole, tilting and shooting are handled using a small 433MHz remote control with four buttons:
- a 'down' button which tilts the rig down 15 degrees on each press (from horizontal to vertically downwards)
- an 'up' button which tilts the rig up 15 degrees on each press (from vertically downwards to horizontal)
- a 'power' button which turns the video transmitter on or off
- a 'shoot' button, which takes a picture
I've made some improvements/changes this summer (2013):
- the battery has been moved out of the box (so the box is smaller) and fits into a plastic holder below the rig
- the battery is now a 5-cell (hump) pack because 4 NiCads only deliver 4.8v at best and the Pololu Maestro is a bit unreliable unless it gets 5v
- the rig is now designed to fit on top of the next section down of the pole. This has a bigger cross-section and makes me happier lofting a heavier camera than my A570 (e.g. my s100)
- the video stuff is now mounted at the bottom of the pole rather than on my wrist - less cumbersome and easier to look at
- the video monitor now has a simple hood (made out of stiff black cardboard) - it's velcro'd to the monitor and held closed by a rubber band
The electronic components (see below) were cheap, costing under £30 (excluding the video link, which I already had) and the remaining components were even cheaper - just scrap aluminium, plastic, bolts and pop rivets.
Rig and Video Receiver - front view
Rig (with 5-cell battery) and Controller
Rig and Video Receiver - side view
Video Receiver and Hood
Side view of Video Receiver on pole with Hood
Front view of Video Receiver on pole with Hood
Inside the red box are the electronic components:
- the tiny receiver board of a 433MHz 4 channel wireless remote (£5.75 from Virtual Village on Ebay)
- a Pololu Maestro 6 channel servo controller (£15.75 from HobbyTronics) which turns the simple on/off signals into servo pulses
- a Pololu R/C switch with small Low-side MOSFET (£6.49 from HobbyTronics) used to turn the video transmitter on or off (to save power)
- a tiny 2.4GHz video transmitter (very cheap but sadly no longer available)
A short video of the rig under test (before the latest modifications) is available on YouTube.
Here's a more detailed look at the receiver components inside the red box:
The four outputs of the RX board (D0-D3) are each either 0 volts or 5 volts and are switched by the four buttons on the remote. Channel D0 on the RX board is connected to the USB plug while the other three channels (D1-D3) are connected to channels 0 to 2 on the Maestro (which are configured as inputs). Maestro channels 3 and 4 are configured as servos with channel 3 controlling the tilt servo and channel 4 the R/C switch which turns the video TX on and off. Maestro channel 5 is unused.
The script running in the Maestro does the work of decoding the inputs and controlling the outputs. It's complicated by the fact that the 433MHz controller switch operates in a toggle not a momentary fashion. That is, one press turns the switch on and a second press turns it off. I wanted the tilt buttons to operate on every press, i.e. when the switch is off a press, turning the switch on, should result in a tilt move and the next press, which turns the switch off, should also result in a tilt move. To do that, the script has to remember the state of the switches so that it can detect when they change. It assigns a value of 1 to one switch and 2 to the other and starts by putting the on state of both switches on the stack, followed by the position of the tilt servo. Here's the script:
init # initialise things begin swap # get switch states on top of stack dup # remember switch state value 1 bitwise_and # set to 1 if switch 1 was ON 0 channel equals if # has switch changed? swap tiltdown swap # yes so tilt dup 1 bitwise_and 0 equals # get new state of switch swap 2 bitwise_and bitwise_or # and save it (preserving switch 2 state) swap else swap endif swap # repeat process for switch 2 dup 2 bitwise_and 1 channel 2 times equals if swap tiltup swap dup 2 bitwise_and 0 equals 2 times swap 1 bitwise_and bitwise_or swap else swap endif 2 channel if 1 power else 0 power endif # check channel 2 and turn power on or off repeat sub init 3 # put switch state value on stack 10 3 speed # slow tilt servo motion 10 3 acceleration # and acceleration 5000 3 servo # set tilt servo to horizontal 5000 # put position on stack return sub channel get_position 500 less_than # check if channel high return sub tiltdown # tilt down 15°, stopping at 8000 (vertical) dup 8000 less_than 500 times plus dup 3 servo return sub tiltup # tilt up 15°, stopping at 5000 (horizontal) dup 5000 greater_than 500 times minus dup 3 servo return sub power # power on or off 8000 times 4 servo return
The tilt step of 15° is accomplished by adding or subtracting 500 from the servo position. This is because 5000 approximately corresponds to horizontal and 8000 to vertical and hence 8000 - 5000 = 3000 to 90°, and thus 15° is 3000/6 = 500. The Maestro scripting language (which is a variant of Forth) does not have parameters (or even variables) so changing things like the tilt step involves changing the value of both occurrences of the increment.