Dala's Battery-Emulator

Dala

Member
Joined
Feb 16, 2018
Messages
352
Hi all,
Thought I'd make a new thread for this, since quite a lot of development has been made since last year. I set out to connect used 400V EV packs directly as-is to grid-tied solar inverters, skipping the steps to open up packs, reconfigure for 48V, add BMS, add busbars, contactors, precharge, etc.

This is the basic idea:
iJE77OZ.png


I am happy to say that this was succesful, and the project is completely open source! Here is a video of my 30kWh LEAF battery, attached to my garage:
View: https://www.youtube.com/watch?v=XHZWGLzT7gg


And here is a link to the Github page:

As of today (21.07.2023), the following inverters/batteries are supported:
S8Bnm3r.png


The list is constantly growing, since this is an awesome community effort. Check out the Wiki side on the Github for more info. Hope this inspires someone here to test it out, really the simplest way so far to get a large powerwall for home use!
 
As someone who has disassembled two entire Leaf packs and reconfigured them to 14s / 48v, this is of course very interesting. I knew that there was a comparatively low selection of inverters that can handle the native high-voltage packs. Looks like you are making some awesome progress. Who wouldn't like a system that allows us to simply stack up old EV batteries and plug them in?!?

As far as BMS, does this solution simply use the BMS already in the OEM battery pack? Is there additional work to get the BMS functioning, or does the mere charge and discharge through the main ports "wake up" the internal BMS? I'd still want to know that the cells are properly balanced and monitored, and I guess there would be no external way to check that.

Cheers, John
 
As far as BMS, does this solution simply use the BMS already in the OEM battery pack? Is there additional work to get the BMS functioning, or does the mere charge and discharge through the main ports "wake up" the internal BMS? I'd still want to know that the cells are properly balanced and monitored, and I guess there would be no external way to check that.
Yes this uses the stock BMS that is inside the battery. The OEM BMS is still doing the cell monitoring, and incase we run into any problems, we stop charging/discharging.

We actually keep track of each and every cell individually in tandem on the LilyGo:
zZqFGmW.png


For this system, ssafety is prio #1! :)
 
What a great project! Would it be possible to support SMA Sunny Boy Storage inverters and Mitsubishi Outlander PHEV batteries as well?
 
There might be a catch: The SMA Sunny Boy Storage communicates exclusively via CAN bus to batteries. Would it be possible to emulate the CAN interface of the BYD HVS in addition to the RS485 interface?
 
There might be a catch: The SMA Sunny Boy Storage communicates exclusively via CAN bus to batteries. Would it be possible to emulate the CAN interface of the BYD HVS in addition to the RS485 interface?
Yes, I already have Patreon supporters that I know run CAN batteries, and CAN inverters on the board! It works beautifully to emulate the BYD HVS protocol! For instance Goodwe and Sungrow inverters!
 
Today I tested automated contactor closing/opening via the LilyGo board. This will be much safer compared to the manual way I have been using. With the auto control, the system can decide that it is time to open the contactors on its own, to avoid dangerous over/undercharge situations.
1gdWNHF.png


