120V AC ➡️ 5V DC: Soldering and Electronics 101

At the end of my last challenge where I did 10,000 pushups in 30 days, I mentioned that I wanted to dust off my engineering diplomas and dive back into the world of circuitry. Despite three of my four diplomas saying ‘Engineering’ on them, most days I don’t feel like a real engineer. While my current field of synthetic biology takes a great deal of inspiration from engineering and other disciplines, it had probably been close to 15 years since I had even touched a resistor. I had never soldered components together. And while I remember basic circuit theory equations, I felt like I had forgotten much of the rest.

First attempt

Several years ago, Gwenn bought a lamp in Thailand that consisted of a series of carved coconuts strung together with a bulb wired into the center of each. Unfortunately, the bulb type was obscure and the plug for US 120V outlets instead of the European 230V, so it has since served purely as non-functional decoration. About a year ago, I thought that I would surprise her by repairing it.

I could have just cut the US plug and swapped it with a European style, but I wasn’t sure how well it would handle the doubled voltage (as anyone who has brought their US hairdryer with them to Europe has probably experienced) and figured that burning the apartment down might not be the surprise she had imagined. So instead, I thought of changing the input from a US plug to a USB plug. Then it could run off of the 5V power produced by a cell phone charger.

So I bought all of the parts I thought I might need:

  • Cell phone charger and USB cable
  • LEDs
  • Electrical tape

I figured that I could hook up five 0.5W LED bulbs with the power I could draw from the cell phone charger. I intended to have the big reveal after an epic birthday scavenger hunt quest, but the logistics didn’t work out. But when I finally got around to it, I spliced together the power wires and the LEDs and…nothing.

No light.

I measured with the multimeter to make sure I was getting power, but I couldn’t figure it out. So the parts all went in the closet and were forgotten for several months.

In March, during the beginning of the quarantine, I first had the idea to finally bring it out again as one of my one-month projects. I thought that perhaps the light needed to be more complicated and had the idea of using an Arduino to control it. But as I looked more into it, and knowing that Gwenn didn’t really want it to be some fancy controllable light, I began to realize where I had gone wrong before and that I could do it without any controllable electronics.

So I decided to save the Arduino for other parts of this month’s challenge and this project just required brushing a healthy coat of dust off of my Electric Circuit Theory (ECT) knowledge as well as learning a few other crafting techniques.

Intro to LEDs

LEDs, or Light Emitting Diodes, have become an increasingly popular, energy-efficient bulb option over the last decade. While more colloquially known just as high-efficiency lights, they are one specific kind of diode, which an electrical element that only allows current to pass in one direction. Plugs are designed so you don’t need to worry about this if you are plugging in a Christmas tree, but it is important to know if you are wiring them yourself.

Additionally, the resistance profile of LEDs in nonlinear. Here’s what I mean:

This is a graph of current vs. voltage. The straight blue line is how those two interplay for a resistor. The straight line means that it is linear and follows Ohm’s law: I = V/R where I is the current, V the voltage, and R the resistance. [You can blame ‘I’ for ‘Current’ on André-Marie Ampère, who first defined it as ‘intensité du courant‘.]

Think of it like a bucket with a small hole near the bottom. Where there is very little water, there is little pressure on the hole, so water may just dribble out. This is like having low voltage (pressure) leading to low current (flow). If you add lots of water to the bucket, then the pressure will increase and so will the amount of water flowing out of the bucket. The important thing to note is that both of these systems are linear, so as you increase the amount of water in the bucket, the flow continually increases at the same rate.

Now look at the curve for the LED. This is like a water balloon with a scratch on it. You add more and more water and nothing happens. The balloon just continues to fill. But at some point a small hole opens. And for a small range, you will get a steady stream out of the hole. But if you fill it much more, that hole will rip open and the balloon will fall apart. That is a nonlinear system. Instead of steady increase leading to steady increase, you get nothing…nothing…nothing…super fast ramp and EXPLODE!

For the LEDs I used, they wouldn’t ‘explode’ per se, but they could easily burn out. So what lots of sites that I read recommend is to include a resistor with the LED. That way, once there is enough voltage to turn on the LED, the resistor can help tamper the current to prevent it from getting out of control. In tinkering around, I found that a 220 ohm (unit of resistance) resistor worked well.

With one LED working, I began to believe I could actually fix the light

After testing one bulb with twisting wires and using electrical tape, I was convinced that I could actually get it to work, but I wanted it to be more durable and nice looking, leading us to:

Introduction to Soldering

Despite having three diplomas that say “Engineering” on them, I don’t believe I had ever soldered before. We used breadboards and connected wires way back in my undergrad days, but since they were temporary lab experiments and we would reuse parts in later assignments, I don’t ever remember needing to solder. So I bought a cheap solder iron online and watched a bunch of YouTube videos.

Main tips that I learned:

There are several types of solder

Mostly commonly used solder in electronics is actually hollow with ‘flux’ inside that aids in its flow when melted. The smoke when soldering is actually the flux burning off. For this reason, it is important to heat the wires or elements to be soldered with the iron, rather than directly melting the solder and trying to apply it like paint, as it won’t flow into the connection. Though people will ‘tin’ the tip, allowing better conduction of heat to the element.

There are different temperatures used in soldering

This is where I found differences as some people recommended the ‘hot-and-fast’ while others the were against using anything too hot. I didn’t look too much into it as I wasn’t soldering near electronics and only planned to connect wires together that had a much higher tolerance for temperature variations.

Heat shrink is your friend

For doing connections that one wants more permanent, heat shrink is a great option. Basically it is a tubing that is slightly larger than the connection that you can slide over and then heat with a heat gun or lighter to shrink. This both protects the connection and strengths the wire. I used this extensively for the lamp, both to insulate the soldering of LED, resistor, and wire elements, and then to heat shrink them together afterwards. That makes sure that the elements are both insulated from each other and nicely organized. I bought a box with lots of sizes and it is magic.

Soldering together the wire lights and USB cable

Checking that I had each LED in the right orientation before soldering, I worked my way through the five connections.

Once the LEDs were soldered and heat shrinked (heat shrunk?), I drilled small holes in the coconuts, as previously only the wires had passed through. Then I glued the bulbs in place and used the existing yarn to cover the shrink wrap.

Finally, I spray painted the glue to match and voilà! A fully functioning USB-powered LED coconut light.

While this project (and post) took much longer than I had intended between conception and completion, I’m proud of how it turned out. I’m starting to find the right level of discomfort to challenge me without being completely overwhelming. Next I’ll write about what I ended up doing with the Arduino I didn’t use. 😀

5 thoughts on “120V AC ➡️ 5V DC: Soldering and Electronics 101

  1. Pingback: What I learned going from total novice to solving a Rubik’s Cube in under 2 minutes over a weekend – Chortles and Harrumphs

  2. Pingback: How to make an Arduino-powered immersion circulator – Chortles and Harrumphs

  3. Pingback: How to Finish a Painting – Chortles and Harrumphs

  4. Pingback: How to hot-wire a scooter with a paper clip – Chortles and Harrumphs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s