Building Your Own Demilight

< Back to the Main Demilight Page

Overview

The goal of the Demilight Project is to create a small, 3D printable moving head LED light that creates a useful amount of light for a small space. What counts as a "small space" is left as an exercise to the builder.

The background and instructions below are, at their core, documentation of the process a skilled builder can use to recreate the Demilight at home. Builders should be alert for errors, use their judgment in determining appropriate power supplies, heat load, print setting etc. While I have tried to eliminate all the large sources of error, keep your wits about you as you dive in.

The project is currently in version 0.9.4, which is certainly not the last version. If you see improvements, adjustments, modifications, alternations, or new things you think would work, please try them, and I want to see pictures!

User Datasheet

I had the fun opportunity to provide one of these tiny lights for a friend's partner over the holidays as a present, and as such, needed a short 'datasheet' to explain the key features and usage of the thing. If you're interested in the salient details of the Demilight at this stage, downloading the datasheet (PDF) is a good place to start.

3D Printed Parts

All 3D printed parts are listed below by version. Parts are named by the version there were first introduced - so, for example, the Shell-Left part did not change from version 0.9.3 to 0.9.4, so that STL file is still called ShellLeft-093. This is to assist with builders who are progressing through versions, who may not need to reprint all the parts.

In development, parts have almost always been printing in PLA, but assuming your printer has decent dimensional accuracy, PETG should also work. Given the close tolerances on some of the parts, ABS is not recommended due to the need to manage post-print shrinkage - however, it's not something I've tested, so if you have a successful experience with ABS, please drop me a line.

Printer Orientation for Demilight Version 0.9.4

All STL files should be oriented correctly for your slicer of choice (tested in PrusaSlic3r 2.2 and Cura 3.6/4.8), but if they are not, see the reference images above for suggested orientation.

Print settings like speed, temperature, and fan settings will largely depend on your printer. Infill setting is not super critical, as there's very little infill in any of the parts except for the yoke and the lid. On my Maker Select V2.1, which has less-than-ideal bed adhesion, I print all the parts with a brim, which is easy to remove on all the parts; on the Prusa Mini, this isn't necessary. Maximum overhang angle (in the suggested orientations) is approximately 70 degrees on the shell halves - while this prints successfully on both of my printers without supports, you may find you have more reliability with them enabled.

Post-processing

There are two places where the tolerance between printed parts are deliberately tight: between the Bottom Case and Lid, and between the two halves of the Head. Some filing of the these contact points will be necessary (I find a cheap set of needle files works great.) The yoke only attaches directly to the two hobby servos - I have found all of the 9G hobby servos I've ordered (see below) to have the same critical dimensions, but they are obviously a cheap commodity product; some filing may be necessary to accommodate your servos if you find yours are radically different.

Printed Circuit Boards

The gerber, drill, and assembly files for having your own circuit boards manufactured are available for download below.

The files include:

  •  Gerbers:
    • Copper Bottom
    • Copper Top
    • Profile
    • Silkscreen Bottom
    • Silkscreen Top
    • Soldermask Bottom
    • Soldermask Top
    • Solderpaste Bottom
    • Solderpaste Top
    • Gerber Job
  • Drill File
  • Assembly:
    • Full BOM
    • BOM for SMD placement only
    • Top-side placement file

Note that requirements for the exact formatting of these files varies from board-house to board-house; you may need to do some adjusting of files/columns/labels to get a particular board house to accept your upload.

An annotated BOM is also available with more options for manufacturers parts, notes of part selection, and alternatives for some of the through-hole parts.

Other Components

LED Emitter Board and Heat Sink

The head parts and LED driver was developed using the Cree XLamp XP-E2 3-Up LED star PCBs from LED Supply, in a variety of colors. They strike a nice balance between brightness, compactness, and color rendering. However, there's no reason you have to use this particular LED star, so long as you consider the following details:

  • The 3D-printed head parts are meant to accommodate an LED star PCB with a diameter of just slightly over 20mm. (See drawing.) If selecting another LED start to use, make sure it fits within these dimensions. (See the Indus Star datasheet for more dimensional details)
  • The forward voltage of the LED must be less than the supplied voltage; beyond that, the limits on the remainder of the circuit limit the maximum forward voltage to 24 volts.
  • Depending on the material used for the 3D prints, there is a practical limit to how much heat can be produced before the plastic parts start to melt. In testing, this is about 5V. Depending on the choice of LED star, you may need to adjust the maximum current supplied to the LEDs.

 

 

