Share →

rickard

The heart of the issue of electric automobiles has always been the energy storage cell or battery and it remains ever so today and into the future. Moving from the crude lead acid batteries, the limitation on electric cars has always been the weight and size of the battery necessary to power it to any specific distance.

No, this is a new blog, not a repeat of the last two. But the battery thing remains true.

And we were pleased this week to announce a victory lap in the matter of effectively using Tesla’s onboard Battery Management System circuitry to monitor and control packs. Indeed, we have accomplished interface with both the individual modules of the battery removed from the pack, and/or the entire battery pack as a whole. It is my belief that your best shot at success in using these batteries is to make maximum use of the BMS circuitry Tesla has designed and built for that purpose. And various DIY strategies circumventing that are probably inherently dangerous with these none-too-stable cells.

I had envisioned this as a project that would take a few months to attack and with varied expectations of success. Indeed at some level we seemed to face the grueling ignomy of hand decoding binary 8051 machine code.

Instead, due to a fortuitous leap of insight, it was about 3 weeks and success appears pretty much total and all encompassing. Some days you are the windshield and some days you are the bug, but these were good days for me personally. I go home many evenings feeling as if I have just had my ass kicked. But some days end well. It is good to be the King.

My disparagement of these cells is not meant as an attack on Tesla, nor for self-aggrandizement. Our viewership is simply very accustomed to relatively benign LiFePo4 cell chemistries and these are NOT the same. Indeed dissimilar.

I found an interesting case of an innocent at the hands of laptop batteries, very similar if not precisely identical to the Tesla cells. And it includes a revisit to our old friend, that master of disaster and the only EV guy I know who actually eschews technical knowledge in favor of good old common “Lil Mexican” sense and know how – Jehu Garcia. It’s always better to have a theory than actual information I always say. And where better to make one up than Jehu’s shop.

These poor innocent assclowns actually added a lithium battery and solar panel to their vehicle AND HOME using Jehu’s profoundly deep-knowledge techniques and expert professional assistance. Fortunately there were no fatalities. But I thought it illustrates the hazards of dealing with these cells on even a small scale. If you are tossing around 85kWh of it, understand what you are getting into.

Despite a small number of vehicle fires of impressive energy and display, Tesla’s car I view as essentially safe. But they have gone to extreme measures to achieve that with this cell chemistry in a design tradeoff for maximum energy density. This makes sense as energy density is what electric vehicles are all about. But I view it as imperative to employ those safety measures in any application using their batteries gleaned from the vicissitudes of the undivided attention of very poor or very unfortunate drivers.

In other words, there is currently no better design to safety Tesla’s batteries than that designed by Tesla. And nothing you or I (or Jehu) is going to come up with will match it. So if something else “seems like a good idea” abandon that thought promptly and with some enthusiasm.

That is not to say don’t use them or “leave it to us experts.” You are going to have your hands full designing and crafting enclosures for these modules, developing heating and cooling strategies, and marrying it all in to your system and your designs. And I would urge care and attention to detail there. Plenty of work to do in the DIY realm. But at least for the basics, monitoring voltages and temperatures accurately, we can get you there using Tesla’s very effective circuitry.

Our own Collin Kidder made the trip from Sparta Michigan to our facility here in Cape Girardeau, and indeed brought his father and others with him for the adventure. His father Tim, and sidekick Steve the Oreo man have a LOT of energy. They kind of wear me out. They immediately set out on a fix and repair mission digging up all sorts of things I didn’t even know I owned and making repairs to them.

Collin and Bill Bayer and Dylan Fizer attacked the already disassembled 60 kW pack and removed all 14 modules. And then wired them up using the very unique daisy chain serial bus Tesla used to interconnect them. They then connected one of our EVTVDue boards, kind of an Arduino Due clone but with only one USB port, and featuring the addition of both an EEPROM to store persistent configuration variables and a single CAN transceiver giving us an operational CAN port.

