diy solar

diy solar

I want to make my own BMS

Pidjey

New Member
Joined
Dec 20, 2020
Messages
162
Hi all,

As I have seen this comunity is very very active in the forums and I would like to discuss you my plans. I am sure that you have toons of ideas and tips that can help me.

First of all I would like to briefly introduce myself. I am an electronic engineering with master and phd in electronics. I have experience in PCB and firmware design (among many other areas) of 8 years. Currently I work in one of the biggest electronic R&D companies in Europe. I have the capabilities of producing and manufacturing whatever. I can use any kind of encapsulation likq QFN, CSP.... I can order professional PCBs. In the end, my only limit is the market (I could design an ASIC but doesn´t make sense for this purpose).

I would like to design my own BMS and I would like you to contribute with ideas. I have read posts like https://diysolarforum.com/threads/diy-bms-design-and-reflection.4065/ and https://diysolarforum.com/threads/c...y-controllers-in-the-garbage-bin-angry.11176/ that are very useful, I have taken a look but there are also many pages and details.

The first thing I would like to say is that I do this project for fun.

My first draft is:
- Low/high voltage per cell protection
- Low/high temperature protection (this is important for me as I live in a very cold place)
- Overcurrent protection
- MCU driven sol metrics can be exported
- NMOS high side cutting method
Nice to have:
- Passive/active balancing
- Shunt for propper current monitoring
- Advanced algorithms for SOC calculation

Everything you can suggest me will be welcome.

Best regards
 
Last edited:
- Overcurrent protection
Pretty much requires putting fets in the high current path which makes the BMS scale very poorly and adds resistance to the circuit.
I beg you not to do this.
Almost everyone is going to use discrete over current protection off the positive battery terminal anyway.
- Passive/active balancing
Spend the components and pcb real estate on this functionality.
Cells just keep getting bigger and seem to require more balance current to keep them synchronized.
Think 12 or even 10awg balance/sense leads. :)
- Shunt for propper current monitoring
Not essential would be nice to have this as an optional component.
Some folks will want to use a discrete shunt.
Others will wish to use a hall effect sensor.
Another source of added resistance.

Instead of using fets in the high current path may I suggest zero potential switches.
2 for discharge
and 1 for charge

Here is an example of an inverter that supports remote control https://www.samlexamerica.com/products/ProductDetail.aspx?pid=504
It could be wired to the 1 of the discharge switches and {dis/re}connected by the bms.
The reason for having 2 switches is that some loads are more essential than others and should have independent trigger/release criteria.

For devices that don't support remote control, eg. chargers and dc fuse-blocks a shunt trip can be {dis/re}connected by the switches .

Those are my suggestions for very scalable and fairly simple device.
If anything is not clear please.

I'll be glad to flesh out anything that is not clear.
 
Last edited:
Thank you very much @smoothJoey for your tips,

What do you mean with zero potential switches? relays?

When I am talking about high side mostefs I am talking about NMos, not PMos that are normally in the high side and they have high resistance. NMos are normally used in high side but with drivers you can also use them high side. My plan is to use very high quality ones where resistance would be lower than cell resistance.

The problem of relays is that, 100A relays are quite bulky. About the number for charging, discharging I was planing to do the same with the fets. I agree that 2 for discharging is good.

The idea of using the remote control of the devices is quite good. I am using an hybrid inverter but since I am planning to do this opensource I would like an standalone system.

What I want to do doesn't need to be necesarily easy.

I forgot to say that relays are zero drop but not zero power consumption. The coil consumes few watts.
 
Last edited:
I would like you to contribute with ideas.
My only input is that there is a broad range of functionality in BMSs. Reporting, remote monitoring and management are just a few. Within management there are various cell balancing strategies as well as current measurement and control strategies. Every modern day EV has some form of BMS and they use contactors with power saving circuits. With some simple research you will see there is no lack of ideas out there. To me the challenge will be deciding on which ones to implement. That of course will depend primarily on the use case. What is your use case?
 
