Wednesday, January 25, 2012

Quick Tip: Making Momentary Buttons Breadboard Friendly

2012-01-22 22.40.41Momentary buttons are probably one of the most common components in most projects.  Unfortunately, most buttons are not made to be inserted into a breadboard.  Most do line up and some will work if you are very nice to them.  However, the pins are normally curved and very short so their ability to connect with the breadboard is very marginal and can lead to problems that may at first seem like issues with your microcontroller or the button itself.  More than likely the issue is really just that the button isn’t making good contact with the circuit.

2012-01-22 22.42.58To eliminate this problem from my projects, I use the following process to make the buttons breadboard friendly.  I recommend keeping a set of these specifically for breadboarding to save you time down the road.  However, if you need to you can certainly reverse these modification later to use the buttons in your final product.

Basically, what I do is attach extensions to the “pins” coming from the button so that they fit tighter and deeper into the breadboard.  This is certainly not an original idea.  Many before me have done the same.  However, since I was making up several of these recently I decided it would be good to document and reference later for others getting started in electronics.

2012-01-22 22.45.29I start by getting a piece of male pin headers – one for each pin on the button.  Hold the plastic housing with your fingers or a pair of pliers and then using some needle nose pliers, pull the pins out of the plastic.  These pins are much more rigid than just wire and are easier to insert into the breadboard without worrying about them bending.
2012-01-22 22.52.11Once you have the pins out, find the holes on a spare breadboard that align with the pins of your button and insert the new header pins into these holes.  Only push them in far enough that they are secure and try to make sure they are all sticking up the same height.  We use this technique to ensure that when we solder the pins to our button that they will line up perfectly with the breadboard.

2012-01-22 22.57.48Next, we will place the button on top of the standing pins and align it so that the buttons pins are on the outside of the new pins.  We’ll next add some alligator clips to hold the two parts together to be soldered.  So, don’t be overly concerned about getting everything perfect at this point.  You may need to bend the pins on the button out just slightly to make them easily fit on the outside of all the new pins.

2012-01-22 23.05.09Using the alligator clips, secure one corner on properly.  Make sure that the new pin extends as high up on the button’s pin as possible so that we get good contact at least on the top & bottom of the button pin.  If there is a curve or loop in the button pin, don’t worry about trying to straighten it.  It will not be a problem.  That gap will easily fill in with solder.  Once you get one of the clips on then do the opposite corner and then the other two pins.

2012-01-22 23.10.07Now that you have everything secure, it’s a simple process of soldering all the pins together.  You may accidentally solder your clips to the pins.  This is not a problem.  A simple touch of the soldering iron will cause it to release without undoing the main solder joint if done quickly.  Be careful, the clips can get hot quickly in this process.

2012-01-22 23.10.37Now you have a button perfect for use in a breadboard that you can depend on to give you a good connection to the rest of your circuit and loosen with use. 

This same technique can be applied to many types of components with similar types of connectors that are not necessarily breadboard friendly. 
Enjoy and please share your projects or suggestions in the comments!

Wednesday, January 4, 2012

Making a Gadgeteer DaisyLink Extender Module

LEDModuleChainI’ve been working on designing a .NET Gadgeteer DaisyLink module for a project I’m working on and ran into a limitation of the GHI Extender module that I thought warranted an improvement (aka “hack”).  I’ll detail the steps I took to convert a GHI Extender module into a DaisyLink Extender module in this post.

In case you’re unaware of what DaisyLink is…in a nutshell, it’s a way to chain together Gadgeteer modules so that you only have to use a single socket.  An example of such a module is the GHI Smart Multicolor LED module.  On a DaisyLink module there are two sockets – the upstream socket (the one going toward the mainboard) and the downstream socket (the one going away from the mainboard). 

