Discover the EVTV Controller for Tesla Model S batteries, designed for solar applications. Learn how it integrates with photovoltaic systems and ensures safe, efficient energy management.

In this episode, we introduce the EVTV Controller for Tesla Model S battery modules for Solar applications. We also examine a typical home offgrid/grid-tie photovoltaic system using the most recent equipment, and we describe how a photovoltaic cell converts sunlight to electricity.

Click here for more information on the EVTVDue Microcontroller

In January, Tesla announced the availability of the Powerwall and I put a deposit down on one of those and ordered one. And this past month, they announced the availability of the solar tiles and I signed up for that too. Thus far, they haven't sent me anything and I don't think they have any intention of doing so.

They're simply surveying people, taking deposits and raising money on the secondary IPO bond market, leaving us somewhat on our own. A lot of guys are trying to do the Powerwall and so we have taken on, because of a couple of disastrous fires and mishaps with these batteries, it's caught my undivided attention, which it probably didn't want to do. But we're there now and by far and away, my interest would be in using a full Tesla battery pack, both for solar and for a vehicle.

That be how I power things around here with regards to solar battery backup and make my own power wall. Thank you, Elon Musk. But in the meantime, most people are dealing with somewhat smaller systems for their home.

This is going to be our EVTV controller for the Tesla Model S battery modules. And we've got that in a pretty small box, kind of a rat's nest of wiring. But it's coming along very nicely with some software and some other things to make a very nice controller to manage these battery packs and communicate with the BMS boards that were on here.

If you will recall, Colin Kidder and I and a guy named Jared Tuma worked out the how to talk to the BMS boards and get them to balance cells. We can get voltages from them, and we can get temperatures from temperature sensors that are in each terminal of each of the batteries. The heart of how we did this, or the brains of the controller box, is of course our EVTV Due.

This is simply an Arduino Dewey, 84 megahertz, and we took off one of the USB ports and added an EPROM so we can save stuff, and a CAN port, a control area network port, CAN. To talk to the BMS boards though, we had to do some level shifting. So we had to make a shield and the more we chew on it, the more we make.

Its basic purpose is to provide additional 5 volt power to power the boards and to provide serial communications at a very odd data rate of 612.5 kbps to a 5 volt system that is daisy chained in a cable from one board to the next. And it has a connector on the end that brings out a lot of signals, those serial signals, the power, but also we've added four digital outputs with MOSFETs. Actually eight of them, four outputs, eight MOSFETs, so we can switch it one of two ways.

We can either set it as a switch ground or set it as a switch 12 volts. Either way, it'll carry about four amperes, and that's more than enough to energize some contactors. This is the GIGAVAC GX14 contactor that we use a lot here at EVTV with electric vehicles.

It can do a continuous 350 amps. In an EV, we don't care about that very much. We might do a thousand amps, but we're not going to do it for very long.

And so our average duty cycle on these things is 75 or 100 amperes, and often not even that. In this solar application, we really do need it to carry 350 amps continuously in some operations. And so that gives us our switches.

We put two of these in here. We connect to the positive and negative terminal of this 2S, 2P 48-volt pack, which gives us 20 kilowatt hours and nominally 48 volts. And that goes into the box through the contactors and out to our terminal bars there.

And that gave us the opportunity to do a number of things. Most notably, we can pre-charge. We have a pre-charged resistor across the terminals of the positive contactor, and so we'll turn on the negative contactor when we want to energize the system and pre-charge through that resistor into whatever capacitive load we have for an inverter or for another device.

We can set the pre-charge period in seconds to anything we want. And after that elapses, we close the positive contactor and are in full operation. More importantly, it lets us set in software some configurable limits, limits on the temperature of those terminal sensors, a high voltage limit on the pack itself, a low voltage limit on the pack itself.

We've added a variance limit where you can set, I've got it set to 0.2 volts now, where if any of the essentially 24 cells in this pack, we can measure the difference between the highest and the lowest. And if that difference exceeds our variance, we've probably got a cell going bad. And so we will disconnect the box.

So a lot of it's about control. We do have a couple of other things here. One is this connector allows us to bring out our power and control signals out of the box.

And we do that with this connector. Of course, I've never met a connector I like, but this happens to be the connector used on the Tesla Model S drive unit. So we had some of them laying around.