I tested this with solid state relays, that can take the 3.3VDC activation source. I also updated the Wiki page (https://github.com/dalathegreat/BYD...issan-LEAF-battery#prechargecontactor-closing) with info on this, will put some pictures of the final install this week :) Will be nice to sleep better, knowing that the system can now better act on faults autonomously!
 
Yes, I already have Patreon supporters that I know run CAN batteries, and CAN inverters on the board! It works beautifully to emulate the BYD HVS protocol! For instance Goodwe and Sungrow inverters!
Sounds good. I have a Sunny boy storage 5.0 with a BYD HVS battery. I also have a spare battery from a Mitsubishi Outlander PHEV that I would love to connect to the SBS's secondary battery port. This type of battery is supported by SimpBMS for example. Any chance to integrate the relevant source code parts in your emulator? Do you see any problems with this HW setup? I would be happy to support you via patreon if there is a chance to get this up and running (ideally without having to modify the battery itself).
 
Sounds good. I have a Sunny boy storage 5.0 with a BYD HVS battery. I also have a spare battery from a Mitsubishi Outlander PHEV that I would love to connect to the SBS's secondary battery port. This type of battery is supported by SimpBMS for example. Any chance to integrate the relevant source code parts in your emulator? Do you see any problems with this HW setup? I would be happy to support you via patreon if there is a chance to get this up and running (ideally without having to modify the battery itself).
Absolutely I can do that!

I added initial basic support for BMU equipped versions of the i-Miev/Czero/Ion battery packs: https://github.com/dalathegreat/BYD...mmit/873937133cb9576bbddfd4a802c9e71577018bdc

I also added all the info I have on the i-Miev packs: https://github.com/dalathegreat/BYD-Battery-Emulator-For-Gen24/wiki/i‐Miev-CZero-Ion-battery
 
Great job Dala! Not using HV yet, but I patreoned you just to show some support!!
 
Dala: First, let me say that I think it is great that you are doing this. I spent quite a bit of time looking for people with the ability to do this sort of project, and to find a small development team to handle various aspects of a project. What I encountered is people are just too busy, or there were way too many things that they wanted to attempt at one time. I did learn that there are companies building these devices, such as Nuvation Energy.

The companies I found tend to focus on large projects, and are not really geared for DIY.

That being said, things have changed quickly in my USA Midwest State, (and I feel much more widespread across the US) with the advent of the new 2020 NEC. I've posted numerous times in various forums about how restrictive it has become, with the result being it feels like Al Gores "an inconvenient truth". NEC 2020 has made it nearly impossible in many areas to have a DIY project. But what concerns me more is that insurance companies are dong everything they can to limit their exposure. We are still trying to settle a 3 year old claim regarding wind damage. Last night we had 90 mph winds here. Since we are out shopping for a new insurance company, language about solar, batteries etc is popping up in nearly all of the questionnaires they ask us to fill out about our property.

I have a BMW I3 battery sitting out in the garage, and I'd love to use it in the manner your system proposes to do. I could never get it permitted, and if it was in any way involved in a claim, we would be massively screwed.

I'm wondering it would make sense to start a group with people like yourself, with the express purpose of getting a system that can be "Listed" such as by UL, ETL, etc? This is course would be expensive, but there are people like Nuvation making equipment that is already UL approved. The trick is to make it work with a variety of batteries and inverters.

I hope this isn't rambling too much.
 
@prepared1 -- good points all around. I'm working on new construction plans at the moment, and my solution is basically to remove everything solar and battery related from the main home structure. I'm planning to build a completely-detached "utility shed" that will house the incoming grid connection and meter, all the inverters, the batteries, transfer switches, etc., etc., etc. For my own peace of mind I think I'm going to build it entirely out of concrete, basically rendering it fireproof. Then I'll just run a massive cable from the dedicated utility shed to the house.

This has a side benefit in my case as well. I have 3-4 structures on the site. I can actually serve ALL of them from the utility shed, which means that the portion of my solar array that I grid-tie will actually offset all structures, rather than just the meter where they are mounted. Also, I can eliminate at least two other meters -- so in my case, that's $50/month that I'll wipe off my electric utility bill just by going to a single meter.

Effectively I'll be self-insuring the equipment in the utility shed, but that's okay. In comparison to everything else, it's cheap and easily replaced.

I just don't think there's ever going to be a UL approval for anything homemade, especially on the battery side. The best you can hope for is getting an inverter manufacturer to "bless" our use of second hand cells. That is going to be an almost-insurmountable challenge for a lot of reasons -- not the least of which is that a lot of those inverter manufacturers are also in the battery business and want to sell you their stack, not support the one you made yourself. I hate it, but that's just the economic reality of it, I believe.

Cheers, John
 
New software v2.2.0 has been released, adding support for GoodWe "ET/BT & EH/BH & EHB" inverters 🥳

That's gonna be a no from me, no interest to make it a product. This is an open source project, that anyone can feel free to commercialize if they so please. But for simplicity it just stays as a for-fun project, that runs on a 15$ hardware.

Sidenote, in Finland insurance companies atleast claimed that as long as the inverter is the thing doing the grid connection, any battery can be connected. But most likely they don't understand what they say...
 
New software v2.2.0 has been released, adding support for GoodWe "ET/BT & EH/BH & EHB" inverters 🥳 That's gonna be a no from me, no interest to make it a product. This is an open source project, that anyone can feel free to commercialize if they so please. But for simplicity it just stays as a for-fun project, that runs on a 15$ hardware. Sidenote, in Finland insurance companies atleast claimed that as long as the inverter is the thing doing the grid connection, any battery can be connected. But most likely they don't understand what they say...

Hi Dala, would there be any interest in using a fiat 500e battery pack.. I own a couple of running examples and one that I recently acquired with a discharged pack.. if there is interest I'd be happy to get a can sniffer and send over the reading and possibly use these packs as well.. these cars can be acquired for cheap in non running conditions,but battery pack is pretty resilient.
 
..if there is interest I'd be happy to get a can sniffer and send over the reading and possibly use these packs as well.. these cars can be acquired for cheap in non running conditions,but battery pack is pretty resilient.
Yes please! Info on battery, pictures of connectors, CAN logs from running vehicles (and on standalone batteries), anything is welcome!
 
It's a 24 kw pack, I'll take pics of connectors as I can .. as far as getting CAN logs what would you recommend
 
It's a 24 kw pack, I'll take pics of connectors as I can .. as far as getting CAN logs what would you recommend
Anything that can read CAN data is OK. Cheap versions would be an Arduino with CAN shield, or a Raspberry PI with CAN addon. Downside with cheap is that it is harder to use. Dedicated CAN readers are easy, Peak P-CAN, or Kvaser Leaf Light are good quality tools. Anything will work!
 
@prepared1 -- good points all around. I'm working on new construction plans at the moment, and my solution is basically to remove everything solar and battery related from the main home structure. I'm planning to build a completely-detached "utility shed" that will house the incoming grid connection and meter, all the inverters, the batteries, transfer switches, etc., etc., etc. For my own peace of mind I think I'm going to build it entirely out of concrete, basically rendering it fireproof. Then I'll just run a massive cable from the dedicated utility shed to the house.

This has a side benefit in my case as well. I have 3-4 structures on the site. I can actually serve ALL of them from the utility shed, which means that the portion of my solar array that I grid-tie will actually offset all structures, rather than just the meter where they are mounted. Also, I can eliminate at least two other meters -- so in my case, that's $50/month that I'll wipe off my electric utility bill just by going to a single meter.

Effectively I'll be self-insuring the equipment in the utility shed, but that's okay. In comparison to everything else, it's cheap and easily replaced.

I just don't think there's ever going to be a UL approval for anything homemade, especially on the battery side. The best you can hope for is getting an inverter manufacturer to "bless" our use of second hand cells. That is going to be an almost-insurmountable challenge for a lot of reasons -- not the least of which is that a lot of those inverter manufacturers are also in the battery business and want to sell you their stack, not support the one you made yourself. I hate it, but that's just the economic reality of it, I believe.

Cheers, John

John: Thank you for your comments. I want to be clear that my troubles with the insurance company are not due to anything that we did, batteries, or anything else. In 50 years with this company, who has proven to not "be like a good neighbor", we have never had a claim that we caused. We had 140 mph derecho winds here for an hour in 2020, and said insurance company has delayed our claim constantly, re-assigned agents (we are on number 11 now) etc. I've become quite knowledgeable about insurance company practices as a result.

By the way, they are NOT all bad. I keep bringing this up so people pay attention, and hopefully avoid being screwed.

In our latest policy, there was language that stated that solar systems (in general, meaning panels, racking, etc) would be covered if your were to show that you are not a net producer. The language was somewhat confusing, but it made me think of people who sell back to the grid, and have a surplus. I believe the intent was to not have people effectively be "in business as a mini utility" of sorts. But it wasn't clear.

I read some information online about how the 2020 code came to be, and surprise, surprise, it had a bunch of members who are in the energy business, for their "expertise". Sure, in eliminating competition, and making it non conforming for many people to do DIY. Which the insurance companies use to get out of paying claims.

I can certainly see why many people could cause a fire. Reports are growing that claims are being denied, even when the solar system isn't even part of the cause. Just think of all the things in a persons household that are not "listed". Oh, you put a car stereo in yourself? Did wiring in your home? Worked on your car?

Your plan sounds like a good one. Anything you can do to limit your exposure, to reduce damage, make it more safe, etc is wise.
 
Back
Top