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:
simulate this circuit – Schematic created using CircuitLab
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.
Best Answer
The TI version of the LM358, is spec'd at 0.7ma typical/1.2ma worst case quiescent power supply current.
A LP339 quad comparator (Ti's version) is spec'd at 60ua typical, 100ua worst case. Link: http://www.ti.com/lit/ds/symlink/lp339-n.pdf
Linear Technology has a 0.3uA (typical/quiescent) single comparator, but costs quite a bit more than the LP339. http://www.linear.com/product/LTC1540