Pretty Book Lamps: A Tragedy

A few days ago a friend remarked that electrical engineers seem to be in the biz basically only to make lights turn on or blink. He was correct. It is in this spirit that I pursued a small piece of art: a book lamp à la Lumio as a birthday gift for my pops, a bibliophile with a predilection for weird chotchkies.

As expected, it was easier said than done. In any case, this is what we're trying to make:



Essentially a book with a lamp + diffuser in lieu of content — the entire project of recreating it was probably about 15 hours from start to finish, though most of that was experimentation. I asked my dad for a photo with the finished product, but the old man promptly lost the final version in his hotel before he could snap one.


I am in distress

me too, dad.

Theory of Operation

Before we dive headlong into design and materials, let's take a step back and consider how this product might work from a high level:
high level

Not particularly complicated. We have the power, the switching, and the illumination, and we'll address them one at a time.


Power is always kind of scary to work with. While most of the things we encounter on a daily basis rely on low-voltage DC circuitry, we transport this power from place to place as high-voltage AC. Having experienced more than enough 120V AC coursing through my hands for a lifetime, I make it a point to let other people rectify my power when necessary. Luckily for us, 120V AC / 5V DC converters are some of the most accessible electronics on the market. Thanks, cell phones! Luckily, I have a few lying around the house:
sugar cube

While we can use one of those to provide power from a wall, the Lumio can spend time unplugged providing portable illumination. That's a nifty feature I'd like to replicate, so the obvious solution is to throw a rechargeable battery in there. And if there's a rechargeable battery in there, we probably need to add a way to charge it. And if we can charge the dedicated battery, why not be able to charge some other stuff as well? If you give a mouse a cookie...

This is beginning to sound like feature creep, but it would be super cool to do. I don't usually like to cheat and use other people's designs... but I was running on a limited time frame and Adafruit has a pretty nifty board for doing exactly this. I present to you, the humble PowerBoost 1000: pboost

This sucker takes Micro-B USB input, charges a lithium ion battery, and provides a boosted 5.2V DC @ 1A output (perfect for a USB charger), all in about 1"x2" of fiberglass. With this, we can connect a battery, charge a phone, and power the illumination circuit — all from a simple wall brick. We'll get more into the specifics of how this all works later, but for now that'll about do for the the power side of things.

The Switch

Mechanisms for a device's activation upon opening are commonplace, from laptops to lost arks — while mechanical switches usually suffice, a more elegant clasp-less design (such as those in Apple's Macbook laptops) works magnetically. To achieve this functionality, most high-end electronics manufacturers will rely on a MEMS magnetometer. They look like this: ■, and the more fancy ones are digital and provide hooks for I2C or SPI communication with programmable hardware interrupts. It's easy to see why this would be useful, but digital communication implies some form of micro-controller like an Arduino or Raspberry pi, which would be overkill for a lamp stuffed into a book.

So now what?

A more suitable alternative would be a hall effect sensor. Some even come with built-in Schmitt triggers to get a clean digital output (for a buck on Sparkfun triggered

But if you're a sucker for the classics like me, you'll probably end up choosing a reed switch. These date back to the 30's at Bell Labs, and are just some intertwined ferrous metals that will make contact in the presence of a magnetic field, like so:
switch animation

and they usually look like this:
reed switch

In this design, I'm going to move ahead with the reed switch because I find the mechanism endearing. Realistically any of the proposed solutions (and probably several others) could get the job done — though we'll also run into some limitations worth discussing later as well. Now that we can provide power and flip a switch in the presence of a magnet, we're ready to hit the most important aspect of the design:


There's basically only one light source we can use in a low-power DC circuit, and that's the ubiquitous LED. Adafruit comes in clutch again with some really bright ones: a 25 pack at 15000mcd each, roughly as much light as a 25W CFL. Watch out when testing these. Seriously. Their optical output is fairly narrow and looking directly into a focused 15000mcd is trouble.


As you can see, they aren't particularly diffuse. In the case of the Lumio, in order to get a consistent brightness across the entirety of the lamp, they more than likely have an interposing material to help spread out the light out, either in the form of light piping or paper diffuser. Because I don't have access to injection molding for a custom light pipe, and because this is inside of a book, paper is seeming like an appropriate and economical option.


Now that we have a functional understanding of the system and some idea of how we want to put it together, the next step is to design it — starting with pen and paper.

Sketching & Floorplanning

Before we get to the CAD, it'll be helpful to draw out the grittier details; if not a true schematic and mechanical draft (the clock is ticking here) at least we can nail down the components and specs. Let's take a look at the electronics:

zappy stuff

A) Power Input: The first stage is power input, and for this we have a battery charger IC with three terminals. The leftmost is the USB VBUS line supplying 5V for battery charging, the bottom right is the battery connection terminal, and the top right is the output battery voltage. This will rise and fall according to the battery charge state, and in the case of a single-cell lithium-ion battery is usually between 4.2V at 100% charge and 3V when it nears 0%. This change in voltage is problematic for driving LEDs for a straightforward reason.

For a given Luminance L, Current I, Voltage V, and Resistance R:

$$ \begin{cases} L \propto I \\
I = \frac{V}{R} \\
\end{cases} $$


$$ L \propto \frac{V}{R} $$

As our current-limiting resistor is constant, this means that the luminance of our LEDs is directly proportional to our battery voltage. And because our battery voltage will change as it runs out of juice, that means our LEDs are going to dim — bummer! To address this, we need block B.

B) Input Regulation: to address the issue of our battery voltage rail drooping as its charge depletes, we can use what is known as a "Buck-Boost Regulator." These are electronic circuits designed to translate one DC voltage (our battery voltage) to another. The nice thing about them is that it doesn't matter if the input is higher or lower than the output — the output will stay steady no matter what. With the addition of an "enable" pin that lets us activate and deactivate this regulator with the flip of a (reed) switch, we have an elegant method to turn on the LEDs at will!

C) LEDs: To ensure we are properly driving the LEDs, we need to limit the current sinking through them. The datasheet for these LEDs calls out a forward drop (Vf) of 3V — this means that if the LED is on, the voltage at the cathode will be 3V less than the voltage at the anode. This principle applies to all diodes, though LEDs usually have a larger Vf than their non-illuminating counterparts. To determine the resistor necessary for 20mA then, is simple algebra:

$$ I = \frac{V_{power} - V_f}{R_{lim}} $$

Substituting 20mA for current, 5V power and 3V for Vf

$$ 20 * 10^{-3} = \frac{5.0 - 3.0}{R} $$ $$ R = \frac{2}{20 * 10^{-3}} = 100\Omega $$

100Ω should work to set the LED current to 20mA.

D) Output Power: Finally, we have the output power system. This is a USB type-A connector that will provide a way to supply our buck-boosted 5V to the outside world. In this way, we can achieve similar functionality to any number of portable battery chargers.

As for the LED structure and lamp diffuser, just a quick sketch of what would probably work:
solid stuff

A) Complete Lamp & Scale: Here we have a sketch of what the finished product should look like (with some additional transparency for a view of the LED/USB mount). The measurements are based on the book I ended up selecting for cannibalization, which we'll get into later. Importantly, we have a magnet and reed switch at the beginning and end of the book respectively, a light bar along the spine that will provide mechanical support as well as housing for the LED and USB input/outputs, and a diffuser that to help our lamp produce a uniform glow.

B) Diffuser Construction: The diffuser itself will involve a little paper-craft. Ultimately, each 'pocket' of the diffuser will be comprised of two sheets of paper in a shape reminiscent of l'Arc de Triomphe; these will be adhered together along the edges, with the caveat being that whatever adhesive force is applied must be greater than the total tension applied to each page when the lamp is completely opened. We will do this through an established process known as "winging it."