< We use this little board to create all sorts of CAN controllers for Delphi DC-DC converters, Chevrolet Volt Chargers, etc. Collin had been hard at work on a prototype shield for this board to accomplish a couple of things. First, we have to provide power for the isolated side of each of the Tesla module BMS boards. Then, we have to communicate with it at 612,500 bps. And finally, it is a 5v transistor-to-transistor (TTL) bus. Arduino is 3.3v. And so he needed to add some device for shifting the 3.3v Arduino levels to the buss's 5v levels. Indeed 5v TTL signals will destroy the Arduino Due if directly connected. He chose to use some AND gates for this and they worked very well. We wanted him to add some MOSFET outputs to this so we could control external contactors based on what was found on the module voltages and temperatures. The Arduino can put out about 50ma of current at 3.3v and this is of course some short of the 12vdc coil voltage of our typical high current DC contactor. Those contactors can take 5 or 6 amps of current initially to close although very briefly and typically have a holding current somewhere around 350ma max. So we have to use the Arduino digital outputs to switch a MOSFET that can do 30v and 20 amps peak. We also MIGHT want to provide outputs to engage external heating or cooling based on detected module temperatures. SO we built four outputs, two for contactors and two others and they can be configured to put out 12v active high or a switched ground active low. And finally, we wanted to be able to accept four digital inputs. Why? I guess because we can. I'm not sure what we'll use them for in this application, but I see this shield as perhaps being useful for other applications as well.

In any event, we added some of Mr. Kidder’s magic sauce software using what we learned earlier and presto chango batta boom batta bing…..nothing…..

Further investigation indicated that the cyclic redundancy check we were making according to the manufacturer’s data sheet had a wee bug in it and there were indeed some other anomalies. But Collin got it all worked out. I asked him to add display of ALL the voltages and temperatures. With the help of a heat gun, we learned that the temperature sensors for each module are actually located on the positive and negative connection terminals of the modules.

And so as you see in the video, we can read and display all module terminal temperatures and each individual cell voltage within the module. Perhaps glossed over in the video, we could conceivably change the voltage at which Tesla goes into active “balancing” between the cells.

The Texas Instrument chip actually has a feature to bleed current around high cells while charging and so to actively top balance the individual cells. They are a little bit conflicted with all this. They set it to a very high value like 4.15 volts. Then they advise you not to charge your car to 100% for maximum cell life. If you never charge 100%, the cells never get to 4.15v and it is unclear just when balancing might be performed.

Similarly, there does not appear to be ANY provisions for balancing between modules. You can only balance between cells within a module. But in any event, we do have the ability to write into a chip register what voltage threshold we want to use to initiate this.

A very nice feature Collin and I discussed and he WAS able to implement – self addressing. The modules are addressable individually with an ID. But you might have modules from anywhere and so have random IDs or even conflicting IDs.

As it turns out, you can simply broadcast a command for all modules to assume ID 00. Modules with ID 00 are then able to accept address assignment commands. And we are just the guys to issue them. But then why don’t ALL the modules with address 00 then go to the new address, and accept no further assignments?

The answer is related to the way the bus is wired.

The Tesla module BMS board communicates through a Silicon Labs 8642ED RF isolator chip. This is the key to keeping the modules isolated from each other and from our controller board. This chip RECEIVES serial data on channel 2 and transmits it on channel 3 – two separate channels that are not actually connected to each other. So any data intended for the entire system goes to the first module, which then RETRANSMITS out channel 3 to the channel 2 input RX on the NEXT module.

A command to assume address 0 is passed automatically to all modules down the chain.

But an ID assignment is not. So the assignment goes to the first board, which assumes the new address (01 for the sake of argument) and does NOT pass this assignment on. Rather it passes an ACCEPTANCE down the chain which is passed eventually back to the controller.

The next assignment only applies to modules with address 00. So the first board in the series passes it on down the bus. The SECOND module seizes it, assumes the new address (02 for example) and does NOT pass it on, just as the first did. But it does issue an acceptance which IS passed down the chain.

This continues until NO module issues an acceptance.

So by iteration, we can issue addresses and note their acceptance until we issue an address and do not get an acceptance. And in this way, we can assign addresses serially on the bus for any number of modules up to 62. And so you can build a pack with any number of modules 1 to 62 and it will automatically address them. In Collin’s software, we do this a lot. And so you can remove a module. Replace it with two. In any combination. And the software will always know what module is where and what it’s temperatures and voltages are on the bus. Tres cool.

Note that this has NOTHING to do with the configuration of your pack. All modules COULD be wired in series or all modules could be connected electrically in parallel. Or any combination in between. The controller simply masters a serial bus of consecutive modules and cares not at all what the actual configuration is.

The weakness of this architecture is that a bad module board breaks the chain. Indeed a connector with no module board on it breaks the chain. And so we have had to devise a DONGLE with the mating receptacle from a board, wired to jumper the pins and pass all signals and voltages, in order to take out a module and still operate.