And so that's our connector. We can make a harness, and I have one here somewhere for two of these modules, or for four, or for any number really. In fact, our software and our scheme for this system allows us to automatically detect and to employ up to 63 of these individual modules.

And that can make quite a large battery pack. On the other end, we have our two cables coming out. We also have a USB port to hook up a laptop to do the configuration, or to monitor a whole lot of data we put on the screen about the pack that you don't normally have to operate.

You simply let the box do it. But if you want to configure it, or you want to monitor it, you can do it through the USB port. We have adopted these little three and a half millimeter jacks, just common stereo audio cables.

Not the four segment like Apple uses, but the old three segment stereo audio cable to carry CAN and our charge enable output. More on that in a minute. And so we can bring CAN out of the box and use it to communicate with other devices.

Here on our bench, we've got two battery terminal blocks. We're going to connect a variety of equipment to this battery pack. The first one is a Magnesign 4048, I think it is.

This is a great little inverter. I love this thing. It puts out 5,000 watts without breathing hard, and it's tiny.

It's become the darling of the recreational vehicle crowd. RV guys use these things constantly. You can plug in ShorePower AC and use that.

It'll charge the battery at like 100 amps. It's a great charger. And then it'll pass through the AC to your house circuits on your RV.

If you unplug ShorePower, then you can use the battery to provide 240 volts AC or 120 volts AC as you like, 60 hertz, up to five kilowatts. The next one down the bench, the big yellow one, is called the Sunny Island and Sunny Boy. And it is too a five kilowatt inverter.

It does just 120 volts AC if you want 240, you need two of them. But it is quite able to set up to use lithium batteries, but it wants to communicate over CAN with a BMS. And so we've included code in our software to support the Sunny Boy.

Outback Power is coming out with a great little unit this summer called the Skybox that will also be a charger, an inverter, and a charge controller for solar and provide 240 volts AC at five kilowatts. And we're anxiously awaiting the release of that. And we're going to try to do whatever we have to to incorporate that in here.

We also have a charge controller on the wall, and I fall in love with this thing. Let's take a look. We've got a little segment just on there.

Okay. We bring our five strings of eight Panasonic HIT cells in across the room here into an electrical panel we're using as a combiner box. There are combiner boxes available, and you should use the appropriate DC circuit breakers.

We don't, but we don't use circuit breakers very much. They're really switches. But we're combining five strings of 5.6 amps at about 480 volts, and a 480 volts and 25 to 30 amps.

And we use it down there with our other charge controller into our original solar battery. But now we're playing with Tesla battery modules, and I found a charge controller that I really like. It's called the Morningstar, is the manufacturer.

TriStar MPPT600. The reason I like it is most of these charge controllers don't work for us. They have a maximum MPPT voltage of 100 or 150 volts, and then they're typically for 12, 24, 36, or 48 volt outputs.

This one has an extremely wide input range of 100 to 600 volts, so it'll do an enormous variety of solar configurations. And it has a fairly broad output of 16 to 72 volts on the output to your battery. This is your solar battery charger, and it's a little bit different from most battery chargers in a couple of ways.

Both are switching power supplies. A switching power supply uses some sort of a switching mechanism, typically a MOSFET or an IGBT, to switch your input voltage through a coil, an inductor. And that causes, as current goes through it, the buildup of a magnetic field.

And then we turn off the switch, and the field collapses. But because the switch is off, it can't go back to the source. And we have a diode, because the polarity has instantly reversed on the inductor, and we let it discharge into an output capacitor.

And it'll be a different voltage and a different polarity, an opposite polarity, to our input. This is a common switching power supply, and it's how you use to step up or step down DC voltages. And you see switching power supplies all the time.

In fact, most power supplies are now switching power supplies. However, they measure the voltage and the current on the output and rate the power supplies based on their ability to regulate very closely that output voltage and current. An MPPT charge controller is almost exactly the opposite.

We don't care a whole lot what the output is. It's going to be about the battery voltage, or a little higher actually, so we can charge the battery. What we care about is the input.

And that we can, on the regular power supplies, you vary the output, you get a higher voltage or more current by increasing the pulse width of the switching diode, or the frequency of the switching. And you can decrease it by narrowing the pulse width or decreasing the frequency. And so it's a very controllable output.

