Right before Christmas, I’ve got my hands on the just-released The Things Gateway, the official building block of the LoRaWAN network for the Internet of Things. If you haven’t heard before of TTN, it’s one of the largest LoRaWAN networks, which aims to allow low-power devices (or nodes) to connect to a decentralized, open-source network. In the TTN architecture, long-range gateways are used as a bridge between the LoRaWAN network and the Internet, allowing devices to things to talk to the internet without 3G or WiFi plans.
The whole network is community-based, one can join an already established community in a city or country, or can start its own community.
Obviously, there is a fair use policy enforced, allowing for about 1000 nodes to connect to a single gateway:
- Golden rule: 30 seconds air-time per device per day
- For 10 bytes of payload, this translates in (approx.):
- 20 messages per day at SF12
- 500 messages per day at SF7
- more for SF7BW250 and FSK (local-area)
- This allows for >1000 nodes per gateway
- Downlink bandwidth is even more restricted: you can’t send all messages as ‘confirmed uplink.’
- If your application requires more bandwidth, think of another solution
As for the gateways, one can build its own gateway, or can simply buy the “official” gateway, either from the TTN Shop or Farnell/Newark. As a side note. I’ve got mine from Farnell, I often order from them,
Before ordering your own, please be careful about the frequency bands for LoRa communication – they are different in different parts of the world.
My gateway is the EU model, which works in the 868MHz band. The US version works in the 915MHz band – but don’t worry, the only thing that differs is the LoRa card, the rest of the review applies to the US model as well.
In the box, I found the gateway, a small indoor antenna, and a 12V/2A power supply with UK and EU plugs.
The creators of the TTN gateway have designed it to be window mounted; there are suction cups to fix it on the windows panes. Strangely though, no one seems to care about wall mounting. Here are two possible issues – the black plastic case is facing outwards, it will overheat as hell when the gateway is placed on a south-facing window, The second issue is that, without wall mounting holes, it will be difficult to use the gateway with an external antenna.
The front cover is easily removed, just gently pull it out from the sides.
The key element of the [EU] version of the TTN gateway is the LG8271 LoRa gateway card from Microchip, which combines eight receiving channels and one transmit channel on a single 90.0 mm x 30.0 mm, mPCIe card (see datasheet).
The main processor is a PIC32MZ2048EFM144 @ 200MHz. Communication between the LoRa card and the main processor is done via UART. Connection to the Internet is done via either the built-in Ethernet port or wireless using one MRF24WN0MA module.
There’s also a Bluetooth 4.2 module out there, but it’s hard to see in the pictures. We also find connectors for GPS (to determine a precise location of the gateway) and for XBee connectivity. The makers of the TTN gateway are a bit cheap here, there are no sockets for the XBee board installed, and one has to completely dismantle the gateway to solder those. We can also find a plethora of test points. However, as the available documentation regarding the TTN gateway is pretty thin, there’s no point in digging further into hardware aspects.
Setting up the gateway
Setting the gateway is surprisingly simple. Just create an account to https://www.thethingsnetwork.org/, then go to https://ttn.fyi/activate/ and follow the process. Mind that you will have to switch the WiFi network to the one provided by the gateway before going to the second step. If everything is OK, you will be able to see the gateway in The Things Network console.
Is overheating an issue?
After keeping the gateway powered on for a few days, I took some thermal images with my FLIR for iOS camera. And I don’t like what I saw.
Even in winter conditions, in a room where the temperature is about 20C, the LG8271 LoRa gateway card is very hot. The Semtech SX1301 is at 75C, while the inductors and the MCP1727 1,8V LDO in the top-right corner are reaching 71C. Way too hot for my taste. And there’s nothing to do. I can install a small heatsink on the SX1301, but there’s nothing I can do to help the LDO cool down.
Operating the gateway with the cover removed doesn’t improve things much. The temperature of the SX1301 has dropped to 69.7C, and the LDO stays at 62.7C. And this happens in the winter time. Will the gateway survive the scorching summer in Bucharest? I don’t know.
Poor LoRa coverage? Blame the Low-E windows
An unexpected issue came when I was trying to determine the coverage of my gateway. With the gateway installed in my office, on the first floor, I wasn’t able to connect from home, at a mere distance of 1.5km as the crow flies. I was baffled, as the gateway was supposed to cover 10 km in the suburban area.
I found that the Low-E windows (both at home and at the office) are very good in blocking the LoRa signal – some research papers are quoting attenuation of 30dB in the frequency bands used by LoRa modules.
So, I took my TTN Uno outside – still nothing. Then I (temporarily) installed the gateway on the outside of the window, taking advantage of a sunny day. With this setup, I was able to connect from a distance of 5km.
Bottom line, I need an external antenna. A further investigation of the coverage will follow once the external antenna will be installed.