And so we can safely announce victory over the use of individual Tesla battery modules. But this is kind of like our celebration of getting the Tesla drive unit to turn. It has been nearly two years since we demonstrated this and I haven’t actually announced a product as yet, although we do have about six of these in beta testing with various users around the country. It not only takes a lot of time to productize something when you get it working. It actually in this case takes a lot of time for users to install it in a build and get back to us on how it went….

And so while victory is in front of us, having a product available for you to use is not. And I weaken in the knees and sprout a faint sweat across the forehead at the thought of what must be done here. It’s not a drive unit. But we have to have PCB’s made, contactors added, enclosures sourced, much improvement on the software, and figure out how to supply connectors and harnesses and pins and dongles in some rational combination to users with an unknown number of modules they want to control. So we are still looking at a month or more even on this relatively simple product.

The end product for the modules will look remarkably like the box we built in addressing the battery pack as a whole. We had to house two contactors, two relays, provide a switch to turn it on, indicator LED’s for the contactor states, and a controller. Cable glands for cables in and out, and of course a wiring harness to plug into the control connectors on the battery. In the case of the battery, we replaced the expensive and impossible to source high voltage connector with some 1″ x 0.25 copper bar and dealt with the HVIL pin using a piece of heavy copper wire basically.

For the whole battery controller we used a GEVCU hardware to control all of it. This is a bit of overkill under the circumstances. AN EVTVDue with Collin’s shield would work much less expensively in our final design but we needed to be able to control contactors now.

The reason for this was not immediately apparent. The Tesla battery HAS a pair of perfectly serviceable contactors inside of it. Indeed, our problem has never been monitoring the voltages and temperatures. We had a Tesla monitor program for over a year that reads the 6F2 CAN message and derives the cell and module voltages and module temperatures. But we couldn’t get the battery BMS board to close the contactors inside and connect us to the battery.

The issue was precharge. Almost everything you connnect a high voltage battery to features an input capacitor to smooth out the incoming voltage. Some of them are quite large. Inverters, DC-DC inverters, even the chargers have capacitors. If you connect a high voltage battery to one of these simply by closing the contactor you have most usually destroyed the contactor. The application of 350v to an empty capacitor causes an immediate increase in current to essentially infinity, albeit for an infinitely small period of time. It is almost always enough time to arc weld your contactor contacts and thereafter you cannot open them. They are welded shut.

The answer to this is to precharge. Rather than connect the 350vdc directly to the circuit, you connnect it through some resistance to limit the initial current – say 500 ohms. A 500 ohm resistor will limit the current from a 350v source to 350/500 or 0.7 amperes – 700 milliamperes. This doesn’t sound like much, but in four or five seconds it will get those capacitors up to 200 or 300 volts. At that point, the initial surge current would be limited to 30 amps or so. The energy stored in the capacitor then acts as a limit on the current. And it quickly fills to match the battery voltage.

So we typically put a resistor across the terminals of the positive contactor. Then we engage the NEGATIVE contactor. This completes the circuit, but the capacitor has to charge through the resistor at 700 milliamps.

Once the precharge is complete, we THEN close the positive contactor, bypassing the resistor entirely.

We’re kind of cavalier about all that. Four seconds. Seven seconds. What’s the diff.

Tesla not so much so. They actually use a little different approach. They close the negative contactor and actually MEASURE the voltage on the output terminals of the contactor. If the voltage immediately jumps to pack voltage without any ramp up, they know that they have NOTHING connected to the output pins and since there SHOULD be an inverter connected to it, they abort the procedure entirely and refuse to close the contactors.

Similarly, if it takes too LONG to ramp up to voltage, they detect this as a fault and again abort the procedure. So not matter how correct our High Voltage Interlock HVIL simulation was, we could NOT get it to close the contactors.

The solution was to randomly connect capacitors across the output terminals of the battery until the proper value was employed that the ramp up fell within Tesla’s acceptable window of time. And if it is at the same time connected to any other equipment it will fail.

But that leaves us with a bit of an embarrassing problem. We still don’t have a precharge. Now we have two live terminals at 350v, but anything we connect that to will blow up from surge current. And so we are forced the embarrassment of ANOTHER set of contactors and another precharge resistor that we can indeed control.

Ultimately, you want to have a box/connector for the battery that you can press a button, and the precharge happens automatically, and indicator LED’s will show you your contactor state. No laptop needed to monitor it. And the controller will have software to detect anomalies of voltage or temperature and DISCONNECT the entire thing from your house/car/airplane/other circuitry in the event of a problem automatically and while you sleep. You’ll need a laptop to set this up and define your precharge time, temperature limits, voltage limits etc. But unless you just like sitting and looking at 96 voltages and 32 temperatures, that would be a relatively rare event.

