@activex: I started a project with a arduino leonardo based solution on measuring battery voltage (analog in) and usage of i2c to transmit it to the raspberry. Also i used averaging of the measured voltages over 10s to make the indicator stable.
pros are: no additional components, if you are already using a leonardo or a clone
Am i allowed to modify your source code for this and post a guide?
[GUIDE] Battery icon indicator guide with MCP3008
-
- Posts: 128
- Joined: Sat Sep 09, 2017 6:06 am
- Location: Germany
- Has thanked: 60 times
- Been thanked: 37 times
Re: Battery icon indicator guide with MCP3008
Hi, you can average the read values over 10s for example to stabilize the values.activex wrote: ↑Sun Dec 18, 2016 9:24 amI tried using 10% steps, but that was too unstable with my 2000mAh battery, with a bigger battery and/or another controller it might work betterBenOfTheNorth wrote:Very nice, thanks! Is it worth going from the 100/75/50/25 values to more detailed levels, or does the accuracy of the voltages not really make this feasible?
In addition you can add a small capacitor between the adc input and ground.
I done both and have now very stable readings.
Re: [GUIDE] Battery icon indicator guide with MCP3008
No problem!salami738 wrote: ↑Tue Nov 14, 2017 2:40 am@activex: I started a project with a arduino leonardo based solution on measuring battery voltage (analog in) and usage of i2c to transmit it to the raspberry. Also i used averaging of the measured voltages over 10s to make the indicator stable.
pros are: no additional components, if you are already using a leonardo or a clone
Am i allowed to modify your source code for this and post a guide?
-
- Posts: 128
- Joined: Sat Sep 09, 2017 6:06 am
- Location: Germany
- Has thanked: 60 times
- Been thanked: 37 times
Re: [GUIDE] Battery icon indicator guide with MCP3008
@activex: Can you give me (https://github.com/salami738) permissions to push changes to your repository or make me a new branch?
Have made some improvements and want go give them back.
Improvements so far:
- Only change icon if state has been changed (lower cpu usage)
- Removed unnecessary sudo for changing icon
- Made a few alternative icons
Have made some improvements and want go give them back.
Improvements so far:
- Only change icon if state has been changed (lower cpu usage)
- Removed unnecessary sudo for changing icon
- Made a few alternative icons
-
- Posts: 128
- Joined: Sat Sep 09, 2017 6:06 am
- Location: Germany
- Has thanked: 60 times
- Been thanked: 37 times
Re: [GUIDE] Battery icon indicator guide with MCP3008
Hi, thanks for changing permissions on your repository! Made a pull request: https://github.com/joachimvenaas/gbzbat ... tor/pull/3
You can review it and merge it, if you like it. Greetings!
You can review it and merge it, if you like it. Greetings!
Who is online
Users browsing this forum: No registered users and 1 guest