My First 48V 6.5KWh Li-Ion Powerwall 🥰

Final thoughts before starting:

- This heat is disrupting my chargers LOL today it's 36°C (96.8°F) outside and 28°C (82.4°F) inside; Liitokalas just switch off, a 12V 2A transformer just burnt out. So I'm switching power sources to two used PC PSUs which can output 12V at 7A each and I'll use them outputting 4A. Added big external fans.

- My cells come from different sources: two vendors (500+400 cells) and notebook batteries (250 cells). I want the four 14s20p batteries to have the most similar cell distribution possible, so I won't only divide cells by capacity and IR but also by model. For e.g. I have 200 Samsung 22F and 200 UR18650AA Sanyos: I'll divide them equally in the 4 packs, 50 Samsungs each and 50 Sanyos each.

- Final choice for series connections: nickel plates, strips, copper busbars? First choice is 16mm2 copper busbars for each battery, cells fused with 35AWG tinned copper, spot welded. Haven't got to test spot welding again (maybe I'm too scared after my last test LOL), if that fails I'll go for welding (I love welding!).

- I made the cooling/heating system with ESP8266 and got the DS18B20s working in OneWire configuration; an ESP8266+14 DS18B20 for each 14s20p battery; fans and Peltier cell switch on/off when temperature thresholds are reached; using IRFZ44N for giving them 12V current (I might use two MOSFETs because they get terribly hot with all the heatsink). I'll mount two cooling/heating systems (primary and backup) because temperature is critical. Looking for any other possible SPOF (single point of failure). So 12V power source for the system will be double, too: my old small solar system as primary source, grid as second source.

ESP8266-temperature-control.jpeg
On the left ESP8266, center MOSFET with heatsink for powering cooling, in front of MOSFET three small DS18B20 temp sensors.

peltier-12V-3A.jpeg
Peltier cell 12V 3A; I'll try cooling using this and a set of fans to distribute cool air.
 
- I made the cooling/heating system with ESP8266 and got the DS18B20s working in OneWire configuration; an ESP8266+14 DS18B20 for each 14s20p battery; fans and Peltier cell switch on/off when temperature thresholds are reached; using IRFZ44N for giving them 12V current (I might use two MOSFETs because they get terribly hot with all the heatsink).
View attachment 25465

Nice start. The problem with your MOSFET getting hot is because you're applying a too low Gate voltage. If you look at the datasheet for the IRFZ44N ( https://www.infineon.com/dgdl/irfz44npbf.pdf?fileId=5546d462533600a40153563b3a9f220d ), the "Gate Threshold Voltage" is 2.0~4.0V - so at 3.3V the MOSFET is _almost_ off and essentially acting like a complex and expensive resistor. If you want to use the IRFZ44N, you need to apply at least 5V to Gate, ideally closer to 10V.

These should work much better at 3.3V Gate voltage:
 
Nice start. The problem with your MOSFET getting hot is because you're applying a too low Gate voltage. If you look at the datasheet for the IRFZ44N ( https://www.infineon.com/dgdl/irfz44npbf.pdf?fileId=5546d462533600a40153563b3a9f220d ), the "Gate Threshold Voltage" is 2.0~4.0V - so at 3.3V the MOSFET is _almost_ off and essentially acting like a complex and expensive resistor. If you want to use the IRFZ44N, you need to apply at least 5V to Gate, ideally closer to 10V.

These should work much better at 3.3V Gate voltage:
I must say, I wouldn't have searched that! Very good info, I'll find an easy way to raise up that 3.2V coming out of ESPs pin, shouldn't be too difficult. Yes, I did think it was strange that a 49A rated IC heated up with only a small load. I won't change IC because I have a box of IRFZs so it's good to have suggestions to use it better. I'll update the schemas asap (y)
 
