Sensor delay

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Stereolight
New user
Posts: 3
Joined: 23 Mar 2018, 17:02

Sensor delay

#1 Post by Stereolight » 23 Mar 2018, 17:17

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?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Sensor delay

#2 Post by Shardan » 23 Mar 2018, 17:37

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
Regards
Shardan

Stereolight
New user
Posts: 3
Joined: 23 Mar 2018, 17:02

Re: Sensor delay

#3 Post by Stereolight » 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

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Sensor delay

#4 Post by toffel969 » 24 Mar 2018, 09:12

Stereolight 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
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 devices
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

Stereolight
New user
Posts: 3
Joined: 23 Mar 2018, 17:02

Re: Sensor delay

#5 Post by Stereolight » 24 Mar 2018, 18:18

Thank you!!

Post Reply

Who is online

Users browsing this forum: No registered users and 139 guests