Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: safe shutdown when power loss

  1. #1

    safe shutdown when power loss

    my plan: working with an T3.5, which is powered on VIN with 5V. When power is lost, I want to save data to eeprom. Idea: feed the 5V into a GPIO and measure. Put an extra Cap on the 3.3V line, which holds the 3.3V line long enough to save data when a LOW is detected on the GPIO.

    Is this feasible?
    Will this lead to a problem with the voltage onboard voltage regulator?


  2. #2
    I would be interested in this as well!

  3. #3
    just as an update: I did a voltage divider on the Vin line so that I can read it with an analog pin. Now I am detecting with this analog read if the 5V drops below a certain level, if so, the eeprom saving routine is started. There will be enough time (plenty of ms (i checked with oszi)) for saving before the teensy turns off. So no extra cap is needed.

  4. #4
    If you figured out a reliable solution: would you mind to post a code example and the values of the voltage devider?

  5. #5
    sorry for the late reply.
    I took two 10k resistors. Then measured the voltage of the resistor between GND and a ADC pin with analogRead(). If the voltage is below 2.5V I call my saving routine.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts