House of Hacks

Wednesday, November 26, 2014

Bits of Binary: How to add binary numbers


Addition is probably one of the most common operations when using binary numbers. And it's really easy to do. We'll see how easy in this episode of Bits of Binary at the House of Hacks.

How to convert between decimal and binary.
Bits of binary playlist

For a written transcript, go to How to add binary numbers.

Music under Creative Commons License By Attribution 3.0.
Intro/Exit: "Hot Swing" by Kevin MacLeod at
Incidental: "Zap Beat" by Kevin MacLeod at


One plus one equals... huh? I'll talk about how this actually makes sense, today at the House of Hacks.


Hi Makers, Builders and Do-It-Yourselfers. Harley here.

In the last episode of Bits of Binary, I showed how to convert between decimal and binary numbers. In this episode in the series, we'll look at how to add binary numbers together.

Remember in grade school when you had to memorize this addition chart?

Well, OK, maybe you didn't have to memorize it, but I sure did.

This table is a matrix with the 10 numbers found in the decimal system, 0 through 9, on both the row and column headers. Each cell contains the sum of its row and column header. This gives us the sums for all the single digit combinations. 0+0=0 all the way up to 9+9=18. Multi-digit numbers can be added by simply thinking of them as multiple single digit combinations.

Well, binary has something similar, but much, much smaller. Since there are only two numbers in the binary system, 0 and 1, the table only has two rows and two columns. And it looks like this.

Or if you want to write it a slightly different way as equations, it looks like this.

Once you know this table, the process of adding in binary is exactly the same as adding in decimal. For example let's look at the decimal numbers: 321 + 181. Staring with the units: 1+1 = 2, 2+8 = 10 so write 0 and carry a 1, 1 + 3 = 4 + 1 = 5.

Similarly, in binary we'll look at 1011 + 10. Starting with the units on the right: 1 + 0 = 1, 1 + 1 = 10 so write 0 and carry a 1, 1 + 0 = 1, 1 + 0 = 1 again.

That's it. Addition is short and sweet. Thanks for watching this episode of Bits of Binary. In the next episode, we'll look at how to subtract binary numbers.

I've created a playlist over here that will be filled in as new episodes in this series are added.

Thanks to everyone who has subscribed to this channel and liked the videos.

Be sure to leave a comment if you have any thoughts or questions on this topic.

And until next time, go make something. It doesn't have to be perfect, just have fun!

Sunday, November 16, 2014

How to replace intermittent connectors


Sometimes plugs fail. Today at the House of Hacks we tear down a Better Life Devices BLD T250 transdermal stimulator to change the plugs from unreliable barrel connectors to more reliable 1/8" audio connectors. The general process can be used for any type of small device.

Referenced video: How to desolder electronics

For a written transcript, go to How to replace intermittent connectors.

Music under Creative Commons License By Attribution 3.0.
Intro/Exit: "Hot Swing" by Kevin MacLeod at
Incidental: "Dispersion Relation" by Kevin MacLeod at


This medical device is going to get an upgrade today at the House of Hacks.

My wife has chronic back issues and the other week had a big flair up. The chiropractor showed us a home electronic stimulation unit that he was willing to sell us at a very steep discount because he wasn't terribly impressed with their reliability. He said they worked fine as long as they worked but reported they had a tendency to develop intermittent faults and then fail altogether.

As I looked it over, before buying it, I noted the connectors on the side. A similar design used to be standard for photography flashes and is a well known failure point. I guessed that this was probably the problem but, if it wasn't, figured it would be easy enough to figure out what was.

So we went ahead and bought it, knowing I would probably have to fix it at some point.

Sure enough, after about two weeks of use it started working intermittently. In this episode, I'll show how I upgraded this with a more reliable solution.

At the local electronics store I got a couple 1/8" audio extension cords. The plan was to cut the ends off and put one end in the device coming out as a pigtail and splice the other end onto the wires for the pads.

But first I need to open the unit. I start by sliding this cover off, taking off the two knobs with a gentle pull, they're just press fit on, and removing the battery. It's a good idea to make sure the power is disconnected before doing any sort of repair on electric devices.

Next is to open it up. This took me a little bit to figure out as there are a couple hidden screws. The first one is under this label. Fortunately the label is made out of thick plastic and held down with some sticky but removable adhesive, so it peels off without too much trouble. Once off, a philips head screw is revealed.

There's another screw on the back under this belt clip. One side of this clip has a slot designed to slide a screw driver into. Lift up with a fair mount of pressure to pop off the clip. And there's the second screw.

Finally there are two plastic clips accessed through the battery cover. Pulling the two parts of the case apart at the bottom causes those clips to pop apart and the case finally separates.

The circuit board simply rests in place. To remove it, the LEDs may have to be slid out of the holes in the case before lifting the board out.

And that completes the disassembly.

These are the original cables with their problematic ends. They plug into these connectors on the board.

These will be replaced with the ends from this audio cable. I'll cut the ends off the cable and replace the connectors on the board with the female audio connector and splice on the male audio connector onto the end of the electrode cable. This will result in a much more reliable connection.

To remove the connectors, I'm just going to use a bit of desolder braid to remove the solder. Once the solder's removed, the connectors just drop out of the holes.

This is a cheap brand of audio cable that I've had about 50% failure rate with. So before doing anything to this cable, I'm testing it with a simple continuity check. I make sure I don't have any shorts between the tip and ring and that I do have continuity between the tip on both ends and the ring on both ends.

Now that the cable checks out, I'm just going to cut off the ends. Then using some wire strippers I'll carefully remove the insulation. With audio cables, the outside conductor is wrapped around the inside one. So after taking off the outside insulation, the wires first need to be gathered together and twisted. Then the insulation can be taken off the inside conductor.

And then the other end gets the same treatment.

With the connectors exposed and twisted together, now I'll tin the ends. This makes it much easier to solder when things are put together.

Now the wires just go in the holes the old connectors came out of. For this particular application, it doesn't matter which wire goes in which hole. For other types of devices, the outside ring should match up to the outside ring on the original.

A little solder finishes the connection and then the excess wire can be trimmed off.

That finishes the electrical side. Now a dab of hot glue makes a mechanical connection to act as a strain relief so there's no undue stress on the solder joint.

Now to modify the cables that plug into the device.

Cut off the original ends and split the two wires down the center. Expose the wire with some wire strippers, twist the wire together, add a bit of heat shrink tubing on the wires, add some tinning to the wires and solder the new ends onto the old wires.

Generally, I like to make a mechanical connection before soldering, but this particular wire was too brittle to bend well so I used the solder as both a mechanical and electrical connection.

Finally slide the heat shrink over the connectors and heat it up to shrink it around the connection. In total there were three pieces of heat shrink tubing for each cable: one for each of the wires and a larger one around the whole thing.

And now it's time to reassemble the device. This is just the opposite of taking it apart. Drop the circuit board into one side of the box, sliding the battery connectors into place. The other side goes back on top with the new connectors coming out of the original holes. The screws go back in. The label is replaced and then the knobs slide back onto the controls. Finally, the battery can be placed in. Before the clip goes back on, I'm going to test it. Yeah, nothing like testing it on yourself. As I turn up the intensity I can feel it working. Success!

A side effect of using these connectors is they act as a strain-relief, break-away connection. If the control unit somehow has forced applied to it, like it drops out of a pocket, it simply comes apart at the new connectors rather than putting a lot of force on the wire/connector/PCB system like the original connectors did.

Finally, I'm thinking about making a DIY version of this device. If you'd be interested in seeing a video about this, let me know in the comments.

Thanks for watching and until next time, go make something, it doesn't have to be perfect, just have fun!

Thursday, November 13, 2014

How to desolder electronics


Taking apart soldered connections is a handy skill for a maker. In this episode, we look at three techniques to do this.

For a written transcript, go to How to make desolder electronics

Music under Creative Commons License By Attribution 3.0.
Intro/Exit: "Hot Swing" by Kevin MacLeod at
Incidental: "Mining by Moonlight" by Kevin MacLeod at

Associate links

Paladin Tools 1700 Desoldering Tool With Standard Tip
Aven 17542 Desoldering Wick, 2.5mm Width, 5' Length


Today at the House of Hacks we're going to look at how to take apart electronics.

Hi Makers, Builders and Do-It-Yourselfers. Harley here. When working on electronics, a time will come when you have to take apart a solder joint. There are three main ways of doing this that we'll look at in this episode.

The first is to simply apply some heat and gently pull the connection apart. If you're just disassembling something without the need to put it back together and there's no mechanical connection, this works well. Like for scavenging these diodes and capacitors.

But this does leave a lot of solder on the connection so it may not work if you need to reassemble the joint. Also, if there's a mechanical connection, like wires that are twisted together, this may not work too well.

The other two ways physically remove most of the solder from the joint: the desolder pump, also known as a solder sucker, and solder wick or solder braid. Both these work well for connections that also have a mechanical component to them. Or electrical components with multiple points that all have to have their solder removed becoming apart. Like this LED sensor.

The desolder pump essentially vacuums up the liquid solder. There are a couple different designs, this one is spring activated, but they all basically work the same way. You push down the plunger, melt the solder, put the tip next to the connection and press the release button. This causes a vacuum in the tip and just pulls the solder right up.

Sometimes you have to do this a couple times to get all the solder out. Fancy solder stations may have a tip for the iron that has the suction mechanism built into it.

The desolder wick, or braid, works with capillary action on the melted solder. To use it, just put the braid over the connection and then heat it with the soldering iron. The braid will heat up, melting the solder and then capillary action will pull the solder up into the braid.

Depending on the size of the connection and the amount of solder on it, you may have to move to an unused spot on the braid a couple times to get all the solder out. It is a one time use tool. Once a spot of braid is full of solder, you trim it off and throw it away.

I originally learned with a solder sucker but recently started using the braid and I think it's becoming my preferred method of removing solder.

Thanks for watching and until next time, go make something. It doesn't have to be perfect, just have fun.