Multi-sensor wireless micro DIY sensor

DIY, as Wikipedia says, has long been a subculture. In this article I want to talk about my diy project of a small wireless multi-sensor sensor, and this will be my small contribution to this subculture.

The history of this project started with the hull, it sounds stupid, but that's how this project started. The case was purchased on the Aliexpress website, it should be noted that the quality of the plastic casting of this case is excellent. After a short correspondence with the seller, a drawing was sent to the post office and this project began.

Multi-sensor wireless micro DIY sensor

The drawing itself was very poorly measured and half of the measurements for the borders, cutouts and technological holes of the future printed circuit board had to be done using a caliper. Having received all the internal dimensions of the case, it became clear that the radio chip would have to be "bred" directly on the printed circuit board, since the height from the top of the printed circuit board to the inner surface of the case was 1.8 mm, and the minimum height of a finished average radio module is usually 2 mm (without a screen).

Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
SoC nRF52 in the QFN48 package was chosen for the sensor. In this case in the nRF52 series, Nordic has three options: nRF52810, nRF52811(new), nRF52832. Chip parameters: 64 MHz Cortex-M4, 2.4 GHz transceiver, 512/256 KB Flash, 64/32 KB RAM for nRF52832 and 192 KB Flash, 24 KB RAM for nRF52810, nRF52811, multiprotocol chips, support Bluetooth Low Energy, Bluetooth mesh, ESB, ANT, and nRF52811, in addition to the above, Zigbee and Thread, as well as Bluetooth Direction Finding.

Multi-sensor wireless micro DIY sensor
I decided to make the sensor itself multi-sensor so that it can be used for different tasks. For this reason, the chip layout had to be made as compact as possible, taking into account the fact that the minimum dimensions of the components should not be less than 0603, so that the device could be soldered by hand. After the chip was divorced on the board, I started selecting sensors. The main thing I was guided by when selecting it was the dimensions of the sensor body and the possibility of soldering the sensor at home with a minimum set of equipment (soldering iron and hair dryer).

Multi-sensor wireless micro DIY sensor
The following sensors were selected for the sensor: SHT20, SHt21, Si7020, Si7021, HTU21D (temperature and humidity sensor), all these sensors have the same body and the same pins of the legs, HDC2080 (temperature and humidity sensor) also has the same body as before listed, but has an additional interrupt output, more energy efficient, BME280(temperature, humidity and pressure sensor), LMT01(temperature sensor), TMP117(high precision temperature sensor), high energy efficiency, interrupt output, upper and lower temperature limit setting, LIS2DW12(accelerometer ) high energy efficiency, one of the best in its segment or LIS2DH12.

Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
Also in the first version of the sensor there was a reed switch in the list, but in subsequent revisions it was excluded, since there was not enough space for a 1.6 cm reed sensor with a glass bulb, and I split a couple of such sensors by installing the finished board in the case, also because of the square the type of case and its small height, the device was not very suitable for the role of a magnetic opening and closing sensor.

Multi-sensor wireless micro DIY sensor
In addition to the sensors, there are 2 LEDs on the sensor, one of them is rgb located on the bottom side of the sensor. Two smd buttons, one connected to reset, the second "custom" for implementing some scenarios for the sensor. The body of the sensor consists of three parts, the main body, an inner insert with a hole that holds the battery and is attached to the main body with four screws, and a bottom cover that snaps into the holes on the inner insert. There are also 4 analog pins, 2 digital pins and also two more pins that can be an NFC antenna or digital pins, SWD port.

Rgb LED and buttons are placed on the pcb board in such a way that they have open access when the bottom cover is removed through the holes in the inner insert, which are designed to snap the back cover into place.

Multi-sensor wireless micro DIY sensor
The device survived two revisions, also earlier, in place of the TMP117 sensor, a MAX44009 light sensor was installed, which was later replaced by a temperature sensor, both sensors have the same body, but different pins on the legs, it may be in vain that it was replaced, it may be worth returning.

Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
Now I have 4 such devices working at home, two of them are temperature and humidity sensors with Si7021 sensors (one on nRF52832, the second on nRF52811), one is a shock sensor implemented on the LIS2DW12 accelerometer (nRF52810) and a temperature control sensor on the LMT01 sensor (nRF52810 ).

The wireless sensor is powered by a cr2032 battery, the sleep consumption is 1.8uA for nRF52810, nRF52811 and 3.7uA for nRF52832. Consumption in data transfer mode 8mA.

Multi-sensor wireless micro DIY sensor
Multi-sensor wireless micro DIY sensor
The description of the protocol used, the development of software for this sensor for different use cases, I think is beyond the scope of this article.

A test of the sensor with a smart home system can be viewed in a short video below.


The project of this sensor is open, you can get all the materials on the project on my GitHub.

If you are interested in everything related to DIY, you are a DIY developer or just want to start, you are interested in using DIY devices, I invite everyone interested in telegram chat – DIYDEV.

For everyone who wants to make devices, start building automation of their home, I suggest getting acquainted with the easy-to-learn Mysensors protocol - telegram chat MySensors

And for those who are looking for mature enough solutions for home automation, I invite you to telegram chat open threadsystem. (what is Thread?)

Thank you for your attention, all the best!

Multi-sensor wireless micro DIY sensor

Multi-sensor wireless micro DIY sensor

Source: habr.com

Add a comment