Last edited:
My only input is that there is a broad range of functionality in BMSs. Reporting, remote monitoring and management are just a few. Within management there are various cell balancing strategies as well as current measurement and control strategies. Every modern day EV has some form of BMS. With some simple research you will see there is no lack of ideas out there. To me the challenge will be deciding on which ones to implement. That of course will depend primarily on the use case.
That is my real question and the reason why I opened this topic. I am aware of the huge amount of different BMS with different features. I have been EV user for long time and have done lot of research. But, manufacturers are not always users so I would like to know which features are important for the users.

Actually I only need:
- Low/high voltage per cell protection
- Low/high temperature protection (this is important for me as I live in a very cold place)
- Overcurrent protection

But, as this is a hobby project, not a commercial or necesity project, I want to know what is useful for other people that can be applied to my project. If we talk about money (and time is also money) it would be cheaper just to buy a Daly BMS than spending hours and money in designing and prototyping.
 
You did not mention the form of interaction with your load and charging source. In other words, what are you going to use for bells and whistles?
 
You did not mention the form of interaction with your load and charging source. In other words, what are you going to use for bells and whistles?
Oh sorry, I am not sure what you mean. As I said now I am using an hybrid inverter (mppt+inverter) but I might get a charger and an inverter separetly. In any case I would like yo have a single wire solution (chargin and discharing)
 
Are you going to have any mechanisms for the BMS to control charging and discharging? My EVs use CANBUS, my 12 volt portable pack use FETs in the BMS and my 48 volt hybrid inverter uses a contactor on DC and a relay on the RSD loop of the inverter. These are driven by the BMS. I would have preferred CANBUS but Outback does not shre details of the interface. Maybe SolArk is more open. Those are examples of different use cases.
 
Last edited:
With single wire for charging and discharging you cannot control the current direction with mechanical relays. The only way is with fets. Normally they are set like in the next diagram.

main-qimg-106c212265273097e4d22d52897d9837.webp


During normal operation both conduct current. For example if you want to allow current only from the left to the right, you keep left fet on and right fet off. The right fet will conduct through the body diode current from left to right and will block from right to left. The drawback of this scheme is the power disipation because the right fet will dissipate P=Ix0.8v but it is the standard way in BMS. As this is in faulty sittuations this shouldn´t happend a lot.
 
What do you mean with CANBUS? Are you refering to something else than the comunication protocol?
 
The only way is with fets.
I am fine with using FETs on a 12 volt portable pack. For a 48 volt 42 kWh pack with a hybrid inverter I prefer a contactor for failsafe. I would also prefer CANBUS to modulate charging current on my Skybox but that is not available.
 
What do you mean with CANBUS?
Yes, the communication protocol. My BMS can use CANBUS to talk to several standalone chargers to vary the charging current. I wish I could do that with my Skybox so I could end the solar charging day with my pack at optimum SOC.
As another hypothetical feature, if my pack needed some extra balancing it woul be nice to have the CV stage remain at a low current so the balancing shunts would have time to work. That would be kind of a user selectable type of float.
 
What do you mean with zero potential switches? relays?
Should present as the downstream side of a relay.
could be 2 sets of 3 switches.
one set for normally open
another set for normally closed
When I am talking about high side mostefs I am talking about NMos, not PMos that are normally in the high side and they have high resistance. NMos are normally used in high side but with drivers you can also use them high side. My plan is to use very high quality ones where resistance would be lower than cell resistance.
Just to reiterate I don't want any XMos in the high current path.
Makes the implementation not scalable.
The problem of relays is that, 100A relays are quite bulky. About the number for charging, discharging I was planing to do the same with the fets. I agree that 2 for discharging is good.
personally for something like a inverter or inverter charger I would only purchase one that supports remote switching similar to the one I linked earlier.
That is the one I own actually.
I would only use a shunt trip on devices that just can't be hacked for remote switching and are relatively low current.
The idea of using the remote control of the devices is quite good. I am using an hybrid inverter but since I am planning to do this opensource I would like an standalone system.
When you say hybrid inverter do you mean inverter/charger?
hybrid means a lot of different things to different people.
 
Last edited:
I see you mean inverter+charger+mppt+ats those are commonly called all in ones.
 
personally for something like a inverter or inverter charger I would only purchase one that supports remote switching similar to the one I linked earlier.
I agree with that. I view CANBUS as a form of that which also offers configuration. In the event communication fails a remote switch or contactor is the ultimate failsafe. When FETs fail, they fail closed.
 
If I was designing my own BMS......

