How to build your router
- Build Examples
- Selecting your Hardware
- Where to buy ?
- Default GPIO pinout per board
- Pictures of some routers
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
- The Minimalist: the cheapest and easiest to build
- The Adventurer: for people who want to mitigate the flaws of the Robodyn and do some improvements over the existing Robodyn
- 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: probably the best and safe solution out there but requires an additional power source
- Possible Upgrades: some additional components you can add to your router
- 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: a limited Solar Diverter / Router with Shelly devices and a voltage regulator
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
- Robodyn includes Zero-Cross Detection circuit
- Supports Phase Control and Burst mode
- Reuse your Shelly EM or 3EM and send through MQTT grid power and voltage
- You can also use a SSR and ZCD module instead of the Robodyn
WARNING
- 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
- Not as precise as a JSY (MQTT delays)
- No local measurement in place to measure the routed power (statistics will be empty)
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
- Robodyn includes Zero-Cross Detection circuit
- Supports Phase Control and Burst mode
WARNING
- 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
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
- Robodyn includes Zero-Cross Detection circuit
- Supports Phase Control and Burst mode
WARNING
- 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
- Requires to unsolder the heat sink and triac and put a new triac on a new heat sink
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 |
---|---|---|---|---|
TIP
- Dedicated ZCD circuit with a good pulse
- Dedicated Random SSR (models up to 100A)
- Supports Phase Control and Burst mode
- 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
WARNING
- Bypass mode will use the SSR dimmer set at 100% power
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
- Dedicated hardware supporting high loads
- Supports Phase Control and Burst mode
- Heat sink are bigger and better quality: bigger models are also available
- All the components can be easily attached onto a DIN rail
WARNING
- Requires an additional 12V power supply (e.g. Mean Well HDR-15-15 12V DC)
- Bypass mode will use the dimmer set at 100% power
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
- Dimmers: Robodyn, Solid State Relay or Voltage Regulator ?
- Relays: Solid State Relay or Electromagnetic Relay ?
- How to choose a Solid State Relay ?
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):
- Pros:
- cheap and easy to wire
- 40A model comes with a heat sink and fan
- All in one device: phase control, ZCD, heat sink, fan
- Cons:
- limited in load to 1/3 - 1/2 of the announced load
- 16A / 24A models comes with heat sink which is too small for its supported maximum load
- no solution ready to attach them on a DIN rail.
- The heat sink often has to be upgraded, except for the one on the 40 model which is already good for small loads below 2000W.
- The ZCD circuit is less accurate and pulses can be harder to detect on some boards
- You need to go over some modifications to (improve wiring / soldering and heat sink)
- You might need to replace the Triac or move it
Solid State Relays:
- Pros:
- cheap and easy to wire
- support higher loads
- can be attached to a DIN rail with standard SSR clips
- lot of heat sink models available
- Cons:
- limited in load to 1/3 - 1/2 of the announced load
- require an external ZCD module, heat sink and/or fan
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 bypass relays, you can use electromagnetic relays because they will be used less frequently. Also, some electromagnetic relays boards have both a NO and NC output to better isolate the dimming circuit and bypass circuit.
For external Relays
- If you want to use the relays to automatically switch one of the resistance of the water tank, as described in the recommendations to reduce harmonics and flickering, you must use a SSR because the relay will be switched on and off frequently.
- If you are not using the automatic relay switching, and you either control them manually or through a Home Automation system, you can use electromagnetic relays, providing the relays won’t be switched on and off frequently.
- Use a Zero-Cross SSR for resistive loads
- Use a Random SSR for inductive loads (pump, motors)
Also to consider:
- You should not use electromagnetic relays to switch a load on and off frequently because they have a limited number of cycles before they fail and they can be stuck.
- Relays have to be controllable through a 3.3V DC signal.
- It is easier to find SSR supporting high loads that can be controlled by a 3.3V DC signal than electromagnetic relays.
- Also, SSR with a DIN Rail clip are easy to install.
- On the other hand, SSR can be more affected by harmonics than electromagnetic relays and they are more expensive.
How to choose a Solid State Relay ?
- Make sure you add a heat sink to the SSR or pick one with a heat sink, especially if you use a Random SSR instead of a Robodyn
- Type of control: DA: (DC Control AC)
- Control voltage: 3.3V should be in the range (example: 3-32V DC)
- Verify that the output AC voltage is in the range (example: 24-480V AC)
- Verify the SSR amperage: usually, it should be 2-3 times the nominal current of your resistive load (example: 40A SSR for a 3000W resistance). For induction loads, it should be 4-7 times the nominal current.
- Zero Cross SSR (which is the default for most SSR): for the bypass relay or external relays with resistive loads, or when using Burst modulation routing algorithm
- Random SSR: if you chose to not use the Robodyn but a Random SSR for Phase Control, or external relays with inductive loads (pump, motors)
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
- Robodyn
- Random and Zero-Cross SSR
- Zero-Cross Detection Modules
- Voltage Regulators
- Electromagnetic Relay
- Measurement Devices
- Temperature Sensors, LEDs, Buttons, Displays
- Mounting Accessories
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
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.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)
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
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:
- Zero-Cross SSR DA
- Zero-Cross SSR DA + Heat Sink + Din Rail Clip (40A, 60A, very high - can prevent closing an electric box)
- Zero-Cross SSR 120 DA (for very high load)
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-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 |
-1
means not mapped (probably because the board does not have enough pins)
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.
Pictures of some routers
TO BE COMPLETED