Servo Motors

The 3d printed parts are sized for two 9g hobby servos. While these are a fairly standard part, there are small differences in mounting holes between brands. None of the ones tested have been problematically different - at most, the pre-started holes for the servo mounting screws may not line up with the servo holes, making the servo mounting screws slightly harder to install.

You will want servos with leads of at least 9" (23 cm) long.

 

 

Wire (LED/Power+data)

Two pieces of wire of roughly 9.5" are needed to power the LED star. The gauge will depend on the current that will be pushed through the LEDs. Something stranded is recommended over solid core for flexibility.

Additionally, you will need some wire to provide power and DMX to the light. 18 AWG wire made for wiring RGB LED strips is useful for this purpose, as a nice balance between current capacity, flexibility and cost. It is available either with a slick external jacket or without jacket depending on the application and aesthetics.

 

 

Heat-Set Inserts (Hanging Hardware)

As of version 0.9.1, hanging hardware is intended to be attached via a pair of m3 x 6mm cap head machine screws inserted into a pair of m3 x 3mm heat-set inserts.

 

 

Cable Wrap (Optional)

As a purely aesthetic touch, the tilt-servo wire and the LED poewr wire can be covered in some 1/4" expandable flexible wire mesh sheathing. As this tends to fray pretty horribly once cut, the ends should be covered in electrical tape, melted with a lighter, or bound with heat shrink.

 

 

Assembly Instructions

What follows are assembly instructions for Version 0.9.4.

Lines marked with the radioactivity symbol indicate steps or methods that seem the most janky, i.e. in need of improvement. I call them out here to emphasize that, if you see a better means of accomplishing these steps, I encourage you to.

Lines marked with the info symbol give further background or information on a step.

Head Module

Step 1: Tilt Servo Wires

Thread the wires of one of the hobby servos through the hole in the body-left component from the inside to the outside. Depending on your 3D print tolerances, some small amount of filing may be necessary to allow the Dupont connector to clear the hole.

Step 2: Attach Tilt Servo

Using one of the wide-head mounting screws included with the hobby servos, mount the tilt-servo whose wires you threaded in step 1 to the body-left component. Do so in such a way that the active, rotating part of the servo protrudes through the hole in the 3D printed component.

The body-left piece has a starter-hole included in the 3D print, though the position of the hole in the servo may vary slightly depending on the manufacturer. Don't worry if the screw doesn't line up with the starter hole exactly; with a little work, it will screw in.

Step 3: Solder LED Star Wires

Solder two 9.5" pieces of flexible wire to the anode and cathode pads on the LED emitter PCB you've chosen to use. You will need to later reference which wire is soldered to each pad - either use two different colors of wire, or thoroughly mark the other end of just one wire so you can distinguish them.

If you're using a beefy LED star PCB, particularly an aluminum one, you may notice it takes significantly longer than usual for the pads to heat up to the point that you can solder to them. This is expected - the PCBs are, of course, designed to suck heat away from hotspots, so soldering is a bit challenging. Maintain some perseverance with a hot iron and the solder will take. Additional flux may also be helpful.

Step 4: Attach Heatsink to LED Star

Attach your chosen heatsink to the back of the LED star PCB, taking care to center it properly. You may wish to test fit the LED star and the heatsink into the body of the light before sticking them together, to ensure they'll fit.

If your heatsink did not come with thermal adhesive or thermal tape already on the back, some thin thermal tape may be used.

Step 5: Thread LED Wires through Body

Thread the wires of the LED star through the same hole in the body-left component from inside to outside, following the same path that the tilt servo wires did.

Step 6: Wire Cover (Optional)

