Five channel battery monitor with LCD status display and NRF24 Network wireless communication for marine and RV applications.
Usually, when I have a board design, I don't waste much time milling and assembling it.
This time, though, it became pretty clear that I was a tiny bit rusty when it comes to milling on my CNC machine as I do maybe two boards a year and usually I switch around what software I use - at least parts of the tool chain.
As I learned my steps again, I created a lengthy tutorial about all the different steps I need to take to make this work which can be found here.
So after the CNC milling and the following cleanup was done, I was reasonably happy with the result. It wasn't perfect to a number of reasons and lessons learned like: drill the holes after milling the second layer so that auto leveling can actually work!
So while the top side turned out amazing, the bottom side had a bit of an offset and the bed leveling didn't work at all. I had this issue before where all my traces were milled out way too deep but I forgot why that was an issue and what the potential solution was. So I did it again. Result: Adding data to the tutorial to make it easier for myself next time around!
I also had a routing error on my board as the TFT display I was using was different from the last TFT I bought off of ebay. They might all look kinda the same, but these 1.8" displays are pretty much all ever so slightly different and need voltage divider or just some resistors or they need a software pixel offset... or not.. and so on. Luckily, this one was very easy to fix. Added some resistors to ground to create a voltage divider for the SPI signals.
In addition to sensing and displaying 5 different voltages from 12V batteries, I also wanted to add the possibility to wirelessly send the data to other modules on the boat using the extremely cheap NRF24L01 communication module one can by on ebay for about 90 cents a pop. This piece is a work in progress, though, and has not been tested at all, yet.
The end result is supposed to look kinda like this but in a nice 3D printed case and connected to actual boat batteries. As soon as I do that, I also have to calibrate the inputs. It wasn't enough to measure all the different resistors because my multimeter doesn't seem precise enough. I will have to calibrate the individual inputs and provide calibration values in the code to correct the measurements to be accurate. For example, a 4.2V fully charged LiPo shows up at 4.05V. That's a lot of deviation!
Since I cannot possibly put a bread board to permanent use in a marine environment, I created the schematics of the breadboard in KiCAD. The whole thing is rather simple.
And here the board:
For the display I am using, it is necessary to divide the voltage of the IO lines down to roughly 3.3V. I use 1K and 2.2k resistors for this.
For measuring a total of 0V - 18V, I use 4.7k and 22k resistors as voltage dividers.
I have become a big fan of bread board prototyping. In my youth, my dad always build his own breadboards so I knew was creating boards with a bunch of wires was good for. However, he used solder shoes and pins for his boards which meant soldering every single part regardless, even though non-permanently.
Nowadays, I use what everyone else uses which are these white, cheap breadboards you plug your wires in directly.
I have one board that I constantly reuse and extend if necessary. This board has a 1.8" TFT screen attached which is great for displaying things in realtime instead of sending the data to a PC. Faster and easier. Plus, it only needs four pins for SPI.
This is basically, the entire battery monitor. A bunch of wires and resistors. The protection circuitry is within the AVR. That's FAR from ideal and I do not recommend this to anyone. However, for my project this is good enough and easy.
Hidden in here is an Arduino Nano clone that I program directly using the Arduino IDE.
This version of the breadboard does not have a wireless communication connection to anything. However, I want this system to communicate with other devices on my boat so I planned for an NRF24L01 to be added to the PCB board.