djacobow / pidog2 Goto Github PK
View Code? Open in Web Editor NEWHardware monitoring and external watchdog support for the Raspberry Pi
License: GNU General Public License v3.0
Hardware monitoring and external watchdog support for the Raspberry Pi
License: GNU General Public License v3.0
Having enabled this feature on a pair of lab systems, I noted that within a 24 hour period each system would be reset. The serial monitor revealed no anomalous voltage readings and then the pidog would switch off.
[ 0x00000229, 0x00000110, 0x0000001E, 0x0000012C, 0x0000001E, 0x012603A8, 0x038E0000, 0x141703D8, 0x00000000, 0x70640207, 0x033C0000, 0x02870000, 0x602D3647, 0x74636800 ]
[ 0x00000229, 0x0000010F, 0x0000001E, 0x0000012C, 0x0000001E, 0x012603A8, 0x038E0000, 0x13D103D8, 0x00000000, 0x70640207, 0x033C0000, 0x02870000, 0x602D3647, 0x74636800 ]
[ 0x00000229, 0x0000010E, 0x0000001E, 0x0000012C, 0x0000001E, 0x012403A4, 0x03840000, 0x13D103D8, 0x00000000, 0x70640207, 0x033C0000, 0x02870000, 0x602D3647, 0x74636800 ]
[ 0x00000229, 0x0000010D, 0x0000001E, 0x0000012C, 0x0000001E, 0x012403A4, 0x03840003, 0x140003DC, 0x00000000, 0x70640207, 0x033C0000, 0x02870000, 0x602D3647, 0x74636800 ]
[ 0x00000229, 0x0000010C, 0x0000001E, 0x0000012C, 0x0000001E, 0x012403A8, 0x03890003, 0x140003DC, 0x00000000, 0x70640207, 0x033C0000, 0x02870000, 0x602D3647, 0x74636800 ]
Powering off pi.
[ 0x0000020B, 0x00000000, 0x0000001D, 0x0000012C, 0x0000001E, 0x012403A8, 0x03890000, 0x13BB03D8, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
[ 0x0000024B, 0x00000000, 0x0000001C, 0x0000012C, 0x0000001E, 0x01230007, 0x03A80000, 0x13BB03D8, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
[ 0x0000024B, 0x00000000, 0x0000001B, 0x0000012C, 0x0000001E, 0x01230007, 0x03A80007, 0x13D10000, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
[ 0x0000024B, 0x00000000, 0x0000001A, 0x0000012C, 0x0000001E, 0x01280001, 0x03870007, 0x13D10000, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
[ 0x0000024B, 0x00000000, 0x00000019, 0x0000012C, 0x0000001E, 0x01280001, 0x03870000, 0x13A40007, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
[ 0x0000024B, 0x00000000, 0x00000018, 0x0000012C, 0x0000001E, 0x011F0000, 0x03810000, 0x13A40007, 0x00000001, 0x70640207, 0x033C0000, 0x02870000, 0x602D3666, 0x74636800 ]
Code inspection suggests that the reason for the sudden cutoff is that the reading of the ADC is sometimes generating garbage that allows the code path to execute a cutoff as though the monitored voltage is too low.
Discussion with @djacobow led to idea that an EMA filter should be applied to the ADC readings. I've implemented his suggestion and have not experienced any additional power cuts as a result. Because of the severity of this problem, I will submit these changes as a PR today, but note that additional changes might be warranted.
The convergence time of the EMA filter, based on a 1V change in the monitored voltage, is several minutes. This is fine when monitoring a battery, but probably not ideal when monitoring the output of something where the voltage changes are expected to be more rapid (e.g. a solar panel). As such, the code changes will not apply the EMA filter to VSENSB. As such, its recommended to NOT use VSENSB with the LVDC/HVRC feature.
it looks so great, exactly what i was looking for.
Could you please confirm if it will work with Pi 4 hardware and latest raspberry pi operating system? If anyone has tested it with Pi4, please let me know and confirm.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.