foccci - The Fully Open CCS Charge Controller Interface My real name is "Fully Open CCS Charge Controller Interface", but that's just too difficult to remember. What I am? I'm a Charge Controller that enables CCS charging of homebrew electric vehicles. I was born in the OpenInverter forum community, https://openinverter.org/forum/viewtopic.php?t=3727, and I'm growing more and more due to the great people there…
foccci - The Fully Open CCS Charge Controller Interface
Hi, I’m Foccci. Just call me [Foksi] or [Fok-See] or just Foxi :-)
My real name is “Fully Open CCS Charge Controller Interface”, but that’s just too difficult to remember.
What I am? I’m a Charge Controller that enables CCS charging of homebrew electric vehicles.
I was born in the OpenInverter forum community, https://openinverter.org/forum/viewtopic.php?t=3727, and I’m growing more and more due to the great people there.
Inside, I have a QCA7005 PLC modem and an STM32 microcontroller. I’m a piece of hardware, and because hardware alone is quite boring,
I’m in a team with Clara, https://github.com/uhi22/ccs32clara, which is dealing with the bits and bytes of our mission. And together, we can do a lot for you.
News
2024-06-27 Foccci Is Gaining Speed
While some folks are integrating Foccci in their vehicles and providing nice pictures for the galery (https://openinverter.org/forum/viewtopic.php?t=5077), we were proudly presenting the project at the
Augsburg Linux info day (https://openinverter.org/forum/viewtopic.php?t=4800). Sleep and wakeup,
new, fast contactor driver and a new connector pinout provide more flexibility for the car integration. That will
be the version 5, which will hopefully pop-up in the shop in July.
2023-12-13 Supercharging works. Halve a dozen boards are spread around the world.
Johu is charging the Touran on the TESLA Supercharger using the hand-populated V3 board: https://openinverter.org/forum/viewtopic.php?p=64563#p64563 and https://www.youtube.com/watch?v=OKg3VUslol8
The first JLC populated boards have been completed manually, only one bug in the schematic needed a small workaround. Boards are on the way to several enthusiasts for further testing. The software is growing thanks to the great openinverter community.
2023-10-25 First Order of Populated Boards
Received four reservations on openinverter forum, and this was the trigger to create version v4.1 with minor layout
improvements, and to order a batch of five
at JLCPCB. Total cost for five: $127.32 including shipping, taxes and duties. The NCV8402 was out of stock,
and the QCA7005 is anyway not in their stock. So the material price is
25€ JLCPCB populated PCB
12€ QCA7005
4€ 2 x NCV8402
1€ RF transformator
<1€ connectors for programming and serial line
2023-10-08 Light-Bulb-Demo-Charging on Alpitronic and ABB works
Using the foccci V3 board together with ccs32clara software, the muehlpower voltage sense board, a cheap chinese relay, the light-bulb-demo
worked on the first attempt on alpitronics hypercharger and on an ABB triple charger.
2023-07-28 Charging Loop Reached
The foccci board version 2023-07-12 runs the STM32F103 and the QCA7005, and successfully enters
the charging loop, with simulated evse by pyPLC. It provides the checkpoint number and some other
informations via CAN with 500kBaud. On the other side of the CAN sits an ESP32 Wifi-Kit-32, with
a CAN transceiver added. It shows the data of the CAN on its OLED display.
2023-07-09 The board starts talking
After the PCBs and QCAs arrived, the soldering was the next challenge. It went well, and the board started talking to
the ESP32 running ccs32berta https://github.com/uhi22/ccs32berta
…is ready in KiCad and is sent to JLCPCB. It is a two-layer, and has so many capacitors, that they do not really fit
to the place where they would make sense. Caused by taking the schematic from the Millisman design, but changing
the size to 1206 for easy hand soldering. Btw: Below five dollars for five PCBs, including shipping, duties and taxes.
add optional “Molex Mini-Fit Jr. Header, Dual Row” for the case, that the Deutsch is not needed in certain use cases.
Docu: add details of step-by-step bring-up, incl current consumption, and typical errors
more temperature inputs (6, to support L1, L2, L3, N, DC+ and DC-)
The use of the LEDs on GPIO0 to 3 is not clear. Are they used in the automotive firmware at all? GPIO3: on the CCM, this is connected to µC.43 via R8 (0 ohms). Measure the pin.
Regarding AMS1117-3.3 for the 3v3 regulators. These are tried and tested, but you may wish to avoid the polarized capacitor by using a more modern regulator. Consider TLV75733PDBV “Stable With a 1-μF Ceramic Output Capacitor”
The STM32F103 seems to meet the requirements and it’s popular but be aware that it has a basic ARM core with no FPU. And: Do we need a low-power variant (stm32L4 series)?
The QCA7005 is labelled QCA7000.
missing the JTAG port pull down resistors on the QCA
Could do with one more processor decoupler so that a cap can be dropped right against every package power pin.
Would be worth adding lines to the QCA7005 Reset (so that is can be reset without a power cycle) and the Int pins (just in case it’s needed in the future).
Might put a Schottky protection diode on the temperate sense inputs.
supply voltage measurement (to be able to adjust the PWM for contactors according to the supply voltage, and just for info)
Finished Todos
TVS at the CP
Transformerless RF path
do not inject >7V into the enable pin of the step-down
Low-power concept
Clarify interface (electrically and mechanically)
more copper cooling area for the NCVs
analog current feedback from the DRV8874 IPROPI to the controller
Change the PP pull-up to 330 ohms and 5V, and optionally prepare pull-down 2k7. Use voltage divider to the controller, to be able to measure the full 0 to 5V range. Discussion here: https://openinverter.org/forum/viewtopic.php?p=66208#p66208
Adapt the footprints / part numbers for the parts which JLC could not populate
U1 Flash: Old: Package_SO:SOP-8_5.28x5.23mm_P1.27mm, must be SOIC 150mil (order code SN), which is Package_SO:SOIC-8_3.9x4.9mm_P1.27mm.
L11: The https://jlcpcb.com/partdetail/C162588 is normal 1206. Changed from Inductor_SMD:L_1812_4532Metric_Pad1.30x3.40mm_HandSolder to Inductor_SMD:L_1206_3216Metric_Pad1.22x1.90mm_HandSolder
12V highside LED drivers (for RGB LEDs as in BMW LIM)
Contactor driver (with PWM?) for two contactors
Charge port temperature sensing (2 channels, either NTC or PT1000)
Connector lock motor bridge and connector lock feedback
Optional:
Analog input for HV voltage sensor at the charging port
fuel flap switch
button to start/stop the charging process
HV contactor feedback
Requirements for the low-power-mode
The foccci shall fall in low-power-mode, if not needed. The consumption shall be less than 5mA during this mode.
The foccci shall use the enable pin of the step down converter TPS54302 to shut down the power supply.
The following ways shall be used to activate the high-power-mode:
CP line: A significant voltage (above 4V) for a significant time (at least some milliseconds).
Button: A button to ground, internally pulled-up to 12V, if pressed long enough (at least some milliseconds).
microcontroller: The STM32 shall be able to keep itself powered by using a toggle pin. In case of stuck to high or low, the foccci shall power-down.
Not planned at the moment: Wakeup via CAN communication. This would be a helpful use case, if the user wakes the car via remote key (unlock), and the connector is unlocked by this activity.
Starting with power suppy connected to the 3V3, but set to 0V. Slowly increase the voltage to 0.5V. Observe the current. No current is good.
Measure, whether the DVDD pins of the QCA and 3 pins of the Flash have 0.5V.
Connect multimeter to 1V2, and turn the power supply slowly up.
With 2V, the board draws 4.5mA.
At 2.7V, the current jumps from 6mA to 13mA. This is when the 1.2V regulator starts delivering its intended output voltage.
At 3.3V, the current is 20mA. This does not look like normal operating current.
On the L10 input, there is a 0V/3.3V quare wave with 600ns cycle time. This looks normal for the step-down-converter.
On the R6 (both sides), there is the 25MHz clock, with ~1V amplitude.
The Reset line is 3.3V (no reset). When pulling it to ground, the current consumption increases from 20.8mA to 23mA.
The CS of the Flash is permanent high. This means, the QCA does not want to load its programm code from the Flash. Something is wrong.
The RBIAS and R_BIASREF were not populated. Added them.
Looks better: At 3V3, the current is 80mA. At the CS of the Flash there is activity for one second after power-on. Seems the QCA is fetching its program code.
Connect the ESP32 with the ccs32berta via SPI, using 220 ohm protection resistors in all four SPI lines. ESP powered via USB, QCA powered from 3.3V bench power supply. Result: The Berta finds the modem and starts the SLAC.
Make sure that SPI is enabled in the settings of the Raspberry.
Install the flashrom tool: sudo apt-get install flashrom
The docu of flashrom is here: https://www.flashrom.org/Flashrom
Check whether the device is detected: flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -V
To flash the binary file to the SPI flash: flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=2000 -w myfile.bin In the case that to tool complains that multiple flash chip definitions match the detected chip, choose the correct one with the option -c "MX25L...something...
Create Fabrication Output for JLCPCB
Starting with KiCad7, the The xsltproc appears to have been removed. So the procedure to create the BOM needs to be adjusted.
In https://gist.github.com/arturo182/a8c4a4b96907cfccf616a1edb59d0389 we find, that there is a plugin now: “Fabrication Toolkit”.
This can be installed with the “Plugin and Content Manager” in the KiCad main window.
Then, in the PCB editor, use the FabricationToolkit from the toolbar. This creates a new folder in /production/, which
contains a zip with Gerber and drill files, and also the BOM, positions and designator files.
Some of the IC footprints have the wrong orientation in the JLCPCB viewer. The Fabrication toolkit offers the possibility to
rotate (and shift, if necessary) the footprints, by adding in the schematic an attribute ‘JLCPCB Rotation Offset’.
Thanks to jrbe for the hint in https://openinverter.org/forum/viewtopic.php?p=61049#p61049
JLCPCB offers
Offer 2023-08-27: 5 PCBs, 2 populated.
Option A: All available components: $82, which includes Extended components fee: $45.30
Option B: Only basic components. $21. Plus shipping and duties, = $38.
Offer 2023-08-28: 5 PCBs, 5 populated.
Total $107 for 5 populated PCBs, plus shipping ($13) and duties and taxes ($23). Plus QCA, connector, inductor, transformator, housing.
For trouble shooting it is recommended to create a log file of the serial output. You need a serial-to-usb converter and connect it to the UART TX line and ground. For recording, you can use e.g. Putty on windows or any console program. The baud rate is 921600. Not each cheap USB-to-serial is able to catch this high speed. So if you get only garbage, try an other adaptor.
Additionally, use the openinverter web interface to observe spot values. As default, the Node ID of Foccci/Clara is 22.
Does the STM detect the modem? Means: Does it show the QCAs software version?
Does the QCA go to sleep 30s after power-on? This is when the STM says “zero modems found”.
Does the QCA stay awake longer than 30s when a central coordinator is present. If not, this means the QCA does not hear the central coordinator, so the RX path is deaf.
Are the RX and TX pins (4 in total) on the QCA at around 1.6V statically? If not, then check for short circuits.
Is the resistance between the RX pins around 500 ohms (measured when not powered)? If not, check for short circuits or bad soldered pads.
Is the resistance between the TX pins around 16kohms (measured when not powered)? If not, check for short circuits or bad soldered pads.
If evse (central coordinator) is connected, do you see packets on the RX pins? Using two osci channels, they should be invers on positive and negative RX pins.
In the web interface or in the serial log, check whether the spot value ControlPilotDuty shows 5% PWM on the control pilot.
In the web interface or in the serial log, check whether the resistance on the ProximityPilot pin is correctly detected. The spot value “ResistanceProxPilot” shall show 10000 ohms (means: infinite) while the charge plug is not connected, and it shall show around 1500 ohms if a CCS2 plug is connected. For CCS1 this should show 150 ohms if the button the plug is not pressed, and 480 ohms if the button on the plug is pressed. (Discussion here: https://openinverter.org/forum/viewtopic.php?p=70435#p70435)
Clara shows software version “bootloader”. Is tis normal?
No. Clara should report something like “[PEVSLAC] received GET_SW.CNF
For MAC 04:65:65:ff:ff:ff software version MAC-QCA7005-1.1.0.730-04-20140815-CS”
If you see instead something like “[PEVSLAC] received GET_SW.CNF
For MAC 00:b0:52:00:00:01 software version BootLoader” then the QCA7005 was not able to load the firmware from the SPI flash U1. Some possible root causes are
U1 is not populated
U1 is not programmed with the software (see above “Programming of the SPI flash”)
U1 is wrong type.
One of the SPI lines between the QCA and the SPI flash are not soldered correctly.
Credits
Thanks to Millisman for the initial board design.
Thanks to Lars @evcreate for sponsoring the Ioniq charge control module.
Thanks to celeron55, mikeselectricstuff, Zieg, catphish, projectgus, chrskly, johu, Infant, muehlpower, crasbe, royhen99, asavage, Pete9008, P.S.Mangelsdorf, grgumxlm, royhen99, MeKe, mstegen, jrbe, Bigpie, xvyDFatih, olegiv, ns0708, f0ld, explorer232, dougyip, Gabriel, tom91, quentin42, maciek16c, apple2, CCSknowitall on the openinverter forum for the helpful discussions, proposals, reviews, tests and questions.
Special thanks to projectgus for organizing the chips.
评论