All of that said, I HAVE been working quite a bit on decoding all these other CAN messages from the battery BMS and have found some interesting things. For example, it tracks total lifetime charge and discharge. State of charge. And some other interesting things. I’ve been spending the last week adding such things to our software interface. And I added a CELLDEV limit for cell deviation. We can get the average cell voltage and then detect any cells that vary from that average by more than a few millivolts in all operating regimes. That can be an early warning of trouble. I don’t know what is appropriate, but we immediately disconnected from the UQM Powerphase 100 test bench at 200 millivolts but it seems perfectly happy with 400 millivolts for example.

Again, this will take some time to productize and unfortunately, some assembly here to produce. I just don’t see any way around it. But again, hopefully within a month Elon Musk time or two months Julian calendar.

Again our thanks to Arthur Hebert who indicated the way originally with the 6F2 as Rosetta Stone CAN message ID of Tesla Batteries, Jarrod Thuma for his early work on the Module BMS boards, and of course Collin for pulling it all into operation. Suggestions along the way too numerous to mention individually but nonetheless valuable. This has been an exhilerating and engaging adventure in reverse engineering and right to repair.

There is currently a Supreme Court decision pending on the control patent owners can assert over products once a first sale transaction has been completed. The correct theory is that once you have accepted money for a product, it belongs to the purchaser who may do as he likes with it going back to Lord Coke in the fifteenth century. But believe it or not, some corporations are taking the position that the stuff still belongs to THEM after they sell it and they want to tell you what they will allow you to do with it.

The case in point is between Lexmark and Impression Products Inc and you can find the written arguments in it HERE.
Lexmark argues that by putting a sticker on the printer cartridge, the end user agrees that they are already getting a discount on the printer cartridge (right) in exchange for agreeing not to ever resell or refill it. That Impression Products, Inc. a small firm with 25 employees has heroically gone all the way to the Supreme Court while many others have simply agreed to desist rather than face the legal expenses is amazing. They never agreed to anything and are simply refilling cartridges, but our legal system is its own reward as you can see in the text of the arguments. Common sense or good policy having no place in the discussion. It’s all about the money and the ONLY people with no voice in it whatsoever are the people PAYING the money. The scramble for filthy eucher by the undeserving is vomit inducing to behold.

But the implication is that nothing is to be repaired, reused, or worn out. It should all be immediately replaced with brand new, at heroic expense, because we can vote to empty your pockets at whim. We have the power.

You do have….right up until the moment we take it away….traditionally with a noose.

John Deere has essentially declared war on farmers over the same issue and they are now using Hungarian hackware to repair their tractors.

While I am incensed at the nature of all this, I’m also lambasted by the insanity of it. After alienating all farmers worldwide, who does John Deere imagine they are going to sell their tractors to? Does Lexmark imagine no other printer will do? I would look askance at the concept of mutually assured destruction as a strategy when dealing with your customer base. Long term, it is so idiotic it makes me wonder if American companies DESERVE to have jobs.

Popular and enduring products are those that were used and reused and had a purpose that got repurposed. If you look at the VW Beetle, Volkswagen lost much in third party parts and sales. None of it detectable with modern financial instruments. But they gained much more in brand recognition and good will for the quality and durability of their product line, which never was of particularly high quality nor particularly durable.
Its simply that everyone could work on them and parts were easy and cheap to obtain and it has become an automotive icon of unparalleled stature because of this. Why is this simple but emphatic lesson completely lost on the management of so many large firms.?????

They can’t read? They don’t KNOW about Volkswagen Beetles? Buses? If Lil Jehu can grasp this while randomly burning down everything within range, why can’t Lexmark, John Deere, and the United States Supreme court?????

Imagine a world where the makers of duct tape and WD-40 wanted to be paid extra and again if you actually used the product to do something important or valuable? Or heaven forefend a purpose not envisoned at the time?

Tesla has asserted they will not enforce patents. But with a couple dozen pages of provisos. I think they should just publisher their CAN .dbc file and anything else they can do to make the Tesla THE most open, repairable, reusable car ever built. The million mile car. But Elon never called and asked…so….

But it sure gives me something to do on winter afternoon since they appear disinclined to do so.

Jack Rickard