Introduction: Control Mix of 12v Lights & Motors

Why Use Old Bulbs

Old light bulbs just look cool. And the quality of light from old incandescent or fluorescent lights is hard to duplicate. For years, I've been using old light-bulbs for decorations. I have a large collection of old lighting, most of it left over from upgrading existing items to NeoPixels. So it's kind of ironic that I am now re-using the aged and inefficient lights in a digitally controlled project.

I had occasionally thought about powering up the old bulbs, but I was too fascinated by spectacular LED sequences to bother. You need a lot more power than the Arduino can provide. There are plenty of simple circuits and boards, but for me, it wasn't worth the effort or money for "throw away" items.Then I realized I already had several boards that could power 12v lights - my trusty motor-shields.

Motor Driver... Seriously?

Sure, using a motor driver board is total overkill for powering a lamp. But if you need a quick test for a design for a temporary (seasonal) installation, then they are very convenient..A motor driver board is really just a PWM board with isolated power circuits. That's exactly what I needed to safely control these old 12v bulbs. It even has protection-circuits, code-reversible polarity and easy to use screw terminals for prototyping.

I used the classic Arduino UNO and the motorshield from Adafruit because I own several of each. I've built numerous robots and machines with this combo, so I knew they are rock-solid and very sturdy. If I hadn't blown them up yet, I was pretty sure some light bulbs weren't going to hurt them.

This motor-shield has four power ports that can handle the volts and amps needed for this project. And it comes with a software library that makes it easy to control the power level via PWM, and even reverse the polarity of the prorts.

Other Stuff Needed

You can power the UNO and the lights with the same power supply, but it is always a good idea to use two - a separate power supply for the Arduino and the motor-shield. One supply only needs to be powerful enough for the Arduino. But the second power-supply needs to be powerful enough to run the lights, so a beefy 9 or 12v with good amperage is a good idea.

I call this a 12v project, but all the items I use in the demonstrations will also light up with a good 9v power supply. If you want to use batteries, a standard 9v battery will NOT work on some of them, but a 6xAA battery holder provides enough amps for almost everything except an automobile headlight.

And the Software

The Arduino controls the board through software. The Adafruit board has a special library that makes it easy to write the software. You control the brightness of the bulbs using PWM, and you can even reverse the polarity of the power ports. The best resource for learning how to do all this is Adafruit's tutorial for their motor-shield.

Geeky Stuff

The motor shield can also power stepper motors, solenoids, pumps and servos. So you can place the lights on a servo or motor and animate them. Many of the IO pins are still available, so you can still add NeoPixels and sensors to the project. You could cause the lights to react to sensor inputs such as sound or motion.

So even thought the motor-shield is overkill for lights alone, the power to combine numerous inputs and outputs in one project makes this combination an excellent option for all types of art projects.

Step 1: 12v Incandescent Bulbs

These are the oldest and simplest bulbs to work with, but they are also the least efficient. They create light by putting so much electricity through a filament that it glows. (CAUTION - HOT!!!These bulbs can get really hot. Do not place them near any heat-sensitive or flammable materials. They are not appropriate for jewelry or clothing projects.)

Where to Find Bulbs

Incandescent bulbs are cheap and easy to find in a wide variety of shapes and sizes and styles.

Most older cars use 12v bulbs for their headlights and running lights. Any auto-parts store or junkyard will have a selection of interestingly shaped bulbs to choose from.

