Easy IOT – App Controlled RF Sensor Hub for Medium Range IOT Devices

by benjineer.io in Circuits > Arduino

14838 Views, 71 Favorites, 0 Comments

Easy IOT – App Controlled RF Sensor Hub for Medium Range IOT Devices

Diagram.PNG

In this series of tutorials, we will build a network of

devices that can be controlled via a radio link from a central hub device. The benefit of using a 433MHz serial radio connection instead of WIFI or Bluetooth is the much greater range (with good antennas and sensor positioning, potentially up to 1000m!). This is far more suited to outdoor applications such as a wireless temperature sensor located at the end of a garden, or a relay to control a heater in your garage.

Control and monitoring of these devices will be through a DroidScript app on an android mobile phone or tablet. We will be building on the knowledge we gained in the previous Easy IOT tutorial where we controlled a relay using an ESP32 Module. If you haven’t completed this yet, you may want to check it out here:

https://www.instructables.com/id/Easy-IOT-Remotely...

This time however we will be using the ESP32 as a Hub to bridge the gap between WIFI and 433Mhz Radio. This allows us to send a command from our phone connected to our home WIFI network that will then be forwarded on to the appropriate remote device.

We will also cover how to build ultra-low powered sensor nodes with a few simple modifications to an Arduino Pro Mini allowing the device to be powered from a battery for over a year!

While there are other ways to create low power RF sensor networks e.g. LoraWan, this series aims to provide simpler (and cheaper) alternative that aims to teach the core principles of wireless communication, data handling and low power electronics. More complex systems that use protocols like LoraWan and MQTT will be covered in a future tutorial.

Tutorial 1 - ESP32 Based RF Sensor Hub

DSCF0565.jpg
DSCF0562.jpg
DSCF0551.jpg

In this tutorial we build the central hub that will transmit radio messages to and receive from our wireless sensors, and pass that data to our android application.

Please follow the link to the tutorial:

https://www.instructables.com/id/Easy-IOT-ESP32-Ba...

Tutorial 2 - Remote Relay Node

DSCF0971.JPG
RelayNode.PNG

For our first controllable device, we will use an Arduino Nano connected to a relay module and another HC-12 Module to receive the radio data from our ESP32 Hub.

Please follow the link to the tutorial:

https://www.instructables.com/id/Tutorial-2-Remote...

Tutorial 3 - Ultra Low Power Temperature Sensor Nodes

DSCF1258.JPG

In this tutorial we will show you how to modify an Arduino Pro Mini to greatly reduce power consumption, then build a temperature sensor node that will periodically transmit messages to the ESP32 Hub.

Please follow the link to the tutorial:

https://www.instructables.com/id/Easy-IOT-Low-Powe...

Tutorial 4 - ESP32 WIFI Autoconnect and UDP Broadcast

screenshot-1578498544366.jpg

Currently, our ESP32 Hub must be pre-programmed with the WIFI SSID and password, which means it is not very easy to change. To make it easier the ESP32 can be programmed to start up as a WIFI Access Point which the user is able to connect to. This will then bring up a “login page” that allows them to enter the SSID and Password of the network we would like to connect to.

Once the device has the WIFI details entered, they are saved into the memory, and the next time it is powered it will automatically try to connect. If it is unable to connect, then it will switch back to Access Point (AP) mode.

If the device connects to the WIFI network successfully, we should be able to talk to the hub using our app, but we still have the problem of needing the IP address of the hub. We get around this by programming the hub to transmit UDP messages announcing its IP address on the WIFI after connection, which we can read using our app and then connect to.

Please follow the link to the tutorial:

https://www.instructables.com/id/ESP32-WIFI-Autoco...