open_evse
open_evse copied to clipboard
Shifted voltmeter
I'm making a custom setup for development of a few features and needed a voltmeter for it. I have no idea what an OpenEVSE2 is and the code looks kind of dated, so I added support for a transformer based voltmeter that scales the input sine and puts it around half its VCC rather than zero. I bought it locally, so not sure how available it is, but seems to be quite common, called ZMPT101B. The thing looks like this just in case:
It required a voltage caclulation logic alteration as well as subtracting the offset rather than adding, and since for some reason those are unsigned for voltage (why? they are signed for current), I added a define. I also made the voltmeter-related defines redefinable in build time.
There's an additional commit allowing to drop GFI support in build-time, it doesn't really relate to the voltmeter code, but I threw it for good measure, as it might be useful for someone. (My setup has an external GFI unit)
PS: The "shifted voltmeter" name seems dumb, but I can't honestly think of anything better
nice shot with those modules, they are less than 1$ on ali express and well sourced. What adc pin did you use on the OpenEVSE module ? OpenEVSE 2 is an experimental board. Perhaps you should keep the voltmeter settings on the #ifdef OPENEVSE_2 and just add yours in your #ifdef SHIFTED_VOLTMETER
@landswellsong thanks very much for the work. I bought one of these boards several years ago, and never had the time to play with it. I think it would make more sense to put this into my repo in the development branch. I've already copied it over
https://github.com/lincomatic/open_evse/tree/development
I made the define ZMPT101B instead of SHIFTED_VOLTMETER. After you test and give me some sample values to put into the VOLTMTER_xxx defines for this board, I will merge it into the stable branch, where it will eventually make back up to this repo. Please give is a whirl, and you can open up an issue on my repo to discuss tweaks.