Up time counter
Up time counter
Hello I am quite new into open9x, but I am missing one feature from my graupner MX-16s. It is timer, that counts "up time" from last charge. When I know that my battery last 6 hours of transmitting then I don't have to waste time charging when I see that transmitter was powered up for only 2 hours from last charge. It would be great to have this timer for example on STATS screen. In EEPROM It is necesary to store timer value and transmitter voltage. When on power up is detected voltage higher than last stored value the timer is cleared to zero, because we just detected freshly charged battery.
Re: Up time counter
That would be a nice feature!
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Up time counter
How much higher ??
On NiMh there is a huge recovery effect. A used pack if left unused for a while will recover some tenths of volts but they will lost in a while.
Furthermore which time resolution you expect ?
If we want a 1 second resolution it means 3600 writes per hours about 16000 write during my last flying session; No thanks !!! I like my eeprom.
Instead lipo/life batteries have a well known discharge curve, maybe it can be useful to calculate remaining capacity knowing the voltage.
On NiMh there is a huge recovery effect. A used pack if left unused for a while will recover some tenths of volts but they will lost in a while.
Furthermore which time resolution you expect ?
If we want a 1 second resolution it means 3600 writes per hours about 16000 write during my last flying session; No thanks !!! I like my eeprom.
Instead lipo/life batteries have a well known discharge curve, maybe it can be useful to calculate remaining capacity knowing the voltage.
Re: Up time counter
I don't know implementation details, but it works quite well on MX-16 with Ni-Mh batteries for more than 3 years. I agree that eeprom lifetime would be issue, but then I am wondering how its done in MX-16's firmware.
-
- 9x Developer
- Posts: 1109
- Joined: Sat Dec 31, 2011 12:11 am
- Country: -
- Location: Massa (MS), Tuscany, Italy
Re: Up time counter
They have a battery backup on RAM if I'm not wrong.
About NiMh maybe it's sufficient to reset the counter when voltage value is near a fully charged battery (10.8V for a classical 8 element battery)
About NiMh maybe it's sufficient to reset the counter when voltage value is near a fully charged battery (10.8V for a classical 8 element battery)
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Up time counter
I will add this feature only on boards which have the soft power feature (remanent timers). I don't want to write in EEPROM something each second...
Bertrand.
Bertrand.
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Up time counter
On ersky9x we already have a current monitor that stores the used capacity in the EEPROM, even better than a timer I would say.
I agree, without the soft power feature, writing to the EEPROM makes this rather a problem for wearing out the EEPROM. I have investigated the possibility previously and concluded it is difficult to do without excessive writing to the EEPROM.
Mike.
I agree, without the soft power feature, writing to the EEPROM makes this rather a problem for wearing out the EEPROM. I have investigated the possibility previously and concluded it is difficult to do without excessive writing to the EEPROM.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Up time counter
So there is some sort of current sensor on ersky board? I am pretty sure that there is no way to do this on stock 9x board.
But to resolve EEPROM write number I think we actualy don't need one second acurancy. If we increment counter at 0:30, 1:30, 2:30,... we get one write per minute and stay within 30 second error each power cycle. My each flight is around 10 minutes and the battery last 6 hours = 36 power cycles. 36 * 30 sec = max 18 minute total error. That is totally acceptable for given purpose. We don't need super accurate timing.
This solution would results in 10 eeprom writes each flight, but I am pretty sure that I generate more writes using trims to compensate drift of gyros on my tricopter board.
But to resolve EEPROM write number I think we actualy don't need one second acurancy. If we increment counter at 0:30, 1:30, 2:30,... we get one write per minute and stay within 30 second error each power cycle. My each flight is around 10 minutes and the battery last 6 hours = 36 power cycles. 36 * 30 sec = max 18 minute total error. That is totally acceptable for given purpose. We don't need super accurate timing.
This solution would results in 10 eeprom writes each flight, but I am pretty sure that I generate more writes using trims to compensate drift of gyros on my tricopter board.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Up time counter
Well, why not ... if flash allows ...
Bertrand.
Bertrand.
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Up time counter
The EEPROM is not as simple as that, as I understand it, it is divided into blocks and a write to any byte in a block causes the whole block to be written. So writing to two consecutive bytes counts as 2 writes to each of them!
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Up time counter
AFAIK the eeprom is single-byte access, I haven't read about blocks at least in the "normal" datasheet.
However, as I understand the eeprom management, a write to any single byte will trigger a write of the entire "file" anyway (either the entire currently selected model, or the "General Settings" file).
Everytime a single byte is changed (and after a short delay) a new copy of the entire model is written, because it firstly has to be compressed, with a result that will likely change much more than just the byte the user has edited, and secondly in order not to lose data if the user turns the power off during write a new copy is written and the new location is stored afterwards, so any loss of power in the middle will simply reload the last copy, losing the last change because the model location still points to the old address.
So we actually have a ton of bytes being written on each change.
However, as I understand the eeprom management, a write to any single byte will trigger a write of the entire "file" anyway (either the entire currently selected model, or the "General Settings" file).
Everytime a single byte is changed (and after a short delay) a new copy of the entire model is written, because it firstly has to be compressed, with a result that will likely change much more than just the byte the user has edited, and secondly in order not to lose data if the user turns the power off during write a new copy is written and the new location is stored afterwards, so any loss of power in the middle will simply reload the last copy, losing the last change because the model location still points to the old address.
So we actually have a ton of bytes being written on each change.
Re: Up time counter
Is this available on open9x too? I could only find the actual current.MikeB wrote:On ersky9x we already have a current monitor that stores the used capacity in the EEPROM, even better than a timer I would say.
Mike.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Up time counter
No, it's not done today, would you open an enhancement issue?
Bertrand.
Bertrand.
Re: Up time counter
I just did, but I cannot change it to enhancement.
All new isseus are automatically defects.
All new isseus are automatically defects.
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: Up time counter
The global timer (since last charge) has been added.
Also now all Model Timers may be "remanent" (you will see a 'R'). It means that when you load your model / start your Tx, it starts where it was before ...
Bertrand.
Also now all Model Timers may be "remanent" (you will see a 'R'). It means that when you load your model / start your Tx, it starts where it was before ...
Bertrand.