Before I recently got back to working on my car I was continuing work on my BMS. A lot has changes since my first revision and I will try too go over all that here. First off and most noticeably is I have created an actual PCB, this is a huge improvement over the previous breadboard design as I can now develop on the hour long train ride to work.
I do however need to make a second rev of the board to fix some little bugs, remove some unnecessary components and move some connectors around. Since my previous version of the BMS master board I have also switched to a big beefy 32bit PIC microcontroller, this meant rewriting my menu code. I also took the opportunity to write some line and circle drawing routines.
In this video you can see that I have added the voltage indicator lines. I have also made the graph display scalable to maximise use of the display space. What is not evident is the bar-graphs now no longer need to redraw the entire bar each time one is updated. This saves heaps of cycles and gives a much smother image. I’ll have a demo of that in the next video.
Still to do:
Feed in real data for a more impressive demo
A low tide mark, this might be a bit later on as I will need “active” data ie. data that is changing to test and develop.
Alright folks what do we think of this type of layout? I finally got this LCD to work and I have been playing around with how I want the graphics to look. Things I still need to add are:
A low tide mark for each battery to show how low it has gone when you pressed down hard on the accelerator.
Some lines going across the screen to act as a visual aid for determining voltage.
Fix the line drawing routine to only redraw the part of the graph that needs to change. This should result in a much smother image and should take a lot less of the PIC’s CPU time.
Make the graph scalable to allow up to 24 batteries. 24 enough?
Any suggestions? Leave a comment
Image 1: FIRST LIGHT! It works! It’s a bit of a rats nest but I cleaned everything up after I got here.
Image 2: Single bar not much to it.
Image 3: 12 bars! Even tho it only says 10
Image 4: That’s better. Now I just need to add those extra features…
I still need to determine how to layout the raw data version where it simply shows each battery as a voltage. I think though I will finish the graph first since that is more fun (=
Well after many hours of coding I finally have some software the simply displays the buffered values of all the batteries to .1 of a volt with less then +/- .1 volts! It’s currently refreshing at about 10 Hz but I think I can even speed that up by removing a few unnecessary delays. I still have a lot of refractoring to do on my code but things are going smoothly and there is little holding me back save my lack of time. There is still a lot to do before having a finished product. It needs to be able to sit on the evil bus and listen for its address and ignore anything else that comes its way. That way it can share the same data line with its other node friends. I also need to create the master node. The master will “call” each node in turn asking for its data. Once the node responds the master will call the next and so on in an endless loop. Can’t wait to start coding that one…. :’(
Photo 1: Here you can see the volt meter hooked to the first battery. It’s a little bit off but I don’t have the best calibration system.
Photo 2: My two boards talking evil to each other.
Photo 3: My mini EV pack for testing. Nice to have that but I will soon have a calibration setup which will do pretty much the same
thing except be safer since it will only be able to supply 60mA
Noise, that’s what I’m running in to. First a brief explanation of my project since I was in such a hurry the other night. The problem with battery packs of considerable size and cost (like the ones found in electric cars) is that they require constant monitoring throughout their life. Every cycle must be monitored for any cell that may be out side the bounds of reasonable operation or the owner of the pack could find them self with an undesirable number of door stops. A BMS (Battery Monitoring/Managing System) aims to inform the user that a cell or number of cells, are at higher or lower voltages in the chain.
The first idea, the one I had working last night, was to incorporate the measurement of 6 batteries with the use of one PIC microcontroller. This would save a considerable amount of components seeing as I would not have to have a board for each battery.
However this does mean that I don’t have as much resolution per battery. 10 bits resolution = 1024 / 6 cells = 170 values per battery.
This introduced the problem of more noise interfering with the displayed value because each of the 170 values represents about .1 volts. Therefore every (LSB) Least Significant Bit of noise translates to .1 volts of jumpy noise.
This is the new board which I have not been able to test yet. It may have a better tolerance to noise then its breadboard predecessor.
As for testing, I have run in to a bit of trouble with my code and I think I am just going to have to rewrite it a bit for more durability. The code also does a great deal of noise removal by sampling the values multiple times and further running it through a box filter. On the bench I have had it returning data for all 6 batteries about 4 times a second. The frequency can be increased or decreased depending on the amount of filtering applied.
I’m also testing a new idea for resetting the PIC on the board as well saving power. My dad and I came up with a system to allow the whole board to turn itself off when it doesn’t receive any signals on the evilbus. I’ll see how that goes (if it works) after I have rewritten my code and made a setup for testing evilbus.
OK, this will be a quick post since its time for bed but I wanted to get this up. I have been working on a BMS system for my electric car and this is what I came up with. It uses a simple PIC microcontroller and a few trim pots for calibration to measure 6 cells in series. Sounds simple but there are several catches to this problem. More on that later. For now lets bask in the glory that is LCD displaying data.