0

Can I set pin 13 to output 5v, then put arduino pro mini to sleep and it maintains 5v going through pin 13 while in sleep mode?

I know there are various "levels" of sleep - can a voltage be maintained on a pin for all/any of the sleep modes?

  • Sounds like you interpret "sleep mode" as something that disconnects the MCU pins? What does the manual say about this? – Mikael Patel Aug 18 '17 at 19:01
  • 1
    @MikaelPatel Actually the manual is quite vague. It's possible to infer that the pins remain connected from the bit that tells you that to save power IO pins should not be driving resistive loads when you enable sleep, but that's about all. – Majenko Aug 18 '17 at 19:49
  • 1
    @Majenko Yes, the Pin section of Power Saving is a bit vague but the I/O Ports chapter and circuit diagram gives some more details. Not driving resistive loads is not forbidden but should be avoided in low-power applications. The General Digital I/O circuit does not show any disconnect on sleep mode (which I think was the question). – Mikael Patel Aug 18 '17 at 21:58
3

can a voltage be maintained on a pin for all/any of the sleep modes?

yes.

  • I will be able to test this tomorrow and update with an accepted answer – Owen Aug 18 '17 at 23:08
3

Given the absence of clarity on the driving state of pins during sleep, consider connecting Pin 13 to an SR Latch or the gate of a MOSFET.

An SR Latch will hold it's output high or low until a high is presented on the Set or Reset inputs, so connect Pin 13 to the Set input, with a pull-down resistor -- even if the MCU in sleep mode allows the voltage output to drain away to 0v, the SR Latch will maintain it's output.

A MOSFET gate has a non-trivial capacitance which can hold a charge if the gate's driver goes high-impedance, thus holding the gate open after the driver is disconnected.

  • Thank you for the tips. I've never heard of SR Latches and they seem quite complex - well more complex than the mosfet. – Owen Aug 18 '17 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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