The purpose of this project is to replace the wired remote control that comes with an inexpensive fog machine with a custom one that is powered by a Nordic Thingy:52 so the machine can be controlled via Bluetooth Mesh.
Cheap fog machines usually have a wired remote control with a button and an LED. The LED is used to indicate that the machine is currently at an adequate temperature to produce fog. This project replaces the original remote control with a project box that mimics the old button and LED functionality. Inside the box, a 5V wall wart is used to allow the Thingy:52 to both detect when the fog machine is ready and also recharge the Thingy:52's battery. The Thingy:52's battery keeps it from browning out in the periods where the fog machine is reheating. A relay replaces the original remote control's button to put the Thingy:52 in control without exposing it to AC.
The firmware provides two mesh elements:
- Element 1
- Config Server
- Health Server
- Generic OnOff Server
- Element 2
- Generic OnOff Server
The Generic OnOff Server in the first Element works like the button on the remote control. Setting this element to 1 will produce fog until it is written back to 0 or the heater becomes active. It is automatically set back to 0 when the heater becomes active. If the fog machine is not able to produce fog then setting it to 1 has no effect.
The Generic OnOff Server in the second element is set to 1 when the fog machine is capable of producing fog and 0 when the heater is active. Writing to this element has no practical effect because the written value will be immediately reverted. A client can read this value to determine whether or not the fog machine will be able to immediately produce fog. Note that the heater can become active at any time.
The firmware for this project is based on the Bluetooth Mesh Light sample in the nRF Connect SDK (NCS). A detailed description of the project -- including photos and schematics -- is available here and a video of it in action is here.
This project is built from the v1.3.0 tag of NCS. The recommended project location is "nrf/samples/bluetooth/mesh/fogger".
west build -b thingy52_nrf52832
Provisioning assigns an address range to the device and adds it to the mesh network. Complete the following steps in the nRF Mesh app for Android or iOS:
- Tap
Add node
to start scanning for unprovisioned mesh devices. - Select the
Mesh Light
device to connect to it. - Tap
Identify
and thenProvision
to provision the device. - When prompted select the OOB method and follow the instructions in the app.
Once the provisioning is complete the app returns to the Network screen.
Complete the following steps in the nRF Mesh app to configure models:
- On the Network screen, tap the
Mesh Light
node. - Basic information about the mesh node and its configuration is displayed
- In the Mesh node view, expand the first element:
- Tap
Generic OnOff Server
to see the model's configuration. - Bind the model to application keys to make it open for communication:
- Tap
BIND KEY
at the top of the screen. - Select
Application Key 1
from the list.
- Tap
- In the Mesh node view, expand the second element.
- Tap
Generic OnOff Server
to see the model's configuration. - Bind the model to application keys to make it open for communication:
- Tap
BIND KEY
at the top of the screen. - Select
Application Key 1
from the list.
- Tap