Loading 3D model… large boards can take a moment.
Full plans and code for a sensor controller capable of publishing multiple sensor data via MQTT
Raspberry Pico source code is here
PCB schematics (KiCad format), plans plus any 3D prints/CNC files for the different hardware platforms are here
A brief overview is on YouTube
Under the hood the sensor modules use Raspberry Pico Ws to communicate with an MQTT broker and transmit data it collates from the following sensors:
I also intend to add EC and/or pH sensors to this to essentially make this a one-stop hydroponics sensor interface.
The module arranges these sensors into sensor "groups", referred to by their index. Each group effectively publishes a set of data from multiple sensors to a single MQTT topic. This allows the Sensor Pod, for example, to accumulate sensor data from both the SCD30 sensor and the Stemma Soil Sensor into a single topic, and also allows the HIB to publish sensor data to multiple topics (i.e. the RTC battery voltage and each individual connected feed sensor all publish to their own individual topics)
Currently there are two different hardware platforms defined:
The Sensor Pod consists of a single sensor group providing data from the following sensors:
The HIB consists of two distinct pieces of hardware. One section provides power and hardware control to the Raspberry Pi powering the AutoBloomer controller, along with a RTC module and interfacing to relays. The other section is the sensor module which provides data from feed level sensors along with the current RTC battery module voltage. These are grouped as follows:
Configuration of each module is done in two ways:
Basic pod configuration of essential runtime variables (wireless SSID/key, broker address, module location/name etc) is done via serial port connected to the bord's EXT header (3.3v, 57600/8/n/1) and transmitting commands in the format: <COMMAND><SENSOR_GROUP><PARAMETER> (note no space)
SSIDMyNetwork -> Sets the sensor module to connect to the wireless network with the SSID "MyNetwork"PASSthe_key -> Sets the sensor module to connect to the wireless network using the PSK "the_key"NAMESensorModule -> Sets the Pico's host/MQTT client name to be "SensorModule"BRKRthebroker.local -> Tells the sensor module to connect and publish to the MQTT broker with host name "thebroker.local"BRKR192.168.1.50 -> Tells the sensor module to connect and publish to the MQTT broker at address "192.168.1.50"GRPN0Group1Sensor -> Sets the name of the sensor group at index 0 to "Group1Sensor"GRPL0LeftChamber -> Sets the location of the sensor group at index 0 to "LeftChamber"Once these have been set the pod will attempt to connect to the configured broker via the supplied wireless network and begin publishing sensor data to the topic:
AutoBloomer/<< sensor group location >>/<< sensor group name >>
Once connected, the pod will also subscribe to a specific MQTT topic to listen for sensor calibration commands. The topic in question is:
AutoBloomer/<< sensor group location >>/<< sensor group name >>/control
The payload consists of a single line detailing the type of calibration to be performed. Currently the only sensor capable of (and requiring) calibration is the SCD30 on the Sensor Pod. Calibration commands are one of the following:
For example, setting a FRC value of 400 (i.e. recalibrating outside) and using mosquitto_pub the command line would look something like this:
mosquitto_pub -h broker.address -m "FRC 400" -t "AutoBloomer/SensorLocation/SensorName/control"
For more details on these parameters, see the SCD30 documentation here
No comments yet. Be the first to ask about this board.