Maker Pro
Maker Pro

How to differentiateLed's intesity/frequency in between fade in/out and slow blinking?

Dear All,
Currently, l am working on a project where l need to differentiate the led behavior due to light or color intensity. The aim is to identify the end of fade in /out and the beginning of slow blinking in sequential processes. l want to identify how long fade in/out and slow blinking continues.
the using photoresistor with Arduino in loop cant help to identify the stage when the value of resistance fade in/out is
395-281-369-291-124-88-125-288-320-387-395-291-116-217-308-359-385-263-330-301-120-75-117-258-327-385-395-281-369-291-124-88 and slow blinking 341-396-403-406-408-154-36-24-18-15-340-396-403-407-408-157-36-24-19-14.
Another method l have used is to connect the photoresistor to the capacitor for calculating the time difference for energizing the capacitor when the photoresistor is high less time or low more time needed to energize the capacitor. this way helped a little bit to get more accurate values but it is not enough to differentiate them.
but l am not sure how to identify the fade in /out and slow blinking because the value range is similar as l show in the comment. l do not know exactly when the led's fade in/out will finish. my task is to identify when fade in/out finish give some command if fade in/out continue more than 10second print("there is a problem in system"). Something like this. and l have 4 stages fade in/out, slow blinking(1hz), fast blinking (4hz), and solid on. the fade in/out range is changing it gets min and mak value in the process. this makes it difficult to differentiate it from others.
l would be happy if someone can share his/her experience or ideas for solving this problem.
 
What is the real problem. Is it choosing a threshold or rate of change at that threshold.? Adding a capacitor makes the problem worse by slowing the response and making them look the same. So remove that. By differentiating with series C and load R, to get the slope voltage dV/dt combined with the threshold, may be your answer.


upload_2022-3-5_11-11-16.png
 
Top