In this case, we want to control the input. Recall in our discussion of the photovoltaic panels, the concept of a maximum power point. That voltage, or that current flow at which our voltage is maximum and our current is maximum, and the product of those two is the maximum power point.

Now that's going to vary with the amount of sunlight falling on the photovoltaic arrays. And all day long, the sun's in motion and we have clouds moving around, birds shitting on things, it just never ends. So it's a variable moving target.

What this device does, and all MPPT charge controllers do, is seek the maximum power point. Not only can we change the frequency and the pulse width of the switching power supply, but we could do it 100 times a second. And in fact, we can do it, take a measurement of what the input voltage and current is, change the pulse width, and measure it again, and change the pulse width and measure it again, and do our main charge point and five points either side of it continuously.

And if one of those gives us a higher power, we simply slide our pulse width and or frequency towards, and it's really pulse width, towards that point. And so we're continuously changing the pulse width to try to keep the maximum voltage and current point at which we get the maximum power out of the solar panels. And we kind of let that go to the batteries, and there the voltage we're applying may vary somewhat.

But the concept is to track the power out of the solar panel. This one does it across a very wide range of 100 to 600 volts. That's unusual.

And across a quite wide range of battery outputs, 16 to 72 volts. And you pay for that flexibility. This little puppy's about $1,489, where you can pick up charge controllers for as little as $40 or $50 in a very low power range.

This one will do about 3,000 watts. So we can be doing 50 or 60 amps here pretty easily, which is a lot. More importantly, across a wide area.

Above it, where we actually run in our 460 volts, 25 or 30 amps using just some basic 12-watt Romex. The 20 feet that we're going to carry that small amount of current. We have used a Gigavac Mini Tactor.

This is a small contactor that can do 800 volts and 35 amps. And we're not going to have more than about 25 amps. And we can turn that on and off.

I have connected the coils to a 3.5 millimeter audio jack, stereo cable. And that just plugs in. And if we had 12 volts on the tip and ground on the ring, or 12 volts on the ring, ground on the tip, that contactor would energize and apply our solar power to our charge controller.

We're going to use the charge enable output of our EVTV module controller to turn this on and off. And we're not even going to have to fool with the charge points. We'll just set the maximum on the TriStar and use our controller to determine whether it's charging or not.

Stay with us. There's more to come. And so our Morningstar charge controller can do up to 60 amps charging this battery.

And the big thing is it has a very wide voltage range that it supports for batteries for the charging. But it also has a very wide input range for the solar photovoltaics. Most of the 48 volt charge controllers have a maximum PV input of 100 or 150 volts.

This one will go up to 600. And 600 is kind of a magic number. Most of the panels are made to be in series up to 600 volts.

And so that thing is pricey. I think it's about $1,489. But I've fallen in love with it already, as you'll see.

Again, the voltage of the Tesla Model S battery is not precisely ideal. Nominally 3.6 volts. We charge them to 4.2 volts.

And their life is pretty much over at 3 volts. When we have one pack here, that's about 21.6 volts nominally. It's going to go out at 18.

And we're going to be kind of charged up at 24 volts. Most of the solar equipment is designed for 48 volts. Runs from 41 or 42 volts up to as high as 64.

Well, we'd be burnt up at 64. Never mind all the goofy arrays and switches and so forth they have for that. So what we've done is provided one of those digital outputs from our shield.

We can switch 12 volts onto that. Put it on a three and a half millimeter jack with a return. And I can use that to control one of our little 35 amp mini tractors from GigaVac and switch the solar power on and off to the charge controller.

In that way, when we get up to our cutoff voltage, also a configurable item, we can simply cut off the charge enable signal coming out that jack. De-energize that contact or remove all the solar power from the device. If you were going to have more than one string or two strings, the Morningstar will do about 3,000 watts.

If you need more, you could do them in parallel. You'd use that charge enable to switch a little Bosch relay to energize each of the solar inputs separately and each of the Morningstars separately. And that would work out pretty well.

And then we have our CAN port. We can provide CAN to the Sunny Island inverter to interoperate with that. But we've kind of invented a battery management protocol.

That protocol will let you do up to, I think, 15 batteries, 63 modules each, up to 255 cells per module in kind of a universal 29-bit message addressing scheme to very flexibly deal with batteries, modules, and cells in a very large system. 15 batteries of 63 modules of these six cells would be about 860 Tesla Model S battery modules and about 4.4 megawatt hours of storage. But you would be able to manage all that from one device using this proposed protocol for large-scale battery management systems using 29-bit addressing.

