pIoT a pico/personal Internet of Things DIY platform

This post is a follow up and an evolution of this previous one. I am pretty proud to present here a work that has been going on for more than a year. It all started with some friends at MakeSpaceMadrid. We wanted to create a super-cheap, Arduino-compatible with embedded wireless communication, electronic board. We decided to adopt the very well-known Arduino UNO ATMega 328p as microcontroller and the nRF24L01 wireless chipset as communication module, both sold for about 1€ on the Chinese market. We called our project Sensorino. We did a lot of things, but the project took longer than expected. Its code is still on github and everybody is welcome to contribute. While Sensorino was slowly being developed, I forked it on a personal, simpler project, and called it pIoT.

So what´s pIoT?

It’s a collection of three things: a hardware design for custom boards with a microcontroller and the wireless communication chip, the firmware that runs on the microcontroller and a server that collects data, shows it and executes rules. The project is open source and available on github for anyone to download or contribute.

pIoT board

A pIoT board

At the moment most of the functionalities are there: the board design is extremely simple, it’s just the ATMega328p connected to an nRF24L01+ module, the firmware contains a library for exchanging messages over the nRF24 module, a library for managing energy consumption (that is, putting the microcontroller into sleep modes) and a library for exchanging JSON messages with a host computer, the server software is programmed in java and takes care of parsing packets, visualising data on web using GWT and implementing rules using the mvel expression language. A new version of the server for nodejs is also on its way.


A screenshot of the server interface

The topology of the network is simple, there is one “base” node connected to a host computer through a serial port, the computer running the server code, and a set of “peripheral” nodes, which can be both sensors or actuators, that send/receive data to the base. More complex topologies are possible, but routing is not supported at the moment (for this, I suggest the very interesting RadioHead project). I am writing a tutorial for helping set up the whole thing.

pIoT topology

pIoT topology

I have created a testbed at home, with an old laptop working as server (a Raspberry Pi would also do) and two nodes, one that senses data from a plant (as already published a in previous post) and one that acts as a remote controlled colour LED. It works, and, as far as now, battery consumption is quite good. I have had the plant sensor running on two AA batteries for a couple of months.

pIoT server

The pIoT server

Garden pIoT node

A pIoT node in the garden


There are still things missing of course, but a complete proof of concept is already there and promising. If you are interested in the project and willing to collaborate, I will be very pleased to help!

Minia library for Java

After quite a big effort I have managed to use my Minia in Java.
Unfortunately there is no native support for HID devices in the JVM so one has to map some native library of the OS using JNI or JNA or map some third party library like the HIDApi that is esactly what I did.
This library claims to be compatible with Windows, Linux and MacOSX.
I have compiled it for Windows, and after some useless attempts I have managed to import in java using JNA.

After this I created a little abstraction for the device and a little GUI for testing it.
As usual the code is available in my repository here.

I have also created a small wiki page here and here.

Have fun.

A simple GUI for testing the Minia