Code Monkey home page Code Monkey logo

pidog2's People

Contributors

djacobow avatar djacobowitz-cmt avatar ericwaynedavis avatar kevank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pidog2's Issues

pidog occasionally shuts off power to rpi when using the LVDC / HVRC features

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.

Raspberry Pi 4

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.