EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.61k stars 339 forks source link

Zorro ELRS Date/time occassionly reset #2187

Open pfeerick opened 2 years ago

pfeerick commented 2 years ago

I have the same problem with the Radiomaster Zorro ELRS version. Date/time reset every reboot sometimes to 2000, sometimes to 1970 year. EdgeTX 2.7.1 and nightly 2.8.0 the same behavior.

Originally posted by @Roman-Golod in https://github.com/EdgeTX/edgetx/issues/1588#issuecomment-1206107884

Roman-Golod commented 2 years ago

It doesn't happen, when I pull off the battery (I use the external 2s battery) without switching off Zorro. Time/date saves in that case. Maybe I can make any another experiments to help solving this problem?

UPD: That was wrong. Several times OK, then resets again. The same thing on the OpenTX 2.3.15-otx (1004ef7c)

nrlourenzo commented 2 years ago

Is there any update on this? I have exactly the same issue, date resets to date 2000-1-1

Roman-Golod commented 2 years ago

I received new quartz and capacitors from Radiomaster, replaced it, but it didn't help. Though date/time resetting now happens less often. Maybe l'll try to do it one more time. So, i think, it's hardware related problem.

TerraMotoEU commented 1 year ago

Got a new Zorro 4-in-1 that came with EdgeTX 2.7.1 and had the same problem: Date and time reset after reboot. Issue still persisting after update to 2.8. Mostly resets to yr 2000 but sometimes to 1970.

pfeerick commented 1 year ago

You'll find when it resets to 1970, most likely it will be 2000 on the next boot... since 1970 is the default date of the RTC, and is from before when OTX/ETX was first written, so is then set to 2000. The problem is finding out why it is resetting... Companion doesn't have anything to do with setting the time, although some people seem to see it happen after a sync with Companion. I've not yet experienced this myself - probably because I never initially set the time on my Zorros, but once set they seem to have stayed set.

