Learn how to seamlessly integrate a motion sensor into your ESP32 Lora Meshtastic node with this versatile guide. Step-by-step instructions suitable for both ESP32 and Heltec Lora V3 boards ensure smooth hardware setup and Meshtastic app configuration.
This guide walks you through adding a motion sensor to an existing ESP32 Lora Meshtastic node. This guide also applies to all Heltec Lora V3 boards, but minor changes may be required.
hardware
Now let’s get started with the hardware we need.
assembly
The hardware is all ready and the wiring is now complete. For this we will follow the following Schematic:
HC-SR501 Motion Sensor – DIY ESP32 / Heltec Lora Meshtastic Node
- +Power -> VIN (5V…20V)
- HIGH/LOW output -> PIN 13 or empty pin
- Ground -> Ground
💡
The HC-SR501 motion sensor module does not work with batteries and only works with USB as it uses 5V on the Heltec board.
💡
Capacitors are a great way to isolate one part of a circuit from another.
💡
It is important to note that the connection order may vary. To ensure correct wiring, follow the labels and Io ports of specific components and the provided schematics. Paying attention to these details will help you make the correct connections and avoid potential problems or component damage.
Once all wiring is complete. Double-check your connections and make sure they match the suggested layout before proceeding with the next steps.
Meshtastic settings
In sensor device
- Open Meshtastic app (iOS in this guide)
- move to setting Page
- In the Module Configuration section, go to: detection sensor
- Toggle the switch to activate enable
- on the sensor name
- Set the GPIO PIN to be monitored to: pin 13
- finally get
💡
Detection trigger high turn off For this module, it goes low when motion is detected and goes high when idle. If you are using a different sensor or one is working, switch to a different sensor.
on the client device
- Open Meshtastic app (iOS in this guide)
- move to setting Page
- In the Module Configuration section, go to: detection sensor
- Toggle the switch to activate enable
- Just below the toggle selection customer This time.
- finally get
Once this is set up, you will receive a message on the public channel whenever the sensor is triggered. If you expect your sensor to trigger frequently, consider setting limits in settings. Saturation of the network can potentially cause problems sending and receiving data. For more information, check the channel utilization post or
In conclusion, this comprehensive guide ensures seamless integration of motion sensors into your ESP32 Lora or Heltec Lora v3 Meshtastic Node to expand its capabilities. The instructions provided are for the ESP32, but can also be applied to the Heltec Lora V3 board with some adjustments. To optimize data transfer, you should pay attention to network usage. This guide not only enhances your device with a motion sensor, but also opens up the possibility of integrating other sensors. Explore the potential of Meshtastic nodes by experimenting with different sensors and configurations and expanding the scope of applications for your mesh network. Have fun tinkering and discovering new horizons!