Skip to the content.

How to build your router

Build Examples

YaSolR supports many builds and routing algorithms. Before building your router, you need to decide which type of hardware you want to use. Here are below some examples:

The Recycler

Reuse your existing Shelly EM or Shelly 3EM to build a router!

ESP32-DevKitC Robodyn AC Dimmer 40A/800V Shelly EM or 3EM
TIP
WARNING

The Minimalist

The Minimalist build uses inexpensive and easy to use components to start a router.

ESP32-DevKitC Robodyn AC Dimmer 40A/800V JSY-MK-194T with 2 remote clamps
TIP
WARNING

The Adventurer

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 section for more information.

ESP32-DevKitC Robodyn AC Dimmer 24A/600V Heat Sink Triac BTA40-800B RD91 JSY-MK-194T with 2 remote clamps
TIP
WARNING

The Elite

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.

ESP32-DevKitC Random Solid State Relay Heat Sink Zero-Cross Detection Module JSY-MK-194T with 2 remote clamps
TIP
WARNING

The Professional

(🚧)

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.

ESP32-DevKitC Voltage Regulator Heat Sink PWM to Analog Converter JSY-MK-194T with 2 remote clamps
TIP
WARNING

Possible Upgrades

Here are below what you can add to upgrade your router:

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.

Remote JSY

Here are the components below to build a remote JSY and install the Sender .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.

You can look in the JSY project 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.

See this blog post for more information: Shelly Solar Diverter

Selecting your Hardware

ESP32 Boards

Here are the boards we know are compatible and those we have tested.

Board UARTs Ethernet
ESP32-DevKitC (recommended - 3 UARTs) 3  
ESP32-S3-DevKitC-1 (recommended - 3 UARTs) 3  
T-ETH-Lite ESP32 S3 (recommended - 3 UARTs) 3 ✅
ESP-32S 2  
WT32-ETH01 2 ✅

Dimmers: Robodyn, Solid State Relay or Voltage Regulator ?

Here are some pros and cons of each phase control system:

Robodyn (TRIAC):

Solid State Relays:

Voltage Regulators:

Voltage regulators include a ZCD module and a phase control system which can be controlled in many ways. These are the best option, but complex to setup, wire and calibrate and require an additional 12V power supply.

This is the option used in the Shelly Solar Router.

Heat Sink:

In any case, do not forget to correctly dissipate the heat of your Triac / SSR using an appropriate heat sink. Robodyn heat sink is not enough and require some tweaking (like adding a flan or de-soldering the triac and heat sink and put the triac on a bigger heat sink).

It is best to take a vertical heat sink for heat dissipation. In case of the Robodyn 40A, you can install it vertically.

Relays: Solid State Relay or Electromagnetic Relay ?

For bypass relays used for outputs

For external Relays

Also to consider:

How to choose a Solid State Relay ?

Where to buy ?

Here is the non exhaustive list where to find some hardware to build your router. Links are provided for reference only, you can find them on other websites.

ESP32 Boards

   
ESP32-DevKitC (ESPRESSIF Official Store) - Any version will work: 32 NodeMCU, 32s, 32e, 32ue, etc
ESP32-S3-DevKitC-1/1U (ESPRESSIF Official Store)
LILYGO T-ETH-Lite ESP32-S3 (Ethernet)
WT32-ETH01 v1.4 (Ethernet)
WiFi Pigtail Antenna for ESP32 boards supporting external WiFi antenna

Robodyn

   
Robodyn AC Dimmer 24A/600V Includes ZCD, supports Phase Control and Burst mode
Robodyn AC Dimmer 40A/800V Includes ZCD, supports Phase Control and Burst mode
Triac BTA40-800B RD91 here or here if you want / need to replace the Triac inside your Robodyn
Heat Sink for Random SSR and Triac (there are many more types available: take a big heat sink placed vertically)
IMPORTANT
  1. It is possible to switch the TRIAC of an original Robodyn AC Dimmer with a higher one, for example a BTA40-800B BOITIER RD-91
    Ref: Triacs gradateurs pour routeur photovoltaïque.

  2. The heat sink must be chosen according to the SSR / Triac. Here is a good video about the theory: Calcul du dissipateur pour le triac d’un routeur (from Pierre)

  3. Make sure to improve the Robodyn wiring/soldering

Random and Zero-Cross SSR

Random and Zero-Cross SSR  
LCTC Random Solid State Relay (SSR) that can be controlled by a 3.3V DC signal, (Other LCTC vendor link). Supports Phase Control and Burst mode, See How to choose your SSR ? below
Zero-Cross Solid State Relay (SSR) that can be controlled by a 3.3V DC signal Supports Burst mode, See How to choose your SSR ? below
Heat Sink for SSR (there are many more types available: take a big heat sink placed vertically)
Zero-Cross Detection ZCD module is required with SSR.
Very good ZCD module for DIN Rail from Daniel S. (used in conjunction with a Random SSR)

Other SSR:

Voltage Regulators

   
Loncont LSA-H3P50YB (also available in 70A and more). Includes ZCD, supports Phase Control and Burst mode
LCTC Voltage Regulator 220V / 40A or more models without heat sink but 60A, 80A, etc (also available in 70A and more). Includes ZCD, supports Phase Control and Burst mode
3.3V PWM Signal to 0-10V Convertor or this link or this link or this link. Required to use the voltage regulators to convert the ESP32 pulse signal on 3.3V to an analogic output from 0-10V (external 12V power supply required)
Heat Sink 10-60A for Voltage Regulators

Electromagnetic Relay

   
1-Channel 5V DC / 30A Electromagnetic Relay on DIN Rail Support: here, here, here, here
2-Channel 5V DC / 30A Dual Electromagnetic Relays on DIN Rail Support: here, here, here, here, here

Measurement Devices

   
JSY-MK-194T with 1 fixed tore and 1 remote clamp Used to measure the grid power and total routed power
JSY-MK-194T with 2 remote clamps Used to measure the grid power and total routed power
Peacefair PZEM-004T V3 100A Openable (with clamp) official, with connector, USB-TTL Cable. Can be used to measure each output individually and more precisely. Several PZEM-004T can be connected to the same Serial port.
Shelly EM (or any other alternative sending data to MQTT)

Temperature Sensors, LEDs, Buttons, Displays

Temperature Sensors, LEDs, Buttons  
DS18B20 Temperature Sensor + Adapter (easier to use to install in the water tank - take a long cable)
Push Buttons Amazon (16mm) AliExpress (12mm) for restart, manual bypass, reset
Traffic lights Lights module for system status AZ-Delivery, AliExpress
Screens  
SSD1306 OLED Display 4 pins 128x64 I2C
SH1106 OLED Display 4 pins 128x64 I2C
SSD1307 OLED Display 4 pins 128x64 I2C

Mounting Accessories

   
Electric Box
Extension boards (pay attention to the distance between header, there are different models. This one fits the ESP32 NodeMCU above)
DIN Rail Mount for PCB 72mm x 20mm for the ZCD module above to mount on DIN Rail. Alternative link
DIN Rail Mount for ESP32 NodeMCU Dev Kit C
Distribution Module / More choice
DIN Rail Clips for SSR
AC-DC 5V 2.4A DIN Adapter HDR-15-5 Amazon, AliExpress. 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
3D Print enclosure for JSY-MK-194T. You can screw it on an SSR DIN Rail to place your JSY on a DIN Rail in this enclosure.
Dupont Cable Kit
100 ohms 0.1uF RC Snubber (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 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

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

Minimal requirements:

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.

Pictures of some routers

TO BE COMPLETED