23/10/2018

μNode project


Library & Documentation


Pre-Order now

In TLab.gr we were trying to find the most compact LoRa board that balances a good development experience, low power consumption, and extended feature set. Since we couldn’t find anything that satisfies our needs, we decided to start hacking our own board based on existing technologies out there. The result is our very own TLab μNode (micro-node).

The board was designed by Ioannis Charalampidis, a hacker that we are proud to have in our lab!


The board incorporates an ESP8266 MCU on top and an RFM95 LoRa module in the bottom, and it can be easily programmed with an FTDI TTL cable. The powerful XTensa CPU of the ESP module is capable of handling the most demanding applications, while it’s low power capabilities allows the chip to go into deep sleep mode, consuming just a teensy bit more than 10μΑ when idle.

We also took very seriously the extensibility of the board. In our opinion, the other prototyping boards such as “The Things Uno” or even the “LoPy” are way too bulky to carry around, along with our sensors. We therefore decided to include a prototyping region, allowing us to solder our sensors directly on the board! And since we are cautious about power consumption, the MCU can cut the power all the peripherals when they are not required.

And since the GPIOs of the ESP chip are quite limited, we designed the prototyping region in a way that a MCP23S08 GPIO extender chip can fit there, giving you plenty more GPIOs to play with. 

But the most powerful feature of the board is the WiFi support, that can be used as an additional geopositioning vector, when there are not enough LoRa gateways in range. When used cautiously, the ESP can perform a partial, passive WiFi scan in 1 second, costing about 80mA per scan.

Finally, the board is designed to be soldered by hand, as an exercise for our hacker space members. This means the size of the SMD components are quite big, while the prototyping region is designed for through-hole components.  

“GPS” tracker using μNode

The first project we tried with our new board was the accuracy of the WiFi-based geopositioning features. We therefore decided to create a simple, position tracker, without using GPS. We used a battery pack with 3 AAA batteries, we attached the LoRa antenna and put everything in a box. 


The sketch itself is quite simple. It is based on the WiFiScan.ino example from ESP8266, but instead of printing the access point names, it collects it in a packet and sends it over LoRa in a format compatible with The Things Network standards.

On the receiving side now, we created an integration to The Things Network, that forwards the received packets to our servers. There, we perform triangulation based on the WiFi signal strengths that the node received and we resolve it’s location to the map. We were surprised with the accuracy of the results!

We also created a fancy interface where we can see the activity:

Right after the initial excitement of the results we switched into measuring the power consumption of the board. We hooked an UT61E multimeter to a data logger and we measured the current in operation

We measured the following current (at 3.6V = on the battery pack) for the three phases that the module undergoes:

  1. During WiFi scanning it consumes about 68 mA, and the overall scanning duration is 1.5 sec
  2. During LoRa transmission, it consumes about 20 mA and the transmission duration is 3 sec
  3. In deep sleep, it consumes only 20μA

Overall it consumes about 162 mA in 4.5 seconds. That’s about 0.2 mAh per transmission.

This means that with a typical cell capacity of 1000 mAh, this device can perform about 5k transmissions. Not bad!

The future

We are really pleased with the outcome, so we are investing more time into making this device available to the general audience. We are working on creating a small lab in our hacker space, where we are making these boards. But this might take a while.

In the mean time, if you are interested to buy one, drop us a line on the #tlab channel on the TechMinisty Slack, or via the Contact form. We might have a few spare ones to share.

We are also working on a hardware abstraction library for Arduino that helps with most of the heavyweight operations. For example, transmitting something over LoRa is as simple as:

#include <Arduino.h>
#include <uNode.hpp>
/**
 * uNode library configuration
 */
uNodeConfig unode_config = {
  .lora = {
    .netKey = { ... },
    .appKey = { ... },
    .devAddr = ... ,
    .tx_timeout = 30000,
    .tx_retries = 10
  }
};
/**
 * Handler that will be called when the packet is sent
 */
void packetSentHandler(int status) {
  // Go to sleep for 30 seconds
  // (Will reset the sketch when waking up from sleep)
  uNode.deepSleep(30);
}
/**
 * Sketch setup
 */
void setup() {
  uNode.setup();
  // Send a packet over LoRa and call the given callback
  // when the transmission is completed
  static const char * message = "Hello World!";
  uNode.sendLoRa(message, sizeof(message), packetSentHandler);
}
/**
 * Sketch loop
 */
void loop() {
  uNode.step();
}


Facebook


Twitter


Pre-Order now