Skip to the content.

How to build your router

Build Examples

If you already have a solar router like F1ATB or “Profes’Solaire”, just flash the YaSolR firmware instead of the one you are using. Most hardware used in these routers are compatible with YaSolR.

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-163T, JSY-MK-194T, JSY-MK-194G or JSY-MK-333
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-163T, JSY-MK-194T, JSY-MK-194G or JSY-MK-333
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-163T, JSY-MK-194T, JSY-MK-194G or JSY-MK-333

The JSY-MK-194G has an integrated ZCD and can be used with a Random SSR directly without the need of an external ZCD module.

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-163T, JSY-MK-194T, JSY-MK-194G or JSY-MK-333
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-163T, JSY-MK-194T, JSY-MK-194G or JSY-MK-333

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

Alternative: Home Assistant Solar Diverter

It is also possible to build a (limited) Solar Diverter / Router with Home Assistant and a voltage regulator + Shelly dimmer.

See this blog post for more information: Home Assistant Solar Diverter

Selecting your Hardware

ESP32 Boards

Here are the boards for which firmwares can be downloaded. If yours in not listed, just ask: it may be possible to add it.

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
Olimex ESP32-POE 3
Olimex ESP32-GATEWAY 3
WIPI 3 3  
TinyPICO 3  
Denky D4 3  

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 Modules

Please note that the JSY-MK-194G has an integrated ZCD and can be used with a Random SSR directly without the need of an external ZCD module.

Zero-Cross Detection Very good and dedicated ZCD modules - Required to use a SSR
ZCD module from Daniel S. and its DIN Rail support
UPM-01 DIN Rail Mount for PCB 72mm x 20mm for the ZCD module above to mount on DIN Rail. Alternative link
ZCD module from Rajkumar S which also needs an optocoupler
Optocoupler for ZCD module from Rajkumar S

I often have some spare ZCD modules since I do some batch ordering on PCbWay. If you are interested in one, please have a look at the availabilities in the Pro page.

TIP

If you have access to a 3D printer, you can also print the DIN Rail mounts.

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 or this link or this link or this link

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-163T with a clamp Used to measure the grid power only.
JSY-MK-194T or JSY-MK-194G with 2 clamps Used to measure the grid power and total routed power. There is also another version with a tore and a clamp.
JSY-MK-333 Used to measure the grid power of a 3-phase installation
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 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.
3D Print enclosure for JSY-MK-194G. 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 esp32-poe esp32-gateway wipy3 tinypico denky_d4
Display CLOCK (CLK) 22 22 9 32 40 -1 -1 -1 -1 -1
Display DATA (SDA) 21 21 8 33 41 -1 -1 -1 -1 -1
JSY Serial2 RX 16 16 16 5 18 35 -1 4 4 22
JSY Serial2 TX 17 17 17 17 17 33 -1 25 25 21
Light Feedback (Green) 0 0 0 -1 38 -1 -1 -1 -1 -1
Light Feedback (Red) 15 15 15 -1 46 -1 -1 -1 -1 -1
Light Feedback (Yellow) 2 2 2 -1 21 -1 -1 -1 -1 -1
OUTPUT #1 Bypass Relay 32 32 40 12 20 -1 -1 -1 -1 -1
OUTPUT #1 Dimmer (Robodyn or SSR) 25 25 37 2 19 -1 -1 -1 -1 -1
OUTPUT #1 Temperature Sensor 18 18 18 15 3 -1 -1 -1 -1 -1
OUTPUT #2 Bypass Relay 33 33 33 -1 15 -1 -1 -1 -1 -1
OUTPUT #2 Dimmer (Robodyn or SSR) 26 26 36 -1 7 -1 -1 -1 -1 -1
OUTPUT #2 Temperature Sensor 5 5 5 -1 16 -1 -1 -1 -1 -1
Push Button (restart) EN EN EN EN EN EN EN EN EN EN
RELAY #1 13 13 13 14 5 -1 -1 -1 -1 -1
RELAY #2 12 12 12 -1 6 -1 -1 -1 -1 -1
System Temperature Sensor 4 4 4 4 4 -1 -1 -1 -1 -1
ZCD (Robodyn or ZCD Sync) 35 35 35 35 8 -1 -1 -1 -1 -1
PZEM-004T v3 Serial1 RX 14 14 14 -1 -1 36 -1 26 26 25
PZEM-004T v3 Serial1 TX 27 27 11 -1 -1 4 -1 27 27 33

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