School Bus Conversion Resources

School Bus Conversion Resources (https://www.skoolie.net/forums/)
-   Electrical, Charging and Solar (https://www.skoolie.net/forums/f49/)
-   -   LiFePo protection (https://www.skoolie.net/forums/f49/lifepo-protection-29559.html)

somewhereinusa 12-01-2019 03:06 PM

LiFePo protection
 
Since the lithium batteries I'm using (Valence) don't have any protection built in (only cell balancing), I've designed a protection system. It will totally disconnect the battery bank from everything if things go awry. It will also turn on a compartment cooling fan or turn on a heat pad if called for.
I have it bread boarded and the code written. For you coders out there mine is probably a bit clunky but, it works. Not really necessary but nice for a bit of bling I'm working on a screen to see what temps and voltages are.

https://live.staticflickr.com/65535/...80a315aa_o.jpg

TheHubbardBus 12-07-2019 11:14 PM

That's cool as hell. Great project!


Now I'm going to get out of here quick before I get the urge to start asking questions. I've already got enough to learn as it is.

brokedown 12-08-2019 09:43 AM

I looked into used Valance batteries but unfortunately I heard about them through the same place as most others, Youtube videos. The price on them has nearly doubled since then so my plans are back to lead acid...

cadillackid 12-08-2019 10:43 AM

this is wickedly cool!! is the nano R3 a better choice than an arduino? I know the arduino has huge community support and the R3 looks compatible.. I have been using zbasic.net chips for many years but of course I have to build about everything I use for them.. although some things like relay boards are pretty standard bit-banged interfaces so can work..



im glad to see you run your DS1820s on 3 wires instead of 2.. I hate parasitic power mode on those.. i always got wonky readings...



does the R3 have built in A2D / D2A?
-Christopher

somewhereinusa 12-08-2019 12:46 PM

Quote:

Originally Posted by cadillackid (Post 362644)
is the nano R3 a better choice than an arduino?
-Christopher

The nano is an Arduino with a bit less memory and a lot smaller. The nano doesn't have a power receptacle. Basically anything the Uno can do the nano can do if it has enough memory. It has all the same IO pins.

Quote:

im glad to see you run your DS1820s on 3 wires instead of 2.. I hate parasitic power mode on those.. i always got wonky readings...
I like that you can run a whole string of them and only take up one input pin.

Quote:

does the R3 have built in A2D / D2A?
Not sure what that means,

I've already made a few changes. I don't like those voltage divider sensors, readings aren't close enough. I've got a sensor coming that will do three sources and only use two analog pins. Hope it's more accurate.

brokedown 12-08-2019 01:21 PM

Have you looked at the DIYBMS project? They're using arduino + esp8266 and have quite a lot of features including data logging outputs for multiple collectors.

somewhereinusa 12-08-2019 02:03 PM

Quote:

Originally Posted by brokedown (Post 362658)
Have you looked at the DIYBMS project? They're using arduino + esp8266 and have quite a lot of features including data logging outputs for multiple collectors.

Haven't seen it. Do you have a link?

brokedown 12-08-2019 02:54 PM

https://github.com/stuartpittaway/diyBMSv4

They have a pretty good size open source community and this is the 4th major revision of the platform.

somewhereinusa 12-08-2019 05:31 PM

Quote:

Originally Posted by brokedown (Post 362658)
Have you looked at the DIYBMS project? They're using arduino + esp8266 and have quite a lot of features including data logging outputs for multiple collectors.

I took a quick look, interesting stuff and a bit over my pay grade.

What I'm building isn't really a bms. I guess it's more of a catastrophe\environment control.

The Valence batteries already have a built in bms that will do cell balancing in each individual 12V module/battery. The Valence system uses something similar to what I'm building only it uses the data, sent over a CAN bus, that reads each "cell" inside of the battery to turn things on and off.

Using conservative temp and voltage figures and taking my measurements externally I can totally disconnect my battery bank from everything else to prevent damage from things like being charged when below freezing and over and under volts.

I can also turn on a compartment cooling fan or a heating pad to warm if necessary.

I can see the data from the internal bms using the Valence software but, I can't really do anything with it. If I could "read" the data from the CAN bus I could probably use the internal sensors. That too is above my pay grade.

kazetsukai 12-08-2019 08:18 PM

Quote:

Originally Posted by somewhereinusa (Post 362687)
Using conservative temp and voltage figures and taking my measurements externally I can totally disconnect my battery bank from everything else to prevent damage from things like being charged when below freezing and over and under volts.

I can also turn on a compartment cooling fan or a heating pad to warm if necessary.

Sounds alot like what I'm looking at doing. I'm using RC balancers on Tesla packs and I have an Arduino MEGA setup for automating my lighting. I've been interested in maintaining pack temperatures through automation fans, a heating pad, or water heating/cooling.



What is your main challenge, code? Architecture? Hardware?

somewhereinusa 12-08-2019 08:36 PM

Quote:

What is your main challenge, code? Architecture? Hardware
My main problem is always coding. Building and planning is the easy part. I have the code for this working but, probably really badly formed. I'm thinking of adding data logging to see what triggered an event.

kazetsukai 12-08-2019 11:41 PM

Quote:

Originally Posted by somewhereinusa (Post 362734)
My main problem is always coding. Building and planning is the easy part. I have the code for this working but, probably really badly formed. I'm thinking of adding data logging to see what triggered an event.


If you use GitHub, you could start a code review on your branch. Pretty sure there's a few folks around here that'd be willing to add their .2c, myself included.

dzl_ 12-09-2019 05:01 PM

Quote:

Originally Posted by somewhereinusa (Post 361623)
Since the lithium batteries I'm using (Valence) don't have any protection built in (only cell balancing), I've designed a protection system. It will totally disconnect the battery bank from everything if things go awry. It will also turn on a compartment cooling fan or turn on a heat pad if called for.
I have it bread boarded and the code written. For you coders out there mine is probably a bit clunky but, it works. Not really necessary but nice for a bit of bling I'm working on a screen to see what temps and voltages are.


I love projects like this, and I always admire the people brave enough to undertake them! When I get around to the specifics of my electrical system I'll have to come back and reread this thread.

somewhereinusa 12-10-2019 08:29 AM

Quote:

Originally Posted by kazetsukai (Post 362778)
If you use GitHub, you could start a code review on your branch. Pretty sure there's a few folks around here that'd be willing to add their .2c, myself included.

I hope I did it right. Here's a link to my project on Github.

https://github.com/somewhereinusa/li...attery-protect

kazetsukai 12-10-2019 03:49 PM

Quote:

Originally Posted by somewhereinusa (Post 362985)
I hope I did it right. Here's a link to my project on Github.

https://github.com/somewhereinusa/li...attery-protect

Awesome. I'll use a PR to give feedback, hopefully tonight.



To be fair, here's my Arduino code for scrutiny:
https://github.com/kazetsukaimiko/au...n/cpp/main.cpp


Again, none of my actual business logic runs on the arduino, that's in Java-land. The above is just communication code.

TheArgobus 12-15-2019 11:55 AM

That's awesome. Do you have a screen hooked up to it, or a video of it in action?


How did you determine what temperature/voltage to turn the fans on? I'm asking because I want to do the same thing for my electrical compartment ventilation fans, as they can be a little loud, and due to the cramped space the inverter/charger's airflow sucks. So I figured if I could have the vent fans turn on with the inverter fans, that would be best, but I didn't want to disassemble the inverter to connect a relay to the fan, so here I am trying to figure out other methods of automatically turning on the vents.

somewhereinusa 12-15-2019 03:18 PM

Quote:

Originally Posted by TheArgobus (Post 363807)
That's awesome. Do you have a screen hooked up to it, or a video of it in action?

How did you determine what temperature/voltage to turn the fans on?

There is a screen hooked to it. I started to make a video but, there was a glitch in my code and haven't gotten to it again since that was fixed. Now I'm working on final wiring and it's apart again.

If you just want to turn on one or two fans I would use one or two of these.
https://www.ebay.com/sch/i.html?_fro...ure+controller

I use them for lots of things. If the relay included won't carry enough current you can use one of these to control a bigger relay. I think for the turn on temp I set mine at about 10 lower than whatever the inverter/charger fans are set at.

kazetsukai 12-16-2019 10:26 AM

Quote:

Originally Posted by somewhereinusa (Post 363831)
There is a screen hooked to it. I started to make a video but, there was a glitch in my code and haven't gotten to it again since that was fixed. Now I'm working on final wiring and it's apart again.

I was curious about this as well. Hoping you might upload a picture of the TFT you were using. The API for it was nice and clean, and would probably help me a lot if I ever needed to debug some of my arduino code.



I'm currently fighting a race condition in my code and I can't use Serial to do debugging due to how the code works (Serial is used for communication already, and the bug is in that communication code).



Second, if you're able to send pictures do please send a few of your overall setup once its back together.

somewhereinusa 12-16-2019 11:28 AM

Quote:

Originally Posted by kazetsukai (Post 363942)
I was curious about this as well. Hoping you might upload a picture of the TFT you were using. The API for it was nice and clean, and would probably help me a lot if I ever needed to debug some of my arduino code.


Second, if you're able to send pictures do please send a few of your overall setup once its back together.

I'll get pictures as soon as I can.
The tft I am using is this. I'm not using the touch screen part. At least not yet. I may go to the 7 inch screen.

https://www.adafruit.com/product/1591

You also need this for Arduino to be able to run it.

https://www.adafruit.com/product/1590

I'm looking into replacing the relay board and the 3 cube relays with MOSFETs. Does anyone know it I can use one with a 5v gate voltage to control another MOSFET that will handle say, 30A at 12V?

TheArgobus 12-17-2019 12:05 PM

Quote:

Originally Posted by somewhereinusa (Post 363831)
I think for the turn on temp I set mine at about 10 lower than whatever the inverter/charger fans are set at.


That's a very clever, simple and low tech solution. Nice.


All times are GMT -5. The time now is 02:29 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.