ysoyipek / iC880A-Raspberry-PI

Raspberry PI iC880A and LinkLab Lora Gateway Shield

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry PI iC880A and LinkLab Lora Gateway Shield

Full stack

At the begining this shield has been created to help wiring between Raspberry PI and ISMT iC880A LoraWan concentrator Gateway (SPI version) and to be able to put the whole thing into a outdoor enclosure such as this one.

Then I decided to add some funky stuff like:

  • Footprint for iC880a ISMT LoraWan concentrator (main goal)
  • Can be also used between LinkLabs board and Raspi
  • I2C and Grove connectors to be able to add internal/external sensors
  • Footprint for DC/DC step down if you want to do some simple POE splitter to power the whole thing thru a network cable
  • Footprint for a simple Lora module such as RFM95 that can be used a Single Channel Gateway or also act as a Lora Node
  • Power with DC Barrel connector and terminal block
  • Four visual GPIO Led
  • Footprint for DHT1x Temperature/Humidity sensors
  • Easy to build and solder, 0805 or PTH components
  • Holes to fix board on enclosure or other support

Detailed Description

No specific documentation for now, it's just a kind of wiring helper, please see Gateway section on TTN Wiki and also on TTN Forums for more information on these gateways.

You can power the board with 5V going to Raspberry PI USB power directly, in this case use a descent power supply. You can also use "basic" POE with injector and splitter, this is what I do to oustide (I inject 12V) and use the DC Barrel, in this case I put D4 and a DC/DC Step down calibrated to 5V (do calibration before beforre pluging any boards/devices because default DC/DC output can be over 5V can fry all your boards)

If you need to use sensors you can check out these examples, they're just awesome, I'll post examples as soon as I get all working.

If you use linklabs board you can use these version of packet_forwarder, it has been modified to drive LED of linklabs boards and PPS modem line.

Installation

No specific documentation for now, it's just a kind of wiring helper, please see Gateway section on TTN Wiki and Installation is quite easy but as the plate need to go over RPI network and USB connector, you need to use a 2x20 Raspberry PI connector such as this one form adafruit. You can also find some on ebay.

This specific version of poly_packet_forwarder for Raspbery PI use bcm2835 library, you need to install it before anything. See http://www.airspayce.com/mikem/bcm2835/

For driving specific onboard LED with packet forwarder, please see the specific readme file of the poly_packet_forwarder to adjust you json config file.

I suggest to plug the connector into the PI to see space needed then plug the plate to the connector and start soledering one pin on each edge so the connector will be fixed, then remove plate and connector and solder all other pins.

Software Installation is straightforward, just follow this excellent wiki article. Just one thing, as the reset pin on my board (GPIO17) is different than the one used in the article (GPIO25), you need to adjust startup script. Once installation is done, edit the startup file

nano /opt/ttn-gateway/bin/start.sh
then change line containing
SX1301_RESET_BCM_PIN=25
to
SX1301_RESET_BCM_PIN=17

then file should look like this

#! /bin/bash

# Reset iC880a PIN
SX1301_RESET_BCM_PIN=17
echo "$SX1301_RESET_BCM_PIN"  > /sys/class/gpio/export
...
...

Then restart the service with

sudo systemctl restart ttn-gateway.service

You just need to do this once, on next startup all will start with good configuration.

if you want to follow log file just type

sudo journalctl -f -u ttn-gateway.service

-- Logs begin at Thu 2016-08-11 21:09:47 CEST. --
Aug 12 16:16:27 pi04 ttn-gateway[1525]: ### [GPS] ###
Aug 12 16:16:27 pi04 ttn-gateway[1525]: # Invalid gps time reference (age: 1471011382 sec)
Aug 12 16:16:27 pi04 ttn-gateway[1525]: # Manual GPS coordinates: latitude 46.62477, longitude 0.43528, altitude 104 m
Aug 12 16:16:27 pi04 ttn-gateway[1525]: ##### END #####
Aug 12 16:16:27 pi04 ttn-gateway[1525]: INFO: End of upstream thread
Aug 12 16:16:27 pi04 ttn-gateway[1525]: INFO: End of downstream thread for server  0.
Aug 12 16:16:27 pi04 ttn-gateway[1525]: INFO: concentrator stopped successfully
Aug 12 16:16:27 pi04 ttn-gateway[1525]: INFO: Exiting packet forwarder program
Aug 12 16:16:27 pi04 systemd[1]: Starting The Things Network Gateway...
Aug 12 16:16:27 pi04 systemd[1]: Started The Things Network Gateway.
Aug 12 16:16:38 pi04 ttn-gateway[14558]: [TTN Gateway]: Waiting for internet connection...
Aug 12 16:17:08 pi04 ttn-gateway[14558]: *** Poly Packet Forwarder for Lora Gateway ***
Aug 12 16:17:08 pi04 ttn-gateway[14558]: Version: 2.1.0
Aug 12 16:17:08 pi04 ttn-gateway[14558]: *** Lora concentrator HAL library version info ***
Aug 12 16:17:08 pi04 ttn-gateway[14558]: Version: 3.1.0; Options: native;
Aug 12 16:17:08 pi04 ttn-gateway[14558]: ***
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Little endian host
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: found global configuration file global_conf.json, parsing it
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: lorawan_public 1, clksrc 1
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Configuring TX LUT with 16 indexes
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
Aug 12 16:17:08 pi04 ttn-gateway[14558]: INFO: global_conf.json does contain a JSON object named gateway_conf, 

Schematic

schematic

Boards

PCB Received

PCB

You can order the PCB of this board at PCBs.io. Don't worry they still have a bug with top/bottom thumbails view but final boards are okay PCBs.io give me some reward when you order my designed boards from their site. This is pretty good, because I can use these rewards to create and design new boards and order boards for a discounted price, so if you don't care about PCB manufacturer please use PCBs.io.

Assembled boards

Full stack

##Bill Of Material

Nothing fancy, all components are 0805 and/or PTH and can be ordered almost anywhere (digikey, mouser, radiospare, ...). use only what you need dependings on what you want to do.

  • Adjustable DC/DC step down like this one or this one (same footprint this is why I'm using this one) but there are so much even some directly to 5V
  • LED for 4 GPIO (4/23/18/24) are 3mm PTH or 0805, color of your choice
  • If you use RFM95, diode for DIO0/DIO1/DIO2 (if you want to use interrupts) are 1N4148 PTH or SOD123
  • POE Splitter such as these and POE injector as this one
  • Terminal blocks are 5MM spacing
  • D3 is 1N400x (1N4001, 1N4007, ..) whatever you have, PTH or DO214
  • DC/Barell power jack
  • Grove connector and others at seeedstudio
  • Some PI connector with long pins for pluging this board and Linklabs one
  • Antenna UFL with IPEX cable or SMA if using Lora Module

##License

Creative Commons Attribution-NonCommercial 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License
If you want to do commercial stuff with this project, please contact CH2i company so we can organize an simple agreement.

##Misc See news and other projects on my blog

About

Raspberry PI iC880A and LinkLab Lora Gateway Shield


Languages

Language:Eagle 100.0%