thank you DanaThis can be done with a nano board, timing very accurate over T and V. << 1% error
View attachment 172969
The above is a gui tool for programming board, very simple.
View attachment 172970
Board < $ 3
You can use board and program an ATTINY85 with it for an even simpler solution
View attachment 172971
Its timing accuracy more like 5%
Regards, Dana.
Hi
I´m confused. Before you wrote you want to switch ON/OFF a device.
Now you want to start and shutdown a MCU.
It´s more clear when you exactly name which device or exactly name which MCU.
In case of MCU: What does switch OFF / shut down the MCU exactly mean?
switch OFF power? just 3.3V or the complete power supply (mains)?
Or put the MCU in a power saving mode / sleep mode? Which mode exactly?
Usuefull additional information could be how long is a usual active time and a usual OFF time?
Is it in the ms range or some days range?
Klaus
"It" is what? the RTC?It is actually sending a signal (ON/OFF) to the device
Thank you Klaus."It" is what? the RTC?
"the device" is what? the BMS?
If "OFF" really swtiches OFF the power supply of the MCU it can not be woken up with an INTerrupt.
Again: Please draw a sketch of all this.
Hand drawn is O.K. But with signals, clear names, some timing informations, some signal flow informations....
nothing perfect, not a "solution" just your idea how you think it should work.
Just a drawing we can discuss about.
Klaus
Klaus,Hi,
if "It" is the MCU ... and the MCU is powerd down .. how could "It" send the ON signal to the BMS???
Klaus
Klaus,Klaus,
Sorry, it is the RTC as depicted in the diagram at #3
Thank you Dana for your analysis.Power up/dwn of delay circuit should also be bulletproof unless its a don't care.
Most modern processors have known state during startup and shutdown, like
ATTINY85 and many others.
In so far as cost some versions < $1.
Regards, Dana.
So you say a manual pushbutton is a valid workaround to restart the system..=>other possible workaround: connect the RTC/RST pin to the BMS/pushbuton? but I am not confident about the bidirectional aspect of the BMS/KEY pin: it can light a LED but also "sense" the push button
I asked about the big battery, not the tiny one. You did not mention yet what it is.What kind and size is the 'big battery' ?
=>very very tiny, maybe 1cm diameter
All around the RTC. But now I see that you use the BMS output to power them.=>which pull-up resistors? I don't see
I guess you have two batteries. A small one just for the RTC backup and a big one for the BMS....=>I prefer to avoid additional extra battery
The ATTINY accuracy is based on internal non xtal based osc, but add a xtalThank you Klaus,
The shown path is useful to only switch ON the BMS.
=> I agree. The BMS can be switched off by the MCU
I think you need an additional circuit to switch OFF the BMS. This should be controlled by the MCU. I see no problem to combine both.
=>ok
What if the RTC_Int already is LOW when you switch OFF the BMS. Then it never has the chance to switch ON again.
=>correct.
A workaround could be to repeatedly send ON pulses to the BMS. Maybe every 5 seconds .... as long as the RTC_Int is LOW.
=>other possible workaround: connect the RTC/RST pin to the BMS/push-button ? but I am not confident about the bidirectional aspect of the BMS/KEY pin: it can light a LED but also "sense" the push button
Not shown in your sketch: How is the RTC powered? A coin cell?
=>powered by the BMS at the VCC pin of the RTC (like the VCC of the MCU)
=>powered by a tiny coin cell at VBAT pin of the RTC (like in the picture)
What kind and size is the 'big battery' ?
=>very very tiny, maybe 1cm diameter
Is there an undervoltage protection inside the BMS?
=>No, but a protection PCB circuit is packaged with the battery cell
My idea:
If the RTC is powered by a coin cell you must not connect the shown pull-up resistors to the coin cell, because they may drain out the battery. They may draw a lot more current than the bare RTC.
=>which pull-up resistors? I don't see
Maybe it's possible to add a very low power auxiliary supply from the big battery ..
=>I prefer to avoid additional extra battery
You need to consider safe software for the MCU to ensure the BMS will safely switch ON after the MCU shuts down. ... like checking that the RTC switch ON time setup really is in the future..
=>ok, it makes sense
--- Updated ---
Thank you Dana for your analysis.
The accuracy is an additional criteria:
-for the RTC, it is about 0.0003% (2ppm-3.5ppm) => 0.26s of drift per day
-for the ATTINY85, it is about 5% => 72mn of drift per day
Regards,
Michel
Hi
So you say a manual pushbutton is a valid workaround to restart the system..
I don´t care about the BMS internal KEY pin circuitry. I´d just connect the pushbutton according datasheet informations.
I asked about the big battery, not the tiny one. You did not mention yet what it is.
All around the RTC. But now I see that you use the BMS output to power them.
But especially the pullup at the RTC_INT can´t work properly when BMS is down. .. so restarting the BMS won´t work properly.
I guess you have two batteries. A small one just for the RTC backup and a big one for the BMS....
I´m not talking about a third battery.
*****
so for the ON pulse circuit:
Look for a
* monostable multivibrator (one shot)
* non retriggerable
* reacting on the falling edge
circuit. There should be plenty in the internet.
Remaining question: How to power it? I recommend to power it from the big battery.
****
for the OFF circuit:
I´d just use a so called digital transitor controlled by an MCU port pin.
Klaus
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?