IRIS+ front light

29. April 2015 13:26 by Jens Willy Johannsen
Categories: Drones

I’ve gotten myself an IRIS+ quadcopter and it is awesome!
It also offers limitless possibilities for creating add-ons – both software and hardware-based.

My first project is a 1W LED front light in order to help with orientation (and look cool).

I’m using a CREE XR-E on a “star PCB” (this one) with a Carclo lens and lens holder.

The light will be mounted to the IRIS+’s front GoPro mount with a 3D printed mount. I’ll print the prototype myself and then order it on Shapeways as a higher quality SLS printed version (here it is).

Power will be supplied from the flight battery through a ZXLD1350 switching regulator-based circuit I designed a while back for another project.

Remote control

Since the LED driver supports turning output on/off I though I could control the LED from one of the Pixhawk’s relay pins.

Small issue though: the ADJ pin on the ZXLD1350 interprets a voltage of 0 as off (which is fine) and 1.25 V as 100% on. Which is not entirely fine since the relay pins on the Pixhawk toggle between 0 and 3.3 V. So I’ll use a standard NPN transistor so the ADJ pin will toggle between 0 V and floating which will use the internal resistor as pull-up. The schematic looks like this:


And it works like this:

Pixhawk relay Pin voltage ZXLD1350 ADJ pin voltage result
on 3.3 V 0 V LED off
off 0 V internally pulled up to 1.25 V LED on

In other words, relay off means LED on and vice versa.

The transistor is a bog standard BC547 NPN. And since I can’t be bothered to modify the PCB for the LED driver and send off for fabrication and so on, I’ll just solder it on, glue it to the back of the PCB and shrinkwrap the entire mess. Not perfect, but good enough for jazz.


The control pin is attached to the Pixhawk’s AUX OUT 5 signal pin (physical pin no. 54) and power and ground is spliced into the power lead going to the gimbal.

Since the PCB is open to the environment on the backside of the mount and since the pins for VIN and GND are attached directly to the flight battery and are only 0.1" from each other, the entire PCB will be potted using either just hot glue or proper potting compound (e.g. QSil–216) so the battery will not get shorted by a stray drop of water.

APM Parameters

In Config/tuning -> Standard parameters, the First Relay Pin (RELAY_PIN) is set to Pixhawk FMU AUX5 (this is default).

On the Extended Tuning page, Ch8 Opt is set to Relay On/Off.
(If this option is not available, go to Full Parameter List and set CH8_OPT to "28" for "Relay On/Off" (on APM:Copter 3.3.3; the value might be different on other versions))

This will allow the light to be turned on/off by toggling relay 0 in auto missions (DO_SET_RELAY) and toggling channel 8 from the transmitter.

Transmitter setup

Since channel 8 is currently unassigned, I’ll use that to control the relay. I’m using a Taranis TX so setup is as easy as can be:

CH8             MAX Weight(-100%)   Switch (!SG↑)
            R   MAX Weight(+100%)   Switch (SG↑)

In other words: for channel 8, set value to –100% when switch G is not in the up position. And set value to +100% when switch G is in the up position.
Remember that due to the transistor, relay on means LED off, so a channel 8 value of –100% will turn the LED on. So if switch G is in the up position, the LED is off; otherwise it is on.


Here is how the prototype looks:

And yes: it is bright:

And here is the backside with the regulator PCB (with a couple of globs of hot glue in the corners to hold it in place):

No comments No comments »

Creating custom enclosures

29. December 2011 21:04 by Jens Willy Johannsen
Categories: PCB

For another project (that I have shamefully neglected to write about) I decided I needed to put it into some kind of enclosure. And I since I couldn't find any off-the-shelf enclosures that fit I decided to make my own.
A little bit of googling let me to Shapeways that lets you create 3D printed models from your own 3D files in several different materials.

The models themselves can be created in pretty much any 3D modeling application (including the free SketchUp or Blender). I used Luxology's modo.
Obviously, exact dimensions are important. So I got PCB dimensions and coordinates from Eagle and used a caliper to measure the size of the battery and plugs and so on. And I created dummy objects for the battery and the PCB to make sure that everything fit. This is what I came up with:

Enclosure (click for larger version)

The stand-offs have 4.1 mm holes for threaded inserts to use with M3 machine screws (like these ones from RS).

And here with the dummy objects visible:

With dummy objects (click for larger version)

I exported the object to Wavefront OBJ format and uploaded it to Shapeways (I needed to rotate 90 degrees about the X-axis first in order for the preview image to render correctly on Shapeways) and specified the units as meters (since that's what modo uses by default).

The price came to €20.14 plus shipping (€8.38 for UPS shipping) for "white, strong, flexible" material. So now it's just wait and see how it turns out.

Bear in mind, that this is my first attempt at making a 3D printed object. I haven't even smoothed the edges or added support ribs or anything. Not to mention that I have only made the bottom part of the enclosure (it does however have a "lip" for mating with the top half).

For a much nicer custom enclosure, take a look at this one (also on Shapeways).


Comments 2 comments »