Page 1 of 1
Controlling Grundfos Alpha1 L water pump PWM
Posted: 23 Feb 2023, 18:04
by Baigars
Hello i have question is it possible to read feedback pwm signal from grundfos alpha1 l water pump ?
the signal will be at 75 Hz and duty cycle
Code: Select all
95% Standby (stop)
90% Alarm stop: fault, blocked pump
85% Alarm stop: electrical fault
75% Warning
70 Saturation at 70 Watt
0% -70% Slope: 1 W / %PWM
before i used node red to control the pump running on pi, but it was not reliable if the router,pi,node red, mqttbroker had a fault then the hole system brakes down, and once the burner overheated because the mqtt broker had an error luckily i was at home and quickly cooled the burner and disconnected pwm cable. To not repeat my mistake i used rules on espeasy and if esp easy fails the pwm signal output will be zero so the pump will swich to constant speed. I can give the code and schematic if somebody is interested.
Ok back to topic is it possible to read the incoming signal of pump and display it to a dummy device using only espeasy?
Re: Controlling Grundfos Alpha1 L water pump PWM
Posted: 23 Feb 2023, 21:35
by TD-er
What is the signal you want to monitor?
Is this PWM too?
Re: Controlling Grundfos Alpha1 L water pump PWM
Posted: 24 Feb 2023, 15:53
by Baigars
yes pwm signal, but feedback
here examples

off signal its around 95% of pwm duty

at low procentage
Re: Controlling Grundfos Alpha1 L water pump PWM
Posted: 24 Feb 2023, 23:22
by TD-er
Maybe try to convert it to an analog value using a resistor and capacitor?
Re: Controlling Grundfos Alpha1 L water pump PWM
Posted: 25 Feb 2023, 12:01
by Baigars
Analog is solution, but not shure if esp8266 analog pin will be up for task.
what about "Monitor,G,<GPIO>"
"To monitor a GPIO state. By the use of the command you will receive events when the GPIO state of that pin is changed from 1 to 0 and from 0 to 1."
and using timer to count how long the pin is on
Code: Select all
ON Monitor#D7=1 DO
TimerSet 1, 0 // Start timer with ID=1 and initial value 0
ENDON
ON Monitor#D7=0 DO
let,1,[TimerValue(1)] // Save timer value in variable#1
let,2,round(([var#1]/(1000/75))*100) // Calculate PWM duty cycle and save in variable#2
TaskValueSet 2,2,[var#2] // Output PWM duty cycle on dummy device TaskValueSet 2,2
TimerSet 1, 0 // Reset timer with ID=1
ENDON
i think esphome has something like that
https://esphome.io/components/sensor/pulse_width.html
Re: Controlling Grundfos Alpha1 L water pump PWM
Posted: 25 Feb 2023, 12:24
by TD-er
Looks like your PWM signal is 74 Hz.
Rules procesing is way too slow for this.
You could try to use the PulseCount plugin, but on an ESP8266 this is entirely done in software, so there will be quite a lot of jitter.
On ESP32 it is partly done in hardware, but the pulsecount plugin is primarily focussed on the counts and not really on the duty cycle measurement.
Measuring PWM in software is probably not going to be that reliable as you also have to deal with interrupts, like WiFi activity etc.
So that's why I think converting it to analog using some transistor, capacitor and resistor may be the more stable solution.
When using a transistor, you can simply use your own stable voltage to charge the capacitor and I guess this may be a more stable signal to process.