Hi,
As subject states, I’m trying to make my clothes dryer a bit smarter, want to get a notification when it’s finished.
The dryer indicates that it’s finished by flashing a LED, before that happens it’s constantly on.
Intend to measure the voltage going on/off to the LED by using the adc platform.
So far I’m just testing with a battery (1.5v), the setup is as follows:
positive lead from battery to pin 32, negative to ground.
pulldown resistor between pin 32 and ground (5.1 kOhm)
Connecting the battery positive lead to the adc pin on and off gives output like below:
[14:48:56][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:57][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:57][D][sensor:094]: 'Pulse meter': Sending state 61.43424 pulses/min with 2 decimals of accuracy
[14:48:57][D][sensor:094]: 'LED voltage': Sending state 4095.00000 V with 2 decimals of accuracy
[14:48:57][D][sensor:094]: 'Pulse meter': Sending state 599.89801 pulses/min with 2 decimals of accuracy
[14:48:58][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:58][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:59][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:59][D][sensor:094]: 'LED voltage': Sending state 0.00000 V with 2 decimals of accuracy
[14:48:59][D][sensor:094]: 'Pulse meter': Sending state 29.75721 pulses/min with 2 decimals of accuracy
[14:48:59][D][sensor:094]: 'Pulse meter': Sending state 599.90399 pulses/min with 2 decimals of accuracy
So, to get to my actual question, I don’t really know yaml and I usually just copy and paste to get it working, what do I need to do to get the Pulse meter counter to work properly?
Why do I get the high ‘Pulse meter’ numbers even though I just opened/closed to circuit a few times?
(working properly would be counting the flashing of the LED which is about 60 on/off per minute when the dryer is finished).
I put a smart outlet in line with the power for my gas dryer. I am not sure if you have an electric dryer or what you would use in that case. Then, it is only a matter of monitoring the current draw and when it goes below 2-Watts, I could be alerted (not interested) or if it is that way for 15-minutes, the outlet turns off and saves me the vampire current.
You could allow the outlet to constantly be on if you wanted and just monitor current usage.
Thanks!
But, want to learn something in the process, there are a number of ways for reaching the target but using an ESP32 this way seems like more fun.
I used a temp/humidity sensor in the exhaust vent and get a notification when the air is below 32% humidity for at least 2 minutes. Seems to be the sweet spot for me. I’d imagine if it’s a blinking led, your update interval for the sensor will have to be really fast to catch the blink…
Im interested to hear what you figure out… Good luck!
Thanks.
The blinking is about 0.5s on - 0.5 off, so that shouldn’t be a problem, the ESP32 can measure much higher frequencies than that.
Responses in this forum seem a bit slow, don’t think I will get an answer here.
Might need to look somewhere else.
Hey
I like your approach with “reading” the LED impulses…
maybe, I can help you out here, since I did a similar test-Setup bzt with a button push, because I wanted something similar to mearure the impulses from a Water Meter.
try the Pulse_Counter, instead of the Pulse_Meter
I don’t think, that it matters, that my code was previously for an ESP8266… with the correct platform, it should also work on an ESP32
So in my case, the PulseCounter is counting each time when close the button…
I had similar issues with the pulses counting up to “invalid” or not plausible readings - and I think, it was related with the time the contact was closed.
But TBH - I don’t have the device setup, and this config is a backup copy… I would need to setup a new ESP to test the behave and to see, if it can be changed to fullfill your requirements.
Thanks, I’ll look closer at your suggestions about the Pulse Counter (actually started with that but had no success there so tried the Pulse meter but I’ll revisit it)
Come to think of it, do I need the adc platform?
Could I just use a GPIO set for input? Making sure input voltage is below 3.3? (what is minimum voltage that can be detected?)
My dryer has no electronics, so I attached a small buck transformer to the buzzer signal. So when the timer sends voltage (120v) to fire the buzzer, it then powers the transformer which produces a ~5vdv secondary output to an optocoupler (you don’t need to use an opto).
@ServiceXp@CChris , used pulse_counter instead as you suggested and GPIO was much more appropiate than adc.
What I got right now which works almost OK:
When using the now commented (usepcnt false and internal filter) I get continous ON/OFF with any input from my side, anyone who can tell me why?
Also I’m a bit puzzled by the number “Pulse Counter” reports, if I do one “ON” with the external battery I might get 6 pulses / min reported which is correct but I can also get 18 or 36 pulses/min reported.
Might be more consistent when it’s used in the intended setup, will test a bit more before I do that though.