The operation of this, we want it to be deep with a lot of things that you can control. But the basic operation is pretty simple. I press this power button here and there is my negative contactor coming on with a red light.

And after my pre-charge delay, there is my green light coming on indicating the positive contactors connected. And actually, I happen to know that we've also turned on the charge enable. Our Morningstar is already charging this at somewhere between 39 and 60 amps while we speak.

I could, while it's charging, reach over and trip on the magne-sign. And I actually plug that into a 220 plug here in this room and switch off the 200-amp service to the top of the circuit breaker panel and power everything in here off of this battery. And that converter.

It's just in this room. I've got other panels in the other room and so forth. But all the lights, refrigerators, fans going on today because of the heat, we can power and have powered with this magne-sign.

So we think this controller will be the key to safely interacting with four of these modules for a small-scale solar system or 16 of them in an Escalade. And since I can do CAN with it, we'll probably design some further integration with the Tesla Drive unit to go back and forth there and probably replace our little IVT current sensor and use this instead to have individual cell monitoring at the cell level for the vehicle. So it's a big area of development for us.

We're also going to continue with the similar module for the main battery pack. But I wanted to do this first because it's kind of the hardest to get all the software and hardware. We use a little Lim-Cab current sensor in there.

We already have voltage, so I don't need the more expensive IVT current sensor that we use on the Tesla Drive unit. But the Lim-Cab 300 does a great job of measuring current bidirectionally and with a really quite notable accuracy at up to 400, 500 amperes, which is more than we're going to be able to do with this system, I would think, in a solar operation. And so that gives us pretty much complete control.

We can charge, discharge, balance, note variation, note temperature, just about anything you would want to do by way of knowledge about the batteries. But more importantly, unattended control, where if any of those limits that you have preset occur while you're upstairs in bed, this thing shuts down and it shuts down right away. And it's off the charger, off the inverter, it's done.

You have to come in, bring it back up to the laptop, figure out what the problem is, and address it before you can reconvene and reconnect it and make it work again. So that's our basic hardware. Let's take a look at what some of the software I've got put together is doing for this.

All right, we're going to take a look at the software running the system here for our EVTV controller. We're going to bring up a cool term. I'm going to go to options.

I'm going to try to find a USB connection here. We'll have to re-plug it in and re-scan the serial ports. And I have USB modem 1421.

I'm going to go to 115200. I'm at 8 data bits, no parity, one stop bit. All that looks good.

I'm going to go to my terminal, go to align mode. In our key emulation, it's carried to the terminal line feed. You have to have that to enter commands.

And I use a form feed in my code just to kind of keep a clear screen that I update quite a bit. And so we've set our connection. I'm going to connect.

And here we have our EV-TV Tesla battery module monitor, a version 1.08. In that kind of line, we give our runtime in days, hours, minutes, and seconds. We've been up about five minutes. It scans the pack that we have from 1 to 63 modules, and it will find them.

This is the pack status. This is faults of all the modules. Right now, we have no faults.

We have discovered four modules. And we have a combined battery voltage of 48.82 volts. More on that later.

An average cell voltage of 4.09. And an average terminal temperature of 32.27 degrees centigrade. Then we have this bank of four modules here. Now, I understand that's because we're connected to four modules.

If we were connected to eight modules, you would have a longer printout here of eight modules or 16 or up to 63, which would make a long screen. You'd have to scroll back and forth to see things. First thing we show is the voltage for the module itself.

Here is 24.41 volts. And then we have two temperatures. The first is your negative terminal temperature at 32.10 and your positive terminal at 31.9 degrees centigrade.

And then we have our six cells and their individual voltages. We do that for each module. Then we show our battery state of charge.

I can zero that out to 100 here by entering a Z command. And our current is a minus 13.9 amperes or thereabouts. That's actually a function both of our solar charger and our magnum power inverter going on at the same time.

Discharge is shown as a negative current and charge would be shown as a positive current. We're adding amperes or amp hours to the battery would be positive or we're discharging taking them out as a negative. That is a power of 670 watts.

That's that instantaneous current times this instantaneous pack voltage will give us our power in watts. And again negative powers are discharged. And this is watt hours.

