Download PDF
      SAMOVAR                                  
×
Menu

How to connect a regulator to Samovar

 
Wired connection.
Kvic and RMVK regulators
 
The KVIC regulator uses an ADUM1201 for voltage isolation. Samovar talks to it at 38400 baud, or at 9600 baud when KVIC_USE_9600 is enabled.
The RMVK regulator uses PC817 optocouplers for isolation. The port speed is 9600 baud.
These regulators are connected to Samovar in the same way.  The Rx of one device must be connected to the Tx of the other.
On the Samovar side, UART2 is used (on the printed circuit board it is the UART connector): RX D16 and TX D17 on ESP32 DevKit, RX GPIO25 and TX GPIO4 on LILYGO T-Relay 4, RX GPIO18 and TX GPIO17 on ESP32-S3. The SEM_AVR regulator (Stab-avr) is also connected to this port, at 9600 baud.
 
 
How to connect a regulator to Samovar wirelessly
 
A Samovar with a regulator controlled over UART (COM port) can be connected without a cable using two RF modules (radio-frequency modules) HC-12. This is very simple; just connect them as shown in the diagram:
The ADUM is not needed here, because the modules are designed to work at voltages from 3.1 V to 5 V, so they can be connected to both the ESP32 (Samovar) and an Arduino Nano.
 
The manufacturer states that the transmission range of this module is up to 1 km (in open terrain and with an external antenna), which is more than enough for our purpose. The module comes with a default speed setting of 9600 bps. If you use a STAB-AVR or RMVK regulator controlled over UART, just connect one module to Samovar and the other to the regulator as shown in the diagram, and everything should work. If you use a Kvic regulator, you must configure both modules. This is not difficult, but you will need to connect them to a computer to change the speed at which the modules exchange data with each other.
 
Both HC-12 modules must be set to the same speed as Samovar and the regulator. For the RMVK and SEM_AVR it is 9600 baud. For KVIC use 38400 baud, or 9600 baud if KVIC_USE_9600 is enabled in the build.
The module has many options, but we are interested in only one: changing the module's port speed.
To put the module into setup mode, connect the SET pin to GND. Then power the module and connect it to a computer through a UART-USB adapter (an Arduino Nano can be used for this). If you chose 38400 baud, send the command AT+b38400 to the detected COM port and wait for the reply OK+b38400. At 9600 baud you do not need to change the HC-12 factory setting.
 
Disconnect SET from GND, remove the power, connect the modules to Samovar and the regulator, and everything should work.
 
Warning!
The Kvic regulator has no galvanic isolation from the mains voltage; even the HC-12 antenna will be at mains potential! So the module must be placed inside the regulator's enclosure or otherwise reliably insulated.