Skip to content

KolijnWolfaardt/TTN_sensor_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTN Sensor Board

This is a basic sensor board I designed to experiment with the LORAWAN protocol, and The Things Network infrastructure. It is by no means intended to be a good or complete example of all the capabilities of either.

Photo of soldered board

The board uses a Microchip RN2483 to perform the RF communication and a PIC18F46J50 for the other work. The sensors were chosen based on what was available, for experimentation. Other sensors can easily be used.

The board is powered by a single LiPo battery, which is regulated down to 3.3v. To charge the LiPo battery, A MCP73831/2 Battery Management IC is used. The power part is not finished yet, as the batteries have not arrived, so there might be updates here.

Datasheets

Thanks to https://github.com/jpmeijers/RN2483shield for the RN2483 component and module.

Schematic and PCB layout

The schematic and PCB layout were created using KiCad, and can be found in the PCB Layout folder. The gerber files and schematic PDF can also be found there.

Board Top layout Board Top layout

Firmware

The firmware can be found in the Firmware folder, and is intended for the XC8 compiler using the MPLABX IDE. The board is programmed with a PicKIT 3 programmer, but the PicKIT 2 should also work. The basic flow of the program is shown in basic_control_flow.dia (Open with http://dia-installer.de/ flowchart editor) inside the Firmware folder.

comment: # (For more details on the software, see Firmware/README.md )

The radio connects via ABP (Activation by personalization). The keys were programmed beforehand using a USB-serial converter, and the radio stores them internally. I will add some code later to set them in the code.

USB stack adapted from https://github.com/signal11/m-stack.git, for its license see the LICENSE file.

Board Mistakes

There are two mistakes on the board:

  • The ground pin on the PicKit header is not connected.
  • The battery voltage measurement circuit does not work. I replaced it with a voltage divider.

These are suggestions that require more rework, but are only for ease of use.

  • I cannot identify pin 1 of the optical sensor, so I left it off.
  • Breaking out the TX and RX lines to the RF module would have eased debugging.
  • A reset button would be nice, resetting both the MCU and the RF module.

About

An experimental sensor node for The Things Network.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages