Share →

I got this week’s video up more or less on time. But a blog entry just didn’t happen. Christmas came early in the week. It’s Friday and we face another show deadline. And I just haven’t gotten to it.

John Hardy requested a CAN tutorial and I made a weak stab at it in this weeks show. I’m guessing this kind of chalk talk is not going to get me to my dream of 100 million hits on YouTube and Susan Boyle type fame. Pacing to and fro in front of a green wall just can’t make good video.

But CAN is as CAN does. And I am a bit excited about it. We are working on a project, for example, using the TCCH charger. This charger has become the default charger for EV’s largely on price. We have now a pretty good supply of a truly excellent charger, the Brusa NLG513 and even some interest from Brusa in our becoming a dealer. The problem is their pricing. Our cost would be about $2800 and I don’t think it represents a good value proposition even at that level. At the $1995 we are selling the AZD stuff, it’s a great one as it is configurable to an extreme beyond all need, and the build quality is just excellent. It’s also heroically small for what it does – physically. It’s easy to tuck into a car.

We also have the PulsaR in the wings. I was supposed to have 10 of these in stock by November 15. The first working prototype actually isn’t in test yet. But the task turned into an engineering challenge, and I’m told the THREE now PCBoards are off to assembly this week. Should have one in test soon. And hopefully we’ll get one shortly after.

My hope is for PulsaR to rock our world. It does feature CAN communications. And it has the opportunity to perform a lot of instrumentation functions as it manages power INTO the battery pack as well as out of it. It will give us a hugely capable AC charge rate of up to 100Amps and 3 phase if you have it. And of course it does DC charging as well. In this way, we can do charging at up to 300 amps and 370volts from a “mother bank” or another car. That positions us for SAE J1772 Rev B Level 1 and II DC charging.

And I think that does offer a good value proposition at $3500.

Back to the TCCH charger. These have been going for $1200 or $1400 in the 4kw range. At 130 volts, that is 30 amps and gets a 180Ah pack in the black in 6 hours. It’s a little largish. But bang for the buck, this charger from China has been the low cost alternative.

It has a little problem. IT’s not configurable. So you order it with a set voltage, and if you’re pack changes or upgrades, you get to do it OVER again. There have been some versions sorta/kinda available that do 10 charge curves separated by a volt or two to get a range. And you kind of have to pick a voltage range when ordering to maximize your current at that voltage.

For another $75 they sell a CAN controlled version as well. So like U.S. OEMS, they have foregone confirmability for CAN control. Now the ball is in your court, do whatever you like with it. It comes with a little CAN adapter with two pins – CAN HIGH and CAN LOW and there is a bit of a specification. But it really doesn’t amount to a great deal.

When you turn the charger on, it starts transmitting a CAN message indicating the current output voltage (0) and the current output current (0) and a status byte where each bit indicates a fault. If it doesn’t get a reply within about 5 seconds, it shuts down.

It expects a very simple CAN message in reply. The CAN control message has two bytes for VOLTAGE and two bytes for CURRENT and one byte for CONTROL. The CONTROL byte basically let’s you keep the charger ON (1) or OFF (0). Whatever current level you send it, it will try to charge at that current level (up to whats available) until reaching the commanded VOLTAGE. When it reaches that voltage, it automatically tapers the current to hold it.

And so we have been working with Nathan Knappenburger on a little Arduino project to control the TCCH charger. He’s been at it since August, and this week I started looking into the code a bit myself as he seemed to be in some dire straits over something or another.

Enter Macchina. Macchina is the Italian word for “Machine” and serves as a vernacular for automobile in Italian. The Macchina is a specialized board by RechargeCar based on the Arduino Mega 2560 and is compatible with all 5 OBD2 signaling protocols including PWM, VPW, ISO 9141-2, KWP and CAN. Actually most specifically CAN using the MCP 2515 CAN controller and the TJA1051/TH8056 Transceiver. This should cover any car built from 1996 onward. It includes a sturdy power supply to power sub-circuits and add-ons (called “shields” in the Arduino world) and was designed with automotive standards in mind on a 4-layer PCB with better immunity from Electromagnetic Interference (EMI). The MACCHINA SCHEMATIC

Better, on the ATMEL 2560 used in the Arduino Mega, there are six external hardware interrupts connected. And so the Arduino documentation shows how you can attach a function to a an external hardware interrupt and trigger it on a rising edge, a falling edge, or on a change. These are denoted as interrupts 0 through 5. Interestingly enough, the Arduino source code actually supports interrupts 0-7 for eight total hardware interrupts. It’s just that two aren’t connected to anything, and so they don’t document this.

But Macchina connects the pin 13 interrupt output of the MCP2515 CAN controller chip to the hardware interrupt 6 pin on the Atmel 2560 multicontroller. This has an interesting effect. You can use this hardware interrupt to do CAN in a very efficient manner, and it can’t interfere with any shields that use hardware interrupts because it isn’t normally connected on the Arduino version. But it IS supported in the standard Arduino compiler.

The MCP2515 has another feature to recommend it. It features 2 masks and 6 filters that allows you to mask/filter for messages from specific CAN IDs. In this way, it will ONLY set an interrupt when messages from IDs that get through the mask/filter table arrive. This feature is not actually implemented in the Arduino library RechargeCar has provided. But we discussed it with them and they are going to add it to the library. This is very powerful. In this way, you can “listen” for only messages from devices you want to interact with. And better, with the hardware interrupt, you don’t really have to listen at all. When a message from such a device shows up on the bus, the MCP2515 will put it in a register and assert an interrupt to call up a specific routine in your program to deal iwth it. The rest of your program can operate for all intents and purposes without interruption, so to speak, on other things.

Relieving the ATMEL from having to actively “listen” for messages is a dramatic reduction in workload. So we’re gradually becoming a bit of a fan of the MACCHINA.

Chargers have long been a problem for EV builders. With this, we will ultimately have a line of three different chargers with very different capabilities and power levels, at three different price points. But ALL three of them will be CAN capable.

Controller Area Network (CAN) goes quite beyond the Generalized Vehicle Control Unit (GEVCU) we have proposed. It is going to be a part of everything we do on an EV build in the future. I believe we can make this as inexpensive and easy as the old RS-232 serial port was for modems and online services twenty years ago. And it promises much easier integration with modern vehicles as conversion donor candidates, and the use of OEM parts in our builds.

Jack Rickard