shutdown procedure with i2c memory
I have a prop running all eight cogs that updates a i2c fram chip every second or two as a·way to keep the·last info recorded on shutdown.· I am figuring on·powering the board with 12+v through a 8v reg with a 22uf cap feeding a 3.3reg with a 22uf cap.· I will be monitoring the 12+ voltage·with a mcp3208 or·directly to a pin.··The memory·saved is approximately 12 bytes.· Is there·any way to figure my margin of time (safety) so that I am not shutdown in the middle of a write?· Why does·the prop shutdown so quick on low voltage?· Would I be best off with the boen held high or low?·
Comments
The discharge time of the power supply capacitors depends primarily on the current drain of the circuits attached to it.
For the 8V supply, you've got about 4V of "headroom" before the 3.3V regulator loses regulating ability. Why don't you
see if you can measure how much time it takes for the 8V supply to drop to 4V when you cut off the 12V under load?
You'll need a couple of milliseconds to save the data plus the time to read and react to the voltage drop.
The Prop shuts down quickly on low voltage because it's designed for operation down to 2.7V only. It only takes small
voltages below this point for it to stop working reliably.
Use the existing brown-out detector. You should finish an orderly shutdown way before the voltage gets to the point
where the parts won't work properly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
You may find that other parts of your logging code are just as important. In the end, you need to know how much time it really takes to store the data,
add a large fudge factor, and design the power supply to keep everything going long enough to do the job.