jenswilly.dk


Pixhawk CHDK trigger

18. August 2015 22:02 by Jens Willy Johannsen
Categories: Drones | Projects

pixhawk-chdk

The Pixhawk-CHDK trigger will let you use Pixhawk-based drones (like the IRIS+) with a CHDK compatible camera for aerial photography without using a whole mess of duct taped-together UBECs and LED switches and whatnot.

The Pixhawk-CHDK trigger has three input connections in a 0.1" locking header which is compatible with standard servo lead connectors. Power and ground is taken directly from the flight battery (3S or 4S) and the input signal directly from an auxillary output on the Pixhawk. No need for BEC/UBECs or for powering the servo rail on the Pixhawk.

Output to the camera goes directly to the camera's USB port. (Using a locking 2-pin 0.1" header.)

Configuration

There is also a mini-USB connector for configuring the Pixhawk-CHDK trigger. Configuration is done by connecting the Pixhawk-CHDK trigger to a Mac OS X, Windows or Linux computer and opening a terminal connection (using screen or PuTTY or your terminal application of choice) to the device.

Using a simple command-line interface, a number of intervals (up to 20) can be configured. An interval is simply a definition of an input PWM range and corresponding output pulse length. This will allow the Pixhawk-CHDK to work with all CHDK scripts that use the USB remote control input for control, regardless of how many different commands the script supports.

So if we want the CHDK to receive a 50 ms pulse when the RC signal is between 1800 and 2000 µs, the command would be add 1800,2000,50.

Everything is stored in non-volatile RAM (flash) and the interface currently supports the following commands:

  • help – shows available commands
  • list – shows all defined ranges
  • delete – removes a range
  • add – adds a range
  • show – shows all or a specific settings parameter
  • set – modifies a settings parameter
  • pulse – sends an output pulse of the specified length for testing CHDK scripts
  • isp – enters ISP mode for flashing new firmware

Want one?

Everything is open source and open hardware; all schematics, board files and firmware will be made available shortly along with BOM and assembly instructions.

Comments 4 comments »

Pixhawk-CHDK trigger progress

10. June 2015 11:07 by Jens Willy Johannsen
Categories: Drones | PCB | Projects

The Pixhawk-CHDK trigger is coming along nicely. The prototype is done and the firmware is almost done.

The firmware is actually very simple. I'm using 32 bit timers for both measuring incoming RC PWM signal for for outputting 5 V pulses of specific lengths and all the USB CDC functionality is copied-and-pasted from a previous project. The most complex part is actually for command-line interface (or "CLI") parser.

To configure the device you plug into your computer using a mini-USB cable and then connect using Telnet, screen or other terminal application.

The command set is pretty simple and supports the following commands:

list                    -- shows all defined intervals
add 1000,1200,85        -- adds a new interval
delete 1                -- removes entry 1
change 1=1000,1300,85   -- changes entry 1
pulse 50                -- sends an output pulse of 50 ms
show                    -- shows all settings parameters
show <setting>          -- shows the value of a single parameter
set <settings>=<value>  -- changes the specified settings parameter
help                    -- shows available commands
?                       -- same as "help"

No need to "save" or similar. Everything is stored in EEPROM as soon as it is entered.

PCB

The PCB design is also almost done. I just need to check it a couple of times (time well spent, trust me) and verify footprints (likewise time well spent). The size is 5 x 2 cm and even though I probably could squeeze it down some more, I think I'll keep the current size seeing as how I'll be hand-soldering some of the parts and applying solder paste and components all by hand.

Here's a rendering (from the excellent 3D Gerber Viewer from Mayhew Labs:

Pixhawk-CHDK PCB. 5 x 2 cm.

Pixhawk-CHDK PCB. 5 x 2 cm.

No comments No comments »

CHDK trigger for Pixhawk and IRIS+

5. June 2015 9:56 by Jens Willy Johannsen
Categories: Drones

I have begun creating a CHDK trigger cable for the Pixhawk autopilot in my IRIS+ drone.

It will allow me to control a Canon compact camera (IXUS 60 in my case since I had one of those laying around) from the autopilot.

CHDK is the Canon Hack Development Kit which will allow you to do a whole lot more with a Canon compact camera than what the basic knobs and dials will let you do. It also allows for scripts to be run on the camera – LUA (nice) and Basic (yuck) – and enables remote control through the USB port.

The purpose of this trigger cable is to convert the 3.3 V RC PWM signals from the Pixhawk (PWM with pulses from approximately 1000 µs to 2000 µs; read more here if you want) to 5 V pulses (from about 10 to a couple of hundred milliseconds) for the camera.

With the trigger cable complete and the camera mounted on the IRIS+, I can trigger shots from either the RC transmitter or by using pre-programmed actions in auto-missions. Those images can later be stiched together in Photoshop or Microsoft ICE or similar to create a nice high-resolution aerial photo.

While I'm sure this project could be implemented using less sophisticated hardware, I'm using an LPC11U24 microprocessor since that is my weapon of choice for pretty much anything.

I'm trying to make the device as small as possible so I will be using a 7 x 7 mm HVQFN package which will require the PCB to be reflow soldered (we've come a long way since all ICs had to be 0.1" DIL packages). I will also be using a 1 mm pitch JST-SH connector for MCU programming instead of big 0.1" pin headers. Both power and signal input as well as output signal will use Molex SL connectors with locking tabs (which I use everywhere else on my IRIS+).

The resulting images will look this one from a thread on DIY Drones ( A successful APM aerial survey mission):

Click to see higher resolution

Click to see higher resolution

No comments No comments »