TPL Communication Conquered!

Two weeks ago, I wrote about TPL (Transformer Physical Layer) communication, which is a very unique protocol that the average MCU programmer would never stumble across in their lovely world of ones and zeroes. This is because the protocol requires signals encoded in alternating current, to allow for galvanic isolation between the device and the MCU.

Here's the SPI packet 0x55 encoded in a lovely sine wave. This conversion is done using the MC33664 IC, which converts my Pi Pico SPI messages into something the Porsche battery can understand. On the inside of the Porsche battery, there is an MC33771B IC which is responsible for monitoring cell temperatures and cell voltages, and I need these to ensure safe charging, and this sine wave communication is how I will extract this information.

Now, the breadboard demo is great and all, but now it’s time for production. I’m going to draft up a PCB to do charging monitoring, and accept user input where it may be needed, as well as sound a buzzer if something goes amiss.

Here’s the schematic for the battery charging PCB. It houses:

  • Pi Pico - Brains of the circuit, which listens to battery faults and interrupts charging if appropriate.

  • MC33664 - Communication layer between the Pi Pico and the battery.

  • Pull-up/Pull-down resistors - These are for ensuring correct voltages on the MC33664, as the datasheet indicates that there may be unexpected behavior without these.

  • Buttons - User input, I anticipate having a minimal VIM-like interface, where the user can input a byte at a time, with a documented sheet of the commands to tell the Pi Pico, such as turning on/off auto balancing, querying a specific cell voltage, etc.

  • Solid state relays - Interrupts charging if the battery indicates there has been a fault during charging.

  • Display - Read out cell voltages, temperature, fuse status, faults, etc to user.

  • Voltage regulator - The intent is for this PCB to sit in series with the charging battery, so if we supply 24V to charge the battery, we will step it down to 5V for the logic, and then we’ll also pass this through to the battery for charging.

  • Screw terminals - Input from power supply, output to battery contacts.

  • Jumper - AC communication output to battery.

Assuming all these components work, the user will simply plug this circuit series with the battery contacts, and can input a sequence of bits to tell the Pi Pico to automatically charge the battery, by signaling to the battery to balance after charging for a requested period. This allows for other inputs to be processed in the event the user may want to debug cell voltages or other information about the battery. The MCU will also catch faults from the battery, and immediately stop charging using the onboard relays and alert the user if something has gone wrong. These relays are normally open, so in the event of something onboard my circuit frying, the battery will also stop charging. I don’t think I’ll ever be able to sleep comfortably next to a giant brick of charging lithium, but this circuit will certainly relieve some stress I have from charging this thing.

Previous
Previous

Pi Room - Spectrum Analyzer

Next
Next

Different kinds of NFC security measures