As I use 433MHz transmitters for sending sensor data from many of my IoT-nodes, I have made a re-usable Arduino library for this purpose. The transmitted sensor data is picked up by one single receiver (an ESP8266 board) that converts the values to MQTT messages on my local network. In this post I will describe this library, my setup and also a set of new 433MHz transmitters and receivers that I have upgraded to.
Winter is soon to arrive in Sweden and the amount of daylight is decreasing every day. Thus it’s time to set up some extra light sources indoors and outdoors. I have been using my web app for remote controlled outlets (link) for some months now, but with the additional light sources needed for this time of year, I have to extend the application. As Sweden goes into the dark season I would also like to have an on/off schedule for some of the lights so that they are turned on/off automatically according to a set of specified events.
This blog post describes how I have set up a door-open detector at home. It uses a small ATtiny85 board that broadcasts a 433 MHz signal every time the door is opened. The signal is fetched by a Raspberry Pi that in turn publishes an MQTT message that results in the event being stored in a database and also being re-published to a cloud service. The circuit is only active when the door is open (and in that state only consumes 10mA), so the whole setup can be driven by a battery pack that is bound to last for a very long time.
In two previous posts, I used the RCSwitch and pi-switch libraries for communication between an Arduino Uno and a Raspberry Pi. I touched briefly on the main purpose with these libraries – to control RC outlets. In this post I will dig deeper and decode the RC signals so that the remote control can be replaced by a web app running on any browser-enabled device.
In my previous post, I experimented with sending measurements values from an Arduino UNO to a Raspberry Pi via a 433 MHz radio protocol. After testing the setup for a few days, I decided to make some improvements:
- Add an additional sensor for measuring outdoor temperatures. Now there will be four different sensor values transmitted from the Arduino to the Raspberry Pi.
- Add the possibility to send float values for more precision and, for adopting to the Swedish climate, allow negative values.
- On the receiver side (the Raspberry Pi), add storage of the values to a csv file so that the measurements can be visualized in graphs with Excel or a similar application.
- Improve the noise tolerance.
The Arduino computers are excellent for reading sensor data, and they are so inexpensive and consume very little power that you can use plenty of them in your home without breaking your wallet.
The Raspberry on the other hand, is more powerful, a bit pricier, but can easily be programmed to perform more challenging tasks like storing data and hosting a web server.
What if your Arduinos (the Major Toms) could report their sensor measurements to the Raspberry (Ground Control) in a simple way? Then you could access and analyze all measurements via a Web interface on the Raspberry (using a mobile phone e.g.)
This blog post describes my setup for sending sensor data via the 433 MHz band to the Raspberry.