This is the number of watt hours that have been discharged in this amount of time, 8 minutes and 12 seconds here. Our battery capacity is a configurable item. It's 410 amp hours and our current amp hours this session is minus 0.34 amp hours.

The battery state of charge is a function of the number of amp hours since it was last zeroed. And that is persistent from one session to the next divided by our battery capacity that we configure. And that's how we calculate state of charge.

So this amp hours is persistent in the EPROM. Whether we're powered up or not powered up or whatever it will continue to accrue. And it'll go in both directions.

It'll go negative when we're discharging and positive when we're charging until we manually zero it out. In operation as you discharge of course this gets to be a higher negative. But then when you charge solar when you're not using so much electricity it will reverse and decrease back in a positive direction.

This is an interesting line here battery lifetime charging and discharging. You can't zero these out at all. This is like an odometer and we have to recompile the software to change this.

We'll send it to you zeroed out. But it will accrue all of the energy that you charge and all that you discharge separately and add infinitum. As long as you run the system and whether it's on or off these numbers will keep growing as you use the system.

And that lets you get some indication of how much energy you've had in and out of your pack over the time of ownership. Max system discharge current is minus 96.43 amps. You can see that right now we're at about 13 amps discharge.

But when we first engaged the contactors it jumped up to 96 amps. That's not too bad. It would indicate to me that maybe we need a little longer pre-charge time.

This prototype unit has a 500 ohm pre-charged resistor. That's a little high for a 48 volt system. We'll probably go to 50 ohms and 50 watts in our pre-charged resistor for the production unit.

But this is an instantaneous value that's updated every time we read current. If we have higher current it would replace this. So it's a peak snapshot in time of the highest value we've gotten.

And here's the highest value we've gotten for charge in this section. Out of all these cells here this is the highest cell voltage and this is the lowest cell voltage. To keep you from having to read through all these to find them it just tells you what the high low voltage is.

This is our negative contactor is on. Our positive contactor is on. Our temperature alarm is off.

That's set by two values high and low for temperature. Our voltage alarm is off and that's again a high volt and a low volt that you set at the cell level. We don't care what your pack voltage is.

We don't care how many cells or modules you have. What is the highest voltage any cell can reach before you basically throw the alarm? Even if these alarms are thrown these contactors are shut off and the system's disengaged. This is our charging enable output.

It's on and it's a function of two values cut off and resume. Cut off is the voltage at which we simply command all charging to cease. And you lose your 12 volt output for charging enable.

Resume is if your battery pack then falls to some lower level and you set it that's where it would start charging again. If you haven't set to the same thing of course it's going to hit it. Cut off the charging.

Voltage will fall immediately. It'll come on immediately and it'll immediately charge up and exceed it again and it simply sits there and chatter. But by having a cut off and a resume you can say cut it off at 4.2 volts per cell and have it come back on at 3.8 or 3.9. And so you can use the system for a while.

Use some energy out of it before the charging comes on. It keeps it from jumping back and forth. So where do all these configuration items come from? Let's enter a question mark and we get another screen.

Our configuration menu. Again you have to terminate any commands with the line feed carriage return or both. We can set our CAN speed.

You simply enter CAN speed equals 250 let's say. And it doesn't care if it's uppercase or lowercase. You can enter 250 or you can enter 250,000.

It doesn't care. And let's see here. There we go.

We're at 250,000. I can also simply say CAN equals 500 and we're back to 500,000. Note I just put entered the first three characters of this command.

So far we've been able to have all our commands where you can enter the whole command or you can enter the first three characters. It doesn't care. Battery ID.

We were talking about a protocol. We can have up to 14 controllers each controlling up to 63 modules. And each module can have up to 255 cells.

In the case of Tesla Model S of course they have six and that's it. But this is for our CAN protocol to manage large numbers of these things together. So I guess 14 of them and each of them up to 63 modules.

So here's normally we'd be battery ID number one but if we had two of these controllers online we'd have one would be one and one would be two. That's how we keep them straight. I have some single character commands.

Clear all module faults. You recall back here. Pack status no faults.

Well sometimes faults come up and this is where you can clear them and see if they pop back up. If they do you probably have a problem. Display internal resistance screen.

I'm going to talk about that later. S is search for connected modules. We simply search for connected modules.

Actually that occurs every time we power up the software. We seek them out and re-assign IDs and re-number them every time we apply power coming up. So you can simply take your controller offline with the power switch.