I must say, I wouldn't have searched that! Very good info, I'll find an easy way to raise up that 3.2V coming out of ESPs pin, shouldn't be too difficult. Yes, I did think it was strange that a 49A rated IC heated up with only a small load. I won't change IC because I have a box of IRFZs so it's good to have suggestions to use it better. I'll update the schemas asap (y)

Here are some classic approaches to increase Gate voltage when using a low voltage controller, method#1 being the most obvious.
The Gate can take up to 20V, so you can use your main 12V source for the gate - Don't forget the ~10kOhm pull-up resistor.

It shouldn't be difficult to steal a NPN transistor from old junk electronics, don't forget the base resistor missing in the diagram.
But if you have surplus IRFZ44N's, you could use that instead of the BJT transistor - the low 3.3V gate voltage in this role will be plenty to overpower the pull-up resistor without overheating

The only issue is that the main load could switch on briefly until the microcontroller boots up and sets the IOs properly... probably not a big issue in this case.
 
It shouldn't be difficult to steal a NPN transistor from old junk electronics, don't forget the base resistor missing in the diagram.
Yes, I'll use a transistor, I have quite a few. The resistor is maybe a bit hidden on the left side, connected to the green wire.
But if you have surplus IRFZ44N's, you could use that instead of the BJT transistor - the low 3.3V gate voltage in this role will be plenty to overpower the pull-up resistor without overheating

The only issue is that the main load could switch on briefly until the microcontroller boots up and sets the IOs properly... probably not a big issue in this case.
Oh that does happen, not a big issue. As soon as I try the complete prototype with full load and all sensors I'll share the schematics and PCB layout. Thanks!
 
@italianuser be careful you don't get condensation with those peltier elements. I used to have them in one of my old amd athlon overclocked gaming rigs (those were the days) to freeze the core to death when overvolting and overclocking, but the problem was always condensation and isolating the cold side so there was no water (condenstation) on the mainboard and cpu. I wouldn't want your carefully tested and crafted packs to get rust from oxidation. You might get a set of DHT-22's and put it on the inside and outside of your enclosure to detect large differences in humidity.
 
@italianuser be careful you don't get condensation with those peltier elements. I used to have them in one of my old amd athlon overclocked gaming rigs (those were the days) to freeze the core to death when overvolting and overclocking, but the problem was always condensation and isolating the cold side so there was no water (condenstation) on the mainboard and cpu. I wouldn't want your carefully tested and crafted packs to get rust from oxidation. You might get a set of DHT-22's and put it on the inside and outside of your enclosure to detect large differences in humidity.
So true, we were talking about this today with another member of the forum. I have a couple of ideas for condensation, I must do some deeper research. In my mind I have a few things: a smoother software algorithm to lower temperature because the goal isn't to refrigerate like a fridge (most applications on the web show this) but to control temperature <n> degrees per time-frame; air-flow; double-enclosure; choosing a correct position for the peltier cells.
DHT-22, ye nice, I'm adding it now to the schematics, thanks (y)
 
BME280 and or BME680 can be used also especially if you get the right includes and write some good code. I have a BME680 in the center of my battery box and it can calculate, obviously temp, humidity, barometric pressure but also sense any VOCs. I also have 4 DS18B20s on 4 corners of the box giving me well rounded temp readings. The VOC sensor on the BME680 is so incredibly sensitive, if a mouse farts in the shed it will pick it up. So If I detect a serious change in the AQI the sensor spits out, it is time to investigate to see if I have any issues. I may also incorporate a smoke sensor into the mix. The MQ-2 is quite a good all around sensor, requires nothing to speak of for code yet gives an early warning and is very sensitive. Could also tie an alarm in with it I suppose.
Dew point can be calculated by temp, humidity, and pressure so condensation can be avoided that way. Also good airflow will eliminate most of that. I initially had a DHT-22 as my main sensor but the reaction time was a bit to slow. I guess I was impatient. So I have the BME680 sensor calibrated with proper code and it controls my heating and ventilation system. If you are going that route get the expensive versions as in https://www.mouser.com/ProductDetail/619-28061 worth every penny in reliability. In my case I am not using Pelletier units but just airflow. 4 servo motors control 4 flaps, 2 on the lower sides of the box and 2 on the top of the box, also at the top of the battery box I have 4 5000 RPM 180mm fans PWM speed controlled by temperature with each of the fans hall sensors reporting to the ESP32 which is the control unit for the whole project. All of the parameters, of course, reporting to an influx database and visualized on grafana. 450 lines of code with a external watchdog and OTA reprogrammable if necessary. I even had to install an external antenna because the inside of the box is lined with a heat and cold reflective insulation and the WI-FI was spotty.
Left upper DS18B20 sensor is offline right now. As I am in Europe I cant fix it yet. Soon.:p
Wolf
1624448730993.png
 
