I made some experiments with ESP8266 to detect when an external LED is on or off (I need to log this activity). This is the test-circuit I used till now:
I have a lot of programming experience, but every time I need to deal with the electronics circuits I have some difficulties, so the above schematic may be wrong. All resistor values are empirically calculated. I used a wave generator (5Hz) to simulate LED flashes, and on the oscilloscope I get:
- LED on: ~3.22V on (-) OAMP pin
- LED off: ~1V on (-) OAMP pin
- On (+) OAMP pin I set ~2V
Now I would ask:
- How can I improve this schematic?
- How to reduce power consumption?
- Does exist a better OAMP (instead of LM358) specifically designed for low power circuits?
Here there're some glabal tech spec:
- VDD: 3.3V
- Max led frequency: 2Hz
- low power consumption
- I need to measure the time interval between two pulses to detect system (which LED belongs to) state. For example: 1sec between two pulses mean state A, 0.2sec between two pulses mean state B, etc..
NOTE: in the final circuit I cannot interfere with LED and its circuit, I can only watch its light.