Flash Corruption, power management on Heltec V3

We have about a dozen nodes out there now, some battery, some mains, some solar but I’m noticing a reocurring theme. I may be missing something settings wise but there are two issues.

If the power dips, no idea what the trigger voltage is, I’m looking into this now. One of two things will happen.

The unit will deep sleep. This is great and all, but when the power returns it’s then stuck in deep sleep mode. I dont see any obvious way to fix this without an external reset. It means a solar node will go offline, I’ll drive out to sort it and it’s battery will be sat at 4.2V and I just have to hit reset. This is especially annoying as one of the effected nodes is 20M up a tower.

The other one is that the unit will trash it’s flash. The node details will be lost, most other settings will stay but the nodelist will get nailed in some strange way too giving the impression the node’s front end has failed. It can be seen, remote admin works, it relays packets but the node list never updates again.

I have a lot of experience in embedded development and with the ESP32 and it suggests two things…
Corruption on a brownout normally happens at the area of flash being accessed. This makes sense for the node list, but why is the node name being accessed. I’m open to this being corrupted because of its vacinity in flast to the node list. Absoluteley nothing else seems to get corrupted though.

It also makes me wonder how brownout detection is being handled. The node should just shutdown before this failure can happen so either brownout detection isnt happening or it configured incorrectly.

Has anyone else seen anything like this?

2 Likes

Without power saving enabled and on low voltage Meshtastic force sleep forever (36 years) …

Low voltage is 3.1 volt for LiIon …

Enable power saving or set device type as ROUTER or REPEATER. I use my fork with extra power management option.

What I have implemented for my solar nodes is that the mesh runs for several days without sun even when the battery is low.

Normally the node runs permanently. Below a definable battery level, the node switches to interval mode. In interval mode, all nodes start up every full hour for e.g. 5 minutes and every 6 hours for e.g. 15 minutes. You can then communicate or retrieve the buffered messages at every full hour using Store&Forward.

Why is 36 years a default?
The shutdown at 3.1 volts is awesome, if it worked. In reality the calibration needs to be done and well, the less said about the ADC multiplier in the UI the better. Doesnt work in the Web UI, works (ish) in android. The issue is that the uC does have a built in brown out detector in order to protect the flash. it seems to be disabled or ignored. I’ll test this when I have time but its causing issues not just for me. The docs are totally unclear on the fact you NEED to do this calibration for battery devices or you’ll start having issues.

As these are intended as router clients theres no point in store and forward for these but thats a nice thought for automation nodes.

36 years is the maximum interval for deep sleep “forever”. Meshtastic isn’t realy designed for solar powered or low power consumtion cases. Intervals sync by time combined with message buffering could solve this, but this will never accepted by the main firmware.

So given most people ARE using this on battery and it’s promoted as off grid and a number of vendors sell low power specific implmentations. This isnt supported?

When the safeguards to stop this is baked into the hardware?

Sorry but I dont think this is correct. If you need mains power this isnt ‘off grid’ or indeed a viable solution for independant messaging.

Meshtastic utilizes all possibilities to operate the nodes permanently with the lowest possible power consumption.

The nodes go into light sleep as quickly as possible and only wake up as soon as a data packet comes from Lora or BLE or Wifi. But in principle, all nodes must be permanently switched on. This means you will never get below 10mAh RX per hour plus 10mAh TX at 10% air utilization. 500mAh per day is a lot if you only want to operate nodes with batteries or small solar panels.

Meshtastic’s answer will be that you then have to use (more expensive) hardware with low power consumption, larger batteries and solar cells. But Meshtsstic offers a really extensive toolstack with firmware, apps, CLI and much more. Thanks to open source, every developer can build in their own customizations.