C) LED & Power Assembly: This is going to be the trickiest part to make here, because unlike the rest of the construction, customized plastic parts aren't available off-the-shelf. There are plenty of hobbyist plastic housings for use as project enclosures, but given the fairly specific needs here, I decided to CAD up a solution and try my hand at a 3D print. This led to one of the most fun tools I discovered during this project: TinkerCAD. TinkerCAD is a free CAD (Computer Aided Design) program that allows for the creation of 3D models right in the browser. The entire assembly comes together as below:

Not super fancy, but one of the benefits of 3D printing is that we can iterate quickly (and emboss our initials on the side at no extra cost).


With our design sketched out and a working plan on how to tackle each aspect of the project, it's time to get prototyping. First, the most important part — we need a book. To respect its dignity, it will remain anonymous. What follows was undoubtedly the most difficult part of this little project for me: I needed to murder it :(

the hardest part


But hey, looks like a nice fit with the PowerBoost. The three hundred or so pages now unbound from the cover are perfect fodder for making the diffuser; the benefit here is that the pages are perfectly sized for the book. With a small amount of perseverance and patience (and a liberal application of glu-stick) we can start crafting the diffuser.

pockets on pockets

One down, many more to go. Meanwhile, I thought it prudent to get a 3D print started because I've heard these things take time. I'm fortunate enough to work in a lab that encourages such frivolities — let's see what it cooked up.


The boss came out pretty well! I didn't give myself enough margin for the flush fit, so it took a fair amount of sanding to get everything to come together; luckily, the PLA material is fairly sturdy, if brittle.


The USB Type-A connector fits perfectly! It shouldn't be surprising, but honestly every time I witness firsthand how advanced modern manufacturing can be, it's pretty exciting. Let's take a look at the LED mount.


Another perfect fit. Looking at this now, it's pretty clear I should have shaped this piece into a dome and made the LED mount less unidirectional — the diffuser is going to have some work to do. In any case, there's a slight logistical issue of how to best wire the positive and negative voltage rails here. In lieu of a relatively costly custom PCB (Printed Circuit Board) like you'd see in a typical consumer electronic product, I elected to hand-solder the LEDs and resistors to a strip of copper tape. Less elegant than I'd like, but tidier and cheaper than anything else that came to mind.


Not too shabby. Next up, let's get the rest of the circuitry squared away. The PowerBoost will need some wires tacked on to the enable, which are the 4th and 5th from the Micro-B port.


From thence, we need to connect and mount the reed switch. We can mask it and the neodymium magnet behind the blank pages connected to the front and rear covers.


With just a little more soldering, we have the LEDs powered as well. Being careful not to short anything and using a little hot glue, we have a sturdy & stable electronics enclosure!


Final Assembly

When all's said and done, it should just look like a book. Mostly.

final book

I wasn't able to take a video of the final version because my dad lost it too quickly, but an earlier prototype looked like this:

bad gif

It was an interesting project for a variety of reasons, but my favorite aspect was that with modern prototyping technology, it's more than possible to make the types of electronics you see on store shelves independently, often with a significantly reduced cost. While bespoke lamps may not ever be a second source of income for yours truly, hand-made gifts are almost always more personal than something off out of Walmart. In any case...

Some thoughts & caveats looking at future versions:

  • The diffuser quality is super important, and paper is a difficult material to work with due to its fragility. Next time, I think I'll go to a craft store and see what else there is between fabrics and papers for a more uniform and sturdy diffuser.

  • The reed switch worked very well, but the neodymium magnet was so powerful that I needed to put some buffer between them or the switch would quickly magnetize and become stuck (like the head of magnetized screwdriver). Next time I might go with something more mechanical, or less powerful magnets.

  • The LED directionality is important for a more uniform lighting. The next light bar design would benefit from a more central location with more radial directions for the LED mount.

  • Next time I'd like to spin a printed circuit board to house all of the electronics on one board. Routing within the PCB is a much tidier solution than fly-wiring all of the components to one another.

Ultimately, the most important lesson I learned in all of this is to choose your gift recipients carefully.