Controlling Grundfos Alpha1 L water pump PWM

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Baigars
New user
Posts: 9
Joined: 23 Feb 2023, 17:27

Controlling Grundfos Alpha1 L water pump PWM

#1 Post by Baigars » 23 Feb 2023, 18:04

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?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Controlling Grundfos Alpha1 L water pump PWM

#2 Post by TD-er » 23 Feb 2023, 21:35

What is the signal you want to monitor?
Is this PWM too?

Baigars
New user
Posts: 9
Joined: 23 Feb 2023, 17:27

Re: Controlling Grundfos Alpha1 L water pump PWM

#3 Post by Baigars » 24 Feb 2023, 15:53

yes pwm signal, but feedback

here examples

Image off signal its around 95% of pwm duty


Image at low procentage

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Controlling Grundfos Alpha1 L water pump PWM

#4 Post by TD-er » 24 Feb 2023, 23:22

Maybe try to convert it to an analog value using a resistor and capacitor?

Baigars
New user
Posts: 9
Joined: 23 Feb 2023, 17:27

Re: Controlling Grundfos Alpha1 L water pump PWM

#5 Post by Baigars » 25 Feb 2023, 12:01

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

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Controlling Grundfos Alpha1 L water pump PWM

#6 Post by TD-er » 25 Feb 2023, 12:24

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.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 20 guests