Add two more modules if you want and you're up to a 30k 48 volt pack and when you power it back up it already knows that by the time it's painted. But this is a way to manually search for connected modules. Reset original internal resistance record.

I'm going to talk about that a little bit later too. Z reset state of charge values to 100% currently at 99.51. That's an important command. Normally you'll charge and recharge and it will wander around in a solar application.

Once in a while you need to bring it up to full charge and zero it because there are losses in the system both ways and that'll get you back to sort of synchronizing. So this would be a fairly often occurrence. You might plug in and bring it up to full charge and zero out your amp hours and state of charge.

This resets it. O clears the alarms and cycles the contactors. If you trip an alarm you enter an O and it will clear your high volt alarm and your high volt alarm and cycle it.

It'll probably trip it again. You can then change the values down here and bring it up to see what's actually going on. You don't want to give up on your limits.

Capacity equals 410. I could enter a command cap equals 415 here 0.22 and as you can see there it is. We just changed our capacity and our state of charge actually changed because of that.

Let's put that back to cap equals 410. That is really we're using the 64 cell modules out of a 60 kilowatt pack and it's really only 205 amp hours per module. The 74s are about 235 amperes per module and we have two of them in parallel and so that gives us 410 amp hours of storage.

Parallel equals 2. This is actually kind of an important value. Recall that I said we had 48 volts. We actually sum all the modules and so we're measuring 96 volts and we'll divide that by pretty much whatever you want.

This allows you to configure your things. We'll determine the number in series. We know how many modules we found and if you'll tell us how many strings are in parallel we can work out how many are in series.

This is a 2s 2p pack but we can figure out the 2s if you give us the 2p and and then that tells us how to calculate your high total pack voltage. Pre-charge is 6.50. That's simply seconds. Enter how many seconds you want it to do on the pre-charge and that'll work.

High voltage is the highest voltage, highest cell voltage limit for contact or cutoff. Now this is not to stop charging. This is where you determine hey we've got a problem.

Something's gone wrong. We're being overcharged. We're going to disconnect the system.

We're throwing an alarm and we're disconnecting the system. We would advise the sunny boy that we have an alarm before we do that but not very much before. Low voltage is the same at this voltage.

Now understand when you're under a load of 100 amps or so you may go a little bit lower than a static voltage might but you can learn my experience what that is as your battery pack completes. Variance is very important. That's the maximum allowable difference between cell voltages and that is from the highest cell to the lowest cell.

I've got that set to 0.25 volts. If one cell starts to get much higher than the other ones or much lower that's a sign of a failing cell and we're going to catch that before it becomes a fire and so have fairly conservative limits on that what you'll allow. High temperature is the high temp limit for contact or shutoff.

Low temp is I've got set for 5 degrees. Let's talk about low temp for a second. We can go to minus 20 degrees Celsius to operate this battery.

We don't ever want to charge below zero and that's because it actually damages the cell. Now these are temperatures as measured at the terminals of the battery modules. Not what's outside but whatever those terminals are.

That's what we take as the temperature. I've actually hard-coded it in here that your charge enable will cut off at 5 degrees centigrade. You cannot charge below 5 degrees centigrade using the charge enable output.

If you're relying on some other device to to determine your charge when it comes on it comes off like your inverter or your charge controller and I don't recommend that. But if you do set this low temperature to zero degrees centigrade at the lowest and make sure you disconnect the pack and do not allow it to be charged below zero degrees. It causes lithium plating on the anode and it is destructive to the cell.

Cut off is 4.20. If our highest measured cell voltage hits this value the charge enable output is disabled. In the case of our midnight charge controller that would disconnect the solar power from the controller and we simply can't charge past that. Resume I've got set to 4.0 here.

That doesn't make a lot of sense. Let's say resume equals 3.85 volts and there we go. This shows that our negative contact is on and positive contact is on and a question mark to return to our monitor screen.

I'm going to enter an I to display our internal resistance screen. This calculates an internal resistance for each and every cell in the pack. I'm not real happy with this.

I don't know if this will make it into the production version. I thought I'd play with it. The concept is that by measuring internal resistance and comparing it to what we had when we put the pack in service that we can detect deteriorating cells.

Here's the problem. I've got this set where I take the voltage of the cell anytime in that it's under 15 amperes and I store it in an array along with the current that was being discharged at that time. I don't take any samples while charging only when discharging.