Another source of 12v bulbs are "low-voltage rail-lighting-systems." They were very popular a few years ago. Now that LEDs are affordable the 12v systems are quickly being replaced and you can find sets at the thrift store. You can use the bulbs and housing. (Although you don't need the transformer for this project, go ahead and save it for future use.)

You might still find some old 12v flashlight bulbs, but most modern flashlights max out at 6 to 9v.

Hooking Them Up

Most incandescent bulbs are not polarity sensitive, so you can hook up the positive and negative wires in any order. However, you do have to use both poles so the electricity flows through the filament in a complete circuit.

This sounds simple, but there are so many types of bulbs that you need to pay attention to the connection. If you're scavenging bulbs, it's a good idea to also save the "socket" or connector for the bulb. Some bulbs have pins or blades that are easy to connect to. Others have bases that look more like a screw-in bulbs. One pole is the sleeve while the other pole is a bump at the center of the base. These type can be difficult to make connectors for. Copper tape, large alligator clips, or even solder are options for connecting to these bulb types.

Read all of Adafruit's tutorial for the motor-shield before assembling your project.

To hook them up to the motor shield, simply connect the positive lead to one side of a motor port and the negative lead to the other. In the Arduino code, run the "DCmotor" (not "stepper motor") for that port. You can use the "motor speed" function to dim and brighten the bulb. As the PWM speed increases, the bulb will brighten.

Step 2: Cold Cathode Tubes, Flourescents and More

The type of bulb creates light when a gas or powder is excited by an electrical current. All of them require an "inverter" to turn the low voltage DC power into high voltage AC. If you are scavenging these lights from old appliances, be sure to save the inverter. The inverter is usually just a small PCB with some components. It will usually be the closet board to the bulb itself.

Cold Cathode Tube and Inverter

These thin tubes are very bright. They are basically small fluorescent tubes (they're also called CCFL). They were once very common and were found in 2d document scanner/copiers and as backlights for LCD displays and laptop screens. You can buy them new, but the best way to get them is salvaging them from old electronics. Be sure to get the inverter circuit when you scavenge the bulb. The inverter takes the low voltage (usually 9-12v) direct current and converts it into higher voltage AC.

Where to Find Them

You can still find Cold Cathodes new. They are sold as under cabinet lighting and for car interiors. But the most fun way to acquire them is to scavenge them from a old scanner/copiers or LCD monitors. Instructables is full of great tutorials about where and how to scavenge and run CCFLs.

Related Items:: Fluorescents and EL-Wire

Fluorescents are very similar to Cold Cathodes, they are slightly larger in diameter and the bulbs are designed for easy replacement. I still see many fluorescent flashlights sold as part of battery powered tool sets. I find it odd that in the age of cheap LEDs. But old-timers still like them and claim fluorescents provide a better, more even working light so they are still sold. They are also available at any thrift store in many shapes and sizes. When looking for a fluorescent lamp to salvage, make sure you can also salvage the inverter.

Electroluminescent (aka EL-wire) is a flexible wire that can be several meters in length. It is much more suitable for use in clothing and furniture. However, most EL-wire inverters run on lower voltage, in the 3v-4.5v range. Instructables is full of great tutorials on EL-wire. I've even written one on making an illuminated pillow and one (using EL-panel) on making a Pokémon badge.

Hooking up Cold Cathodes

You need to power the inverter with the appropriate DC voltage, and you need to obey the polarity of the inverter inputs. The best idea is to know exactly what voltage the inverter expects. So if you are scavenging the inverter and tube from old equipment, it's a good idea to test the running voltage before removing them.

Remember, these inverter boards put out high voltage AC, so they can be dangerous. Be careful not to get shocked when working with them. Most people describe the shock as a bite or sharp tickle. But the voltage can be deadly to some people - so use caution and make sure you isolate the inverter inside an insulated container.

Read all of Adafruit's tutorial for the motor-shield before assembling your project.

The inverter is (usually) polarity sensitive, so be sure to connect the positive and negative leads to the correct side of the motor-shield port. The polarity of the port can be changed in the Arduino code. Use the DCmotor (not "stepper motor") commands to turn on the motor. When the code tells the motor (here, it's actually the inverter) to run forward the port uses one polarity (+/-), but when the code tells the motor to run backwards the ports polarity reverses to become (-/+). So be sure the code always sends the correct current to the inverter.

I strongly recommend you always use full power to your inverter. You can use PWM with the inverter, but I recommend against doing so. It does dim the bulb, and in some cases even gives a very neat looking left-to-right effect upon start-up. However, it also makes the circuit sing, or ring or whine in a dangerous sounding way. That's probably not good for the circuit and might even be dangerous.

Step 3: 9-12v LEDs

LEDs are the new kids on the block. They are easy to work with, small and sturdy.

NOTE:We are dealing with the 9-12v type of LEDs in this project, not the low power 5v that we usually find in Arduino projects. If you apply 12v to a 5v LED, it will blow up and emit a foul smelling smoke. These LEDs are probabnot individually addressable. In other words, you can change the color or brightness of the entire strip, but not an individual LED.

Where to Find Them

My personal opinion - unless you already own these 9-12v LEDs, or need a very specific configuration, I would use Neopixels instead. Neopixels are very bright, easy to work with and you have much better control of each individual LED. They are inexpensive and available in a wide variety of formats: strips, bars, rings in numerous sizes and densities. Better yet, they run off of the standard Arduino voltages of either 5v or 3.3v.

If you do want to buy new 9-12v LEDs they are available from a variety of sources. Home and Garden stores have a variety of 9-12v LED lighting systems. They can be found for lighting the home and patio, or for shelving and bars - so check in multiple departments to find the style you want. LED lighting is also popular for cars. They are used for lighting the interior cabin and for under-car effects. They also come in blindingly powerful driving lights. You can even find 9-12v LEDs in powerful flashlights and emergency lights.

Hooking Up LEDs

LEDs are polarity sensitive. You must connect the positive and negative wires to the correct lead. Wiring them incorrectly will probably not blow them up, but the LEDs will not light up.

Single-color LED lights usually have two wires, a positive and a negative. RGB lights will have four wires. If you have four wires, then you will need to know whether the LEDs are "common cathode" or "common anode."

  • "Common Cathode" means all the LEDs have their negative sides tied to one "common" wire. You light up the LEDs by applying power to the individual R, G and B color channels.
  • "Common Anode" means all the LEDS get their power from one "common" positive wire. You control the LEDs by opening a drain (negative) channel for each color.

Adafruit has an great tutorial for wiring up a 12v RGB LED strip, and Sparkfun has a helpful video.

The Adafruit Motor Shield has four control channels, so you can control all three of the RGB channels or just one. There are many ways to wire the LEDs onto the shield while leaving enough outputs for motors and servos.

Read all of Adafruit's tutorial for the motor-shield before assembling your project.

LEDs are very compatible with dimming via PWM. Use the DCmotor commands (not the "stepper-motor") and simply code the "motor" to vary it's speed. This will dim and brighten the LEDs. You can do this with one or all three colors to create thousands of color combinations. Remember, reversing the motor's direction reverses the polarity of the shield's motor port.

I've noticed that using the "release" commands helps to fully turn off all the LEDs quickly.

Step 4: Access Your Resource Bins

Go to your resource bins, pick out some interesting items and start assembling a beautiful lamp.

Your spouse or roommate might refer to your resource bins as a "junk-box" or "that annoying collection of trash." Luckily, you have continued to scavenge interesting bits and pieces from all the old appliances and electronic items you disassembled. If you don't have a resource collection, start one.

LEDs - Aesthetics and Design Ideas
LEDs can provide a wide range of light types, warm or cool, harsh or diffused, and in a multitude of colors. How you use LEDs depends on the configuration of the LEDs. In the examples here, we use a 3' long flexible strip with the RGB LEDs about an inch apart. The strip can be cut into 3xLED segments for individual control. Each LED is a point source with most of the light projected into a narrow cone. When the LEDs are arranged into a strip, this gives multiple shadows in a regular repeating patter. However, the strip can be bent into curves or squares, or even wrapped around an object.

Cold Cathodes - Aesthetics and Design Ideas
Cold Cathodes and fluorescents have a cold, harsh light. The cold-cathode tubes are especially cool and bright. They are not friendly and romantic like incandescent. They are sterile and authoritarian. They are long, thin tubes. Trying to hide their shape is futile. Instead, perhaps emphasis their linearity. The two power wires are often used as suspension devices. The bulbs themselves are very lightweight. They are easily suspended or cantilevered in free space for a striking effect. Because they are so thin they can be hidden in very thin recesses - great for shelf and edge lighting. Their light is very even and distributes across a planar surface very well - great for illuminating flat art-works. The emitted light is also "linear." While incandescents and LEDs create a point source that radiates shadows from a center point, the cathodes cast even light along their length. So there is no radial pattern, all the shadows are cast in the same, straight direction.

Incandescent - Aesthetics and Design Ideas
Bare incandescent bulbs have an inherent antique or industrial look. You can find bulbs that immediately give your project a old, mechanical look. Basic incandescent light often has a warm visual quality that harkens back to older days while Xenon and Halogen bulbs have a harsher, more modern light. When underpowered, either by voltage or a low PWM frequency, the filament often glows even more in the yellow/orange range. The filament is often visible, which adds to the mechanical look. They are "point source" lights. Light radiates out from a central point in a spherical shape (unless there is a reflector). This can be useful if you want to illuminate a room and the adjacent wall at the same time. It also is useful if you want to cast a wide pattern of shadows. Some design ideas are: Projected into space, emerging from a flat plane to mimic old vacuum tubes from radios.Add a cage around them for a sturdy industrial chic look.A fun dollhouse lamp can be made with miniature lampshades.Reflectors of all sorts can be used to give them an eerie scientific/medical look.

That's All Folks

That's all there is to it - Have fun and be creative - now you know that you can easily control 9-12v items cheaply and easily without designing and soldering your own control boards.

And when you tired of the lamp - you can build a robot with the same boards!!!