BlueLora — Mile-wide Sensor Networks
Imagine a wireless network that has a range of miles and which runs on a small battery for months. Now imagine what you could do if each node on the network supported any sensor you want. That’s my BlueLora board.
In the picture above you can see — starting at the left-
- BlueLora board with OLED and battery and a temperature sensor
- Bare BlueLora board
- Jtag/Swd debug adapter board
- QWIIC addon boards (in and out)
- Grove addon boards (in and out)
The BlueLora Hardware
The base BlueLora board has a bunch of best-of-breed hardware on it — all designed to provide
- the long range wireless network
- a bluetooth 5.0 link, and
- support for many many different kinds of sensors
Here’s a picture of the various modules:
Here’s a closeup of the board with stuff mounted on it
The board height is 0.18" (4.6mm) or, with OLED, it’s .28" (7.2mm). The bottom of the board has no components and is flat. It is 2.1" x 2.3" (without the battery). This board could be physically smaller, but that extra space ensures that all of the radios (and CPUs) can run without interference from sensors and each other.
The range of the LoRa radio is extremely important which means the radio must be RF isolated from the rest of the unit as much as possible.
2.1" x 2.3" x 0.2" (53mm x 59mm x 5mm)
The Nordic Semiconductor nrf52840 is a very cool CPU. Based on a 64MHz Arm Cortex M4 with 1MB of flash and 1/4 MB of RAM, it has the neat feature that almost all of the pins can be used for almost anything digital. This produces a circuit layout that, in my experience, is unmatched for simplicity and reliability. The chip is optimized for low-power applications and it supports the absolute latest Bluetooth. As icing on the cake, Nordic engineers are some of the maintainers of the Zephyr repository I use.
The power subsystem relies on a very neat dual-mode chip from Texas Instruments. When the USB is plugged in the battery is intelligently charged while running or halted. The VDC supply can run as a switching supply for high efficiency and lots of power (up to .5A) or it can run as a near-linear supply for higher efficiency when sleeping or using little current — and that mode pin is available to the processor so it can be dynamically switched. This makes it easy to have high-power sensors/radios and still get good battery life.
The BlueLora supports standard Li-Ion and Li-Po 3.7V batteries and it can be powered straight from USB. I’m using a (rated) 500mAh battery that’s tiny, a good reference.
When the LoRa transmitter is active, the board may use up to 120mA. That’s for extreme range and usually not necessary. The typical LoRa packet is maybe 1/2 second.
When the board is sleeping it uses about 50uA (measured) for the standard button-press wakeup mode (so about 1 year if constantly sleeping). So, you can optimistically transmit 60,000 packets or sleep a year before the battery is gone when working as a sensor.
A 500mAh battery charges in two hours.
The User Sensor Port has 7 pins - 3 are power, ground, and a 0.1% precision 20Kohm pullup resistor on a CPU Analog port and the other 4 pins are a standard IIC port (V,gnd,sda,scl). They can connect to a SparkFun QWIIC connector or a Grove connector. Grove supports both IIC and Serial and thanks to the CPU the user port may run as either.
The Oled port is also a standard IIC port. You can just plug an Oled into it - a small one fits perfectly next to the radio and button — or you can use it as a second Grove/Qwiic sensor port (or anything else you want to control with two digital pins).
BlueLora should support the entire range of 3.3V QWIIC and Grove sensors. Here’s a screen copy of part of one Sparkfun sensor page ->
Here’s a screen copy of two pages listing some of the Grove sensors from SEEED studios:
I have a few sensors to test with and for examples. Those will be discussed in following pages as I get into applications.
I’ve produced 5 different boards for use with the BlueLora.
Jtag adapter board
This board adapts the 20 pin standard Jlink/jtag connector down to a standard micro-10 pin connector and the non-standard 6-pin connector used by the BlueLora. All the connectors are through-hole for physical strength.
By mistake I have plugged my 6 pin connector in completely backwards for minutes and the JLink and the CPU are just fine with that (when the JLink is not providing power to the CPU). Not a guarantee.
Grove In and Out Boards
The two Grove boards plug into the sensor/oled ports and have Grove connectors on them. One board (in) points the connector into the BlueLora while the other (out) hangs over the side. Again these are through-hole.
The Grove connector pin spacing is 2mm vs 2.54mm for the board connector so it is possible to bend the pins slightly and solder a Grove connector right into the BlueLora.
Qwiic In and Out Boards
These boards plug into the sensor/oled ports and have Qwiic adapters on them. One points into the board, the other hangs out over the edge. Due to the pitch, the Qwiic connectors are SMD.
Programming the BlueLora
A completely blank BlueLora requires a CPU programmer that can use the SWD port. These are inexpensive. I first put a nearly-standard Nordic secure Bluetooth bootloader on them. Nordic provides software for almost all OSes (including mobile) that works well if you want to manually upgrade them.
Beyond the bootloader, the application code is written using the Zephyr operating system. There’s a custom device descriptor file and a bunch of C and C++ libraries that run all of the on-board peripherals of the BlueLora.
This board is designed to be very hacker friendly. The SMD components are ‘big’ (at least 0603) and well labeled, so they can be manually unsoldered/changed. The supply has lots of power available. All of the port connectors are through-hole so they can be easily soldered-in and they are extremely rugged (so you can plug/unplug the debug port hundreds of times). All of the complex components are from stable companies that provide excellent documentation.
The actual range in woods and buildings and hills is, of course, all over the place. Here is an actual walk I took with one unit (with GPS) and one base unit so I could plot signal level vs location. The start of the walk is down a wooded path followed by bushwacking through a preserve. Here it went 0.4 miles before running out of range (at 20dBm).