Last modified: 09.12.2020

started: 08.05.2020

My goal is change the hot-tub project so that I can change the temperature of the water flowing to the hot tub programmatically instead of having to set the heat before going into the hot tub. This could allow me later, to check how cold it is out side and determine how much the temperature needs to change according to that. I will continue using the system VoffCon to handle the commands via the internet. But additionally I will use google home and IFFFT to allow me to give voice commands while in the hot tub.

I could use a schematic with BC547 provided by Brjánn Guðjónsson to start with. I will probably need to tweek the values for R4 and C1 to configure the frequency to get a decently clean voltage.

Or maybe I could use a MCP4725 to do this.

Image of the proportional valve

Proportional Valve with Esp32

Schematic with BC547 on how to convert from 3.3V to 5V provided by Brjánn Guðjónsson
Schematic with BC547

Convert from 3.3V to 5V

Schematic on how to Filtering out noise from a V5 PWM signal
RC filter

Filtering out noise from a PWM signal


Test 1 - Arduino Nano connected to valve

Arduino Nano D5 pin connected directly to the valve green wire. V5 GND and 12V ground connected together. 12V+ connected to valve red wire. and 12V- connected to valve black wire.


I consider this test as a fail because the valve was very jittery. That is, the valve did change position, but never completely stopped. Alway continues little irritating corrections.

Test 2 - Nano with RC filter

Using the RC filter (see image "RF filter") connected to D5 on a Arduino Nano. The test code makes the Arduino Nano read a value from the serial and writes that value to the D5 pin. Then nano will read a A1 pin which is connected to a feedback wire on the Valve.

Arduino Nano Mini USB
Is connected to Computer USB
Arduino Nano D5
Is connected to R6
R6 1kΩ
Is connected to Arduino D5, C5 and R1
C5 0.1μf
Is connected to Ground, R6 and R1
R1 10kΩ
Is connected to R6, C5, C1 and Valve green wire
C1 10μf
Is connected to Ground, R1 and Valve green wire
Valve black wire
Is connected to Ground
Is connected to Arduino Nano GND, Power supply 12V-, Valve black wire, C5 and C1
Power supply 12V +
Is connected to Valve red wire
Arduino Nano A0
Is connected to Valve white wire
Valve yellow wire
Should be, but isn't connected to R7
R7 680Ω resistor
should be, but isn't connected to 12V+ and LED
LED 3.3V
Should be, but isn't connected to 12V+ and R7


Success, You can click here if you want to see a YouTube video of this test in action.

The Test code


Test 3 - Esp32 with RC filter and logic level converter

Possible connections for test 3 - second image

Possible connections for test 3 - second image


This experiment failed. The voltage on the output Green wire went from low: 1.2V to high: 3.2V, but needs to go from 0V to 5V. The valve was little bit open and then just opened just a little more. Never completely open nor completely closed.

The Test code


Test 4 - Esp32 with BC547

Using the BC547 (see image Schematic with BC547) and the RC filter (see image RC filter) connected to the Esp32. Then nano will read a A1 pin which is connected to a feedback wire on the Valve.

Perhaps I could get away with wiring like this

Possible connections for test 4 - second image

Possible connections for test 4 - second image

I tested powering the Esp32 with 12V via til VIN pin. This resulted in the on board voltage regulator heating up to 56° while just blinking one led, no wifi operations where even running. After little googling I found out this is a issue with the Esp32, it's probably best to be in the 5-7V range. The valve will run on 9V. So may be I'll try that. I would like to have only one power source powering the Esp32 and the valve. Maybe I can step down the voltage from 12V before connecting it to the VIN.


The experiment was a success. There are little issues, like little jittering and out max output to the green wire is just over 4 volts, but should be max 5 volts.

If you want to see the experiment in action click here to see it's YouTube video.

The Test code


The project is on hold

The project is on hold because I want to figure out first on how to use my milling machine. I want to use it to mill out a circuit on a copper plate. Additionally I want to mill out parts for a box to glue together for the project to be put into.

So I want to finish the milling project first, and after that, come back to this project.


  • Read from a temperature on the Esp32
    • Select a sensor to use
    • Find out how to wire it. Hopefully we can use a sensor which uses 3.3V but if not we will need to convert it's logic signals for 3.3V
  • Design the circuit, and mill it out from a copper plate.
  • Design a box around the project, mill it out, glue it and put the project into it.
  • Plug the valve into my house hot water pipe and connect it to the hot tub fill valve.
  • Wire everything, put it into the box and mount it on a wall.