Last edited:
@Wolf your graphs are so inspiring. I'll go for DHT-22 for now, I found a very good study, conducted over a 12 month period Test and Calibrate DHT22 Hygrometers. Also, smoke/gas sensors are a good idea, it's quite a time that when I leave the lab and close the door I think I must mount some detection system and the MQ series seem to work well; I have one mounted in the kitchen but it's only active when the alarm system is on.
 
Update 19th July, two points.

1) Last weeks spent for the battery cooling/heating system, because battery packs will be in an enclosure on the balcony, exposed to high temperatures in summer and cold temperatures in winter.

wth... using a MOSFET to drive a few amps load (the 12V Peltier cell and bunch of 0.26A 12V fans) was nothing easy! WTH! Most of the schematics on the web are wrong and can't work for anything more than a green 2V led.

So, after burning (only) three IRFZ44N I got it working. I found out that:

- NO, you can't use many schematics on the web using 3.3V or 5V 3.3V or 5V coming out of ESP8266 or Arduino to drive the MOSFET gate pin (which is the on/off of the cooling/heating system); the MOSFET heats up too much;
- NO, you can't many 10V schematics on the web 10V to drive the gate for my 12V system, same heating problem;
- NO, you can't use many 10V schematics on the web the 12V itself to drive the gate, same heating problem;
- YES, I can use 14V or higher to driver the gate! yeee and the MOSFET remains cool! WTH WTH! :giggle:

MOSFET cooling system OPTO 12V.jpeg
This is the prototype using 12V on the gate pin; gate is switched on/off by the optocoupler (small chip on the left of the MOSFET) which is driven by ESP8266. The two nickel strips of the bottom part is where the load can be connected.

MOSFET cooling system 14V direct.jpeg
This is the working version with 14V on the gate pin. Fan and Peltier are both visible, and green LED is on when gate has an input voltage. Dead MOSFETs visible behind the Peltier cell ouch!

MOSFET cooling system load.jpeg
This is the power source used for the load (different than power source used for the gate pin): 2.77A is used by load, Peltier and fan. MOSFET is cool! Yeah!

2) Put all cells in an Excel sheet, ready to divide them; 1050 cells (70 missing) to be divided in four 280 packs (14S20P). Cells are... ehm... all different colours LOL, be sharing asap.

Now I'm going to bed 2:46AM, tired but happy! Beware of articles on the web!

[EDITED]
 
Last edited:
Wow - impressive work. With my low-level-electronic skills being so poor - I'd have to move myself out on the balcony instead of the battery bank and just get by with an electric blanket and fan :)
 
[...] MOSFET [IRFZ44N]to drive a few amps load (the 12V Peltier cell and bunch of 0.26A 12V fans) [...]

- NO, you can't use 3.3V or 5V [...]10V [...] 12V itself to drive the gate, same heating problem;
- YES, I can use 14V or higher to driver the gate! yeee and the MOSFET remains cool! WTH WTH! :giggle:

I find that _impossible_ to believe, unless the MOSFET is broken. According to the datasheet, the difference between driving with 7V and 15V gate voltage is not that big, the effects are likely negligible when only switching a few Amps.

