Skip to content

Commit 75743da

Browse files
authored
Extract docs for battery monitor (MiczFlor#2257)
* extract battmon docs into markdown * Fix typo * add link to ADS1015
1 parent d6b48d8 commit 75743da

File tree

3 files changed

+43
-37
lines changed

3 files changed

+43
-37
lines changed

documentation/builders/README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@
99
## Features
1010

1111
* Audio
12-
* [Audio Output](./audio.md)
13-
* [Bluetooth audio buttons](./bluetooth-audio-buttons.md)
12+
* [Audio Output](./audio.md)
13+
* [Bluetooth audio buttons](./bluetooth-audio-buttons.md)
1414
* [GPIO Recipes](./gpio.md)
1515
* [Card Database](./card-database.md)
16-
* [RFID Cards synchronisation](./components/synchronisation/rfidcards.md)
16+
* [RFID Cards synchronisation](./components/synchronisation/rfidcards.md)
1717
* [Auto Hotspot](./autohotspot.md)
1818
* File Management
19-
* [Network share / Samba](./samba.md)
19+
* [Network share / Samba](./samba.md)
2020

2121
## Hardware Components
2222

2323
* [Power](./components/power/)
24-
* [OnOff SHIM for safe power on/off](./components/power/onoff-shim.md)
24+
* [OnOff SHIM for safe power on/off](./components/power/onoff-shim.md)
25+
* [Battery Monitor based on a ADS1015](./components/power/batterymonitor.md)
2526
* [Soundcards](./components/soundcards/)
26-
* [HiFiBerry Boards](./components/soundcards/hifiberry.md)
27+
* [HiFiBerry Boards](./components/soundcards/hifiberry.md)
2728
* [RFID Readers](./../developers/rfid/README.md)
2829

2930
## Web Application
3031

3132
* Music
32-
* [Playlists, Livestreams and Podcasts](./webapp/playlists-livestreams-podcasts.md)
33+
* [Playlists, Livestreams and Podcasts](./webapp/playlists-livestreams-podcasts.md)
3334

3435
## Advanced
36+
3537
* [Troubleshooting](./troubleshooting.md)
3638
* [Concepts](./concepts.md)
3739
* [System](./system.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Battery Monitor based on a ADS1015
2+
3+
> [!CAUTION]
4+
> Lithium and other batteries are dangerous and must be treated with care.
5+
> Rechargeable Lithium Ion batteries are potentially hazardous and can
6+
> present a serious **FIRE HAZARD** if damaged, defective or improperly used.
7+
> Do not use this circuit to a lithium ion battery without expertise and
8+
> training in handling and use of batteries of this type.
9+
> Use appropriate test equipment and safety protocols during development.
10+
> There is no warranty, this may not work as expected or at all!
11+
12+
The script in [src/jukebox/components/battery_monitor/batt_mon_i2c_ads1015/\_\_init\_\_.py](../../../../src/jukebox/components/battery_monitor/batt_mon_i2c_ads1015/__init__.py) is intended to read out the voltage of a single Cell LiIon Battery using a [CY-ADS1015 Board](https://www.adafruit.com/product/1083):
13+
14+
```text
15+
3.3V
16+
+
17+
|
18+
.----o----.
19+
___ | | SDA
20+
.--------|___|---o----o---------o AIN0 o------
21+
| 2MΩ | | | | SCL
22+
| .-. | | ADS1015 o------
23+
--- | | --- | |
24+
Battery - 1.5MΩ| | ---100nF '----o----'
25+
2.9V-4.2V| '-' | |
26+
| | | |
27+
=== === === ===
28+
```
29+
30+
> [!WARNING]
31+
>
32+
> * the circuit is constantly draining the battery! (leak current up to: 2.1µA)
33+
> * the time between sample needs to be a minimum 1sec with this high impedance voltage divider don't use the continuous conversion method!

src/jukebox/components/battery_monitor/batt_mon_i2c_ads1015/__init__.py

+1-30
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,7 @@
3737
class battmon_ads1015(BatteryMonitorBase.BattmonBase):
3838
"""Battery Monitor based on a ADS1015
3939
40-
> [!CAUTION]
41-
> Lithium and other batteries are dangerous and must be treated with care.
42-
> Rechargeable Lithium Ion batteries are potentially hazardous and can
43-
> present a serious **FIRE HAZARD** if damaged, defective or improperly used.
44-
> Do not use this circuit to a lithium ion battery without expertise and
45-
> training in handling and use of batteries of this type.
46-
> Use appropriate test equipment and safety protocols during development.
47-
> There is no warranty, this may not work as expected or at all!
48-
49-
This script is intended to read out the Voltage of a single Cell LiIon Battery using a CY-ADS1015 Board:
50-
51-
3.3V
52-
+
53-
|
54-
.----o----.
55-
___ | | SDA
56-
.--------|___|---o----o---------o AIN0 o------
57-
| 2MΩ | | | | SCL
58-
| .-. | | ADS1015 o------
59-
--- | | --- | |
60-
Battery - 1.5MΩ| | ---100nF '----o----'
61-
2.9V-4.2V| '-' | |
62-
| | | |
63-
=== === === ===
64-
65-
Attention:
66-
* the circuit is constantly draining the battery! (leak current up to: 2.1µA)
67-
* the time between sample needs to be a minimum 1sec with this high impedance voltage divider
68-
don't use the continuous conversion method!
69-
40+
See [Battery Monitor documentation](../../builders/components/power/batterymonitor.md)
7041
"""
7142

7243
def __init__(self, cfg):

0 commit comments

Comments
 (0)