From 424111f925f06cac186262d60baa9148f8cf0c3e Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Mon, 15 Jul 2024 12:25:22 +0200 Subject: [PATCH] update doc --- docs/blog.md | 2 +- docs/blog/2024-07-01_shelly_solar_diverter.md | 6 +- docs/build.md | 294 +++++++++++------- docs/buy.md | 34 +- docs/index.md | 32 +- docs/manual.md | 62 +++- 6 files changed, 282 insertions(+), 148 deletions(-) diff --git a/docs/blog.md b/docs/blog.md index 5b54f4f..2b28bfb 100644 --- a/docs/blog.md +++ b/docs/blog.md @@ -6,7 +6,7 @@ description: Blog # Blog -- [2024-07-01 - Shelly Solar Diverter](/blog/2024-07-01_shelly_solar_diverter) +- [2024-07-01 - Shelly Solar Diverter / Router](/blog/2024-07-01_shelly_solar_diverter) - [2024-06-26 - Everything on le JSY](/blog/2024-06-26_everything_on_the_jsy) - [2024-06-25 - Remote JSY through UDP](/blog/2024-06-25_remote_jsy) - [2024-06-23 - Development is still in progress](/blog/2024-06-23_development_is_still_in_progress) diff --git a/docs/blog/2024-07-01_shelly_solar_diverter.md b/docs/blog/2024-07-01_shelly_solar_diverter.md index 396bb16..2429840 100644 --- a/docs/blog/2024-07-01_shelly_solar_diverter.md +++ b/docs/blog/2024-07-01_shelly_solar_diverter.md @@ -8,9 +8,9 @@ _Date: 2024-07-01_ _I've put the YaSolR project in pause for a few days to work on this very cool and awesome Shelly integration..._ -# Shelly Solar Diverter +# Shelly Solar Diverter / Router -| [![](../assets/img/hardware/shelly_solar_diverter_poc2.jpeg)](../assets/img/hardware/shelly_solar_diverter_poc2.jpeg) | [![](../assets/img/screenshots/shelly_solar_diverter.jpeg)](../assets/img/screenshots/shelly_solar_diverter.jpeg) | +| [![](../assets/img/hardware/shelly_solar_diverter_poc2.jpeg)](../assets/img/hardware/shelly_solar_diverter_poc2.jpeg) | [![](../assets/img/screenshots/shelly_solar_diverter.jpeg)](../assets/img/screenshots/shelly_solar_diverter.jpeg) | - [What is a Solar Router / Diverter ?](#what-is-a-solar-router--diverter-) - [Shelly Solar Diverter](#shelly-solar-diverter-1) @@ -46,7 +46,7 @@ A solar router can also do more things, like controlling (on/off) the activation A router can also schedule some forced heating of the water tank to ensure the water reaches a safe temperature, and consequently bypass the dimmed voltage. This is called a bypass relay. -## Shelly Solar Diverter +## Shelly Solar Diverter Features - **Unlimited dimmers (output)** - **PID Controller** diff --git a/docs/build.md b/docs/build.md index 93191bf..d61ab3b 100644 --- a/docs/build.md +++ b/docs/build.md @@ -6,9 +6,15 @@ description: Build # How to build your router -- [Build Types](#build-types) - - [Examples of Shopping Lists](#examples-of-shopping-lists) -- [Default GPIO pinout per board](#default-gpio-pinout-per-board) +- [Build Examples](#build-examples) + - [The Recycler](#the-recycler) + - [The Minimalist](#the-minimalist) + - [The Adventurer](#the-adventurer) + - [The Elite](#the-elite) + - [The Professional (🚧)](#the-professional-%F0%9F%9A%A7) + - [Possible Upgrades](#possible-upgrades) + - [Remote JSY](#remote-jsy) + - [Alternative: The Shelly Solar Diverter](#alternative-the-shelly-solar-diverter) - [Selecting your Hardware](#selecting-your-hardware) - [ESP32 Boards](#esp32-boards) - [Dimmers: Robodyn, Solid State Relay or Voltage Regulator ?](#dimmers-robodyn-solid-state-relay-or-voltage-regulator-) @@ -23,141 +29,145 @@ description: Build - [Measurement Devices](#measurement-devices) - [Temperature Sensors, LEDs, Buttons, Displays](#temperature-sensors-leds-buttons-displays) - [Mounting Accessories](#mounting-accessories) +- [Default GPIO pinout per board](#default-gpio-pinout-per-board) - [Pictures of some routers](#pictures-of-some-routers) -## Build Types +## Build Examples YaSolR supports many builds and routing algorithms. -Before building your router, you need to decide which type of technology you want to use to dim the voltage (_Burst Mode_ or _Phase Control_). -Here is a compatibility matrix for the main pieces of hardware depending on the router type you want to build. +Before building your router, you need to decide which type of hardware you want to use. +Here are below some examples: -Once you have picked up your build type, you can look at the Wiring Schema to know how to wire it and see the [Compatible Hardware](#compatible-hardware) section to know what you need to buy. +- [The Recycler](#the-recycler): reuse your existing Shelly EM or Shelly 3EM to build a router +- [The Minimalist](#the-minimalist): the cheapest and easiest to build +- [The Adventurer](#the-adventurer): for people who want to mitigate the flaws of the Robodyn and do some improvements over the existing Robodyn +- [The Elite](#the-elite): for people who want to use a Random SSR instead of a Robodyn to safely dim more power and have a better Zero-Cross Detection circuit +- [The Professional (🚧)](#the-professional-%F0%9F%9A%A7): probably the best and safe solution out there but requires an additional power source +- [Possible Upgrades](#possible-upgrades): some additional components you can add to your router +- [Remote JSY](#remote-jsy): a standalone application to place in your electrical panel to send the JSY metrics through UDP for remote installations +- [Alternative: The Shelly Solar Diverter](#alternative-the-shelly-solar-diverter): a limited Solar Diverter / Router with Shelly devices and a voltage regulator + +### The Recycler -| Hardware | Phase Control _(\*3)_ | Burst Mode | Nominal Load _(\*1)_ | Wiring Schemas | -| :------------------------------ | :-------------------: | :--------: | :---------------------------: | :------------------------- | -| Robodyn 24A
_(alone)_ | βœ… | βœ… | < 2000 W | // TODO: add wiring schema | -| Robodyn 40A
_(alone)_ | βœ… | βœ… | < 3000 W | // TODO: add wiring schema | -| Random SSR
+ ZCD Circuit | βœ… | βœ… | 1/3 of SSR rated load _(\*2)_ | // TODO: add wiring schema | -| Zero-Cross SSR
+ ZCD Circuit | ❌ | βœ… | 1/3 of SSR rated load _(\*2)_ | // TODO: add wiring schema | +Reuse your existing Shelly EM or Shelly 3EM to build a router! -- **(\*1)**: In example, a 24A Triac would support a maximum peak of 24A but it is advised to not go over 1/3 - 1/2 for the nominal load. Some people also replace the TRIAC with a better one (see [Compatible Hardware](#compatible-hardware) below)\_ -- **(\*2)**: _Max Load for SSR depends on the supported SSR load. Use 1/3 rule for safety_ -- **(\*3)**: Generate _harmonics_, an effect of phase control system. This is not wrong if properly maintained at an acceptable level as per the regulations.\_ +| ESP32-DevKitC | Robodyn AC Dimmer 40A/800V | Shelly EM or 3EM | +| :----------------------------------------------------------------------: | :--------------------------------------------------------------------: | :-----------------------------------------------------------------: | +| | | | -**Hint:** Remember that according to regulations about harmonic, the maximum power should be at around 750W. -More than that, you are supposed to put in place filtering systems to reduce the harmonics. -So if you want to build a router that is compliant with the regulations, any build type will be fine as long as you pay attention to the generated harmonic level. +Notes: -**Bypass:** Whatever the solution you pick, you can always add an optional bypass relay to send the full power to the load instead of dimming it, free of harmonics. -If no bypass relay is added, the dimmer will be used instead at 100% when pressing the bypass. +- Robodyn includes Zero-Cross Detection circuit +- Supports **Phase Control** and **Burst mode** +- Advised load not more than 2000W +- Robodyn has poor quality heat sink, soldering and Zero-Cross pulse +- Bypass mode will use the Robodyn dimmer at 100% power +- Reuse your Shelly EM or 3EM and send through MQTT grid power and voltage +- Not as precise as a JSY (MQTT delays) +- You can also use a SSR and ZCD module instead of the Robodyn +- No local measurement in place to measure the routed power (statistics will be empty) -### Examples of Shopping Lists +### The Minimalist -For each example below, you can add: +The _Minimalist_ build uses inexpensive and easy to use components to start a router. -- ESP32 NodeMCU Dev Kit C -- DIN Rail Mount for ESP32 NodeMCU Dev Kit C -- HDR-15-5 (to power the ESP) -- 1x or 2x 2-Channel 5V DC / 30A Dual Electromagnetic Relays on DIN Rail (for bypass relay + external relay) -- JSY (to measure the grid power and total routed power) -- 1x or 2x PZEM-004T (to measure each output individually and more precisely) -- Cables, LEDs, etc +| ESP32-DevKitC | Robodyn AC Dimmer 40A/800V | JSY-MK-194T with 2 remote clamps | +| :----------------------------------------------------------------------: | :--------------------------------------------------------------------: | :----------------------------------------------------------------------: | +| | | | -**Example 1: For loads up to 2000 W** +Notes: -- Robodyn 40A/800V (placed vertically) +- Robodyn includes Zero-Cross Detection circuit +- Supports **Phase Control** and **Burst mode** +- Advised load not more than 2000W +- Robodyn has poor quality heat sink, soldering and Zero-Cross pulse +- Bypass mode will use the Robodyn dimmer at 100% power -**Example 2: For loads up to 2000 W** +### The Adventurer -- Vertical Heat Sink -- Robodyn 24A/600V (but we move the Triac on the Heat Sink above) +The _Adventurer_ build is for people who are able to mitigate the flaws of the Robodyn 24A to improve it. +The TRIAC can be changed to a BTA40-800B RD91 fixed directly on the heat sink, and the heat sink can be upgraded. +See the [Robodyn](#robodyn) section for more information. -**Example 3: For loads up to 3000 W** +| ESP32-DevKitC | Robodyn AC Dimmer 24A/600V | Heat Sink | Triac BTA40-800B RD91 | JSY-MK-194T with 2 remote clamps | +| :----------------------------------------------------------------------: | :--------------------------------------------------------------------: | :------------------------------------------------------------------: | :-------------------------------------------------------------------: | ------------------------------------------------------------------------ | +| | | | | | -- Vertical Heat Sink -- Triac BTA40-800B RD91 (mounted on the heat sink) -- Robodyn 24A/600V (but we replace the Triac with the one above) +Notes: -**Example 4: For any load - SSR based** +- Robodyn includes Zero-Cross Detection circuit +- Supports **Phase Control** and **Burst mode** +- Advised load not more than 2000-3000W if correctly wired and dimensioned +- Robodyn has poor quality heat sink, soldering and Zero-Cross pulse +- Bypass mode will use the Robodyn dimmer at 100% power +- Requires to unsolder the heat sink and triac and put a new triac on a new heat sink -- Random Solid State Relay: rated 3x your load (i.e. 40DA for max 3000W) -- Heat Sink for SSR (matching your load, vertical ideally) -- DIN Rail clip for SSR -- ZCD module + DIN Rail mount +### The Elite -## Default GPIO pinout per board +The _Elite_ build is for people who want to use a Random SSR instead of a Robodyn to safely dim more power and have a better Zero-Cross Detection circuit more more precising routing. -The hardware and GPIO pinout are heavily inspired by [Routeur solaire PV monophasΓ© Le Profes'Solaire](https://sites.google.com/view/le-professolaire/routeur-professolaire) from Anthony. -Please read all the information there first. -He did a very great job with some videos explaining the wiring. +| ESP32-DevKitC | Random Solid State Relay | Heat Sink | Zero-Cross Detection Module | JSY-MK-194T with 2 remote clamps | +| :----------------------------------------------------------------------: | :-------------------------------------------------------------------: | :------------------------------------------------------------------: | :------------------------------------------------------------: | ------------------------------------------------------------------------ | +| | | | | | -Most of the features can be enabled or disabled through the app and the GPIO pinout can be changed also trough the app. +- Dedicated ZCD circuit with a good pulse +- Dedicated Random SSR (models up to 100A) +- Supports **Phase Control** and **Burst mode** +- Bypass mode will use the SSR dimmer set at 100% power +- Other types of Heat Sink are available: the image above is just an example. + Pick one according to your load. +- All the components can be easily attached onto a DIN rail -Here are below the default GPIO pinout for each board. +### The Professional (🚧) -**Tested boards:** +The _Professional_ build uses a Voltage Regulator to control the power routing. +This is probably the best reliable and efficient solution, but it is more complex to setup and wire. +It requires an additional 12V power supply. -| **FEATURE** | **ESP32** | **NodeMCU-32S** | **esp32s3** | **wt32_eth01** | **T-ETH-Lite** | -| :-------------------------------- | :-------: | :-------------: | :---------: | :------------: | :------------: | -| Display CLOCK (CLK) | 22 | 22 | 9 | 32 | 40 | -| Display DATA (SDA) | 21 | 21 | 8 | 33 | 41 | -| JSY-MK-194T RX (Serial TX) | 17 | 17 | 17 | 17 | 17 | -| JSY-MK-194T TX (Serial RX) | 16 | 16 | 16 | 5 | 18 | -| Light Feedback (Green) | 0 | 0 | 0 | -1 | 38 | -| Light Feedback (Red) | 15 | 15 | 15 | -1 | 46 | -| Light Feedback (Yellow) | 2 | 2 | 2 | -1 | 21 | -| OUTPUT #1 Bypass Relay | 32 | 32 | 40 | 12 | 20 | -| OUTPUT #1 Dimmer (Robodyn or SSR) | 25 | 25 | 37 | 2 | 19 | -| OUTPUT #1 Temperature Sensor | 18 | 18 | 18 | 15 | 3 | -| OUTPUT #2 Bypass Relay | 33 | 33 | 33 | -1 | 15 | -| OUTPUT #2 Dimmer (Robodyn or SSR) | 26 | 26 | 36 | -1 | 7 | -| OUTPUT #2 Temperature Sensor | 5 | 5 | 5 | -1 | 16 | -| Push Button (restart) | EN | EN | EN | EN | EN | -| RELAY #1 | 13 | 13 | 13 | 14 | 5 | -| RELAY #2 | 12 | 12 | 12 | -1 | 6 | -| System Temperature Sensor | 4 | 4 | 4 | 4 | 4 | -| ZCD (Robodyn or ZCD Sync) | 35 | 35 | 35 | 35 | 8 | -| PZEM-004T v3 RX (Serial TX) | 27 | 27 | 11 | -1 | -1 | -| PZEM-004T v3 TX (Serial RX) | 14 | 14 | 14 | -1 | -1 | +| ESP32-DevKitC | Voltage Regulator | Heat Sink | PWM to Analog Converter | JSY-MK-194T with 2 remote clamps | +| :----------------------------------------------------------------------: | :--------------------------------------------------------------------: | :----------------------------------------------------------------------: | :--------------------------------------------------------------------: | ------------------------------------------------------------------------ | +| | | | | | -- `-1` means not mapped (probably because the board does not have enough pins) +- Supports **Phase Control** and **Burst mode** +- Voltage Regulators are available for big loads +- Heat sink are bigger and better quality: bigger models are also available +- Requires an additional 12V power supply (i.e. Mean Well HDR-15-15 12V DC) +- Bypass mode will use the dimmer set at 100% power +- All the components can be easily attached onto a DIN rail -**Potential compatible boards, but not tested yet:** +### Possible Upgrades -| **FEATURE** | **esp32-poe** | **ESP32-C3-DevKitC-02** | **lolin32_lite** | **lolin_s2_mini** | **m5stack-atom** | **m5stack-atoms3** | -| :-------------------------------- | :-----------: | :---------------------: | :--------------: | :---------------: | :--------------: | :----------------: | -| Display CLOCK (CLK) | 16 | 6 | 22 | 9 | -1 | -1 | -| Display DATA (SDA) | 13 | 7 | 19 | 8 | -1 | -1 | -| JSY-MK-194T RX (Serial TX) | 33 | 20 | 17 | 39 | -1 | -1 | -| JSY-MK-194T TX (Serial RX) | 35 | 21 | 16 | 37 | -1 | -1 | -| Light Feedback (Green) | -1 | -1 | 0 | 3 | -1 | -1 | -| Light Feedback (Red) | -1 | -1 | 15 | 6 | -1 | -1 | -| Light Feedback (Yellow) | -1 | -1 | 2 | 2 | -1 | -1 | -| OUTPUT #1 Bypass Relay | 4 | 2 | 32 | 21 | -1 | -1 | -| OUTPUT #1 Dimmer (Robodyn or SSR) | 2 | 1 | 25 | 10 | -1 | -1 | -| OUTPUT #1 Temperature Sensor | 5 | 0 | 18 | 18 | -1 | -1 | -| OUTPUT #2 Bypass Relay | -1 | 9 | 33 | 33 | -1 | -1 | -| OUTPUT #2 Dimmer (Robodyn or SSR) | -1 | 8 | 26 | 11 | -1 | -1 | -| OUTPUT #2 Temperature Sensor | -1 | 5 | 5 | 5 | -1 | -1 | -| Push Button (restart) | EN | EN | EN | EN | EN | EN | -| RELAY #1 | 14 | -1 | 13 | 13 | -1 | -1 | -| RELAY #2 | 15 | -1 | 12 | 12 | -1 | -1 | -| System Temperature Sensor | 0 | 4 | 4 | 4 | -1 | -1 | -| ZCD (Robodyn or ZCD Sync) | 36 | 3 | 35 | 35 | -1 | -1 | -| PZEM-004T v3 RX (Serial TX) | -1 | -1 | -1 | -1 | -1 | -1 | -| PZEM-004T v3 TX (Serial RX) | -1 | -1 | -1 | -1 | -1 | -1 | +Here are below what you can add to upgrade your router: -- `-1` means not mapped (probably because the board does not have enough pins) -- This mapping table might contain errors +| Hardware | Description | +| :--------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------ | +| | A bypass relay to avoid using the dimmer when auto bypass is enabled, and an additional relay to control an external load | +| | A temperature sensor to measure the water tank temperature to automatically stop or start the water heating | +| | A push button to restart the router easily | +| | LEDs to display the system status | +| | A display to show the router information | +| | A PZEM to precisely measure the routed power for each output. Only useful if you have more than one output. | -**Minimal requirements:** +### Remote JSY -- a pin configured to the ZCD system: either the ZC pin of the Robodyn or any pin from any other ZC detection module -- a pin configured to the Phase Control system: PSM pin for the Robodyn or DC + side of the Random SSR +Here are the components below to build a remote JSY and install the [Sender](https://github.com/mathieucarbou/MycilaJSY/tree/main/examples/RemoteUDP) .ino file on a it. +This is a standalone application that looks looks like this and will show all your JSY data, help you manage it, and also send the data through UDP **at a rate of 20 messages per second**. -The website display the pinout configured, the pinout layout that is live at runtime and also displays some potential issues like duplicate pins or wrong pin configuration. +![](https://github.com/mathieucarbou/MycilaJSY/assets/61346/3066bf12-31d5-45de-9303-d810f14731d0) -[![](./assets/img/screenshots/gpio.jpeg)](./assets/img/screenshots/gpio.jpeg) +You can look in the [JSY project](https://oss.carbou.me/MycilaJSY/) to find more information about how to setup remote JSY and the supported protocols. + +| Mean Well HDR-15-5 5V DC | ESP32-DevKitC | JSY-MK-194T with 2 remote clamps | +| :--------------------------------------------------------------------: | :----------------------------------------------------------------------: | ------------------------------------------------------------------------ | +| | | | + +### Alternative: The Shelly Solar Diverter + +It is also possible to build a (limited) Solar Diverter / Router with Shelly devices and a voltage regulator. + +| [![](./assets/img/hardware/shelly_solar_diverter_poc2.jpeg)](./assets/img/hardware/shelly_solar_diverter_poc2.jpeg) | [![](./assets/img/screenshots/shelly_solar_diverter.jpeg)](./assets/img/screenshots/shelly_solar_diverter.jpeg) | + +See this blog post for more information: [Shelly Solar Diverter](./blog/2024-07-01_shelly_solar_diverter) ## Selecting your Hardware @@ -367,11 +377,85 @@ Links are provided for reference only, you can find them on other websites. | | [DIN Rail Mount for ESP32 NodeMCU Dev Kit C](https://fr.aliexpress.com/item/1005005096107275.html) | | | [Distribution Module](https://fr.aliexpress.com/item/1005005996836930.html) / [More choice](https://fr.aliexpress.com/item/1005006039723013.html) | | | [DIN Rail Clips for SSR](https://fr.aliexpress.com/item/1005004396715182.html) | -| | AC-DC 5V 2.4A DIN Adapter HDR-15-5 [Amazon](https://www.amazon.fr/Alimentation-rail-Mean-Well-HDR-15-5/dp/B06XWQSJGW), [AliExpress](https://fr.aliexpress.com/item/4000513120668.html). Can be used to power the ESP when installed in an electric box on DIN rail. Also if you need, a 12V version s available: [HDR-15-15 12V DC version](https://www.amazon.fr/Alimentation-rail-Mean-Well-HDR-15-5/dp/B07942GFTH?th=1) | +| | AC-DC 5V 2.4A DIN Adapter HDR-15-5 [Amazon](https://www.amazon.fr/Alimentation-rail-Mean-Well-HDR-15-5/dp/B06XWQSJGW), [AliExpress](https://fr.aliexpress.com/item/4000513120668.html). Can be used to power the ESP when installed in an electric box on DIN rail. Also if you need, a 12V version s available: [HDR-15-15 12V DC version](https://www.amazon.fr/Alimentation-rail-Mean-Well-HDR-15-5/dp/B07942GFTH?th=1) | | | [3D Print enclosure for JSY-MK-194T](https://www.thingiverse.com/thing:6003867). You can screw it on an SSR DIN Rail to place your JSY on a DIN Rail in this enclosure. | | | [Dupont Cable Kit](https://fr.aliexpress.com/item/1699285992.html) | | | [100 ohms 0.1uF RC Snubber](https://www.quintium.fr/shelly/168-shelly-rc-snubber.html) (for Robodyn AC dimmer and Random SSR: can be placed at dimmer output) | +## Default GPIO pinout per board + +The hardware and GPIO pinout are heavily inspired by [Routeur solaire PV monophasΓ© Le Profes'Solaire](https://sites.google.com/view/le-professolaire/routeur-professolaire) from Anthony. +Please read all the information there first. +He did a very great job with some videos explaining the wiring. + +Most of the features can be enabled or disabled through the app and the GPIO pinout can be changed also trough the app. + +Here are below the default GPIO pinout for each board. + +**Tested boards:** + +| **FEATURE** | **ESP32** | **NodeMCU-32S** | **esp32s3** | **wt32_eth01** | **T-ETH-Lite** | +| :-------------------------------- | :-------: | :-------------: | :---------: | :------------: | :------------: | +| Display CLOCK (CLK) | 22 | 22 | 9 | 32 | 40 | +| Display DATA (SDA) | 21 | 21 | 8 | 33 | 41 | +| JSY-MK-194T RX (Serial TX) | 17 | 17 | 17 | 17 | 17 | +| JSY-MK-194T TX (Serial RX) | 16 | 16 | 16 | 5 | 18 | +| Light Feedback (Green) | 0 | 0 | 0 | -1 | 38 | +| Light Feedback (Red) | 15 | 15 | 15 | -1 | 46 | +| Light Feedback (Yellow) | 2 | 2 | 2 | -1 | 21 | +| OUTPUT #1 Bypass Relay | 32 | 32 | 40 | 12 | 20 | +| OUTPUT #1 Dimmer (Robodyn or SSR) | 25 | 25 | 37 | 2 | 19 | +| OUTPUT #1 Temperature Sensor | 18 | 18 | 18 | 15 | 3 | +| OUTPUT #2 Bypass Relay | 33 | 33 | 33 | -1 | 15 | +| OUTPUT #2 Dimmer (Robodyn or SSR) | 26 | 26 | 36 | -1 | 7 | +| OUTPUT #2 Temperature Sensor | 5 | 5 | 5 | -1 | 16 | +| Push Button (restart) | EN | EN | EN | EN | EN | +| RELAY #1 | 13 | 13 | 13 | 14 | 5 | +| RELAY #2 | 12 | 12 | 12 | -1 | 6 | +| System Temperature Sensor | 4 | 4 | 4 | 4 | 4 | +| ZCD (Robodyn or ZCD Sync) | 35 | 35 | 35 | 35 | 8 | +| PZEM-004T v3 RX (Serial TX) | 27 | 27 | 11 | -1 | -1 | +| PZEM-004T v3 TX (Serial RX) | 14 | 14 | 14 | -1 | -1 | + +- `-1` means not mapped (probably because the board does not have enough pins) + +**Potential compatible boards, but not tested yet:** + +| **FEATURE** | **esp32-poe** | **ESP32-C3-DevKitC-02** | **lolin32_lite** | **lolin_s2_mini** | **m5stack-atom** | **m5stack-atoms3** | +| :-------------------------------- | :-----------: | :---------------------: | :--------------: | :---------------: | :--------------: | :----------------: | +| Display CLOCK (CLK) | 16 | 6 | 22 | 9 | -1 | -1 | +| Display DATA (SDA) | 13 | 7 | 19 | 8 | -1 | -1 | +| JSY-MK-194T RX (Serial TX) | 33 | 20 | 17 | 39 | -1 | -1 | +| JSY-MK-194T TX (Serial RX) | 35 | 21 | 16 | 37 | -1 | -1 | +| Light Feedback (Green) | -1 | -1 | 0 | 3 | -1 | -1 | +| Light Feedback (Red) | -1 | -1 | 15 | 6 | -1 | -1 | +| Light Feedback (Yellow) | -1 | -1 | 2 | 2 | -1 | -1 | +| OUTPUT #1 Bypass Relay | 4 | 2 | 32 | 21 | -1 | -1 | +| OUTPUT #1 Dimmer (Robodyn or SSR) | 2 | 1 | 25 | 10 | -1 | -1 | +| OUTPUT #1 Temperature Sensor | 5 | 0 | 18 | 18 | -1 | -1 | +| OUTPUT #2 Bypass Relay | -1 | 9 | 33 | 33 | -1 | -1 | +| OUTPUT #2 Dimmer (Robodyn or SSR) | -1 | 8 | 26 | 11 | -1 | -1 | +| OUTPUT #2 Temperature Sensor | -1 | 5 | 5 | 5 | -1 | -1 | +| Push Button (restart) | EN | EN | EN | EN | EN | EN | +| RELAY #1 | 14 | -1 | 13 | 13 | -1 | -1 | +| RELAY #2 | 15 | -1 | 12 | 12 | -1 | -1 | +| System Temperature Sensor | 0 | 4 | 4 | 4 | -1 | -1 | +| ZCD (Robodyn or ZCD Sync) | 36 | 3 | 35 | 35 | -1 | -1 | +| PZEM-004T v3 RX (Serial TX) | -1 | -1 | -1 | -1 | -1 | -1 | +| PZEM-004T v3 TX (Serial RX) | -1 | -1 | -1 | -1 | -1 | -1 | + +- `-1` means not mapped (probably because the board does not have enough pins) +- This mapping table might contain errors + +**Minimal requirements:** + +- a pin configured to the ZCD system: either the ZC pin of the Robodyn or any pin from any other ZC detection module +- a pin configured to the Phase Control system: PSM pin for the Robodyn or DC + side of the Random SSR + +The website display the pinout configured, the pinout layout that is live at runtime and also displays some potential issues like duplicate pins or wrong pin configuration. + +[![](./assets/img/screenshots/gpio.jpeg)](./assets/img/screenshots/gpio.jpeg) + ## Pictures of some routers > _TO BE COMPLETED_ diff --git a/docs/buy.md b/docs/buy.md index 664a88b..285db7b 100644 --- a/docs/buy.md +++ b/docs/buy.md @@ -10,27 +10,29 @@ OSS and Pro firmware are the same, except that the PRO version relies on commerc **The Pro version is only 25 euros** and gives access to all the perks of the Pro version below: -| Feature | OSS (Free) | PRO (Paid) | -| -------------------------- | :--------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| Dashboard | Overview **only** | Full Dashboard as seen in the screenshots | -| Manual Dimmer Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Manual Bypass Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Manual Relay Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Configuration | Debug Config Page | **From Dashboard**
Debug Config Page | -| Health View from Dashboard | ❌ | βœ… | -| Statistics and Charts | ❌ | βœ… | -| PZEM Pairing | ❌ | βœ… | -| Help & Support | [Facebook Group](https://www.facebook.com/groups/yasolr) | [Facebook Group](https://www.facebook.com/groups/yasolr)
[Forum](https://github.com/mathieucarbou/YaSolR-OSS/discussions)
[Bug Report](https://github.com/mathieucarbou/YaSolR-OSS/issues) | -| Web Console | [WebSerial Lite](https://github.com/mathieucarbou/WebSerialLite) | [WebSerial Pro](https://www.webserial.pro) | -| Dashboard | [ESP-DASH](https://github.com/ayushsharma82/ESP-DASH) | [ESP-DASH Pro](https://espdash.pro) | -| OTA Firmware Update | [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA) | [ElegantOTA Pro](https://elegantota.pro) | +| Feature | OSS (Free) | PRO (Paid) | +| -------------------------------- | :--------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Dashboard | Overview **only** | Full Dashboard as seen in the screenshots | +| Manual Dimmer Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Manual Bypass Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Manual Relay Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Configuration | Debug Config Page | **From Dashboard**
Debug Config Page | +| Automatic Resistance Calibration | ❌ | βœ… | +| Energy Reset | ❌ | βœ… | +| GPIO Config and Health | ❌ | βœ… | +| Hardware Config and Health | ❌ | βœ… | +| Output Statistics | ❌ | βœ… | +| PID Tuning View | ❌ | βœ… | +| PZEM Pairing | ❌ | βœ… | +| Help & Support | [Facebook Group](https://www.facebook.com/groups/yasolr) | [Facebook Group](https://www.facebook.com/groups/yasolr)
[Forum](https://github.com/mathieucarbou/YaSolR-OSS/discussions)
[Bug Report](https://github.com/mathieucarbou/YaSolR-OSS/issues) | +| Web Console | [WebSerial Lite](https://github.com/mathieucarbou/WebSerialLite) | [WebSerial Pro](https://www.webserial.pro) | +| Dashboard | [ESP-DASH](https://github.com/ayushsharma82/ESP-DASH) | [ESP-DASH Pro](https://espdash.pro) | +| OTA Firmware Update | [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA) | [ElegantOTA Pro](https://elegantota.pro) | The money helps funding the hardware necessary to test and develop the firmware. ## How to buy: -**WARNING! THE PROJECT IS STILL IN DEVELOPMENT: All the features marked with 🚧 in the home page are not yet available** - 1. Get a **[Github](https://github.com/)** account so that I can add your GitHub username to the project repository from where you can download all the firmware files. 2. Make a donation of **25 euros or more** (through [Github](https://github.com/sponsors/mathieucarbou) or [Paypal](https://www.paypal.com/donate/?hosted_button_id=QJYRAPXGEDCNS)). diff --git a/docs/index.md b/docs/index.md index 8f73b42..a661a70 100644 --- a/docs/index.md +++ b/docs/index.md @@ -235,20 +235,24 @@ OSS and Pro firmware are the same, except that the PRO version relies on commerc **The Pro version is only 25 euros** and gives access to all the perks of the Pro version below: -| Feature | OSS (Free) | PRO (Paid) | -| -------------------------- | :--------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -| Dashboard | Overview **only** | Full Dashboard as seen in the screenshots | -| Manual Dimmer Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Manual Bypass Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Manual Relay Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | -| Configuration | Debug Config Page | **From Dashboard**
Debug Config Page | -| Health View from Dashboard | ❌ | βœ… | -| Statistics and Charts | ❌ | βœ… | -| PZEM Pairing | ❌ | βœ… | -| Help & Support | [Facebook Group](https://www.facebook.com/groups/yasolr) | [Facebook Group](https://www.facebook.com/groups/yasolr)
[Forum](https://github.com/mathieucarbou/YaSolR-OSS/discussions)
[Bug Report](https://github.com/mathieucarbou/YaSolR-OSS/issues) | -| Web Console | [WebSerial Lite](https://github.com/mathieucarbou/WebSerialLite) | [WebSerial Pro](https://www.webserial.pro) | -| Dashboard | [ESP-DASH](https://github.com/ayushsharma82/ESP-DASH) | [ESP-DASH Pro](https://espdash.pro) | -| OTA Firmware Update | [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA) | [ElegantOTA Pro](https://elegantota.pro) | +| Feature | OSS (Free) | PRO (Paid) | +| -------------------------------- | :--------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | +| Dashboard | Overview **only** | Full Dashboard as seen in the screenshots | +| Manual Dimmer Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Manual Bypass Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Manual Relay Control | Home Assistant
MQTT API
REST API | **From Dashboard**
Home Assistant
MQTT API
REST API | +| Configuration | Debug Config Page | **From Dashboard**
Debug Config Page | +| Automatic Resistance Calibration | ❌ | βœ… | +| Energy Reset | ❌ | βœ… | +| GPIO Config and Health | ❌ | βœ… | +| Hardware Config and Health | ❌ | βœ… | +| Output Statistics | ❌ | βœ… | +| PID Tuning View | ❌ | βœ… | +| PZEM Pairing | ❌ | βœ… | +| Help & Support | [Facebook Group](https://www.facebook.com/groups/yasolr) | [Facebook Group](https://www.facebook.com/groups/yasolr)
[Forum](https://github.com/mathieucarbou/YaSolR-OSS/discussions)
[Bug Report](https://github.com/mathieucarbou/YaSolR-OSS/issues) | +| Web Console | [WebSerial Lite](https://github.com/mathieucarbou/WebSerialLite) | [WebSerial Pro](https://www.webserial.pro) | +| Dashboard | [ESP-DASH](https://github.com/ayushsharma82/ESP-DASH) | [ESP-DASH Pro](https://espdash.pro) | +| OTA Firmware Update | [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA) | [ElegantOTA Pro](https://elegantota.pro) | The money helps funding the hardware necessary to test and develop the firmware. diff --git a/docs/manual.md b/docs/manual.md index dc60f47..0ac92ce 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -216,7 +216,7 @@ Note: PZEM is required to see the measurements of each outputs. **Bypass Control:** -- `Bypass`: Activate or deactivate bypass. +- `Bypass`: Activate or deactivate bypass(force heating) Only available when the bypass is not in automatic mode. Otherwise the bypass state is displayed. - `Bypass Automatic Control`: Activate or deactivate automatic bypass based on hours and/or temperature. @@ -229,7 +229,7 @@ Note: PZEM is required to see the measurements of each outputs. ### `Relays` section -YaSolR supports 2 relays (Electromechanical or SSR, controlled with 3.3V DC) to control external loads, or to be connected to the A1 and A2 terminals of a power contactor. +YaSolR supports 2 additional relays (Electromechanical or SSR, controlled with 3.3V DC) to control external loads, or to be connected to the A1 and A2 terminals of a power contactor. Relays can also be connected to the other resistance of the water tank (tri-phase resistance) as described in the [recommendations to reduce harmonics and flickering](./overview#recommendations-to-reduce-harmonics-and-flickering), in order to improve the routing and reduce harmonics. You must use a SSR for that, because the relay will be switched on and off frequently. @@ -352,8 +352,13 @@ As a general rule, **do not use MQTT as a grid power source if you have a JSY or #### MQTT as a Temperature Source MQTT can be used to receive temperature data instead of relying on a connected sensor. +There is **1 minute expiration delay** after which the temperature will be considered as invalid. +So This is important to make sure that the topic will be refreshed, otherwise features based on temperature won't work. -(🚧) +- `Output 1 Temperature MQTT Topic`: if set to a MQTT Topic, the router will listen to it to read the temperature linked to output 1 +- `Output 2 Temperature MQTT Topic`: if set to a MQTT Topic, the router will listen to it to read the temperature linked to output 2 + +**The ESP32 must be restarted to apply the changes.** #### Home Assistant Discovery @@ -425,6 +430,13 @@ This section allows to enable / disable some features of the router, and get som All these components are activated **live without the need to restart the router**. +**Notes:** + +- `Output 1 Relay` / `Output 2 Relay`: these are the SSR or Electromechanical relays connected to the ESP32 and used whn you activate bypass mode. + Only activate if you have connected some relays to be used for the output bypass. +- `Relay 1` / `Relay 2`: these are the SSR or Electromechanical relays connected to the ESP32 and used to control external loads. + Only activate if you have connected some relays to be used for external loads. + ### `Hardware Config` section This section allows to further configure some hardware settings and calibrate the resistance values of the loads. @@ -446,8 +458,8 @@ This section allows to further configure some hardware settings and calibrate th #### Relays -- `Output 1 Bypass Relay Type`: the relay type for Output 1 Bypass: Normally Open (NO) or Normally Closed (NC). -- `Output 2 Bypass Relay Type`: the relay type for Output 2 Bypass: Normally Open (NO) or Normally Closed (NC). +- `Output 1 Relay Type (Bypass)`: the relay type for Output 1 Bypass: Normally Open (NO) or Normally Closed (NC). +- `Output 2 Relay Type (Bypass)`: the relay type for Output 2 Bypass: Normally Open (NO) or Normally Closed (NC). - `Relay 1 Type`: the relay type for Relay 1: Normally Open (NO) or Normally Closed (NC). - `Relay 2 Type`: the relay type for Relay 2: Normally Open (NO) or Normally Closed (NC). @@ -458,17 +470,44 @@ This section allows to further configure some hardware settings and calibrate th - `Output 1 Resistance`: the resistance value in Ohms of the load connected to Output 1 - `Output 2 Resistance`: the resistance value in Ohms of the load connected to Output 2 -Be careful to put a value that you have correctly measured! +Be careful to put a value that you have correctly measured with a multimeter, or calculated (see formula below). An approximation will cause the router to not properly work because it won't be able to adjust the exact amount of power to send. +Remember the equation: + +``` +R = U * U / P +``` + +where: + +- `P` is the _nominal_ power in Watts given by the manufacturer of the resistance +- `U` is the _nominal_ voltage in Volts, usually 230V in Europe and 120V in the US/Canada +- `R` is the resistance in Ohms + +**Reading the resistance value from a PZEM or JSY** + If you have a PZEM or JSY device attached, they can help you. You can set the dimmer in manual mode and set it to 50% and 100% and read the resistance value. Then you just have to report it in the `Hardware Config` page. -2. **PZEM-004T v3:** If you have wired a PZEM-004T v3 connected to each output, it will measure the resistance value when routing. +- **PZEM-004T v3:** If you have wired a PZEM-004T v3 connected to each output, it will measure the resistance value when routing. +- **JSY-MK-194T:** If you have a JSY-MK-194T, you can activate the dimmers one by one to 100% and wait for the values to stabilize. + The router will then display the resistance value in the `Overview` page, thanks to the JSY. + +**Using the automatic detection feature** (🚧) -3. **JSY-MK-194T:** If you have a JSY-MK-194T, you can activate the dimmers one by one to 100% and wait for the values to stabilize. - The router will then display the resistance value in the `Overview` page, thanks to the JSY. +- `Output 1 Resistance Detection`: start the automatic detection of the resistance value of the load connected to Output 1 +- `Output 2 Resistance Detection`: start the automatic detection of the resistance value of the load connected to Output 2 + +This is the easiest way to calibrate the resistance values: when a PZEM or JSY is installed, the router will be able to automatically calculate the resistance. +For that, click on the corresponding buttons and wait a few seconds. +You can at the same time check the statistics on the `Output` or `Overview` sections. +Once done, the resistance value will be put in the corresponding field. +Any previously set value will be erased. + +To use this feature, make sure that the resistance will really draw some current. +It won't work if the water heater has already reached its threshold temperature. #### PZEM Pairing @@ -594,6 +633,11 @@ The advantage is a simple setup, the drawbacks are: - the dimmer will heat up. - the power output of he dimmer counts as routed power so the routed power and energy will also contain the bypass power. +In the `Hardware` section, `Output 1 Relay (Bypass)` and `Output 2 Relay (Bypass)` both specify if a relay is installed for the output, on top of the dimmer of course, and if it should be used when bypass is activated. +If no relay is installed, the dimmer will be used and will be set to 100%. + +In the `Hardware Config` section, `Output 1 Relay Type (Bypass)` and `Output 2 Relay Type (Bypass)` are used to specify the type of the relay: `Normally Open` or `Normally Closed`. + ### Display Supported displays are any I2C OLED Display of type `SSD1307`, `SH1106`, `SH1107`.