CCS32Clara: Difference between revisions

From openinverter.org wiki
Jump to navigation Jump to search
(Added parameter description)
Line 13: Line 13:
[https://openinverter.org/forum/viewtopic.php?t=3727 Clara in the OpenInverterForum.]
[https://openinverter.org/forum/viewtopic.php?t=3727 Clara in the OpenInverterForum.]


== Parameters ==
{| class="wikitable"
|'''Name'''
| '''Unit'''
| '''Min'''
|'''Max'''
|'''Default'''
|'''Description'''
|-
| colspan="6" |'''Hardware Config'''
|-
|udcdivider
|dig/V
|0
|100
|10
| Division factor from ADC digits to V of external voltage measurement board
|-
|economizer
|%
|0
|100
|100
|Contactor economizer duty cycle. Contactors are always turned on with 12V for 1s then drop to this value. Set to 100% if your contactor has a built-in economizer
|-
|inletvtgsrc
|
|0
|2
|0
|0 - Charger output voltage is considered equal to charge port inlet voltage
1 - Analog input is used for measuring charge port inlet voltage
2 - Charge port inlet voltage is provided via CAN - don't forget to map something to inletvtg
|-
|lockpwm
|%
| -100
|100
|30
|H-bridge duty cycle for operating the lock. Use negative value if lock polarity is swapped
|-
|lockopentm
|ms
|0
|10000
|1000
|Timeout for lock operation
|-
|lockclosethr
|dig
|0
|4095
|0
|Lock feedback value for closed
|-
|lockopenthr
|dig
|0
|4095
|0
|Lock feedback value for open - if equal to lockclosethr no feedback is assumed and lock is operated timed
|-
| colspan="6" |'''Communication'''
|-
|nodeid
|
|1
|63
|22
|CANOpen node id for SDO requests
|-
|canspeed
|
|0
|4
|2
|Baud rate of CAN interface 0=125k, 1=250k, 2=500k, 3=800k, 4=1M
|-
| colspan="6" |'''Charge Parameters'''
|-
|maxpower
|kW
|0
|1000
|100
|Absolute maximum charge power
|-
|maxvtg
|V
|0
|1000
|410
|Over voltage threshold. Always set about 10-20V higher then desired battery full voltage
|-
|maxcur
|A
|0
|500
|125
|Absolute maximum charge current
|-
|demovtg
|V
|0
|500
|0
|Voltage for light bulb demo? (volatile, value not saved across reboots)
|-
|targetvtg
|V
|0
|1000
|0
|Charge target voltage (volatile)
|-
|chargecur
|A
|0
|500
|0
|Instantaneous current setpoint (volatile)
|-
|soc
|%
|0
|100
|0
|Battery SoC for display on charger
|-
|batvtg
|V
|0
|1000
|0
|Present battery voltage for precharge state
|-
|enable
|
|0
|1
|1
|When 0 charging is stopped/not started
|-
| colspan="6" |'''Testing'''
|-
|locktest
|
|
|
|
|Actuates the lock
|-
|wd_disable
|
|
|
|
|Disabled the CAN timeout detection
|-
|logging
|
|
|
|
|Selects which modules log to the serial console
|}
== Making Clara talk CHAdeMO on the CAN side ==
== Making Clara talk CHAdeMO on the CAN side ==
A pretty straight forward way to integrate CCS charging into your vehicle is to use the existing CHAdeMO (lets call it CDM from here on) CAN messaging. CDM has pretty much all data items we need to initiate a CCS charging session so rather than defining a new set of messages we might as well adopt it. For example Orion BMS or Zombieverter VCU natively support CHAdeMO anyway.
A pretty straight forward way to integrate CCS charging into your vehicle is to use the existing CHAdeMO (lets call it CDM from here on) CAN messaging. CDM has pretty much all data items we need to initiate a CCS charging session so rather than defining a new set of messages we might as well adopt it. For example Orion BMS or Zombieverter VCU natively support CHAdeMO anyway.

Revision as of 22:42, 16 December 2023

Disclaimer: This Page is still work in progress! Any information written here is a draft only and should be handled as such. Contributions more then welcome. If you have questions please ask them in the discussion section of the page or in the OpenInvert Forum.


This page is about the reference software for the OpenSource CCS Charge Controller (Focci). CCS32Clara (also referred to as "Clara") is currently under development by the OpenInverter Community.

Here you will find documentation (or reference) how to setup clara, News on the development, diagramms, open ToDos, etc.


Clara on GitHub.

Clara in the OpenInverterForum.

Parameters

Name Unit Min Max Default Description
Hardware Config
udcdivider dig/V 0 100 10 Division factor from ADC digits to V of external voltage measurement board
economizer % 0 100 100 Contactor economizer duty cycle. Contactors are always turned on with 12V for 1s then drop to this value. Set to 100% if your contactor has a built-in economizer
inletvtgsrc 0 2 0 0 - Charger output voltage is considered equal to charge port inlet voltage

1 - Analog input is used for measuring charge port inlet voltage 2 - Charge port inlet voltage is provided via CAN - don't forget to map something to inletvtg

lockpwm % -100 100 30 H-bridge duty cycle for operating the lock. Use negative value if lock polarity is swapped
lockopentm ms 0 10000 1000 Timeout for lock operation
lockclosethr dig 0 4095 0 Lock feedback value for closed
lockopenthr dig 0 4095 0 Lock feedback value for open - if equal to lockclosethr no feedback is assumed and lock is operated timed
Communication
nodeid 1 63 22 CANOpen node id for SDO requests
canspeed 0 4 2 Baud rate of CAN interface 0=125k, 1=250k, 2=500k, 3=800k, 4=1M
Charge Parameters
maxpower kW 0 1000 100 Absolute maximum charge power
maxvtg V 0 1000 410 Over voltage threshold. Always set about 10-20V higher then desired battery full voltage
maxcur A 0 500 125 Absolute maximum charge current
demovtg V 0 500 0 Voltage for light bulb demo? (volatile, value not saved across reboots)
targetvtg V 0 1000 0 Charge target voltage (volatile)
chargecur A 0 500 0 Instantaneous current setpoint (volatile)
soc % 0 100 0 Battery SoC for display on charger
batvtg V 0 1000 0 Present battery voltage for precharge state
enable 0 1 1 When 0 charging is stopped/not started
Testing
locktest Actuates the lock
wd_disable Disabled the CAN timeout detection
logging Selects which modules log to the serial console

Making Clara talk CHAdeMO on the CAN side

A pretty straight forward way to integrate CCS charging into your vehicle is to use the existing CHAdeMO (lets call it CDM from here on) CAN messaging. CDM has pretty much all data items we need to initiate a CCS charging session so rather than defining a new set of messages we might as well adopt it. For example Orion BMS or Zombieverter VCU natively support CHAdeMO anyway.

Screenshot of CAN mapping to interface Clara CCS with CHAdeMO

Lets go over the items in the screenshot one by one. Note that the IDs are decimal! (256=0x100, 258=0x102, 264=0x108, 265=0x109)

  • udcdivider - actually here we just select some dummy item as the important bit is in the Offset field: the version. In this case I signal non-existant CDM version 10. This tells the CDM module in my car that it talks to Clara. It then includes the battery voltage in some unused message bytes - see below
  • evsevtg - Transmits the chargers present output voltage back to the vehicle
  • evsecur - Transmits the chargers present output current back to the vehicle
  • opmode - observe the weird gain - this is forged to map Clara state "CurrentDemand (13)" to CDM state "ConnectorLocked (4)". In my cars CDM module this is sufficient to initiate the charging progress. You may need to change it so that the ChargeEnable flag together with ConnectorLocked is forged (numerical value 5)
  • evsemaxvtg - Transmits the EVSEs maximum output voltage back to the vehicle
  • evsemaxcur - Transmits the EVSEs maximum output current back to the vehicle
  • batvtg - Transmits the present battery voltage to the EVSE. This is the special item that normally doesn't exist in CDM and that unfortunately will prevent you from using this solution with an OEM car in a safe manner. Of course you could manually set this to some medium battery voltage like 360V but if you arrive with a really low battery at say 300V this might weld your charge port contactors. You could also manually enter the battery voltage before each charging session
  • targetvtg - Transmits the charge end voltage to the EVSE
  • chargecur - By far the most important data item - the charge current request
  • soc - In CDM this isn't normally a percentage value but some encoded kWh value. In my cars CDM module I specify a full battery as "200" (no idea what this actually means in kWh) and thereby can just output the SoC in 0.5% steps
  • enable - The cars charge enable flag. When 0 will stop the CCS session
  • canwatchdog - (missing in screenshot). Map to 0x102 message at some arbitrary bits with gain=0 so it sets canwatchdog=0 whenever it is received. This makes sure charging stops if the CAN bus is disturbed.

As an additional safety measure you could connect CDM pin 4 (charge enable) to Claras button input (at least once we added an active low mode for it). It might also be worthwhile to connect pin 7 (connection check) to the PP input for drive away protection when CDM is plugged in but not charging (again, once we actually implemented this).

Lets list the CHAdeMO pin mapping one by one as well:

  • Pin 1 - GND
  • Pin 2 (12V, charger start/stop) - 12V (I take it from cigarette ligher)
  • Pin 4 (charging enable) - Foccci BUTTON
  • Pin 5, 6 - Power pins, triple check correct polarity!
  • Pin 7 (Connection check) - Foccci PP
  • Pin 8, 9 (CAN) - Foccci CANL, CANH
  • Pin 10 (charger start/stop 2) - Foccci SW1_LS

Attention: with this mapping the error flags are ignored, e.g. voltage or current mismatch.