CCS EVCC using AR7420

From openinverter.org wiki
Jump to navigation Jump to search

Overview

Charging via CCS DC Fast Charge requires Powerline Communication (PLC). The TP-Link TL-PA4010 (discontinued, but widely available used) is an inexpensive home PLC unit that is designed to use a residence's mains wiring (power lines) as a communication medium for ethernet. It can be repurposed to be used as a CCS EV Communications Controller (EVCC)[1]. Additional resources have been compiled by uhi22[2].

TL-PA4010

TP-Link TL-PA4010 ("AV500") PLC Ethernet adapter.
TP-Link TL-PA4010 ("AV500") PLC Ethernet adapter.

The TL-PA4010 utilizes the Qualcomm Atheros QCA7420 PLC comm IC. Examples can be purchased via eBay etc. for well under USD$20 (Apr2023). Variants include single-PCB versions as well as two-PCB, which are used when the unit provides a pass-through mains connnector. Both variants utilize the same PLC IC and adapt well for CCS.

Setting up a CCS Charging Station

Starting point: [3]

Hardware

Software

Setting up a BeagleBone for pyPLC including CAN commincation

There are a number of platforms that pyPLC will run on, for example also on a Raspberry Pi or any other linux computer. The BeagleBone is quite cheap and versatile. Make sure you grab a version with an Ethernet port like the BB green or BB black.

Then here are the steps to get up and running:

  1. Upgrade to the latest debian image (at the time of writing that is Debian 10.3 IoT): https://beagleboard.org/latest-images
  2. Plug it into your USB port. You will now be able to reach the board under two IP addresses 192.168.6.2 and 192.168.7.2
  3. Use SSH to connect: ssh debian@192.168.6.2
  4. Make sure you can connect to the internet. Easiest way to achieve it is plugging the Ethernet port into your local router. You can also route traffic via the computer that the beaglebone is plugged into (see below)
  5. Update the APT package list: sudo apt update
  6. Get the so called EXI converter OpenV2Gx: git clone https://github.com/uhi22/OpenV2Gx
  7. Build it: cd OpenV2Gx/Release && make (this will take rather long!)
  8. Get pyPLC: git clone https://github.com/uhi22/pyPLC/
  9. Install some necessary packages: sudo apt install python3-pypcap python3-serial python3-can
  10. Edit /etc/connman/main.conf and add eth0 to its blacklist by adding it to the line NetworkInterfaceBlacklist=SoftAp0,usb0,usb1,eth0
  11. Bring up eth0 and (if needed) CAN: sudo ip link set eth0 up && sudo ip link set can0 up type can restart-ms 100 bitrate 500000
  12. Run pyPLC: cd pyPLC && sudo python3 pevNoGui.py

Routing traffic via the USB connected computer

On your linux computer type (sure you can somehow do this on windows, too). This is only needed for the setup phase.

sudo sysctl -w net.ipv4.ip_forward=1

sudo iptables -t nat -A POSTROUTING -j MASQUERADE

sudo iptables -A FORWARD -j ACCEPTand on the beaglebone type

sudo route add default gw 192.168.6.1

sudo tee /etc/resolv.conf <<<"nameserver 192.168.xxx.1" #address of your local router here

References