Assembling the OSHCamp 2016 Kit
An assembly guide to the random number generator kit for OSHCamp 2016.
In this post I take a look at assembling the random number generator kit – that delegates at Open Source Hardware Camp 2016 will receive – including a few tips for anyone who doesn’t have much soldering experience. Speaking of which I will be running a soldering workshop on the Sunday of OSHCamp where people can get help assembling their kits.
Generating Random Numbers
Usually when we see random we assume that by this there is no predictable sequence and the outcomes are completely unrelated, however, in the digital world it is incredibly difficult for a computer to create a truly random sequence. The vast majority of the time analysis can be done to extrapolate patterns and complex mathematical sequences in the results, meaning that these ‘random’ numbers are not truly random. When the output appears random to the eye there is usually some way of determining a complex mathematical calculation, in which the sequence may not repeat until after, for example, 200,000 values output. These are known as pseudorandom numbers.
To have true random numbers in a digital system, the best method is to use an analogue signal and an analogue-to-digital-converter so that this signal can be read by a computer.
The great thing about this years OSHCamp kit is that the random number generator is truly random! It uses thermal noise which is sampled and processed by an ATTINY44 to generate true random numbers. The kit was designed by Mark Longstaff-Tyrrell, who makes unusual electronic kits under the name of Denkimono. Mark also spoke at an Open Source Hardware user group meeting earlier in the year about what random numbers are, where we can find them and why we need them.
Kit components include 13 resistors, 4 transistors and 3 diodes. Please see the table below for the full BOM.
To begin with I like to start by soldering the smallest components in place first, such as the resistors and diodes. Personally I find it easier to put all of one kind of component on the board and secure this with Blu-Tack before turning the board over to solder the components. I find doing it this way is much more time-effective and gives neater results on the underside of the PCB, as opposed to how it looks when the legs of components have been bent to secure them. However, if you have little/no soldering experience it may be preferable to solder each component individually. One thing to note when soldering the diodes in place is to be sure that they are orientated the right way round, the correct orientation of the diodes can be confirmed against the silkscreen on the PCB.
After the resistors and diodes were secured in place I next soldered the ceramic capacitors, before moving on to some slightly larger components. Preferably, by larger components I mean slightly larger in height, as I find soldering taller components in before shorter ones can make it more difficult when resting on the underside of the board to secure these in place. I also find that this creates more room for movement with the components and that they need to be secured more than if I had soldered shorter components first.
The next tallest component which needed to be soldered in place was the DIL IC socket and then the electrolytic capacitors. The DIL socket is one component I find Blu-Tack is particularly useful for, as more often than not these can easily move and end up skewed on the board. As with the diodes you need to ensure the electrolytic capacitors are orientated correctly and once again this can be confirmed against the silkscreen on the PCB. Following these I added the piezo and push button before adding the ISP pin headers.
You only need to add the 2 x 3 pin headers for ISP if you plan on reprogramming the board at a later date, but if you do this after the seven segment display it can be a bit fiddly to get your fingers in between the display and DIL socket. I personally prefer to solder the headers first, even if you have no intentions of reprogramming the board at this time, I feel adding the pin headers is good so you have the option to do so in the future.
Once the headers are secure then add the dual seven segment display, which can be a little fiddly because there a quite a few pins and they are fairly long. Once it’s in place I would advise securing this with Blu Tack, since it’s the kind of component which can easily slip and if you’re unlucky end up with a display which isn’t flush with the board.
At this point all of the components should be soldered onto the board and there shouldn’t be any components left to solder. Now the PP3 battery clip can be screwed on to the underside of the board. Don’t tighten the screws too much initially as the GND and power cables from the clip still need to be soldered to the positive and negative terminals on the underside of the board. For neatness I think it looks much better if the wires are run between the clip and board first, before the screws are tightened fully. Once the wires are aligned cut these to an appropriate length and strip enough insulation from the end so that the wires can be soldered to the pads.
Here all of the components should be soldered into place and the only thing which should be left over is the ATTINY44, which can now be inserted into the DIL socket before connecting a 9V battery and testing the board!
Here everything should work as it’s pretty simple kit to assemble, and as soon as its been tested you now have a working random number generator!
This post will be updated shortly with a link to the GitHub repo containing the official documentation, PCB design and firmware source code for the ATTINY44.