First of all, a few important notes that you should definitely pay attention to.
SensESP is a library that facilitates the integration of ESP8266 and ESP32 based sensors and actuators in a signaK network. The framework is based on PlatformIO and is mostly written in C++. Basically, recurring and important functions are mapped by the framework, so that programming and connecting your own sensors to SignalK is quite easy. Currently there are several well-documented examples of different sensors such as:
- Tank sensor (10 ... 180 Ohm)
- Temperature sensors (DS18B20, SHT31)
- Temperature sensors with a thermopile sensor for higher temperatures up to 500 ° C
- Voltage measurement 0… .15V
- BME280 environmental sensor (temperature, air pressure, humidity)
- Frequency counter (e.g. for wind speed, motor speed, shaft speed)
- Heading sensor (9DOF)
- GPS coordinates with speed and direction
- Battery monitoring with INA219
- Brightness sensor
- Speed sensor
- Relay control as output when measured values exceed limit values
The repository also contains a universal board for an ESP8266 to which various sensors can be connected.
Here is a software example for a flow sensor:
#include
#include "sensesp_app.h"
#include "wiring_helpers.h"
ReactESP app ([] () {
#ifndef SERIAL_DEBUG_DISABLED
SetupSerialDebug (115200);
#endif
// create a new application for flow meter
sensesp_app = new SensESPApp ();
// setup the fuel flow meter on two pins
// ESP8266 pins are specified as DX
// ESP32 pins are specified as just the X in GPIOX
#ifdef ESP8266
uint8_t pinA = D5;
uint8_t pinB = D6;
1TP3 Telif defined (ESP32)
uint8_t pinA = 4;
uint8_t pinB = 5;
#endif
// setup flow meter
setup_fuel_flow_meter (pinA, pinB);
// start application
sensesp_app-> enable ();
});
Example circuit diagram (Fritzing)
Realization on breadboard
Realization as a circuit board (Gerber Files)
Here is a more professional one Board with ESP32 and breadboard for your own circuits
Order shop for the board: https://hatlabs.fi/?v=3a52f3c22ed6
Additional information
Examples: https://github.com/SignalK/SensESP/tree/master/examples
Sources: https://github.com/SignalK/SensESP
Thread (german sailing-forum) https://www.segeln-forum.de/thread/78521-sensesp-a-signal-k-sensor-development-library-for-esp8266-and-esp32/
Background stories: