There is a lot of information distributed across this forum on how to build nodes for TTN. I'm going to summarize how I built my first TTN node using an Arduino Uno and an RN2483 radio module. See this as a "How to get started" tutorial for first time builders. There are a lot of things this design can improve on, but this is at least a good place to start.
What you will need:
- Arduino Uno (an Arduino Nano, or any other ATmega 328p, or Arduino compatible board should work too)
- Microchip RN2483 LoRa module
Steps:
Solder wires to the pins marked with red dots in the top view diagram below. It is better to use stranded wire, as solid core wire tends to easily break off when you solder directly to the radio's pins. An alternative way is to use VeroBoard.
You might also want to add a 8.6cm piece of wire to pin 23 (RFH) to act as antenna. Solid core wire does however work better in this case to keep the antenna straight.
An example of how I did this can be seen in the following photo:
Now connect the RN2483's wires to the Arduino like this:
RN2483 pin name <--> Arduino pin number
UART_TX (6) <--> 10
UART_RX (7) <--> 11
RESET (32) <--> 12
VDD (34) <--> 3.3V
GND (33) <--> Gnd
In my case it looks like this:
Next on to the software side.
Download the code from my github repository: https://github.com/jpmeijers/ttnmapperarduino
You will need to copy the rn2483 folder inside the libraries folder to your computer's Arduino libraries folder.
Open the file TXfastViaTTN.ino
you downloaded from my repository using the Arduino IDE.
On line 66 of this file it reads myLora.initTTN("XXXXXX");
Replace the X's with a TTN address. The easiest is to use a testing address, which is one starting with 03FF. (03:FF:xx:xx reserved for testing). Omit the colons when typing in the address. Note that this is a hexadecimal value, so numbers (0-9) and the capital letters A-F are valid.
Program the code onto your Arduino. If it runs, the LED on the Arduino should be constantly on, except for going out for 100ms once every 5s. This means it is transmitting packets to TTN. If you do not see this behaviour, check your wiring.
If you are in the reach of a TTN gateway, you should now see your messages arriving through the TTN API at:http://thethingsnetwork.org/api/v0/nodes/<the address you chose for your node>/
You should have your first working TTN node now. Change the code, experiment, and let us know what you built!
Some more examples of my improvements to the Arduino+RN2483 combination:
Arduino Uno with RN2483 shield. The design of the shield is on my Github page.
Arduino Nano, surfacemounted on one side, with the RN2483 on the other side. I can provide this PCB design if someone needs it.
The idea for this last node is to use it as a sensor for ttnmapper.org. To power it I will use either a USB power bank, or two AA batteries.
More experiences with this type of setup can be found here on Janos' site. He also has nice photos of his setup using an Arduino Pro Mini + RN2483 running my code.