If you want to use some wire mesh sleeving to hide the LED and servo wires from the head of the light, now is the time to install it. Cut off a 7.25" to 7.5" section of your sleeving and thread it carefully over the the LED and servo wires.

If the end of your sleeving frays horribly (which it will), there are a few strategies to clean it up, including wrapping the ends in a small piece of heatshrink tubing (adhesive-lined is recommended) or tape, or melting the ends slightly with a lighter or hot air workstation.

Base Module

Step 1: Print Cleanup

The interface between the base lid and the base has a deliberately tight tolerance - since the friction between the parts is the only thing keeping the parts together, they are modelled to be deliberately tight. On most printers, the fit will actually be too tight, and will require some filing to make the parts fit together. This, however, is still preferable to too-loose. Take care not to over-file these parts; test their fit frequently.

Step 2: Install Threaded Inserts (Optional)

If you plan on using the option hanging-clamps to suspend the light, now is a good time to install two m3 x 3mm heat-set inserts into the base.

Place the base upside-down on a work surface. Carefully place a single insert onto the tip of a hot soldering iron, and allow a few seconds to allow the insert to heat up. Use the iron to press the insert almost all the way down into the two holes in the bottom of the case. When the insert is perhaps 1mm from being flush with the base, remove the iron. (Some tweezers may be useful here to prevent the insert from coming out with the iron). Quickly turn the base print over and press and rub in onto a flat workbench surface - this ensures the insert ends up parallel to the base of the print.

Step 3: Attach Pan Servo

Using twoof the wide-head mounting screws included with the hobby servos, mount the remaining hobby servo onto the base lid component. There is only one orientation that the servo can go which permits its wires to escape.

The lid piece piece has starter-holes included in the 3D print, though the position of the holes in the servo may vary slightly depending on the manufacturer. Don't worry if the screws don't line up with the starter holes exactly; with a little work, they will screw in.

PCB Module

The following steps assume you've gotten all the SMD parts installed by an assembly surface. If you've chosen to hand-solder the SMD parts, then I commend you for your courage and your perseverance. Step 1 begins following the the installation of all SMD parts.

Step 1: Inspect

Assuming you're holding a PCB in your hands, fabricated from the provided gerber files and with all SMD parts installed, you'll want to do a thorough inspection to ensure your board house of choice has fabricated it to the quality you expect, and that you haven't made any errors in ordering.

In terms of PCB qualities, you'll want to look for:

  • Copper/Solder assembly - check that all tracks are complete and not missing/damanged. Are there any solder bridges, burrs, or voids in the copper or solder?
  • Copper quality - there should not be any pits, dents, or cracks in any traces.
  • Solder mask - should be consistent and cover all necessary masked areas.
  • Pads - are the THT pads finished as specified (HASL/Lead-Free/ENIG)? Is the finish smooth and consistent
  • PCB Surface - The board itself should not be warped or curled.

In terms of the order placed for assembly, double check:

  • All surface mounts parts that were specified are installed/well soldered.
  • Are all the parts in the correct orientation? (May be difficult to verify in-place with LEDs, but not super-criticial.)

Step 2: Through-Hole Parts

Install all the through hole parts. What follows is a recommended order, but the order is not critical.

Step 2a: ISP Header

Install a single 2x3 0.1" header pieces into the holes for the ISP programming header on the board. A piece of tape may be useful in holding the header in place from above while soldering from below. Solder a single corner pin to its associated pad, then check that the header is flush and perpendicular to the board. If it isn't, rework the joint with a bit of solder until you have decent alignment. Then solder the remainder of the pins in place.

Alternatively, two 1x3 0.1" pieces of header may be used side-by-side to make up the programming header. (These may be more common in your junkbox than 2x3 header.) In this case, it is useful to use a 2x3 header socket from above to ensure that the headers remain aligned during soldering. As above, solder a single pin in place, check for flushness and perpendicularity, then solder all the remaining pins.

Step 2b: Servo Headers

Install two 1x3 0.1" header pieces into the holes for the Pan and Tilt servo connections on the board. A piece of tape may be useful in holding the headers in place from above while soldering from below. Solder a single corner pin to its associated pad, then check that the header is flush and perpendicular to the board. If it isn't, rework the joint with a bit of solder until you have decent alignment. Then solder the remainder of the pins in place.

Step 2c: Phoenix Connector

Install one PCB-mount pluggable-terminable block piece into the 4 large holes on the edge of the PCB with its connection-side facing off the board. Like with the header pins above, solder a single pin in place, then check that the terminal block is flush to the board and parallel to the edge. It is recommended to start with one of the two middle pins on the connector, since those are connected to the least amount of additional copper on the board and are therefore the easiest to rework/adjust if needed. Solder the remainder of the pins.

Step 2d: 5V Regulator

Install your 5V regulator of choice into the 3 holes for the power regulator. Hold the regulator in place with a piece of painter's tape as you flip the board over and solder a single pin. Using one of the outer-pins is recommended, as these are connected to far less copper than the center (ground) pin. Check that the regulator is flush to the board and perpendicular to it, then solder the remaining pins.

Checking polarity is particularly important with this component - the regulator's V-In pin should be closest to the corner; adjacent to this is the ground pin; the 5V output pin is closest to the center of the side of the PCB.

Step 3: Burn the Bootloader onto the ATMEGA328

Attach your ISP programming device of choice to the board, and burn the Arduino Bootloader onto the ATMEGA328. This will also set the appropriate fuses for using the external 16MHz crystal, and running all internal code at 16 MHz.

The process of burning the bootloader is not terribly complicated, but is a little beyond the scope of these instructions as there are many ways to accomplish it. Adafruit has a great summation of the various ways to burn a bootloader onto an ATMEGA328; note that many of the products are targetted at the DIP28 version of the chip, but many bear a 6-pin header which can be connected to the Demilight PCB.

In my personal experience, the USBtiny programmer from Adafruit works well; using the ArduinoISP sketch has been much less reliable.

Step 4: Download DMX Library, Upload Device Code

Download the JDMX library from Github as a zip file. In the Arduino IDE,  from the Sketch menu, select "Include Library > Add .ZIP Library", then select the zipped file you downloaded. The IDE will automatically unzip the files into the appropriate place for the IDE to reference them.

Using the Arduino IDE and the same programmer you used in Step 3, upload the current Demilight device code. Previous/alternate versions of the code can be found on GitHub.

 

Final Assembly

Step 1: Smoke Test

Plug the screw-terminal part of the phoenix connector into the PCB-mount part. Connect two short lengths of wire to the V+ terminal (closest to voltage regulator) and the GND terminal (farthest from regulator). Ideally, using a variable power supply, apply the minimum voltage your regulator will tolerate (typically a volt or so more than its 5V output). You should see the red 5V indicator LED turn on. Carefully inspect the PCB assembly with your hands and nose to ensure that nothing seems to be burning out at this stage.

Slowly increase the voltage to the maximum voltage your regulator will accept. Again, using light touches to look for heat and deep sniffs to smell for burning, examine whether anything's gone horribly awry.

 

Step 2: Center Servos

By default, the control board software will move both of the servos to their center position for two seconds before beginning to respond to DMX. This is useful for putting the servos in a known position before attaching other parts to their moveable wheels.

If necessary, remove power from the board. Attach the leads of the two servos (Pan and Tilt) to their respective, labelled headers on the board, with signal (orange) wire toward the inside of the board, and the ground (ground) wire toward the outside.

Briefly apply power to the board (less than 2 seconds). You should see both servos move briefly, then stop. This is the center position for both servos.

Unplugging the servos will make the next step easier.

 

Step 3: Solder LED Wires

Strip a small bit of insulation off the two flexible wires soldered to the LED pcb. Solder the wire that connects to the anode (positive side) of the LED to the inner LED terminal on the PCB (marked with a + symbol). Solder the other wire into the remaining terminal. Trim the leads off the bottom of the board.

Step 4: Plug the Servos Back In

Restore the connections of the Pan and Tilt servos on the PCB. Again, with the ground (brown) wire toward the outside of the board and the orange (signal) wire toward the inside.