This almost feels like the backup RTC battery is flat, but there must be something more to this as this would be an easily fixed occurrence (and wouldn't be evident until after several months to a couple of years of ownership)

gagarinlg commented 1 year ago

I think someone should take a look at the RTC supply voltage line with a decent oscilloscope when switching on and off and when un-/-plugging USB. Maybe with some low capacitance probes.

@Risto do you have a Zorro?

Roman-Golod commented 1 year ago

10 days ago I rebuilt the SD content and never touched the data port since then. I thought, the problem was gone, but yesterday it happened again. The clock battery is OK (3,3v).

TerraMotoEU commented 1 year ago

Ah the battery! Mine's at 3.24v. No idea how low they're allowed to go, though.

GavoGavo commented 1 year ago

Got mine today.

ELRS version on 2.7, and experiencing the same issue. Have noticed it go to both 1970 and 2020.

I have mostly been using it plugged in to the PC for flying Sim.

I wonder if the process of plugging in and out is related to the cause?

It's very frustrating.

TerraMotoEU commented 1 year ago

Contemplating whether I'd send it back to The Netherlands for replacement or not. After ordering from Radiomaster EU, PostNL took forever to even move my order. If I was sure it's something that can be fixed via fw update, I'd hold on to it and wait.

Aside from messing up file names (logs, model backups...) is there any other risk coming along with this issue, that we should be aware of, or is that all there is?

GavoGavo commented 1 year ago

Were these all new radios?

Did anyone else notice sticker residue on the cathode/positive side of the batteries, when they removed the clear-and-red battery tab that breaks the circuit in transit?

I noticed when I removed mine that quite a lot of residue was left over. I used the tab to remove the remaining residue but I tried charging the batteries in my XTAR charger and noticed they were not reliably making a circuit. I tried getting more residue off and they seemed kind of OK after that.

I tried cleaning them futher just now.. some residue did seem to come off and the charger now has no problem detecting them. I wonder if there might be a physical component here... poor contact perhaps. I don't think so because I would think that any drop in contact would switch the device off but perhaps it's worth a thought?

If you do try and clean the terminals, be really, really careful and read up about how to do it before you do. These batteries can be dangerous and though they're protected, a short could be catastrophic.

I do note that I have been unable to repeat the problem so far today anyway, and also upgraded firmware to 3.8.

I am going to keep trying to reproduce the problem. If it happens again I will lodge a warranty request with Radiomaster to see what they say. Hopefully this is just a small batch of units. I do wonder if we all got devices from the same batch maybe.

andreo32 commented 1 year ago

I got an answer, when I addressed the same question to radiomaster support: This is a known issue, a STM related bug that we've communicated to edge TX, who should be addressing the issue with a future update. I bought Zorro on August this year, so it is still under guarantee.

andreo32 commented 1 year ago

Hi! There's a guy in RC groups who explaining RTC reset issue by replacing original RTC battery to new - a little bigger one than original. Maybe is just a to weak battery problem... Br,

TheIsotopes commented 1 year ago

@pfeerick Is there anything news on this topic?

I'm having the same problem and it's frustrating.

Dopossum commented 1 year ago

I had the same problem, Time and Date resetting to 2000 or 1970. I have the Radiomaster Zorro Elrs V2.0 running under EdgeTX 2.7. In the menu SYS/Radio Setup , where also Date and Time are set there is a Checkbox option " Adjust RTC" . I enabled it. I have rebooted several times since and Date and Time where everytime correct.

EDIT: Today it was set back to 1970 ..... so the Adjust RTC Checkbox was not the solution, sorry

raphaelcoeffic commented 1 year ago

“Adjust RTC only make sense when a GPS is connected that is then used to fetch the current time. Your issue is most probably related to the RTC itself, and it’s supply power. I believe we have fixed such an issue that related to some brownout level. At best you should update to 2.8, which has the fix included.

KC748 commented 1 year ago

Hi everyone. I'm the guy who replaced the RTC battery with a bigger one mentioned above by andreo32.

My Zorro is on v2.8.0 and just as pfeerick has described above ( and in #1588), the RTC will reset to 1970 if the Power button is pressed while the main battery is removed. And then reset to 2000 on the next reboot. The RTC retains it's date and time in subsequent boot cycles after that.

It doesn't seem like this issue is fixed yet?

You'll find when it resets to 1970, most likely it will be 2000 on the next boot... since 1970 is the default date of the RTC, and is from before when OTX/ETX was first written, so is then set to 2000. ...

This almost feels like the backup RTC battery is flat, but there must be something more to this as this would be an easily fixed occurrence (and wouldn't be evident until after several months to a couple of years of ownership)

kf4mot commented 1 year ago

It doesn't seem like this issue is fixed yet?

It's most definitely not fixed.

chemist132 commented 1 year ago

Same here. i had mine for 1.5 years without trouble and now the date and time are buggy(: No solution yet.

mixMugz commented 1 year ago

Any news about bug? Zorro 2.8.1 EdgeTX still reset date/time after reboot(poweroff)

KC748 commented 1 year ago

Mine doesn't reset after a reboot. It only resets at certain instances as described above. If it is resetting after a reboot, the coin cell may be going flat. The cr1220 are small and only last about 1.5-2 years.

I don't know if this is related, but after replacing the cr1220 with a brand new Duracell cr2032, the beginning 3.33v has dropped to 3.08v in 2.5 months. This drop seems excessive.

Menu50

RCT Batt

mixMugz commented 1 year ago

3.08V is not enough?

Just checking my Zorro and i have 3.00 volts. If I understand it correctly, is this a lithium battery and should it be recharged itself?

pfeerick commented 1 year ago

I would think so, it just seems unusually quick for it to drop from 3.33v to 3.08v - although 3v is the nominal voltage.

It should be a lithium primary cell (thus non-rechargable).

mixMugz commented 1 year ago

So. Another test. Bought the new CR1220. Now voltage show 3.3 volts. Seting date/time. Step one - power off button. Date still correct after power on. Step two - power off by removing battery. Date still correct after power on. Step three - connect wia usb (joystik hid) then power off. Date reset after power on.

Now every time i power off radio - date will be reset. Sometimes date will keep, but reset after second/third reboot.

P.S. I only have external 2s battery connected. No internal battery 18350

KC748 commented 1 year ago

While doing some searches in OpenTx for RTC issues, I came across this one from way back in 2015. It looks like this RTC reset issue has been around for quite a while and on various radios. https://github.com/opentx/opentx/issues/2626 In this issue thread, Mike Blandford has a possible code fix, https://github.com/opentx/opentx/issues/2626#issuecomment-128933531 and there is also a hardware fix (for the Taranis X9E) by replacing a capacitor with a larger value capacitor.

Any chance of implementing either of these solutions for the Zorro?

Also came across this issue draining the RTC battery prematurely. https://github.com/EdgeTX/edgetx/issues/333

pfeerick commented 1 year ago

The comment that closed that issue is rather telling also...

It's an hardware problem, please contact FrSky (the 100uF is not enough, they will use a 470uF instead)

The code that Mike Blandford commented on is already in OTX and ETX, and has been for about four years - was added as part of https://github.com/opentx/opentx/pull/6501 - and is used by basically all the B&W radios that have a soft power button (rather than switch).

So it seems for that particular radio, it was a hardware issue through and through, and was also very intermittent, so really does fit the pattern we're seeing here. So the question now is probably going to be how to confirm it is an issue related to a capacitor value being too low (and which one)?

Nice bit of investigation... could be getting closer! :)

AlxSlk686 commented 1 year ago

Hello! I'm having the same problem with my zorro radio which is using firmware 2.8.1 I found a clear dependency on resetting the date and time. If you turn off the radio immediately after exiting the system menu or from it, the date and time are reset, if you exit the menu and wait a few seconds, the date remains unchanged.

KC748 commented 1 year ago

The comment that closed that issue is rather telling also...

It's an hardware problem, please contact FrSky (the 100uF is not enough, they will use a 470uF instead)

The code that Mike Blandford commented on is already in OTX and ETX, and has been for about four years - was added as part of opentx/opentx#6501 - and is used by basically all the B&W radios that have a soft power button (rather than switch).

So it seems for that particular radio, it was a hardware issue through and through, and was also very intermittent, so really does fit the pattern we're seeing here. So the question now is probably going to be how to confirm it is an issue related to a capacitor value being too low (and which one)?

Nice bit of investigation... could be getting closer! :)

Thanks for the additional information.

I've reread https://github.com/opentx/opentx/issues/2626, and according to projectkk2glider post, https://github.com/opentx/opentx/issues/2626#issuecomment-128792600, the additional 470 uF capacitor is added in parallel to Vcc (3.3v) and GND.

add additional capacitor in parallel somewhere between Vcc and GND lines,

That trace is your Vcc line and should have 3.3V when the radio is powered on. The GND is on the copper fill surrounding it

I've located the 3.3v regulator (A1117B 3.3) on my Zorro and did some continuity tests and came up with the diagram below. Conveniently, there is a 3.3v and GND pads close to the regulator.

Following projectkk2glider's instructions, I'm about to add a 470 uF 16v capacitor on those pads, Does anyone see any harm in doing that?

A1117B

KC748 commented 1 year ago

Ok. I gave it a day for someone to talk me out of it... Crickets. So here it is. :)

Following projectkk2glider's instructions, I added a 470 uF 10v capacitor (recommended is 6v or higher) on those pads (3.3v and GND) and tacked it down with a bit of hot glue over a piece of electrical tape for insulation.

On my Zorro (v2.2), a sure way to cause the RTC to reset is to press the Power button when the main batteries are out. The Power button would briefly flash blue. The RTC would reset to 1970, then to 2000 on the subsequent reboot.

So far, I haven't been able to cause the RTC to reset after adding the 470 uF capacitor. I'm quite satisfied with the result.

Tested:

Even after bricking the radio a couple of time, by pulling the USB before ejecting the Zorro's drive from the computer, the RTC did not reset after unbricking.

Disclaimer: Do the mod at your own risk. I'm not an expert. :) If anyone tries this mod, some feedback would be nice.

[In the pics below, note the offset placement of the capacitor, to clear the gimbal sensor housing and wires.]

2-470uF10v 3-Offset

mixMugz commented 1 year ago

Good news! I need to try with this stuff image image

KC748 commented 1 year ago

It's curious that the tantalum capacitor above the 3.3v regulator is a 47uF capacitor (476J) and not a 470uF (477j). I'm wondering if Radiomaster screwed up and put the wrong value there.

pfeerick commented 1 year ago

On my Zorro (v2.2), a sure way to cause the RTC to reset is to press the Power button when the main batteries are out. The Power button would briefly flash blue. The RTC would reset to 1970, then to 2000 on the subsequent reboot.

Oh, thanks for that - I think I have had this happen myself then... so will try to reproduce this, and then try the mod also if it happens repeatably for me. I'm now also curious as to whether the ELRS zorro is more prone to this than the MPM one, as it could be a little more power-hungry at startup and be causing a brownout, hence why the bigger cap needed.

It's curious that the tantalum capacitor above the 3.3v regulator is a 47uF capacitor (476J) and not a 470uF (477j).

Yes, given those results, it is definitely something to pass on the RM for them to investigate also.

AlxSlk686 commented 1 year ago

I installed back the firmware from RM 2.7.0 and all the problems with resetting the time finally disappeared. No matter how I try to reproduce this problem. All problems start on firmware 2.7.1 So it still looks like this is a software problem and not hardware

richardclli commented 1 year ago

It is interesting though for changes between 2.7.0 and 2.7.1 are mainly UI related. Cannot spot any change that may affect the RTC.

pfeerick commented 1 year ago

Indeed... IIRC the brownout PR was part of 2.7.0, so it won't be that. and rolling both FW and bootloarder back to 2.7.0 don't make any difference to either my MPM or ELRS Zorros for the "power on when batteries removed" triggering of the RTC being reset.

TheIsotopes commented 1 year ago

The capacitor mod helped me ... since @KC748 posted it i have it in action and i've seen no clock reset.

KC748 commented 1 year ago

That’s good news! Could I ask which version of Zorro you have?

There are couple of reports on RCG, both ELRS versions, that rests at every boot. It would be nice to give them some hope. Mine is the 4in1 and it has been rock solid since adding the cap.

TheIsotopes commented 1 year ago

Could I ask which version of Zorro you have?

4in1, Zoro Board v1.9

Roman-Golod commented 1 year ago

Great work, thanks! I've just added 1000 uF capacitor and no resets after some on/off cycles! Zorro ELRS board 2.2

mixMugz commented 1 year ago

So. I can confirm. The mod is working. Putting 470uF / 6.3V on board and I no longer have any case with time/date reset!

Zorro Board v2.2 with 4in1

image image

bbolgradov commented 1 year ago

Excellent, thanks! Mod works on Zorro Board v2.5 with ELRS.

dominikm23 commented 1 year ago

There is a socket on the other side of the board which is directly connected to the 3.3V trace. I just connected a matching plug to a 470uF capacitor and plugged it in. No need to solder or disassemble the circuit board.

I have not had a single date reset since this change and it used to do it pretty much every time I turned it on.

zorro-3v

Berlinologe86 commented 1 year ago

Radiomaster says it is a bug on edgetx? But why is it only on This Radio 😔 IMG_9829

can a edgetx dev confirm This ?

chemist132 commented 1 year ago

I have a Tx16S with edge and the same problemen. I orderbedrag a 470 muF condensator.Op 6 mei 2023 13:33 schreef Berlinologe86 @.***>: Raeiomaster says it is a bug on edgetx? But why is it only on This Radio 😔

can a edgetx dev confirm This ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Shpek commented 1 year ago

I have a BETAFPV Lite Radio 3 Pro 2.8.2 with exactly the same problem - date is set to 01-01-1970 on every reset. RTC battery is 3.1V. I also tried with the battery from my TX16S (which is working fine) - no effect. Tried the cap mod with a 470uF electrolytic and 100uF tantalum - still resetting. Can't downgrade to 2.7.0 since it doesn't have support for Lite Radio 3 Pro.

Roman-Golod commented 1 year ago

Tried the cap mod with a 470uF electrolytic and 100uF tantalum - still resetting.

I tried 470uF with no effect, but 1000uF helped me. Try to increase capacity.

Shpek commented 1 year ago

#

Tried the cap mod with a 470uF electrolytic and 100uF tantalum - still resetting.

I tried 470uF with no effect, but 1000uF helped me. Try to increase capacity.

1000uF made it reset to 01-01-2000. Tried with 4700uF - same thing.

pfeerick commented 1 year ago

Radiomaster says it is a bug on edgetx? can a edgetx dev confirm This ?

That's interesting... to the best of my knowledge is it related to a design choice made by RM to ensure you don't get any mid-air power-offs due to oxidisation of the battery contacts. There are two electrolytic capacitors (near each battery plug on the mainboard) that are holding enough charge to cause the RTC circuit to stop working properly when there are power issues such as the power on with removed battery scenario, hence the time/date reset. Adding more capacitance is probably allowing the MCU to start enough to realise it's in a brownout condition and stop itself properly. Removing them would also have the same effect, but then you'd want to make sure you take care of the battery contacts to prevent intermittent power.

Other than that, this is a nearly impossible issue to fault-find, as outside of the Zorro and an unusual/extreme sequence of events, there does not seem to be any pattern that allows us to reliably reproduce the fault on our end.

Thomas-Cee commented 1 year ago

So @KC748 , could I remove the surface mount 47μF and remount a larger surface mount cap like @mixMugz pointed to? Does it need to be an electrolytic?

Cap Mod

KC748 commented 1 year ago

I'm really not the right person to ask, to be honest. My sense is that the tantalum would be ok instead of an electrolytic. But Personally, I'd just add it to the 3.3v/GND pads. It's way less risky. Hopefully someone will chime in with a more definitive answer. Or otherwise, you're welcome to blazing the trail on this one. :)