{"id":1159,"date":"2021-01-01T10:07:37","date_gmt":"2021-01-01T10:07:37","guid":{"rendered":"https:\/\/open-boat-projects.org\/?page_id=1159"},"modified":"2023-07-12T23:07:00","modified_gmt":"2023-07-12T23:07:00","slug":"sensesp","status":"publish","type":"page","link":"https:\/\/open-boat-projects.org\/en\/sensesp\/","title":{"rendered":"SensESP"},"content":{"rendered":"<p><a href=\"https:\/\/open-boat-projects.org\/en\/wichtige-hinweise\/\" target=\"_blank\" rel=\"noopener\"><em><strong>First of all, a few important notes that you should definitely pay attention to.<\/strong><\/em><\/a><\/p>\n<p><a href=\"https:\/\/signalk.org\/2020\/12\/18\/sensesp-1.html\" target=\"_blank\" rel=\"noopener\">SensESP<\/a> is a library that facilitates the integration of ESP8266 and ESP32 based sensors and actuators in a signaK network. The framework is based on <a href=\"https:\/\/platformio.org\/\">PlatformIO<\/a> 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:<\/p>\n<ul>\n<li>Tank sensor (10 ... 180 Ohm)<\/li>\n<li>Temperature sensors (DS18B20, SHT31)<\/li>\n<li>Temperature sensors with a thermopile sensor for higher temperatures up to 500 \u00b0 C<\/li>\n<li>Voltage measurement 0\u2026 .15V<\/li>\n<li>BME280 environmental sensor (temperature, air pressure, humidity)<\/li>\n<li>Frequency counter (e.g. for wind speed, motor speed, shaft speed)<\/li>\n<li>Heading sensor (9DOF)<\/li>\n<li>GPS coordinates with speed and direction<\/li>\n<li>Battery monitoring with INA219<\/li>\n<li>Brightness sensor<\/li>\n<li>Speed sensor<\/li>\n<li>Relay control as output when measured values exceed limit values<\/li>\n<\/ul>\n<p>The repository also contains a <a href=\"https:\/\/github.com\/SignalK\/SensESP\/tree\/master\/pcb\">universal board<\/a> for an ESP8266 to which various sensors can be connected.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail\" src=\"https:\/\/user-images.githubusercontent.com\/1049678\/102636535-7378e980-415d-11eb-9768-0c90d1856176.jpg\" alt=\"custom-built ESP32 development board in a waterproof enclosure\" width=\"3264\" height=\"2448\" \/><\/p>\n<p>Here is a software example for a flow sensor:<\/p>\n<p><code><\/code><\/p>\n<p><code>#include<\/code><br \/>\n<code>#include &quot;sensesp_app.h&quot;<\/code><br \/>\n<code>#include &quot;wiring_helpers.h&quot;<\/code><code><\/code><\/p>\n<p><code>ReactESP app ([] () {<\/code><br \/>\n<code>#ifndef SERIAL_DEBUG_DISABLED<\/code><br \/>\n<code>SetupSerialDebug (115200);<\/code><br \/>\n<code>#endif<\/code><code><\/code><\/p>\n<p><code>\/\/ create a new application for flow meter<\/code><br \/>\n<code>sensesp_app = new SensESPApp ();<\/code><code><\/code><\/p>\n<p><code>\/\/ setup the fuel flow meter on two pins<\/code><br \/>\n<code>\/\/ ESP8266 pins are specified as DX<\/code><br \/>\n<code>\/\/ ESP32 pins are specified as just the X in GPIOX<\/code><br \/>\n<code>#ifdef ESP8266<\/code><br \/>\n<code>uint8_t pinA = D5;<\/code><br \/>\n<code>uint8_t pinB = D6;<\/code><br \/>\n<code>1TP3 Telif defined (ESP32)<\/code><br \/>\n<code>uint8_t pinA = 4;<\/code><br \/>\n<code>uint8_t pinB = 5;<\/code><br \/>\n<code>#endif<\/code><code><\/code><\/p>\n<p><code>\/\/ setup flow meter<\/code><br \/>\n<code>setup_fuel_flow_meter (pinA, pinB);<\/code><code><\/code><\/p>\n<p><code>\/\/ start application<\/code><br \/>\n<code>sensesp_app-&gt; enable ();<\/code><br \/>\n<code>});<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1197 size-large\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic-1024x480.png\" alt=\"\" width=\"952\" height=\"446\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic-1024x480.png 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic-300x141.png 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic-768x360.png 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic-16x8.png 16w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Schematic.png 1339w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Example circuit diagram (<a href=\"https:\/\/github.com\/norbert-walter\/SensESP\/blob\/master\/pcb\/SensESP.fzz\">Fritzing<\/a>)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1195 size-large\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering-1024x651.png\" alt=\"\" width=\"952\" height=\"605\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering-1024x651.png 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering-300x191.png 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering-768x488.png 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering-16x10.png 16w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/Fritzing_Wirering.png 1263w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Realization on breadboard<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1196 size-large\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout-1024x602.png\" alt=\"\" width=\"952\" height=\"560\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout-1024x602.png 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout-300x176.png 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout-768x451.png 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout-16x9.png 16w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/01\/PCB_Layout.png 1273w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Realization as a circuit board (<a href=\"https:\/\/github.com\/norbert-walter\/SensESP\/blob\/master\/pcb\/Gerbers.zip\">Gerber Files<\/a>)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1381 size-large\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-1024x684.jpg\" alt=\"\" width=\"952\" height=\"636\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-1024x684.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-300x200.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-768x513.jpg 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-16x12.jpg 16w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1.jpg 1488w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1380 size-large\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back-1024x685.jpg\" alt=\"\" width=\"952\" height=\"637\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back-1024x685.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back-300x201.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back-768x514.jpg 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back-16x12.jpg 16w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2021\/03\/pcb_rev_0.3.1-back.jpg 1480w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Here is a more professional one <a href=\"https:\/\/github.com\/hatlabs\/SH-ESP32-hardware\">Board with ESP32 and breadboard<\/a> for your own circuits<\/p>\n<p>Order shop for the board: <a href=\"https:\/\/hatlabs.fi\/?v=3a52f3c22ed6\">https:\/\/hatlabs.fi\/?v=3a52f3c22ed6<\/a><\/p>\n<h2>Additional information<\/h2>\n<p>Examples: <a href=\"https:\/\/github.com\/SignalK\/SensESP\/tree\/master\/examples\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/SignalK\/SensESP\/tree\/master\/examples<\/a><\/p>\n<p>Sources: <a href=\"https:\/\/github.com\/SignalK\/SensESP\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/SignalK\/SensESP<\/a><\/p>\n<p>Thread (german sailing-forum) <a href=\"https:\/\/www.segeln-forum.de\/thread\/78521-sensesp-a-signal-k-sensor-development-library-for-esp8266-and-esp32\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.segeln-forum.de\/thread\/78521-sensesp-a-signal-k-sensor-development-library-for-esp8266-and-esp32\/<\/a><\/p>\n<p>Background stories:<\/p>\n<ul>\n<li><a href=\"https:\/\/signalk.org\/2019\/08\/04\/sensesp-sensors.html\" target=\"_blank\" rel=\"noopener\">https:\/\/signalk.org\/2019\/08\/04\/sensesp-sensors.html<\/a><\/li>\n<li><a href=\"https:\/\/signalk.org\/2019\/08\/20\/sensors-part-2.html\" target=\"_blank\" rel=\"noopener\">https:\/\/signalk.org\/2019\/08\/20\/sensors-part-2.html<\/a><\/li>\n<li><a href=\"https:\/\/signalk.org\/2019\/11\/20\/sensors-part-3-software.html\" target=\"_blank\" rel=\"noopener\">https:\/\/signalk.org\/2019\/11\/20\/sensors-part-3-software.html<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>First, a few important tips that you should definitely observe. SensESP is a library that facilitates the integration of ESP8266 and ESP32 based sensors and actuators into a signal 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... <a href=\"https:\/\/open-boat-projects.org\/en\/sensesp\/\" class=\"more-link\">Read more <span class=\"screen-reader-text\">SensESP<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[40,39,37],"tags":[],"class_list":["post-1159","page","type-page","status-publish","hentry","category-openhardware","category-opensource","category-projects"],"_links":{"self":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/1159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/comments?post=1159"}],"version-history":[{"count":19,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/1159\/revisions"}],"predecessor-version":[{"id":5054,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/1159\/revisions\/5054"}],"wp:attachment":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/media?parent=1159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/categories?post=1159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/tags?post=1159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}