Do not skip this step. If you do, you will not have a moving light. You will have a light. Which will still be nice, but missing the point a bit.

 

Step 5: Install PCB in Base

Using the unused screw from the tilt servo, install the PCB into the base. Thread the screw through the large hole near the phoenix connector, and screw down into the 3D printed part below it.

If you find that the leads of any of the through-hole components are impeding your progress, it may be necessary to remove the PCB, trim the leads more flush, and reinstall the PCB.

 

Step 6: Attach Pan Servo Cover

Using a small piece of something sticky, attach the Pan Servo Cover piece over the pan servo so that the moveable part of the pan servo protrudes through the hole in the cover lid. Foam VHB tape works well for this purpose, as does adhesive tack. Doubled-over gaff or duct tape work sufficiently well.

If necessary, remove power from the board. Attach the leads of the two servos (Pan and Tilt) to their respective, labelled headers on the board, with signal (orange) wire toward the inside of the board, and the ground (ground) wire toward the outside.

This is a strong area for improvement - possibly with a modification of the servo cover and the case lid so that they interlock in some way?

 

Step 7: Install Case Lid into Base

Slide the case lid into the base section, with the wires of the pan servo orientated toward the Phoenix connector fold the excess wire from the pan servo down into the case as you slide the lid in, and make sure the wires for the LED and the tilt servo pass though the gap in the top of the base.

As noted above, the fit between these two parts is deliberately tight - if your lid will not slide all the way in, carefully file a little more off of the lid or the base slot, then retry.

 

Step 8: Mount Yoke onto Pan Servo

Using the tiny horn-mounting screw included with the pan servo, install the short arm of the yoke onto the pan servo. Since the servos were centered in an earlier step, place the yoke in whichever orientation you want to be the center of its ~180° pan movement. Suggested orientation is to the left when viewed from the side of the base with the phoenix connector.

This is another place where the interface of the printed part (in this case with the pan servo knob) is deliberately tight - some filing of the interior of the "cup" where the servo knob sits is expected.

If you have continuing issues with the yoke not turning with the servo knob, a small drop of superglue can be used to hold the joint together. It's best to install the screw partway, add a tiny drop of superglue just under its head, then thread the screw the rest of the way in. This way, the glue remains in the threads of the screw and between the head and print, and does not slip down and glue the servo knob to the servo body.

 

Step 9: Mount LED and Heatsink in Head

Using something sticky, mount the LED headsink to the plastic ledge just in front of the tilt servo inside the head of the unit. Foam VHB tape works well for this purpose, as does adhesive tack. Take care to thread the LED's wires around the tilt servo.

There's probably a better way to do this than just tacking the thing in place, huh? Using a consistent LED star for the emitter would allow for some more advanced mounting strategies, but allowing for a broad range of stars means needing a widely-applicable mounting solution. Perhaps standardizing the head pieces near where the star goes (circular?) and encourging the making of individual adapters based on star/heatsink needs?

Step 10: Mount Head onto Yoke

Using the tiny horn-mounting screw included with the pan servo, install the long arm of the yoke onto the tilt servo. Since the servos were centered in an earlier step, place the yoke in whichever orientation you want to be the center of its ~180° tiltmovement. Suggested orientation is to the either straight up, away from the body, or ~30 degrees "forward" (away from the phoenix connector).

This is another place where the interface of the printed part (in this case with the pan servo knob) is deliberately tight - some filing of the interior of the "cup" where the servo knob sits is expected.

If you have continuing issues with the yoke not turning with the servo knob, a small drop of superglue can be used to hold the joint together. It's best to install the screw partway, add a tiny drop of superglue just under its head, then thread the screw the rest of the way in. This way, the glue remains in the threads of the screw and between the head and print, and does not slip down and glue the servo knob to the servo body.

Step 11: Install Other Half of Head

Slide the tabs on the other half of the head unit inside the mounted half of the head unit. These should be a firm friction fit and retain the aesthetic half of the head without further adhesive.

The two halves of the head were previously held together by tiny friction tabs on the exterior of the head. This was changed in version 0.9.0 to the larger interior tabs.