Let’s Build An LED Lantern! Part 1: Planning The Thing

Hi all. A sudden, and rather unwelcome spare time surplus has left me bored out of my head lately, so I thought I’d take the opportunity to finally knock out an electronics project I’d been tinkering with for a while, and write about it here.

Before I begin, I gotta get some boilerplate stuff out of the way: First off, this is going to be more of a journal than a step-by-step how-to. I am NOT an electronics expert; I’m just a hobbyist, with a hobbyist’s level of experience, knowledge and foresight. I’m gonna screw things up, both in the build and this series of write-ups, and although this project is already finished, I welcome criticisms, corrections, ideas for improvement, and ideas for future projects.

Now for the CYA stuff: While no dangerous voltages will be directly present in this project, it will be using large lithium-ion battery packs, and those can be very dangerous if mishandled. It also involves soldering, which can expose you, obviously, to high temperature molten metal, but also to potentially toxic vapors from burning flux. If you do decide to make one of these yourself, you’re doing so at your own risk.

Ok, now that that’s out of the way, I’ve had a weird obsession with electric lights in general, and light-emitting diodes in particular, for as long as I can remember. So I think a project that takes advantage of high-output LEDs to generate useful light is a good place to start. The goal of this particular project is to make a portable, rechargeable, multicolor LED lantern that fits these criteria:

  1. I want it to be bright at full power, but dimmable down to a low level.
  2. I want it to emit white, red, green, and blue light, and I want to be able to control the brightness of each color individually.
  3. I want it to be self-contained, portable, and rechargeable.
  4. I want it to be energy-efficient and relatively weatherproof, since I’d like to use it outdoors.
  5. I want it to be easy to use and relatively good-looking. I don’t want a hacked-together frankenlantern, like I’ve built in the past

Now that I know what I want to build, it’s time to start picking out the components to build it with. I’m starting with this GE Embrighten battery-powered lantern for the housing.

It’s not a bad lantern as-is, and it’s the perfect foundation for my project: It has lots of room in the base to store the guts, a weather-resistant body sporting a shade that directs rainwater away, and a handle that can be unclipped and opened to facilitate hanging the lantern up. It also has an old-school, Coleman lantern aesthetic to it that I find very charming.

Now that I have my housing, I need a light source. For that, I chose these Cree XM-L LEDs: Each LED package contains four chips: One each for red, green, and blue light, plus one more that emits white light. Warm white, in this case.

The ability to emit “true” white in addition to RGB is critical to this project, since colored LEDs emit light in a very narrow range of wavelengths. I could approximate white by simply mixing red, green, and blue light, but without the wavelengths of light that fall between those three primary colors, the resulting light cast out would look weird and be very inefficient.

Next, I need to come up with a mount for these LEDs that both supports them structurally, and acts as a heatsink. It took a fair amount of scrounging and testing, but I eventually decided to cannibalize this cheap, screw-in 40-watt equivalent LED light bulb:

The plastic diffuser simply snaps off, revealing the LEDs themselves on a PCB that’s screwed into a wonderfully hackable cast aluminum housing.

Now I need power. I want this lantern to both be rechargeable and have a long runtime, so regular alkaline batteries are out. These days, the most energy-dense rechargeable cells are lithium-ion, but working with them directly is both a pain and a potential danger. Fortunately, I already know exactly what to use: This TalentCell power bank is both easy to modify and relatively cheap for the amount of power it supplies.

As the Amazon ad notes, this battery bank is designed to power security cameras, LED light strips, CPAP machines, stuff like that. To those ends, it puts out a few different voltages, (5, 9, & 12) which is ideal for this project, and just about any other project I can imagine. Their advertised capacity is 11,000 milliamp-hours, or 11 amp-hours at 12 volts, which works out to 132 watt-hours. That means ideally, this bank can power a 1-watt load for 132 hours, a 10-watt load for 13.2 hours, etc. The real runtime will be less due to resistance in the wiring & circuitry, but 12 hours @ 10 watts is a pretty good ballpark. I’ll be using two of them, so around 24 hours max @ 10 watts is what I should be able to reasonably expect.

Finally, I need a way to control this whole shebang. A few simple switches and variable resistors could be used to control the brightness of each color, but I opted to use a more sophisticated solution: A microcontroller. I will write a program that tells the microcontroller to set the color and brightness of the lantern by “listening” for button presses, then switching the appropriate LED color on or off, as well as dimming it up or down to one of several preprogrammed steps.

A microcontroller is a fascinating little device. A single microcontroller chip contains a microprocessor, flash memory to store programs, RAM to store variables, and I/O pins to accept inputs and generate outputs. As its name implies, a microcontroller is used to control stuff electronically: It runs a simple program, written in assembly code or compiled languages like C, that tells it what to do when it receives certain inputs. In this case, the microcontroller will read button presses, then respond by turning the LEDs on or off, as well as acting as their dimmer.

To both program and connect my microcontroller, I’m going to be using a cheap knock-off of an open-source microcontroller development platform, called Arduino:

An Arduino board contains the microcontroller itself, plus a USB interface, power management circuitry, and all the glue logic necessary for the controller to run. The inputs & outputs of the controller are wired to connectors along the edge of the board, making external connections a simple matter of just shoving in individual wires. But a number of expansion boards, called shields, can be fitted on top of the Arduino to extend its functionality. I’ll be using one such shield to control the high-power Cree LEDs, and I’ll explain why I need to do that later in the build.

That’s about it for this part. In part 2, I’ll begin assembling and testing the light source. Thanks for reading!