Looking at your 12V-opto picture, I can already see some questionable points:
* 330 resistor on Gate is a little on the high side. Will be a problem if doing high frequency switching (eg. PWM), otherwise OK
* can't see the colours on the other resistors, but pull-down on Gate-Source should be at least 10k.
* Big diode on Source-Drain pins raises a red flag. MOSFETs already have a natural diode included - why the additional diode?
Speculating, but could it be possible that you had the Source-Drain pins reversed in the earlier tests? That would make current flow through the internal diode, creating quite a lot of heat due to the voltage drop of ~1.3V

It's a little difficult to diagnose from the pictures, but if you include a schematic I'd be happy to have a closer look.
 
I find that _impossible_ to believe, unless the MOSFET is broken. According to the datasheet, the difference between driving with 7V and 15V gate voltage is not that big, the effects are likely negligible when only switching a few Amps.
I could easily get things wrong, your support is important.

Looking at your 12V-opto picture, I can already see some questionable points:
* 330 resistor on Gate is a little on the high side. Will be a problem if doing high frequency switching (eg. PWM), otherwise OK
Here I followed what many guides said: "low frequency 100-470ohm; over 1KHz 100ohm; >10KHz <=50ohm". I tried without using PWM.

* can't see the colours on the other resistors, but pull-down on Gate-Source should be at least 10k.
10K, yes, this is the schematics (of the not working -heating up- version).

ltspice schematics.jpg

* Big diode on Source-Drain pins raises a red flag. MOSFETs already have a natural diode included - why the additional diode?
Used these guidelines for protecting MOSFETS: https://www.homemade-circuits.com/mosfet-protection-basics-explained-is/

This section expained why the extenal diode:

external diode.jpg

Speculating, but could it be possible that you had the Source-Drain pins reversed in the earlier tests? That would make current flow through the internal diode, creating quite a lot of heat due to the voltage drop of ~1.3V
With inverted Source-Drain what happened was that load was "slightly on" when gate had no voltage. During testing ehm it did happen, yes!

It's a little difficult to diagnose from the pictures, but if you include a schematic I'd be happy to have a closer look.
Now, reading your answer I'll do some more tests. I edited my previous answer, as an electronic-noob I must be more careful with my statements!

I think the extra external diode I used could be a problem, I'll do a more extensive test on all configurations and make a followup post. Or maybe it's the wrong diode type, I didn'd find much info on using an external diode.

What was important for me was to get the schematics working at full load because I started making a test-enclosure to be put under direct sunlight.

Thanks a lot for your advise @ajw22:giggle:

Ah, yes, I test all components before using them, for transistors I use a T7-H tester.

Tester T7-H.jpeg

@OffGridInTheCity LOL... I'm not so advanced level actually, @ajw22 is, I thank him for his advise (y)

Now I'm nearly ready to mount cooling system out under the sun.
 
Last edited:
Here I followed what many guides said: "low frequency 100-470ohm; over 1KHz 100ohm; >10KHz <=50ohm". I tried without using PWM.
Sounds like very reasonable suggestions.

This section expained why the extenal diode:

View attachment 25652
This is a very niche requirement, completely unnecessary in this case. The Avalanche current rating of the IRFZ44N is 25A, so overloading it only becomes a concern when you want to power a 300W motor or other _inductive_ load. The Peltiers are not inductive (I think?) so doesn't cause back EMF, and the internal "Body Diode" is plenty to handle the tiny fan motors.

A different issue of higher concern is the lack of a "flyback diode" (aka "freewheel diode"). See
I don't think it's necessary in your case, as the fans a very small compared with the MOSFET that can handle 55V... but a flyback diode is always a good idea when switching anything with a motor/coil.



Schematic looks perfectly fine. Looking at the previous picture, I think you may have wired the output side of the PC817A optocoupler the wrong way. That would still kinda work, but not that well. Have you tried measuring the actual voltage on the Gate leg?
 