I would go with a controller:module architecture where the brains of the operation are on one PCB with multiple communication ports for various functions and features. While most of the control and monitoring can be done over common signaling schemes from RS232 to CAN and many inbetween......critical ALARM level signals should be conveyed over a dedicated line what will trigger a disconnect when any device asserts a failure. This allows the system to maintain a safety net even if/when the primary control system has failed.

Critical functions should be as analog as possible or at least programmatically isolated from the main application code. This would include over current protection and over/under cell voltage among others. You should expect the basic safety mechanisms to be functional even if the uC blows up and smokes out.

As for load switching.....MOSFETs are the only answer IMHO. Relays that a load break rated are big and expensive, however if the primary switching mechanism is MOSFET based, a mechanical relay that is NOT load break rated can be used for positive isolation with higher voltage systems. Those relays are much smaller and less expensive. High side switching with MOSFETs is trivial and it puts the designer in a position to use VERY high performance devices with sub mOhm RdsOn. If number of those in parallel, very high current handling is possible with very modest thermal rise.

Linear Tech (Analog Devices) and TI makes some exellent BMS control devices. If you are a glutton for punishment, you could go more discrete but I cannot imagine there are many good arguments for not using extremely well vetted controllers. Both companies also have excellent options for passive and active balancing. These devices will continue to work perfectly even if the controlling MCU is dead.

For current monitoring.....please integrate the shunt with the ADC circuit. Victron uses this architecture for their Smartshunt and it delivers enough performance that you can actually count on its energy accumulator data. TI has recently developed the INA228 which can be used as the basis for a very accurate energy monitor that is also rather simple in practical design - as long as it is very close to the shunt. It is a 20bit ADC and if you want to make use of that resolution, a tight design is needed.

The main controller should have com ports for cell monitoring, an optional balancer, charger input port controller, output switch port controller, shunt, temperature, heating pad controller, optional remote display, optional WiFi/BTLE connection, optional hardwire Ethernet. That way, you can configure something very basic all the way to ridiculous.
 
Should present as the downstream side of a relay.
could be 2 sets of 3 switches.
one set for normally open
another set for normally closed

Just to reiterate I don't want any XMos in the high current path.
Makes the implementation not scalable.

personally for something like a inverter or inverter charger I would only purchase one that supports remote switching similar to the one I linked earlier.
That is the one I own actually.
I would only use a shunt trip on devices that just can't be hacked for remote switching and are relatively low current.

When you say hybrid inverter do you mean inverter/charger?
hybrid means a lot of different things to different people.
The main problem is that I only want 2 wires coming from my battery V+ and V-.

I also want a standole system. Not a system that requieres comunication with the other parts. When you talk about failsafe the last thing you can do is trust in other components using comunication. In terms of informative during normal operation is good to talk with other components but in case of fail I do not think so.

In my opinion not having mosfet in the power path is completly impossible. Yes, you can avoid them in the BMS but we are forgeting that chargers and inverters are SMPS completly done with FETs. Dozens of them. The reason of failure, shorting drain to source, is the overvoltage in the gate. This can happend due to transients. It can happend in duty cycle operations like SMPS but in steady state operations like a BMS this is not a source of failure. Another source of failen is high transient in the V drain source voltage but using 100V rated voltage fets in 48v applications is not common. This happens because the transient is coupled into the gate capacitancy bringing us the previous scenario. But in the end all this failures come from a non adequate use of the mosfet, not from a random failure.

I do not want to say that failing fets is a myth but reminds me to the accidents produced by battery explosions. Everybody talks about them but I have never seen a explosion caused by battery failure. Everytime the reason has been inadequate use or external problems. How many times have you seen fets filing in high quality devices like Outbacks equipment?

I think mosfets are exatly the same scalable as relays. With relays you change the relay, with mosfet you put more. The problem is that normally manufacturers don´t do BMS flexible enough to add more mosfets. Many people just add BMS in parallel.
 
I agree with that. I view CANBUS as a form of that which also offers configuration. In the event communication fails a remote switch or contactor is the ultimate failsafe. When FETs fail, they fail closed.
Uh......nope.
I have blown up a LOT of FET's over the course of designing a LOT of commercial power electronics projects and they don't typically fail closed.
 
Back
Top