Building a Nanode RF - in Words and Pictures
Guide created and maintained by: Ian Chilton - please direct any suggestions or corrections to: ian [at] ichilton [dot] co [dot] uk.
If you get stuck, there is a Nanode Mailing List and an IRC channel - #nanode on irc.freenode.net.
Here's how to build up a Nanode RF as a step by step guide. It shold take around an hour or two.
If you are not familar with the Nanode, see my blog post introducing the Nanode and my blog post introducing the Nanode RF & Wi-Node.
To sumarise, the Nanode RF is an Arduino compatible board with ethernet, RFM12B wireless, SRAM and Micro-SD card.
I am maintaining a a page of useful Nanode links which are worth keeping an eye on as there is information like pin usage and pointers to useful code and libraries.
Some other useful information:
Layout and identify the components from the kit.
(Note that i've got the 10nF and 22pF capacitors labelled the wrong way round. There are 4x 22pf which have black dots on the top and 2x 10nF)
Here are all the components to build your Nanode RF:
Ok, we're ready to start. Here is the PCB ready:
On the bottom, you can see the optional MCP79410 (middle) and 11AA02E48 (top) are pre-soldered.
Start with the resistors. Bend each leg of the resistor over 90 degrees, right next to the body. The last colour on all of the resistors is brown - it's recommended that you align them all in the same direction and have the brown at the same end.
First we add the seven 10K resistors - their colour code is Brown, Black, Black, Red. There are five in the middle and two at the right hand side.
Add the four 51R resistors - their colour code is: Green, Brown, Black, Gold.
Add the four 270R resistors - their colour code is: Red, Purple, Black, Black. Two are in the middle and two at the right hand side.
Add the 2k resistor at the top of the line of resistors. It's colour code is: Red, Black, Black, Brown.
Add the 1R resistor in the middle of the line of resistors. It's colour code is: Brown, Black, Black, Silver.
The silver and gold colours look very similar in certain light conditions - if in doubt use a multimeter to check the value before you fit it.
Add the 10R reistor at the bottom of the line of resistors. It's colour code is: Brown, Black, Black, Gold.
The silver and gold colours look very similar in certain light conditions - if in doubt use a multimeter to check the value before you fit it.
(Need new photo!)
Fit the four DIL socket's for the IC's as shown in the picture. Note that one end has a small notch in it - this signifies pin 1 and should match up with the notch on the legend.
The 8-pin 23K256 (SRAM) over the 'H' (London Hackspace) logo is optional, but it's worth fitting the socket now even if you are not going to insert the IC. It's not clear on the board but pin 1 is the same end as the others.
It's best to tack diagonally opposite corners to hold the socket in place whilst the rest of the pins are soldered. Make sure they are fitted flat on to the board.
It's since been suggested that you delay the installation of the DIL sockets until after step 12 as the capacitors are lower so you can't push them in while soldering if the sockets are in place.
Fit the two crystals. The 16Mhz (labelled 16.00SCA) should be on the right, next to the ATMega328 and the 25Mhz (labelled 25.00SCA) should be at the top, next to the ENC28J60.
Crystals should be inserted so that they are lifted approximately 1mm above the pcb to prevent possibilty of metal can shorting to vias beneath.
Add the four 22pF ceramic capacitors to each side of each of the crystals. They are marked with 22 (don't confuse them with the two 10nF's which look the same but are labelled 103).
Add the seven 100nF ceramic capacitors. They are blue and in three groups - two at the left of the ENC28J60, three at the right of it and two at the right hand side of the board.
Note that there is a spare location for a 100nF capacitor between pin 1 of the ATmega328 IC and the reset switch. Do not fit any component in this location.
Fit the two 10nF ceramic capacitors - to the right of the magjack. They are labelled 103.
Add the first of the MCP1702 3.3v voltage regulators - on the left hand side of the board near the 25Mhz crystal. Make sure the flat edge aligns with the flat edge on the legend.
Add the second of the MCP1702 3.3v voltage regulators - on the right hand side of the board near the 16Mhz crystal. Make sure the flat edge aligns with the flat edge on the legend.
Fit two of the Electrolytic capacitors: one at the top left near the MCP1702 and one at the right hand side next to the 16Mhz crystal. The third, in the middle to the right of the magjack is optional and will be fitted later if external power is required. Ensure they are fitted the correct way round. The long leg needs to go to the + symbol on the legend and you will be able to see the white side on the photos.
Add the two LED's - one red and one green. Both are at the right hand side of the board. Ensure the long leg's (and round edge) go to the + symbol on the legend which is at the edge of the board.
Add the reset switch under the LED's.
Add the mini USB connector - next to the LED's. This is used for power only and is optional if you are going to power the board with an alternative source. Use plenty of solder in the big pins to give some strength for when you are plugging and unplugging.
Add the programming header - the 6-pin right angle header on the right hand side of the board. This is used for both programming and to supply power to the board.
Add the Arduino shield connectors. There are 2 x 6 way and 2 x 8 way SIL sockets. Make sure you get them in the inner lines of holes and that they are fitted straight and vertical. Best to tack one end pin whilst you hold them straight - check the alignment then solder the remaining pins in place. You could also use a shield to keep them aligned if you have one handy.
It's been suggested since that the magjack is delayed until after the RFM12B module is in place. If you are going to fit the RFM12B, it's worth doing this as it allows easier access to the RFM12B without the Magjack getting in the way.
Add the magjack at the left hand side of the board. Use plenty of solder in the big holes to give some strength for when you are plugging and unplugging.
You have nearly completed the board. However, before we add any of the (expensive) IC's, we need to check that they will receive the correct voltage.
Use a multimeter (in DC mode) to measure the voltage between pin 7 of the 74HCT125 (GND) and pin 28 of the ENC28J60, as shown in the photo. You should receive something around 3.3v.
Measure the voltage between pin 7 of the 74HCT125 (GND) and the bottom pin of the 3 pads below the 16Mhz crystal, as shown in the photos. This should give somewhere around 3.3v.
Measure the voltage between pin 7 of the 74HCT125 (GND) and the top pin of the 3 pads below the 16Mhz crystal, as shown in the photos. This should give somewhere around 5v.
WARNING: Only proceed if all of your voltage readings from above are correct - if they weren't then you have a problem with your build.
You need to add a short wire link between the bottom pin (where you measured 3.3v above) and the middle pin of the 3 pads. This connects 3.3v to the RFM12B and other components (Need to confirm which!).
WARNING: Please note that only advanced users should ever use the board with anything other than the wire link in the bottom position with the RFM12B or the SRAM chips fitted as this will send 5v to 3.3v only parts.
Some people were seeing the ATMega328 brown out and reset when initialising the ENC28J60. This is fixed by adding an extra 10uF electrolytic cpacitor between Vcc and GND. The best place for this is the space for the ISP connector. Long leg goes to pin 2, short leg to pin 6.
If you are going to fit the optional RFM12B wireless module. Place the module on the pads (observe the orientation - crystal to the outside) and solder each pad onto the board from above.
If you fitted the RFM12B module, you need to add an antenna - this is a piece of wire of approx 82mm, which will act as a quarter wave for the 868Mhz RF.
Steps 28, 29 and 30 are only required if you require the ability to power the board from an external power supply (not the programming header or usb).
If you require the ability to power the board from an external supply (instead of the FTDI or USB), fit the 1N4001 reverse polarity protection diode. It's right next to the RFM12B. Note that the banded end is lined up with the band on the pcb legend (away from the edge of the board)
If you require the ability to power the board from an external supply (instead of the FTDI or USB), fit the final 10uF Electrolytic Capacitor. It's above the 1N4001 you just fitted and right behind the Magjack. Take note of the polarity and fit the long leg to the plus sign (white strip up towards the 10nF's).
If you require the ability to power the board from an external supply (instead of the FTDI or USB), fit the 7805 voltage regulator. It needs to have the heatsink outwards. If you are using more than 7v, you'll also need to fit an additional heatsink to keep it cool.
I'm not actually going to solder mine in as I don't need it at the moment and it gets in the way sticking out there.
If it's supplied and not pre-soldered to the board, fit the MCP7941x. You should apply a small amount of solder to each pad (on the back of the board). Place the IC over the pads using some tweezers (ensure you note pin 1 to get it the correct way). Use your soldering iron to heat one of the pins and melt the solder, affixing the IC to the board. If you tack opposite corners first, ensure it's placed correctly and then you can leisurely solder the remaining pins without fear of it moving.
You also need to affix the small 32.768khz watch crystal for the real time clock. This can go either way around.
Note - after the production of the board, it was found that the MCP7941x requires 2x 22pF ceramic capacitors fitting. Without these, the RTC lost about a minute per day. To resolve this, fit a capacitor from each leg of the cystal to ground. I'll work out the best way to do this and add further instructions and photo(s) when I can. This is not required if you use a DS1307 IC instead of the MCP7941x.
The RTC and SRAM IC's are volatile which means they will loose their contents when the power is removed or the reset button is pressed. If you wish to retain the contents of these, you need to fit a 0.22F 5.5v super capacitor across the provided pins, noting the positive lead. Connections for a BAS70 MOSFET are provided to allow charging of the super capacitor but this is not required when using an MCP7941x as this contains the required circuitary for charging the super capacitor.
Photo to follow.
To Follow.
Fit the IC's in their respective sockets. Note the spot next to pin 1 and ensure you insert them in the right way.
IC's usually come with their legs pointing slightly outwards. To get them to fit easily into the socket, you should put the legs flat on a desk and rock the IC slightly to bend the pins inwards - do that at both sides and try again to fit into the socket.
Congratulations, you have completed the build of your Nanode RF!
We can now see if you have done it successfully!
Connect a 5v FTDI cable or Nanode Programming Adapter to power the board. If after a few seconds you see the LED(s) come on and flashing then the microcontroller is working and running code. If not, you should remove power and check over the board and connections.
If you are using a Nanode programming adapter and your system prompts you for drivers, you can download those here.
If you are not using a Nanode programming adapter, you can use a normal FTDI lead but ensure the pinouts are as follows (left to right - left nearest the usb connector):
You can test the MCP7941x Real Time Clock out by using my Arduino MCP7941x Library and running the example sketches.
If you have two boards with RFM12B modules, you can test them by using my RFM12B Test code.
I'm also aiming to provide code to test other aspects of the board and some working examples of Nanode usage, but in the meantime i'm collecting useful code snippets and links on my Nanode Information Page.