Note: If you are here for the download from the video on the Adafruit Trinket M0 please scroll to the bottom of the post for the download.
I recently ran across a project called Open Battery Information that aims to help reset software lockout flags in Makita 18V batteries (and others). The project aims to support other manufacturer batteries as well, but started off with Makita 18V batteries.
The link to the Open Battery Information project is here:
https://github.com/mnh-jansson/open-battery-information
I decided to take a shot on it and build the project, program the Arduino, and attempt to fix a battery that I could no longer charge. With a little persistence I was finally able to read the status of the battery using an Arduino Uno and a Python GUI.
Fast forward a bit and I have made a few videos on it, which I will list below here. Feel free to watch these, there is a full guide there too.
Makita battery lockout, full guide setting up Open Battery Information, part 1 of 3, hardware
https://youtu.be/OeKCjAiLS9o
More recently I just finished programming an Adafruit Trinket M0 (https://www.adafruit.com/product/3500) with Open Battery Information. Adafruit makes a lot of cool products for prototyping and hobby projects, I recommend you check them out at https://adafruit.com . Maybe you will find a new weekend hobby project. The complete Adafruit Trinket M0 project is available in this video below.
Setting up Open Battery Information on an (Arduino) Adafruit Trinket M0
https://youtu.be/1yGGF7F5GFM
The folder “MAX31850_OneWire-master” in the “libraries” folder will need to be placed in your libraries folder (usually Documents/Arduino/libraries, create it if it does not exist). This library has been modified from the original version, timing had been adjusted and likely to no longer work actual OneWire devices.
The sketch is located in the “obi_trinket_m0” folder and place this folder in your sketch folder (usually Documents/Arduino). The download is below, it was tested with an Arduino Uno and Adafruit Trinket M0.
I will try to get a pull request into the official repository but until then I would like to provide the necessary files here so it is available. When the pull request goes through I will put a redirect and instructions on how to get the download from the official repository.
For the m0 the OneWire is on pin 0, and the enable is on pin 2. Will need the 4.7k ohm pull up resistors pulled up to 3V (connect to the 3V pin).
Setting up Open Battery Information on an (Arduino) Adafruit Trinket M0
https://youtu.be/1yGGF7F5GFM
Project files for the above video are below:
The URL that I put into the Adafruit board manager is below:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
This URL is located on the Adafruit Feather M0 Basic Proto tutorial page here:
https://learn.adafruit.com/adafruit-feather-m0-basic-proto/setup