[GUIDE] Battery icon indicator guide with MCP3008
[GUIDE] Battery icon indicator guide with MCP3008
Hi all!
I'we finally found some spare time to do a short rough guide on how to add a battery indicator on your GBZ with a MCP3008.
This guide include the hardware installation of the MCP3008 chip, hardware/software part for using LEDS, software part for using videoclips for warnings and shutdown, and software part for having a onscreen battery icon.
Some skills with hardware, and software is required for getting this to work properly!
https://github.com/joachimvenaas/gbzbatterymonitor
It's very rough, so if you have some problems, let me know!
Also, modify as you like! And if you make it better, make sure everyone to post it here so everyone can take advantage of it!
I'we finally found some spare time to do a short rough guide on how to add a battery indicator on your GBZ with a MCP3008.
This guide include the hardware installation of the MCP3008 chip, hardware/software part for using LEDS, software part for using videoclips for warnings and shutdown, and software part for having a onscreen battery icon.
Some skills with hardware, and software is required for getting this to work properly!
https://github.com/joachimvenaas/gbzbatterymonitor
It's very rough, so if you have some problems, let me know!
Also, modify as you like! And if you make it better, make sure everyone to post it here so everyone can take advantage of it!
- Attachments
-
- IMG_0308.jpg (1.62 MiB) Viewed 34079 times
Last edited by activex on Sun Dec 18, 2016 7:09 pm, edited 1 time in total.
-
- Posts: 59
- Joined: Sat Nov 12, 2016 12:26 pm
- Has thanked: 52 times
- Been thanked: 9 times
Re: Battery icon indicator guide with MCP3008
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?
- Helder
- Trailblazer
- Posts: 2985
- Joined: Thu May 05, 2016 8:33 am
- Location: Rogers, AR
- Has thanked: 1459 times
- Been thanked: 3114 times
Re: Battery icon indicator guide with MCP3008
Made a simple board for this project so it's a little easier for the novice or to make it tidy:
https://oshpark.com/projects/hd9tu1Lp
https://oshpark.com/projects/hd9tu1Lp
Chat with me and other members On Discord
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.
Helder's Game Tech Website
We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.
Re: Battery icon indicator guide with MCP3008
I 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?
Last edited by activex on Sun Dec 18, 2016 9:26 am, edited 2 times in total.
Re: Battery icon indicator guide with MCP3008
ExcellentHelder wrote:Made a simple board for this project so it's a little easier for the novice or to make it tidy:
https://oshpark.com/projects/hd9tu1Lp

- Fleder
- Posts: 849
- Joined: Thu May 05, 2016 9:04 am
- Location: Germany
- Has thanked: 183 times
- Been thanked: 258 times
Re: [GUIDE] Battery icon indicator guide with MCP3008
Really great work, thank you!
Does this work on every Raspbian based OS?
Does this work on every Raspbian based OS?
Re: [GUIDE] Battery icon indicator guide with MCP3008
I guess so, but you may have to install some extra packages. I have only tested on retropieFleder wrote:Really great work, thank you!
Does this work on every Raspbian based OS?
Re: [GUIDE] Battery icon indicator guide with MCP3008
Thanks for this guide, it's interesting me for a future build !
Just two questions :
1/ in the guide picture, you're wiring the mcp3008 directly to the battery. Is it possible to connect from somewhere else ine the build ? From the powerstrip instead of the battery for example ?
2/ just for my information on how it works : the first time I looked at the picture, it seemed strange to me to connect both anode and cathode from the battery to the same pin of the mcp3008. Doesn't it make a short ? How is it working ?
Thanks a lot for your answers, and for the guide !
Just two questions :
1/ in the guide picture, you're wiring the mcp3008 directly to the battery. Is it possible to connect from somewhere else ine the build ? From the powerstrip instead of the battery for example ?
2/ just for my information on how it works : the first time I looked at the picture, it seemed strange to me to connect both anode and cathode from the battery to the same pin of the mcp3008. Doesn't it make a short ? How is it working ?
Thanks a lot for your answers, and for the guide !
Re: [GUIDE] Battery icon indicator guide with MCP3008
1: it will not work while connected to the powerstrip. Thats because the powerstrip is always 5V. The battery is somewhere between 4.2-3.2V, depending on how much juice there is leftjohweb wrote:Thanks for this guide, it's interesting me for a future build !
Just two questions :
1/ in the guide picture, you're wiring the mcp3008 directly to the battery. Is it possible to connect from somewhere else ine the build ? From the powerstrip instead of the battery for example ?
2/ just for my information on how it works : the first time I looked at the picture, it seemed strange to me to connect both anode and cathode from the battery to the same pin of the mcp3008. Doesn't it make a short ? How is it working ?
Thanks a lot for your answers, and for the guide !
2: its not connected directly. Its a resistor on both wires. The reason being we need to get a lower voltage value than 3.3V for monitoring. With the two resistors I used in the example, 4.2V (full battery) will be divided to 3.2V. Read more about voltage divider to learn some more

Who is online
Users browsing this forum: No registered users and 1 guest