ESP32 Variable PWM Pump Controller
Budget / SalaryHourly project
TypeFreelance project
LocationRemote
Posted1 hour ago
This project diesel heater's stock fuel pump — the little solenoid pump that clicks away every time it needs to squirt in more diesel — is annoyingly loud. So I swapped it for a pump, which is basically silent. Problem is, the heater doesn't know how to talk to a pump. It only knows how to send clicks (pulses), faster or slower depending on how much fuel it wants. A pump doesn't listen to clicks — it just wants a PWM signal telling it how fast to spin.
It taps into the heater's existing pulse signal (without touching or replacing the heater's own controller — the heater still thinks it's running its original pump, it has no idea anything changed), counts how fast those pulses are coming in, works out how much fuel that actually means in liters per hour, and then converts that into the right PWM duty cycle to make the new pump deliver exactly that much fuel. As the heater speeds up or slows down its pulses, the pump follows along in real time.
A few things I cared about getting right:
Accuracy — the frequency reading has to be rock solid, not jittery, or the pump will hunt around and either starve or flood the heater. I tested the filtering logic on its own (outside the ESP32, just as plain C code) against simulated noisy signals and it came out accurate to well under a tenth of a percent, way better than the 2% I was aiming for.
No new noise — the PWM itself runs at 20kHz, above what anyone can hear, so I'm not trading a clicky pump for a whiny one.
A screen that actually shows something useful — fuel rate, duty cycle, and the raw pulse frequency, live, on the little touchscreen that came with the board. Room to add temperature later.
Fail safe, not fail silent — until I've actually calibrated the new pump (measured real output at a couple of PWM settings and told it), the thing just keeps the pump off rather than guessing. I'd rather it do nothing than run at some made-up rate.
It taps into the heater's existing pulse signal (without touching or replacing the heater's own controller — the heater still thinks it's running its original pump, it has no idea anything changed), counts how fast those pulses are coming in, works out how much fuel that actually means in liters per hour, and then converts that into the right PWM duty cycle to make the new pump deliver exactly that much fuel. As the heater speeds up or slows down its pulses, the pump follows along in real time.
A few things I cared about getting right:
Accuracy — the frequency reading has to be rock solid, not jittery, or the pump will hunt around and either starve or flood the heater. I tested the filtering logic on its own (outside the ESP32, just as plain C code) against simulated noisy signals and it came out accurate to well under a tenth of a percent, way better than the 2% I was aiming for.
No new noise — the PWM itself runs at 20kHz, above what anyone can hear, so I'm not trading a clicky pump for a whiny one.
A screen that actually shows something useful — fuel rate, duty cycle, and the raw pulse frequency, live, on the little touchscreen that came with the board. Room to add temperature later.
Fail safe, not fail silent — until I've actually calibrated the new pump (measured real output at a couple of PWM settings and told it), the thing just keeps the pump off rather than guessing. I'd rather it do nothing than run at some made-up rate.
Apply on Freelancer →
Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.