View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Jan 18, 2021 2:00 am |
|
|
4.1v, is the charging voltage. If so, the electronics needs to be
disconnected when charging. As Jay says, the RF module being used
has an 'absolute max' voltage of 3.9v, so if the battery can go up to 4.1,
he is in for problems....
In fact charging to 4.1, only gives 90% capacity. Also you should not
charge below 0C, and below 4C is 'not recommended', so if this is some
form of automatic charger, there again could be problems. He needs to
look a specific 'low temperature' products like the ReLion range, if
low temperatures are likely to happen when charging.
LIon batteries also have a very significant 'self discharge'. Typically
about 3%/month, so are not suitable for devices being left uncharged/
unattended for long times.
At the end of the day this is why equipment designed to run off grid, tend to
use cells with low self discharge and high capacities. The DL123, is the
same size as the LiIon cell he is looking at and has twice the capacity.
This cell also has a self discharge less than 1% per year!...
Using a Lithium Manganese battery like this removes having to worry
about charging voltages and circuitry. In fact not needing the space for
a charging circuit, may well allow a larger battery to be fitted.
If power is sometimes available, then simply make the circuitry all
run off this when it is there. |
|
|
Spaeth
Joined: 05 Jun 2020 Posts: 27
|
|
Posted: Mon Jan 18, 2021 7:38 am |
|
|
Back to the topic: a battery powered 18 pin count PIC (e.g. 16F1847) should wake up from sleep frequently with a period of 10min. There is no trigger from outside, there is no external oscillator/crystal.
At the moment I'm using the WDT, but the accuracy of the WDT is poor.
It is not possible to add other components at the moment.
Any ideas? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Jan 18, 2021 8:17 am |
|
|
Your chip does have an internal oscillator that can be used as PCM
shows. You have to modify the code to use this instead of the T1
oscillator, and have to tell the sleep to leave this awake, However the
accuracy will be no better than the WDT. The LFINTOSC on your
chip only gives about +/-33% accuracy over the full temperature/
voltage range.
Deciding what processor to use, checking the accuracy of these
oscillators, should have been done at the start of the design, not
be something being chased now. Some of the later low power chips
offer oscillators with 10* better accuracy, and operation over a wider supply
range, but not in the 18pin package. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Mon Jan 18, 2021 8:22 am |
|
|
You could use the internal 31KHz osc and timer1.....
I haven't looked at how to change to a higher clock speed upon 'wake up'...
You should download and read Microchip application note AN606. While only a few pages long, it has some very inteseting detasils about using PIC in 'low power' mode.
That RF device can draw 180ma to transmit and needs a minimum of 120us to 'wakeup'. so a few more numbers to 'crunch' when doing energy calculations.
Also consider a supercap acoss the battery. Without it when the RF module 'powers up' you'll get a V dip, PIC resets.....and sunset loop begins. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Jan 18, 2021 8:49 am |
|
|
The internal 31K oscillator has the same accuracy as the WDT.
His chip doesn't offer the option to keep the MFOSC running during sleep,
and the LFOSC is very low accuracy. It is what clocks the WDT... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Mon Jan 18, 2021 9:04 am |
|
|
Rats... I was thinking the WDT clk was separate from the CPU clock. To me a WDT should be isolated from the micro 'clock'.
I don't see any more options.....if we can only use that PIC. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Jan 18, 2021 10:53 am |
|
|
Exactly...
All the ones I can think of with improvements aren't available in the
18pin package.
Honestly the external crystal would be so simple.... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Mon Jan 18, 2021 11:53 am |
|
|
Have to ask what is the expected 'life span' of the device ? With one battery, how long is it supposed to be operational and what are the real power requirements ?
We know, that every 10 minutes..it has to wake up, do something, transmit data,go back to sleep...but how much time and POWER is required? What environment will it be in? Temperature has a HUGE factor on USEFUL battery life.
As it stands now, there is no way that PIC by itself can accurately wakeup every 10.000 minutes. |
|
|
Spaeth
Joined: 05 Jun 2020 Posts: 27
|
|
Posted: Mon Jan 18, 2021 2:00 pm |
|
|
Hello temtronic,
The life span should be as long as possible, it would be good to make the device running approx. 1 year without changing/charging battery.
The device is running inside, so the temperature range is about 15°C...30°C.
The design is fixed. The first lot of this devices used an RFM12 transceiver. This transceiver does have a sleep function with wakeup timer which waked up the PIC. The timer has a high accuracy.
As the RFM12 will not be produced any more I changed to the RFM69CW which is pin compatible to the RFM12. It also has a larger range. Unfortunately the RFM69CW does not have the sleep function with wake up.
So I was looking for an alternative to the wake up function of the RFM12 but without changing the design of the circuit/PCB. So I took the WDT to wake up from sleep.
LiIon cells do have a charging end voltage of 4.1V LiPo cells do have a charging end voltage of 4.2V. I'm using LiIon cells.
You are right, the max rated voltage of the RFM... modules is 3.6V, but they are running with a voltage of 4.2V without being damaged in my device for more than 3 years, and they are still alive!
I will try the 'L' types of PICs with a voltage of 4.2V soon, perhaps they will withstand.
For my redesign which will perhaps be necessary in future I will perhaps take an external crystal or another PIC family into account. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Tue Jan 19, 2021 1:47 am |
|
|
Have you really had the RFM69 running going to the high voltage for
three years?. I suspect the early units used the RFM12, and it is this that
has been running without problems going to the higher voltage.
Read the data sheets. The RFM12, is rated for 5.4v max. The RFM69
is only rated for 3.6v max. Does the unit ever transmit when it is being
charged?. It's actually the RF output stage that will potentially overload
if the supply voltage is above 3.6v, and also the unit will fail RF
compliance testing if this is done with the supply at the higher level.... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Tue Jan 19, 2021 7:13 am |
|
|
re:
Quote: | Does the unit ever transmit when it is being charged?
|
I suspect it's only powered by a battery, so NOT recharged 'in the field'. Afterall IF there was power 'in the field', it wouldn't need the battery.....
I'm impressed that none of the units have been destroyed by the over-voltage ! Most '3 volt' devices won't last too long in my experience.
A couple of simple hardware changes would make the current units accurately sleep for 10 minutes, for less than a $1 in parts.
I keep thinking about the 'challenge' but not having the option for another PIC or 'upgrades', I'm at a loss to think of ANY options to get that PIC to wakeup every 10 minutes
Ok, it took a 2nd pot of coffee but I finally thought of a way to have that PIC actually wakeup accurately every 10 minutes. NO extra parts, only requires a minor change in the software....just had to freeze my butt in the garage waiting for the furnace to turn on. I should have thought of this days ago considering I've done 'remote control energy management' for 3 decades.....sigh, I gotta be getting old....
Jay |
|
|
Spaeth
Joined: 05 Jun 2020 Posts: 27
|
|
Posted: Wed Jan 20, 2021 8:50 am |
|
|
Hello Ttelmah, I used the RFM12B which are rated at 3.6V.
There is no charging in the devices, but fresh charged LiIon cells do have a voltage of about 4.05....4.09V at the beginning.
No RFM12B device was damaged, nor RFM69 devices. They are still running properly! |
|
|
Spaeth
Joined: 05 Jun 2020 Posts: 27
|
|
Posted: Wed Jan 20, 2021 8:53 am |
|
|
The transmitting period is very short, so this may be the reason why they are running without being destroyed. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9245 Location: Greensville,Ontario
|
|
Posted: Wed Jan 20, 2021 8:56 am |
|
|
According to the datasheet from Hoperf for the rfm12b the 'positive supply voltage' maximum( Vdd) is 6 volts ( six volts). |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Wed Jan 20, 2021 10:44 am |
|
|
He was originally using the RFM12B. As you say, this is fine.
This also has it's own sleep timer, solving the timing problems.
However for some (unknown) reason, he is trying to switch to the
RFM69. Loses the timer, and it is likely to suffer damage if operated
when the battery is charging.
He may be looking at it's range improvements, however these come
at a cost of increased power consumption.
Some people also talk about the 12 being 'end of life', but some of the
third party suppliers are still listing it as '5 years plus' availability,
so it is not worth changing away on these grounds.
If you do feel you have to change for this reason, then this is for
the next board, not trying to bodge it into the current design....
This page makes the point:
https://harizanov.com/2015/03/using-rfm69cw-instead-of-rfm12b/ |
|
|
|