HackCNC Electronics Assembly

From Open Hardware Miniconf
Jump to: navigation, search

The CNCPlotter board designed by Luke Weston for HackCNC uses mostly surface mount parts, but it is provided almost fully assembled so you only need to finish off a few of the easy parts. We could have provided it fully assembled, but then you wouldn't have got to do any soldering, and where's the fun in that!

Before getting started, a quick word about static electricity and how to treat a PCB nicely. You may have heard that electronics is "static sensitive", and that touching the leads of some parts can be enough to kill them. To some extent that's true, and it's a good idea to avoid zapping parts with static electricity if you can. The damage can be subtle and not prevent the part from working initially, but cause it to fail over time, or it could cause immediate failure. However, most electronics is surprisingly robust, particularly once the parts have been fitted to a PCB (printed circuit board). The result is that you should be careful, but not afraid. It's perfectly fine to pick the board up in your hands and touch parts on it, but on the other hand you shouldn't go out of your way to rub it on a polyester jumper or scuff your feet on the carpet and "zap" the board just to see what happens! As long as you're sensible, it'll be fine.

Time for the fun stuff. Your kit of electronic bits should look like this, including the pre-populated PCB, a micro-USB cable, a 20x4 LCD module, and a zip-lock bag of loose parts:

CNCPLOT-01-kit.jpg

Clear a good spot on your bench, and empty the parts out of the zip-lock bag. Make sure you keep them all together and don't let the capacitors roll off the table. These are the parts you should have:

CNCPLOT-02-parts.jpg

The first parts to install are the square grey variable resistors, commonly referred to as "trimpots".

All three trimpots are the same value so they are interchangeable and you don't need to worry about which one goes where. They have 3 leads laid out in a triangular pattern so that they can only be inserted in the PCB one way around. The leads may end up bent in transit, so bend them straight with your fingers and pop them into place:

CNCPLOT-03-trimpots.jpg

Now if you turn your PCB over to solder them in place, you'll have a problem: the trimpots will probably fall out! The trick is to hold them flush against the board with one hand and gently bend out the leads on the bottom with the other hand, so they end up like this:

CNCPLOT-04-bentlegs.jpg

Then they'll stay in place with the PCB upside down so you can solder them.

Time for soldering. If you haven't done this before it may seem intimidating, but it doesn't take long to get the hang of it. If you're confident with soldering you can jump right in, but if you'd like assistance please talk to one of the helpers in the room for a quick introduction. If you're reading this before the miniconf and want to do a bit of homework, there's a 6 minute video introducing soldering at www.freetronics.com/how-to-solder.

Once you've soldered the trimpots into place, use a pair of sidecutters to trim the leads off flush with the top of the solder. Be careful though: when you cut a lead it can go "sprooiiiingggg" shooting off at great speed like a micro-sized javelin in search of the nearest eye, so it's best to hold the lead with your fingers while you cut it. Don't brush the lead offcuts onto the floor: please push them aside into a little pile or put them straight into a rubbish bin.

Next up is the black tubular electrolytic capacitors. There are 2 things to be careful of with these parts. Firstly, they are "polarised", which means they only work one way around. Worse still, if you put them in backwards they don't merely not work: they have a habit of exploding in a very messy, smelly way! If you look at the body of the capacitor you'll see that one of the leads is marked "-" (negative), and also that the two leads are different lengths. The long lead is positive ("+"), and the short lead is negative. If you look closely at the PCB you'll notice that the holes are also marked, with a + next to the positive side. Be VERY careful you put them in the right way around!

Secondly, because the capacitors are quite tall and you'll be mounting an LCD module on top in a moment, they have to lie flat on the PCB instead of being mounted vertically as they normally would. It's easiest if you bend the legs first before you fit them to the PCB, like this:

CNCPLOT-05-caplegs.jpg

Then put them in place, bend the leads out under the PCB to hold them in place, and solder and trim them. This is where they go:

CNCPLOT-06-caps.jpg

Next are the screw terminals and servo header. There's a trick to these, too: they need to go in a certain way around, with the wire hole facing the outside of the PCB. That's not as simple as it sounds though, because there are slots on both sides of the body and at first glance it's not obvious which way around they need to go. Look carefully at both sides and you should be able to work it out.

The other problem is that the leads on the terminals are short and thick, so you can't bend them out to hold them in place. You either need 3 hands and some care to hold them in place while you solder the first lead, or use some tape or blu-tac to hold them on temporarily. This is where they go:

CNCPLOT-07-headers.jpg

The female header for the LCD goes on the PCB near the screw terminals. Once again, hold it in place with tape or blu-tac while you solder it on. The header isn't polarised so you can fit it either way around, but it's important to get it vertical. Solder on one leg first, then check its position before soldering the rest:

CNCPLOT-08-lcdheaders.jpg

The male header for the LCD goes on the LCD module itself. Be careful: there are two sets of header mounts on the LCD, and you need to fit it to the upper position as shown in the photo. You'll see that the male header has one side that's short, and one side that's long: the short side inserts into the module so that the long side protrudes. As before, tape or blu-tac in place, then solder just one pin and check the alignment before proceeding with the rest:

CNCPLOT-09-lcdheader.jpg

When the LCD module is fitted onto the PCB using the headers it should align like this:

CNCPLOT-11-complete.jpg

The CNCPlotter board is now electrically complete and functional. You can plug it into your laptop using the supplied micro-USB cable and start setting up the software, or you can use the supplied M3 bolts, nuts, and spacers to mount it on your HackCNC chassis through the holes in the LCD module and PCB.