If it's more than 20 amps discharged I take that for a high value of current and I save the voltage there which should be some less because of the discharge. Then I calculate the change in voltage for the change in current. Unfortunately for this pack that winds up being a very low value.

Here's why. The individual cells might have an internal resistance of 60 or 70 milliohms but we don't have individual battery cells. We have voltage cells that are made up of 64 of those batteries and in the case of an 85 kilowatt pack 74.

Those 74 cells have the capacity to put out 1155 amps in a p85d and actually using the same cells they'll go up to 1350 amps briefly in some of the newer models. That's a lot of current. We're not in a 48 if we went 300 amps at 48 volts we're at 16 kilowatts.

Now that's nothing for a motor but it's a shit pot of power for a house even for a big house. You just rarely see backup generators above 15 kilowatts because there's just no need. You can have five air conditioners coming on at the same time and it would still do it.

So we're not going to see currents much above 300 amps and while I'm sitting here discharging 15 or 30 amps this is not going to make much sense. My hope is that over time and with increased loads that it might. And then if I enter an R I simply just copied the instantaneous values into EPROF and that'll be displayed as the original internal resistance for the rest of creation or until I hit R again.

So this lets you take a sample of an internal resistance using some realistic currents for your system and then save it to the EPROM so you can go back later and get current internal resistances and compare them to what you had originally measured some months back. I think simply because of the massive number of these 18650 cells in parallel and their very high collective power output that at 300 amps we're going to load it sufficiently to do anything particularly accurate with internal resistance. But if we did it would be you would run the system at some discharge level but less than 15 amps for a few minutes and then put it under a load of 300 amps or so and that would give you about the maximum delta you're going to have in current and so about the maximum delta you're going to have in voltage and in your best calculation for an internal resistance.

I kind of suspect this is not going to be a very popular or useful item. We may work on that strategy over time. But that's our basic monitor thing.

We've got a number of configuration items you can set and right now we have our charge enable on. We're actually charging at 11 amps at the moment while we're running power in here. Now what I can do is set my cutoff equals 3.9 let's say and that's going to shut off my charge enable output and now we can see our true we're no longer charging.

This is our true discharge of 31 amperes into the magnum power that's powering the room I'm in at the moment. You can see that's putting out 1500 watts. We've got a couple of fans on, a refrigerator, a whole bunch of lights.

Now we do tend to use LED lights but still it's everything in this end of the shop and we're using 1500 watts from this little inverter that will only do five kilowatts. Well five kilowatt we can have both lifts going, a heater, you know I mean it's you can do a lot with 5,000 watts even from that little magnum power unit which is oh it's less than $2,200 retail and so you can do a lot with this sort of a system. And of course at five kilowatts on a 20 kilowatt pack.

Now I wouldn't say you're probably not going to get 20 kilowatts out of the pack and here's why. Most of the devices cut you off at about 41 volts. Well 41 volts is only about discharge to say a stated charge of 20 or 25 percent.

We're not really discharged. We would be fully discharged at about 36 volts. And I can show you a little chart here showing the discharge curve of these batteries configured as a 48 volt pack.

And you can see that you know at 40 or 42 volts we're in our prime here. We're not fully discharged. So you have to oversize your battery pack a little bit using these modules.

That's actually not a bad strategy anyway to never fully discharge your pack and to keep it on the top two-thirds of its operating range is actually good medicine in the solar installation. It will maximize the life of your batteries. And so that's pretty much okay.

But it is the one caveat when using the Tesla Model S cells. Their world in the inverters and their world in the charger controllers is based on the 2.1 volt lead acid cell. And you have six of them in a 12 volt battery.

You have 12 of them in a 24 volt. And you have 18 of them in a 36 volt. And you have 24 of them in a 48 volt.

We're dealing with nominal 3.6 volt cells. And so six of them gives us about 21 volts nominal. 12 of them gives us about 42 nominal.

And fully charged about 48. They typically charge the lead acids to 57 or with equalization as high as 64 volts. So we're a little bit slid down the range there a little bit from what they're accustomed to seeing.

I think we can use this charge enable output to control that. Like say the Morningstar, usually it's set where it'll charge to 60 volts or something. But we're not going to let it do that because we cut off the sunlight at our 4.2 volt per cell value.

