====== Arduino based node ======
===== Components =====
* ATmega328 (with Arduino bootloader)
* RFM69HW 868MHz or 915Mhz module
* MCP1700 3.3v Voltage Regulator
* 28pin DIL IC Socket
* 2x 1uF Ceramic Cap
* Various headers and sockets
* Stripboard
===== Guide =====
==== Step 1 ====
* Solder 28pin DIL IC socket to the strip board
* Cut traces along the centre of the socket
* Check that there is no conductivity between the two halves
{{:guides:p1010049.jpg?300|}}
==== Step 2 ====
* Solder voltage regulator with 1uF capacitor
* Connect voltage output to Vcc as well as ground
* Solder header for Serial (Tx and Rx)
{{:guides:p1010051.jpg?300|}}
==== Step 3 ====
* Program the ATmega328 with the arduino bootloader
* Upload simple script to the micro
* Connect up the usb-serial convertor and test that everything is working
==== Step 4 ====
* Solder connecting wires to RFM69HW (GND, NSS, SCK, MISO, MOSI)
* Line up with the ATmega328's corresponding pins. You'll need to bend your connecting wires a bit to fit through the holes in the strip board. Solder these in place.
* The other 2 pins that need to be connected are VCC and DIO0 which are best connected with insulated wire.
* VCC -> 3.3v
* DIO0 -> pin 2 (Interrupt 0)
{{:guides:p1010056.jpg?300|}}
==== Step 5 ====
* Upload repeater script to test RFM69HW
* Check either with Funcube or that it is repeating to other nodes
* Its been found that some modules are slightly off frequency and so need adjustment to match. The easist way is to use a funcube or RTL dongle and then adjust the frequency to line up with other nodes.
==== Step 6 ====
* Solder antenna to ANT and GND pins
{{:guides:p1010058.jpg?300|}}
===== Schematic =====
{{:guides:arduinodesign.png|}}
===== Uploading new arduino scripts =====
* As the current arduino is programmed just to use its internal oscillator it has a special board identification which needs to be added to your IDE. You need to find the boards.txt and add to the end
For Arduino 1.6.1 use this script:
##############################################################
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.tool=avrdude
atmega328bb.upload.protocol=stk500
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.tool=avrdude
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x07
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard
Otherwise for older versions of Arduino use this:
##############################################################
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.protocol=stk500
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x07
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard
* On Mac OS X: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/
* On Windows : hardware/arduino/
* On Linux: /usr/share/arduino-1.0.5/hardware/arduino
though the version number might be different.
* Restart the Arduino IDE and you can now select ATmega328 on breadboard and upload
===== Programming =====
* Get the latest repeater code from [[https://github.com/UKHASnet/UKHASnet_Firmware|github]]
* Make sure you update your node ID and location and other settings
* Upload via serial to the board.
* Some additional programming notes with tips for Windows users can be found here: [[:arduino_stripboard_windows_programming|Programming Arduino Nodes using Windows]]
====== Troubleshooting ======
* Everything appears to run 8x slower
* * Using an ICSP Programmer, 'Burn Bootloader' in the Arduino IDE to set the fuses. This will disable the DIVIDE-BY-8 function.