📜 ⬆️ ⬇️

Autonomous radio Thermometer on msp430, NRF24L01 + and solar powered


Starting exercises with a series of msp430 microcontrollers immediately drew attention to the meager energy consumption in duty (low power mode) modes. I always wanted to collect the most autonomous radiometer to nail it to a tree in front of the house and minimize the effect of the heat coming out of the house on the accuracy of the readings. A radiometer on batteries, even if they last for years, is also not very good, climbing a tree with a target of battery replacement is not always great, especially in bad weather. I decided to try the solar power scheme.


The system consists of a set of sensors (in my case, an external thermometer) that sends data to a central node (receiver) connected to a FreeBSD netbook that plays the role of storage (and in the future - a central processor of a smart home)
Consider everything in order.
External sensor

Composition:
1. Microcontroller msp430g2553 with 32768Hz quartz
2. Thermometer from Maxim DS1621 Why him? because it was.
3. Radio module on the NRF24L01
4. Ionistor 1F
5. 2 solar batteries SINONAR SS-3514 (pdf not found)

Electronic nuances:
')
1. The thermometer works on i2c and the radio module on SPI. Let's unite signal lines of interfaces SDA with MOSI, and SCK with MISO. (Working in turn, they will not interfere with each other. I can specify if necessary)
2. Connect the nutritional foot of the thermometer and the i2c pull-up resistors to one of the msp430 outputs. What for? In sleep mode, turn off the thermometer and the suspenders from the power in general, reducing energy consumption.
3. As an energy storage device used ionistor 1F. I wanted to use a battery, but fashionable lithium-ion and lithium-polymer do not charge at negative temperatures. NiMH is large in size, and the self-discharge is large enough, which is critical when using micro-consumption.
4. As a protection against overcharging the ionistor, exactly as well as against overvoltage of the power supply, turn on 2 LEDs parallel to the power supply. Falling on one diode 1.8V on two - 3.6V. By the way, the idea of ​​creating a voltage reference generator on the LED read in childhood in the magazine Young Technician.

Here is the external sensor circuit:


The nuances of the algorithm works:
1. Turn on the thermometer, wait for data availability, periodically putting the processor to sleep in lpm3 mode (only ACLK at 32 kHz works).
2. Measure the processor supply voltage (11th channel of the ADC) relative to 2.5V reference voltage
3. Wake up the radio module, form an 8-byte packet containing the sensor id, status, supply voltage and temperature.
4. Turn off the light. We translate the radio module into standby mode, put the processor to sleep for 2 minutes in lpm3.
5. If a power supply voltage is detected below the critical limit, we wake up not every 2 but every 10 minutes.

In the mode of deep hibernation, and this is the main state of the system, the total current consumption is 1.5 - 1.8 μA . Before shutting out, I did not drive, but after a day of work, the voltage on the ionistor dropped from 3.6V to 2.2V. Those. in the absence of a nuclear winter of the polar night, the device is experiencing a 16-hour dark time of day with a reserve. Charging in the presence of 2 salt batteries begins to occur with room lighting.

Layout:



Prototype:



Structurally, the external sensor decided to place in an empty transparent jar from some chemical. To eliminate the formation of moisture put inside a bag of selikogel.

Photos of the finished device - at the beginning of the article.

Sources (in the picture archive): image

Receiver

Composition:
1. Microcontroller msp430g2553
2. Radio module NRF24L01 +
3. USB-COM converter to connect to the server.

The circuit for switching on the NRF24L01 + to the microcontroller is the same as in the external sensor.
Algorithm: we sit at the reception. When a package arrives, we send it to uart, waiting for the next package.

Brain

The intellectual part of the system is made on the remains of the Asus EEE PC. Why on the leftovers? Because there is no screen and Claudia. Installed FreeBSD 9.0.
From software:
1. lighttpd - web server
2. rrdtool - a package for storing and visualizing statistical data
The daemon written on PERLe listens to the reception from the USB2COM converter, when it detects a received packet from the sensor, it adds the temperature and voltage data to the RRD base.
When the browser connects to the web server, we observe the current values ​​of temperature and sensor supply voltage


Plans:
1. Implement radio modules anywhere where necessary (lighting control, sensors of all that is possible)
2. Accordingly, expand the functionality of the central node. In general, the notorious "smart" house.

Waiting for comments and questions.

Source: https://habr.com/ru/post/162877/


All Articles