-
Notifications
You must be signed in to change notification settings - Fork 23
measurement interval lost after sensor reboot #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I realize this is old but you are correct. There was an error with how the measurement interval was stored to eeprom. I THINK I have this fixed but i'm still going through stuff and I'm not sure this project is even supported any more. |
Hi, the project is still very much supported, thanks for your contributions. Would you mind forking it from mine and adding you changes to the forked branch so I could import them to my repository? Thank you very much for the contribution! I am a bit busy right now, but I will come back to your questions in couple days. |
Oh yeah it's already forked and under https://github.com/cheeeeee/RS485_AtmelDebug/tree/master/src. The issue here was a mismatch between the initial array declaration being u16 and the eeprom stores being u8. On my branch everything is u16 and all values are written to eeprom as u16 and loaded as u16. Also the loadconfig() function wasn't fully finished and now is in working order. I'm still working on stuff so I don't know if I really have a stable build yet or not so you have time. |
Hi, |
Added some possibly stable .elf and .hex files at https://github.com/cheeeeee/RS485_AtmelDebug/tree/master/src/Release |
Hi, |
I think this bug might be a combination of the bug in the library as incorrect register number was specified for measurement interval AND MAYBE eeprom saving issue. @cheeeeee is correct - I should be saving 16bit values, not 8 bit. Even though I don't use them all. Will work on that |
Yeah when I was going through it you could do a mix of 8 bit and 16 bit ints but honestly it's just way easier to make everything 16 bit even if it's a little inefficient. If there's anything you want me to look at more in depth just let me know i'll be happy to do it. |
I guess my sensors have the same bug. I have 20 sealed sensors, most of them buried, but i also have some replacements at my desk. Do you think these saving issues can also affect other areas (not just the measurement interval) which could make the device stop working completely and not answer anymore ? |
I had a similar issue with the sensors stopping reponding. But i did not associate it with the storing problem. |
Is this issue still open? I have similar behaviour across multiple sensors; after powering down and up again the reading interval requires checking and resetting regularly to ensure correct readings. I also have the odd occurrence when the slave ID is reset to 1, which causes much more trouble as when there are multiple devices on the bus, it's not fixable by the master. |
I have pinpointed that to a power sequencing issue. I don't know yet what, but something causes the sensor to corrupt eeprom when power is rising/falling too slow. I.e. this should happen while turning of/on the whole string of sensors. Increasing BOD value seemed to help, so I did that for my current batch of sensors. But also I have a hardware solution that powers sensors and disconnects both power and modbus lines when voltage is too low. If anyone wants, I can send that as a bandaid fix for this problem, contact me directly plz. Also just disconnecting cable instead of allowing slow switch off of the power supply is an option if you have it on a connector. |
Hi,
i somehow have an issue with the measurement interval.
it seems that its not correctly stored in EEPRom and initialized to a very high value after power off->on.
here is what i did:
Power off sensor, power back on
Reinitialize python object, turns out this was not the issue
** here the test, if the data is updated fast, yes it is**
** power off sensor, power back on**
The text was updated successfully, but these errors were encountered: