A Simple 433MHz R/C KAP Rig
The picture on the right shows my KAP rig, redesigned to to use a small 433MHz remote control with six buttons (numbered 1-6):
The electronic components (see below) were cheap, costing around £20.The remote is claimed to have a range of 200 metres or more which is more than enough for me.
Inside the red box are three electronic components:
Note that the power is supplied by a 5 cell Nicad - a 4-cell one typically supplies less than the 5v that the Pololu Maestro requires to operate reliably. I've had no problems charging the pack with my standard Spektrum charger.
A short video of the rig under test is available here.
The six outputs of the RX board (D0-D5) are each either 0 volts or 5 volts and are switched by the six buttons on the remote. Channels (D1-D3) are connected to channels 0 to 2 on the Maestro (which are configured as inputs). D0 and D1 feed a resistor ladder which sends 1.7v or 3.4v to channel 1 of the Pololu depending on whether button 1 or 2 is pressed. Similarly D2 and D3 feed a resistor ladder which sends 1.7v or 3.4v to channel 2 of the Pololu depending on whether button 3 or 4 is pressed. D5 on the RX board is connected to the USB plug to trigger the shutter of a camera while D4 is currently unused (see future plans below).
Maestro channels 3 and 4 are configured as servos with channel 3 controlling the tilt servo and channel 4 the pan servo. Maestro channel 5 is currently unused (but see future plans below).
I have several ideas for the unused button and Maestro channel:
- it could trigger a brief panorama session - a series of pans and shoots covering 360° as quickly as possible
- it could switch between portrait and landscape mode if I made a HOVER rig
- it could switch between photo and movie modes if the camera is running a CHDK script
The script running in the Maestro does the work of decoding the inputs and controlling the outputs. Note that that the 433MHz controller switches operate in a momentary fashion. That is, the outputs D0-D5 are 5v only when a button is depressed. Here's the script:
init begin tiltch tchannel # tilt return 0, 1 or 2 dup 2 equals if up endif 1 equals if down endif pchannel repeat sub init thorizontal pmiddle # set pan servo mid position return sub thorizontal # set tilt servo horizontal thoriz tiltservo servo return sub pchannel # test pan channel panch get_position dup phi greater_than if drop pleft panloop pmiddle else plo greater_than if pright panloop pmiddle endif endif return sub panloop # pan while a pan button is pressed 1 # true to ensure while is entered begin while panch get_position plo greater_than repeat return sub tchannel # test tilt channel get_position dup tlo less_than if 0 else dup thi less_than if 1 else 2 endif endif swap drop return sub up # tilt up a bit tiltservo dup get_position dup tvert less_than if tup swap servo else drop drop endif return sub down # tilt down a bit tiltservo dup get_position dup thoriz greater_than if tdown swap servo else drop drop endif return # tilt servo movements sub tup 5 plus return sub tdown -5 plus return # pan servo movements sub pmiddle # set pan servo mid position 5828 panservo servo return sub pleft 5878 panservo servo return sub pright 5778 panservo servo return # named constants sub tiltch 0 return sub panch 1 return sub tiltservo 3 return sub panservo 4 return sub phi 700 return sub thi 700 return sub plo 300 return sub tlo 300 return sub tvert 8000 return sub thoriz 4680 return