And so that's an overview of the EVTV controller for the Tesla Model S battery modules. We're going to use that as a battery pack for our own Tesla Powerwall. But I think we can do it for a little bit less money than we can a Tesla Powerwall, which is priced at I think $11,400 for 14 kilowatt hour.

Well this would be about 20 kilowatt hours, certainly 14 usable. We'll probably price this controller somewhere about the price of one module, $1,300 or so. You pick up four of the modules, you're at $5,000, $6,500 with a controller.

$8,000 with a charge controller, but for $9,500 you could have that Outback combined charger and inverter on a 20 kilowatt system. And be beating the game rather significantly. If you want to buy a battery out of salvage and take it apart yourself, you can beat that considerably.

$1,345 price is on eBay. It's the guy that simply buys racks, takes the batteries out, pulls the modules and sells them and makes good money doing it. So one strategy is simply to buy full packs out of racks and disassemble them.

Take your four modules and sell the other 12 to other people. Probably wind up with a free battery pack that way. In any event, we've decoded how to read these.

Oh, the battery balancing. Well, I've got that set up in here now as I really only do it at the top end of the pack. It will, if any cell is above 3.6 volts, it'll go through the whole series of cells and find the highest one and turn on balancing.

That's basically a little shunt. Grains about 125 milliamps I think across the terminals, kind of knocking it down, taking a little energy out of it, and then four seconds later it does the same thing to the next highest. Because the first one is being drained for 15 seconds, some other one will be the next highest.

One thing I failed to mention was balancing. The way balancing works is I only want to do it at the upper end of the pack above 3.6 volts. But if that's going on, what we'll do is go through and find the highest cell and set a little tiny MOSFET to bleed across the cell about 125 to 200 milliamps across that cell for 15 seconds.

And four seconds later it will go find the next highest cell. Because the first one has decreased in voltage, that typically would leave another cell as then the highest one. And it'll set that one to also discharge a minute amount of current.

And four seconds later it will select a third one and then a fourth one. At that point the first one will have terminated its discharge cycle and it may again come up as the high cell. But whichever one comes up and it will continue to do that until there is a variance of less than 0.015 volts from the highest to the lowest.

And at that point it simply quits balancing. So it's really quite automatic. Colin had some things in there that you could set with hysteresis and balance voltage and so forth.

I guess I thought that was a little bit too manual. It's kind of a set thing. I've got a balance strategy that seems to work.

As you can see all these are pretty close. They were not when we started playing with this pack. It takes hours or days to bring them in balance.

But they will come in balance actually pretty nicely. And so the balancing algorithm we have works pretty well. When they get below 3.6 volts, I don't want to be draining material out itself.

I certainly don't want it to happen on the bottom end of the pack where we've disconnected from the system but we're still bleeding cells down with balancing. That doesn't make sense. So that's why that's the situation.

Anyway, that's a rundown of our EVTV controller for Tesla Model S modules, battery modules. And I think it's a good start. We continue to work on the software by the time we have these available in the web store.

It may not look a whole lot like this, but this is the basic approach and the amount of information. The idea is that you be in control of the limits of your pack and that we are in operation. You basically push the button and walk away.

And it will do that. But if the light magically goes off and your battery pack isn't responding, you should be able to plug in the laptop and get all the information you need to figure out what's really going on here and make repairs as necessary. That's the concept.

The overarching mission is not to provide battery backup, but to disconnect battery backup if everything isn't absolutely perfect. And so you have too wide a variance in your cells. You have too high a voltage.

You have too low a voltage. You have too high a temperature. You have too low a temperature.

Its job is to disconnect this battery pack and prevent a fire. That's what it's about. If you're tripping voltage temperature alarms and you get on here, you can see the temperature on the screen.

You can watch it operate for a while and watch the temperature alarm go off. You may decide, you know those little nozzles on the back of those Tesla Model S packs? Why don't we hook that up to a cooling system? Because the level we're using this battery pack at, it's generating heat. I would suspect that by far the majority of you, your use of the battery pack, it's never going to generate enough heat to be a problem at all.

But that can build up over hours. And so if you put on your pack and 10 hours later it trips and goes offline and you fire it back up and it works fine, and 10 hours later it kicks out, it's easy enough to hook up a laptop and watch those temperatures climb over time. And you may decide that additional cooling is probably required.