Skip to content

Commit

Permalink
Extract docs for battery monitor (MiczFlor#2257)
Browse files Browse the repository at this point in the history
* extract battmon docs into markdown

* Fix typo

* add link to ADS1015
  • Loading branch information
s-martin authored Feb 14, 2024
1 parent d6b48d8 commit 75743da
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 37 deletions.
16 changes: 9 additions & 7 deletions documentation/builders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,31 @@
## Features

* Audio
* [Audio Output](./audio.md)
* [Bluetooth audio buttons](./bluetooth-audio-buttons.md)
* [Audio Output](./audio.md)
* [Bluetooth audio buttons](./bluetooth-audio-buttons.md)
* [GPIO Recipes](./gpio.md)
* [Card Database](./card-database.md)
* [RFID Cards synchronisation](./components/synchronisation/rfidcards.md)
* [RFID Cards synchronisation](./components/synchronisation/rfidcards.md)
* [Auto Hotspot](./autohotspot.md)
* File Management
* [Network share / Samba](./samba.md)
* [Network share / Samba](./samba.md)

## Hardware Components

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

## Web Application

* Music
* [Playlists, Livestreams and Podcasts](./webapp/playlists-livestreams-podcasts.md)
* [Playlists, Livestreams and Podcasts](./webapp/playlists-livestreams-podcasts.md)

## Advanced

* [Troubleshooting](./troubleshooting.md)
* [Concepts](./concepts.md)
* [System](./system.md)
Expand Down
33 changes: 33 additions & 0 deletions documentation/builders/components/power/batterymonitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Battery Monitor based on a ADS1015

> [!CAUTION]
> Lithium and other batteries are dangerous and must be treated with care.
> Rechargeable Lithium Ion batteries are potentially hazardous and can
> present a serious **FIRE HAZARD** if damaged, defective or improperly used.
> Do not use this circuit to a lithium ion battery without expertise and
> training in handling and use of batteries of this type.
> Use appropriate test equipment and safety protocols during development.
> There is no warranty, this may not work as expected or at all!
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):

```text
3.3V
+
|
.----o----.
___ | | SDA
.--------|___|---o----o---------o AIN0 o------
| 2MΩ | | | | SCL
| .-. | | ADS1015 o------
--- | | --- | |
Battery - 1.5MΩ| | ---100nF '----o----'
2.9V-4.2V| '-' | |
| | | |
=== === === ===
```

> [!WARNING]
>
> * the circuit is constantly draining the battery! (leak current up to: 2.1µA)
> * the time between sample needs to be a minimum 1sec with this high impedance voltage divider don't use the continuous conversion method!
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,7 @@
class battmon_ads1015(BatteryMonitorBase.BattmonBase):
"""Battery Monitor based on a ADS1015
> [!CAUTION]
> Lithium and other batteries are dangerous and must be treated with care.
> Rechargeable Lithium Ion batteries are potentially hazardous and can
> present a serious **FIRE HAZARD** if damaged, defective or improperly used.
> Do not use this circuit to a lithium ion battery without expertise and
> training in handling and use of batteries of this type.
> Use appropriate test equipment and safety protocols during development.
> There is no warranty, this may not work as expected or at all!
This script is intended to read out the Voltage of a single Cell LiIon Battery using a CY-ADS1015 Board:
3.3V
+
|
.----o----.
___ | | SDA
.--------|___|---o----o---------o AIN0 o------
| 2MΩ | | | | SCL
| .-. | | ADS1015 o------
--- | | --- | |
Battery - 1.5MΩ| | ---100nF '----o----'
2.9V-4.2V| '-' | |
| | | |
=== === === ===
Attention:
* the circuit is constantly draining the battery! (leak current up to: 2.1µA)
* the time between sample needs to be a minimum 1sec with this high impedance voltage divider
don't use the continuous conversion method!
See [Battery Monitor documentation](../../builders/components/power/batterymonitor.md)
"""

def __init__(self, cfg):
Expand Down

0 comments on commit 75743da

Please sign in to comment.