2
\$\begingroup\$

I have a microcontroller that needs to be powered ON only when there is light in the ambient, otherwise it should stay OFF. To achieve this I use the power latch described here and a simple light sensor formed by a 2N7000 N-channel MOSFET, a 5mm flat top green LED and a 10kOhm resistor as shown in the figure below. Everything is powered by a 3.7V LiPo battery. When there is no lo light, the output voltage of the sensor "Vout" is low and the power latch doesn´t provide power to the MCU. When there is enough light, Vout goes high and the power latch turns ON the MCU. I have implemented the circuit and it works, however there is definitively room for improvement. I write my questions below:

  1. When there is no light, I get a Vout of 0.9V which means a constant current draw of 90uA through the 10kOhm resistor. I would like to reduce this current to less than 10uA to increase the battery duration. Should I replace the MOSFET with something else? Or is it mainly due to the green LED leakage current?
  2. Do you have a better light sensor to propose that can be powered with 3.7V and consume 10uA or less when light is OFF?

schematic

simulate this circuit – Schematic created using CircuitLab

EDIT: Adding the power latch schematic since it is an important information. The output of my light sensor is connected to the "triggerOut" pin of the power latch.

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ It's possible, but you need to give more details about the power latch. What is its input voltage threshold? Since it's probably a logic input with tiny input current the MOSFET follower can probably be deleted... \$\endgroup\$
    – bobflux
    Commented 13 hours ago
  • \$\begingroup\$ The schematic of the power latch is the one below. The output of my light sensor is connected to the "trigger out" pin. randomnerdtutorials.com/wp-content/uploads/2019/10/… \$\endgroup\$
    – spanito
    Commented 13 hours ago
  • \$\begingroup\$ The input of the power latch is a 1kOhm resistor connected to the base of a 2N3904 NPN BJT. Do you mean that I should remove the 10kOhm resistor at the MOSFET source? \$\endgroup\$
    – spanito
    Commented 11 hours ago

2 Answers 2

3
\$\begingroup\$

LEDs (D1 in schematic below) also act as solar cells when they receive light. So you can use a LED as current generator to turn on a transistor without drawing current from the supply:

enter image description here

D1 will produce current proportional to illumination. So, RX should be adjusted to ensure that, at the desired light level, Q1 Vbe just reaches the threshold so it turns on and enables the MOSFET. Q1 can also be turned on by applying a logic 1 level to the GPIO so the MCU can keep itself powered. In fact if you add a resistor in series with Q1 base, with this schematic you can also use Q1 both as light sensor and power indication LED...

Here's another idea:

enter image description here

With 2 LEDs in series used as photovoltaic generators it should be possible to turn on a N channel MOSFET. Then the MCU should output a square wave to operate the charge pump on the lower right to keep the MOSFET turned on. The LEDs will also light up.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks a lot for the nice suggestions. The first option you propose should be a bit easier to implement software wise (in the MCU) as you don't need a square wave signal at the GPIO pin. I will first give a try to the other solution with P-MOS proposed by Simon, but I will likely also make a small pcb with the first circuit you propose. Thanks again. \$\endgroup\$
    – spanito
    Commented 4 hours ago
  • 1
    \$\begingroup\$ I think Simon's circuit is simpler, you can try it first. No need to order BSS84, it should work with your current P channel FET. \$\endgroup\$
    – bobflux
    Commented 3 hours ago
2
\$\begingroup\$

Using a source-follower, as you have done, will produce an signal whose voltage just follows gate potential, but a little lower, which isn't really the behaviour you require to trigger the latch. I would employ a P-channel MOSFET in a common-source configuration, to produce a more emphatic output transition between 0V in the dark, and the full +3.7V when illuminated.

After a little reading, I find that a typical LED when reverse biased will have a "dark" leakage current on the order of 10nA, which rises to 1μA or so of proper photo-current when moderately illuminated. That's a factor of 100 change, which should be easy to distinguish, but will require the right choice of biasing resistor to produce an appropriate gate potential.

Assuming that the MOSFET's \$V_{SG(TH)}=1V\$, we would require significantly lower \$V_{SG} << 1V\$ to switch it off, and significantly greater \$V_{SG} >> 1V\$ to switch it on. Let's also assume there's no cap on voltage, and aim for \$V_{SG}=10V\$ when illuminated:

$$ R = \frac{V}{I} = \frac{10V}{1\mu A} = 10M\Omega $$

In the dark, resistor voltage would be:

$$ V = I \times R = 10n A \times 10M\Omega = 0.1V $$

That seems to span a good distance either side of the 1V switching threshold, so build it:

schematic

simulate this circuit – Schematic created using CircuitLab

Replacing the LED with a current source swept from 10nA upwards, here's an output \$V_{OUT}\$ you might expect with a BSS84 having \$V_{SG(TH)}\approx 1.5V\$:

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Thanks a lot for taking the time for such a detailed and clear answer. I'll order the BSS84 p-MOS right away and test it soon. What do you think about replacing the R1 with a potentiometer ranging from 1MOhm to 10MOhm? This should allow to tune the threshold of the light sensor. \$\endgroup\$
    – spanito
    Commented 6 hours ago
  • 1
    \$\begingroup\$ @spanito That idea should work, yes \$\endgroup\$ Commented 4 hours ago

Not the answer you're looking for? Browse other questions tagged or ask your own question.