The Box: More brainstorming

I don’t anticipate my order with the potentiometer to come in until early next week so I have a lot of time to plan out every last detail for this project. A few more developments have come up.IMG_0878I found the perfect box for it. It’s wide enough for the LCD but still small enough so there’s not a lot of wasted space.IMG_0882Something I picked up from the Greg robot project is that the wiring for the LCD will use a lot of space if I use the same jumper wires.
IMG_0880This time around, I’ll chop off the male end of the male-to-female jumper wires. That way, I can cut the wire to a more reasonable size. These wires are good because they’re stranded so they’re easier to work with in a smaller space, even better when they’re shorter.IMG_0886I’m still thinking about the power situation and I’m starting to lean toward finding a 5v supply to ditch the regulator and that large 9v adapter. I remembered I purchased this backup battery for my phone that gives a 5v 1A output. I’d like to use this over normal batteries because it’s rechargeable, and I’m out of rechargable AAs or AAAs so I won’t have to spend any more money on that.IMG_0887I have this Samsung USB cable for my phone that started acting weird months ago so I stopped using it. It had both data communication problems as well as power/charging problems, but that could have been caused by the phone itself. It reacted better to other cables that I use now though. I’ll  cut it open and see if I can use this to connect the project to the battery. If that doesn’t work, I’ll go buy a 5V 2A adapter from Sayal again.


Tutorial: Power Supplies


When I first started playing with an Arduino, I relied on USB power. Once I got into those roaming robots, I started using a battery holder I bought with the rest of the parts. In my recent projects, I’ve used power adapters that plug into the wall. With my experiences using different ways of powering my projects, I thought I’d write a tutorial that may help someone chose a supply for their projects.

Power supplies can come in different forms that give you choice based on what’s best for your project. Making a roaming robot? Go with a 4-cell AA battery holder. How about a scarf with LEDs? The lithium ion polymer (“lipo”) battery is great for wearables because it’s light and small. Sticking up strip lights above your kitchen counter? You’ll need a power outlet adapter to drive all of those LEDs. Of course, you can stray away from what a certain power supply is typically used for, as long as it can handle whatever your project is asking for.

Battery Packs


Every maker probably has a handful of battery holders lying around at any time because they’re so easy to come by. Most of the holders I have were stripped off of old toys and electronics.

The voltage that is supplied by the pack is easily calculated by adding the voltage put out by each cell. On most batteries, a mAh, or milliamp-hour, rating will be given. This is telling you how many milliamps you can draw from the battery for an hour. For example, if you have a 3000mAh battery, you can draw 3000mA for an hour, 1500mA for two hours, etc. The higher the mAh rating, the larger the capacity of the battery and the longer your project will be powered.

Power Adapters

You also probably have a power adapter lying around from an obsolete device. Inside of the “black box” is a transformer to step down the voltage, and then a rectifier circuit to make the output DC (if the output is DC). I’ll probably try writing tutorials for transformers and rectifiers once I brush up on the material. For now, all you need to know is that the adapter is converting your outlet power into power suitable for your project or device.

IMG_0752Look for the specifications printed on the adapter. The input is always the same but you need to make sure it’s an input that works for your location. In North America, we’re looking for adapters that want 120v 60Hz power, while people in other places around the world may want to look for adapters that want 230V 50Hz power. If you’re reading this, you should know what comes out of the plug next to you.

As for the output, that will vary between project and device. It is always important to know the power your project requires. For most projects, you’ll be looking for a DC supply. It’ll need to have a voltage rating appropriate for the components in your project. It is always possible to change the voltage for parts of your project using voltage dividers or regulators (to be discussed shortly) so go with the highest voltage that is required by any of your components. It is important to consider the current draw of your project as you can cause your adapter to overheat and fail if your project begins to draw more current than the adapter is rated for.IMG_0747This was a good reminder to check the specifications carefully. I accidently picked up an adapter with an AC output…IMG_0751Some adapters allow you to change the voltage and polarity of the output.

IMG_0754It is a good idea to check your power supply with a multimeter. With the variable power supply in the previous picture, the label on the switch is not very accurate so I used my multimeter to adjust the switch to the proper position. I didn’t want to open up the project to take a picture but I still wanted a picture of my lovely multimeter so this was the best I could do. (Please see the Voltage Regulation section for an extra word on measuring your supply.)

IMG_0749Power supplies will usually come with some sort of connector at the end of it. Just remember that no matter the shape of these connectors, it always leads to a couple of wires. I don’t bother looking at the connectors anymore because I end up chopping them off and stripping the wires. If you want to keep the connector, you can pick up a female connector to add to your project so that you can easily plug and unplug your power.IMG_0750This supply for my PLC shows the symbol for DC power, the dotted line under a solid line. The symbol for AC power is a sine wave. It also has circuitry so that it can work internationally as seen by the input rating.

Voltage Regulation


Sometimes, parts of your project may use a different voltage to one that your supply is giving you. The LM7805 is a 5v constant regulator that I use to power my Atmega 328 projects (unless I have a 5v supply). For other voltages, you can use other constant regulators or a variable one like the LM317.

If you are using an Arduino board, such as the Uno or Mega, there is an onboard regulator for you already. As long as you supply it with at least 7v DC, it will be happy. If you’re using a power adapter and it doesn’t have the correct barrel jack connector, you can strip the wires and power the Arduino through the Vin pin. Don’t forget to connect the ground too. One thing to note is that each pin on the Arduino can handle 40mA max, so you’ll need to consider the current draw of each component. That’s why people tell you to use an external power supply for servo motors because they’re one of those components that will draw a lot of current.

Switches can be added in various places around your project. Good places to put them are on your main power supply and the supply to major components that you’d ever want to cut power from. If you’re ever dealing with lots of power, be sure to check the rating of the switches.

About measuring your supply: Adapters can be regulated and unregulated. Regulated adapters have voltage regulator circuits built in them while unregulated adapters don’t.  When you measure the voltage of an unregulated adapter, the voltage may be higher. The voltage will drop as the load on it gets larger. I’ve never experienced any huge variations in measuring my supplies but it may happen and it could affect your project.


When choosing a power supply, you look for one that is an appropriate shape for your project and one that meets the power requirements of your project. It’s a good idea to have a multimeter around when building and testing your project to make sure you’re getting the correct voltage and current in the places you expect. As you always should while building something, be cautious with what you’re doing to ensure the safety of you and your project.

I’ve got the power

I made the decision to run out to Sayal Electronics to make it back in time for the women’s final hockey game in Sochi. If my package from Dipmicro comes in tomorrow, this weekend should be a great one.
IMG_0661The main reason for going was for some solder which I ran low on in the LED name tag project.IMG_0663Now for the power adapters. I picked up this 9v 1A power supply. It looks to be one for some old portable gaming device from Atari in 1990.IMG_0664I’m not sure if I regret this or not yet. The barrel plug is too small for an Arduino and you don’t need 9v to power a standalone Atmega chip. I have some 5v regulators from a failed project so at least I won’t have to go out and buy anything else.IMG_0662I bought another adapter, this one 5v 2A. I think this will be the one I’ll use for the desk lighting system, even if 2 amps is overkill. It definitely won’t draw that much, but this adapter was just a couple bucks. The varied output on the label kind of confuses me so I’ll have to check it with my multimeter before I use it.IMG_0666My intention was to look for barrel jacks with thru-hole pins I could plug into a breadboard or solder on a perfboard. I wasn’t satisfied with the ones I saw in the store so I decided I’ll just chop off the plug and strip the wires.

Let’s hope Canada Post shines and delivers my Dipmicro package tomorrow. (lol)