On closer inspection, very sure that the output side of the PC817A was reversed. The voltage limit when connected in reverse is just 6V, and it was exposed to 12V (or more?), so that Opto may be damaged. But the 10k resistor would have limited the current flow, so it may be OK... you'll have to test it.
 
This is a very niche requirement, completely unnecessary in this case. The Avalanche current rating of the IRFZ44N is 25A, so overloading it only becomes a concern when you want to power a 300W motor or other _inductive_ load. The Peltiers are not inductive (I think?) so doesn't cause back EMF, and the internal "Body Diode" is plenty to handle the tiny fan motors.
I could remove the extra diode
A different issue of higher concern is the lack of a "flyback diode" (aka "freewheel diode"). See
I don't think it's necessary in your case, as the fans a very small compared with the MOSFET that can handle 55V... but a flyback diode is always a good idea when switching anything with a motor/coil.
Yes, I'll have a flyback diode, it doesn't harm although Peltier doesn't seem to be an inductive load. Better to have flyback, you never know in the future, out of my mind, I might connect something "wrong" on the load side
Schematic looks perfectly fine.
Oh, wow, I always have so many questions about my schematics, although I do a lot a research and testing before finalizing design.
Looking at the previous picture, I think you may have wired the output side of the PC817A optocoupler the wrong way. That would still kinda work, but not that well. Have you tried measuring the actual voltage on the Gate leg?
That's a good point. I never questioned that. I did invert pin 3 and 4 of optocoupler because on prototype boards I made I had a design problem. I'll test that for sure.

Proto Boards.jpeg
These are the prototypes made with acids and all that stuff, quite dirty boards I know. There's no false contacts, I checked that out deeply. Boards are two, connected on two pins of ESP8266, one for heating (cement resistors), one for cooling (Peltier and fans).
 
Last edited:
On closer inspection, very sure that the output side of the PC817A was reversed. The voltage limit when connected in reverse is just 6V, and it was exposed to 12V (or more?), so that Opto may be damaged. But the 10k resistor would have limited the current flow, so it may be OK... you'll have to test it.
Oh my, that could be a problem. I did revert them because of my board design, didn't want to do all again. I did a quick test and it seem ok to revert them. Next test will be that (y)
 
Acid etching with Laser print? I used to do that a long time ago, too! Brings back memory :)
Have a look at https://jlcpcb.com/
The boards are only a few dollars or so, super cheap. The shipping often costs more than the boards, so I wait and order my hobby PCBs together with my business jobs.

I did a quick test and it seem ok to revert them. Next test will be that (y)
Just a few months ago, I actually tried to google what exactly happens in this case. Couldn't find a clear answer, except that it will "kinda" work, and possibly that it may get damaged over time. Would be very interested to know, if you're going to test it.
 
Acid etching with Laser print? I used to do that a long time ago, too! Brings back memory :)
Oh I'm glad you remember nice things, I love doing this stuff :D because in an hour or so (design, print, transfer, acids) I have the boards ready. I use InkJet and make two printouts on transparent paper and then overlap the two to make a darker negative. Had unexpected results during tests last year: importing in GIMP at 600DPI gave me a worst result respect to 300DPI (I published results and photos here). Also choosing "normal paper" gave me better results against all other types of paper.

IMG_20201027_025715.jpg

I will surely buy from them for future projects where I can wait some days for boards. My only valid plan would be to purchase 20 PCBs and sell 10 on Ebay for some extra "money for coffee" (how italians say, to indicate small money).

Just a few months ago, I actually tried to google what exactly happens in this case. Couldn't find a clear answer, except that it will "kinda" work, and possibly that it may get damaged over time. Would be very interested to know, if you're going to test it.
I think you got it right. I gave for granted that inverting output pins 3 and 4 was OK, but looking at optocoupler's design below it can't be OK :D I'll make a test on that.

1626690021547.png
 
Back
Top