Hello everyone!
I am trying to make a project for electric meter reading. This is a type of meters which has a led for visual expression. This led is switching OFF 1 time in every 1/100 kwh/h for 200-400 mseconds and than going back ON.
And my aim is to count every flash of a led using BH1750 sensor. Now with the delay 1 sec this sensor is missing many flashes of a led..
Does anybody know : is it possible to decrease sensor delay (devices tab) less than 1 sec? to 250 msec for example?
Sensor delay
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 1156
- Joined: 03 Sep 2016, 23:27
- Location: Bielefeld / Germany
Re: Sensor delay
Hello,
I think this sensor is not the most suitable choice for counting short pulses - they are made for room lighting or sunlight measurement.
The internal data processing and converting to I²C takes up some time on top, sensors like BH1750 and TLS2561 are somewhat slow anyways.
A better way might be using a phototransistor or a photodiode with a comparator chip giving a dedicated level so you get well defined
"on" and "off" values. The comparator uses a predefined level and converts the linear output of the phototransistor into digital on/off.
You may use the counter function of ESPEasy with this output directly.
Regards
Shardan
I think this sensor is not the most suitable choice for counting short pulses - they are made for room lighting or sunlight measurement.
The internal data processing and converting to I²C takes up some time on top, sensors like BH1750 and TLS2561 are somewhat slow anyways.
A better way might be using a phototransistor or a photodiode with a comparator chip giving a dedicated level so you get well defined
"on" and "off" values. The comparator uses a predefined level and converts the linear output of the phototransistor into digital on/off.
You may use the counter function of ESPEasy with this output directly.
Regards
Shardan
Regards
Shardan
Shardan
-
- New user
- Posts: 3
- Joined: 23 Mar 2018, 17:02
Re: Sensor delay
Dear Shardan,
Thank you for the reply. I'll try phototransistor. It is going to be much better.
Anyway, any ideas about delay?
BR, Vitaly
Thank you for the reply. I'll try phototransistor. It is going to be much better.
Anyway, any ideas about delay?
BR, Vitaly
-
- Normal user
- Posts: 469
- Joined: 03 Jan 2017, 10:58
- Location: Germany
Re: Sensor delay
use the pulse counter, it will catch all the pulses inbetween delays (i think it uses interupt function,not sure) and then update the device in delay interval.. the idea to count pulses onthe controller with a short delay on a switch input is not good/feasable /will not work,the esp andwifi will go nuts. check the wiki for the counter devicesStereolight wrote: ↑23 Mar 2018, 21:01 Dear Shardan,
Thank you for the reply. I'll try phototransistor. It is going to be much better.
Anyway, any ideas about delay?
BR, Vitaly
https://www.letscontrolit.com/wiki/index.php/TCR5000
https://www.letscontrolit.com/wiki/inde ... ogic_input
your phototransistor will work the same on software side.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Who is online
Users browsing this forum: YandexBot [bot] and 21 guests