The communication for DaisyLink happens using the I2C protocol and a neighborhood bus.  It isn’t the intent of this post to explain in detail how DaisyLink works.  For that info, see the .NET Gadgeteer Module Builders Guide.  However, I mention this because the neighborhood bus is the reason for this hack.  All the pins in the two sockets on a DaisyLink module can be passed straight through from one socket to the next except the neighborhood bus (socket pin #3).  This pin has to be activated/deactivated independently as this is the mechanism that the mainboard uses to identify which module it is communicating.

ExtenderModuleThe GHI Extender module is in my opinion the most useful of all Gadgeteer modules since you can basically do anything with it.  Before I started understanding how DaisyLink worked, I always assumed that the Extender module had two sockets on it so that it could be used to develop DaisyLink applications since I otherwise see no application for the other socket except as a way to tie two cables together.  The pins on the two sockets are directly connected together and to a header on the edge of the module.  As I mentioned above, this is a problem since I need to be able to control the value of pin #3 independently on each socket.  So, it’s time to pull out the soldering iron!

2012-01-03 21.57.15.highlightedIf you flip the Extender module over and rub the solder mask a little to polish it, you will see the circuits.  I’ve highlighted in green the circuit for pin #3 that goes to both sockets and to the header pad.  Note that the left-most junction is where the circuit connects to what we will refer to from now on as the downstream socket.  We’re going to add an additional pin to the header called “P3*” (since * is used by Gadgeteer to denote downstream sockets) and make the header labeled “P3” only connect to the upstream socket pin #3.

2012-01-03 21.59.20

 

We’ll begin by using a box cutter or Xacto knife to scrape the solder mask off the circuit on both sides of the junction we want to bypass.

2012-01-03 22.05.37

 

 

 

Next, we’ll use the box cutter to make four deep cuts through the copper circuit we just exposed and then we will remove the sections.  The cuts to make are shown in red on the picture to the right.  Remove all the copper between each set of parallel cuts.

2012-01-03 22.28.37

 

Now that pin #3 of the downstream socket has been isolated, we need to connect the two circuits that we just cut back together so that the upstream socket pin #3 will be connected to the “P3” header.  Start by using the box cutter to scrape a little more of the solder mask off the copper on the right side of the top circuit we cut and below the bottom circuit we cut.  Now, take a thin wire and solder it to the two pieces of exposed copper.  If you have some Kapton tape to stick down the wire while soldering, it will make it a lot easier.  However, you can manage it w/o if necessary.  It also helps if you tin the wire with some solder before attempting to connect it to the PCB.  You will probably not get a large bead of solder to stick to the tiny piece of copper.  As long as you get enough so that the wire is secured that will be sufficient.

2012-01-03 22.37.32We’re done on the back side of the PCB.  Next we’ll attach the male headers to the board.  Although the module has 10 header holes, we will need a section of header that has 11 male pins.  To make it easier to solder every square, put the header into a spare breadboard and put the Extender module on top.  I also like to put an extra piece of header underneath the module on the other side to give it some support and help ensure it stays flat.

Take a small piece of thin insulated wire and strip a very small amount off one end and tin it with some solder.  We’ll solder this to pin #3 of our downstream socket.  Note that in the picture on the right, pin #1 is in the bottom left corner of the socket.  All the even numbered pins are in the top row and the odd numbered pins are on the bottom row.  So, pin 2012-01-03 22.47.16#3 will be the second pin on the bottom row.  It will greatly simplify soldering if you have a tiny alligator clamp that you can clamp the wire to the PCB so that the exposed end of the wire is lying on top of the pad for pin #3 as is shown in the picture.  If you have a flux pen, it would be a good idea to add a little flux to the SMD connectors before soldering.  However, if you take care and get it done in one heating you should have no problems w/o additional flux.  Use your soldering iron to heat the wire and pad so that the reflowed solder connects the two together.  You may need to add a tiny amount of additional solder.  Just be careful not to bridge any of the other pads.  Solder the other end of the wire to the extra header pin.

2012-01-03 23.14.05Let it cool a few seconds and then you can remove it from the breadboard.  Take caution when removing it as the extra header pin could easily snap off if torqued side-to-side.

Finally, to help protect the uninsulated wire we added to the bottom side of the board I created a label in Excel and printed and taped it to the underside of the board to help label the extra header in case some day years from now I forget why it’s there.

Now that I have a good way to prototype, it’s time to go finish my new DaisyLink module!  Thanks for stopping by.