CCS32Clara: Difference between revisions
(Described more Spot values) |
(Updated parameter names and semantics) |
||
Line 20: | Line 20: | ||
| colspan="6" |'''Hardware Config''' | | colspan="6" |'''Hardware Config''' | ||
|- | |- | ||
| | |UdcDivider | ||
|dig/V | |dig/V | ||
|0 | |0 | ||
Line 27: | Line 27: | ||
|Division factor from ADC digits to V of external voltage measurement board | |Division factor from ADC digits to V of external voltage measurement board | ||
|- | |- | ||
| | |EconomizerDuty | ||
|% | |% | ||
|0 | |0 | ||
Line 34: | Line 34: | ||
|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 | |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 | |0 | ||
Line 44: | Line 44: | ||
2 - Charge port inlet voltage is provided via CAN - don't forget to map something to inletvtg | 2 - Charge port inlet voltage is provided via CAN - don't forget to map something to inletvtg | ||
|- | |- | ||
| | |LockDuty | ||
|% | |% | ||
| -100 | | -100 | ||
Line 51: | Line 51: | ||
|H-bridge duty cycle for operating the lock. Use negative value if lock polarity is swapped | |H-bridge duty cycle for operating the lock. Use negative value if lock polarity is swapped | ||
|- | |- | ||
| | |LockRunTime | ||
|ms | |ms | ||
|0 | |0 | ||
Line 58: | Line 58: | ||
|Timeout for lock operation | |Timeout for lock operation | ||
|- | |- | ||
| | |LockClosedThresh | ||
|dig | |dig | ||
|0 | |0 | ||
Line 65: | Line 65: | ||
|Lock feedback value for closed | |Lock feedback value for closed | ||
|- | |- | ||
| | |LockOpenThresh | ||
|dig | |dig | ||
|0 | |0 | ||
Line 74: | Line 74: | ||
| colspan="6" |'''Communication''' | | colspan="6" |'''Communication''' | ||
|- | |- | ||
| | |NodeId | ||
| | | | ||
|1 | |1 | ||
Line 81: | Line 81: | ||
|CANOpen node id for SDO requests | |CANOpen node id for SDO requests | ||
|- | |- | ||
| | |CanSpeed | ||
| | | | ||
|0 | |0 | ||
Line 90: | Line 90: | ||
| colspan="6" |'''Charge Parameters''' | | colspan="6" |'''Charge Parameters''' | ||
|- | |- | ||
| | |MaxPower | ||
|kW | |kW | ||
|0 | |0 | ||
Line 97: | Line 97: | ||
|Absolute maximum charge power | |Absolute maximum charge power | ||
|- | |- | ||
| | |MaxVoltage | ||
|V | |V | ||
|0 | |0 | ||
Line 104: | Line 104: | ||
|Over voltage threshold. Always set about 10-20V higher then desired battery full voltage | |Over voltage threshold. Always set about 10-20V higher then desired battery full voltage | ||
|- | |- | ||
| | |MaxCurrent | ||
|A | |A | ||
|0 | |0 | ||
Line 111: | Line 111: | ||
|Absolute maximum charge current | |Absolute maximum charge current | ||
|- | |- | ||
| | |TargetVoltage | ||
|V | |V | ||
|0 | |0 | ||
Line 132: | Line 118: | ||
|Charge target voltage (volatile) | |Charge target voltage (volatile) | ||
|- | |- | ||
| | |ChargeCurrent | ||
|A | |A | ||
|0 | |0 | ||
Line 146: | Line 132: | ||
|Battery SoC for display on charger (volatile) | |Battery SoC for display on charger (volatile) | ||
|- | |- | ||
| | |BatteryVoltage | ||
|V | |V | ||
|0 | |0 | ||
Line 159: | Line 145: | ||
|1 | |1 | ||
|When 0 charging is stopped/not started (volatile) | |When 0 charging is stopped/not started (volatile) | ||
|- | |||
|AcObcState | |||
| | |||
|0 | |||
|15 | |||
|0 | |||
|Feedback from OBC | |||
|- | |- | ||
| colspan="6" |'''Testing''' | | colspan="6" |'''Testing''' | ||
|- | |- | ||
| | |DemoVoltage | ||
|V | |||
|0 | |||
|500 | |||
|0 | |||
|Voltage for light bulb demo. To use the board without CAN, to get an constant voltage. Is ignored as long democtrl is not STANDALONE. Only values between 150V and 250V are accepted, others are treated as zero. | |||
|- | |||
|DemoControl | |||
| | | | ||
| | |0 | ||
| | |511 | ||
| | |0 | ||
| | |Enables the standalone demo mode if value is set to STANDALONE. In this mode, no CAN is required and the target voltages for precharge and charging loop are taken from demovtg. | ||
|- | |- | ||
| | |ActuatorTest | ||
| | | | ||
| | |0 | ||
| | |7 | ||
| | |0 | ||
| | |Tests various outputs | ||
|- | |- | ||
|logging | |logging | ||
| | | | ||
| | |0 | ||
| | |2047 | ||
| | | | ||
|Selects which modules log to the serial console | |Selects which modules log to the serial console | ||
Line 203: | Line 203: | ||
|Last detected error | |Last detected error | ||
|- | |- | ||
| | |EvseVoltage | ||
|V | |V | ||
|Outlet voltage reported by EVSE | |Outlet voltage reported by EVSE | ||
|- | |- | ||
| | |EvseCurrent | ||
|A | |A | ||
|Outlet current reported by EVSE | |Outlet current reported by EVSE | ||
|- | |- | ||
| | |InletVoltage | ||
|V | |V | ||
|Charge port voltage | |Charge port voltage | ||
|- | |- | ||
| | |EvseMaxCurrent | ||
|A | |A | ||
|Maximum current the EVSE can deliver | |Maximum current the EVSE can deliver | ||
|- | |- | ||
| | |EvseMaxVoltage | ||
|V | |V | ||
|Maximum voltage the EVSE can deliver | |Maximum voltage the EVSE can deliver | ||
|- | |- | ||
| | |ControlPilotDuty | ||
|% | |% | ||
|The PWM ratio of the CP line. This is normally 5% for DC chargers, and between 10% and 90% for analog AC chargers. | |The PWM ratio of the CP line. This is normally 5% for DC chargers, and between 10% and 90% for analog AC chargers. | ||
Line 232: | Line 232: | ||
|Temperatures of the temperature sensors. Requires correct calibration values depending on the used NTC types. | |Temperatures of the temperature sensors. Requires correct calibration values depending on the used NTC types. | ||
|- | |- | ||
| | |MaxTemp | ||
|°C | |||
|Maximum of the above | |||
|- | |||
|ContactorDuty | |||
|% | |% | ||
|Duty cycle of charge port contactor driver | |Duty cycle of charge port contactor driver | ||
|- | |- | ||
| | |AdcLockFeedback | ||
|digit | |digit | ||
|Feedback value from charge port lock | |Feedback value from charge port lock | ||
|- | |- | ||
| | |AdcProximityPilot | ||
|digit | |digit | ||
|Analog value of the PP line. This is the raw value of the analog-to-digital-converter in range 0 to 4095. | |Analog value of the PP line. This is the raw value of the analog-to-digital-converter in range 0 to 4095. | ||
|- | |- | ||
| | |ResistanceProximityPilot | ||
|ohm | |ohm | ||
|Measured resistance between PP line and ground. Requires correct setting of the parameter ppvariant. | |Measured resistance between PP line and ground. Requires correct setting of the parameter ppvariant. | ||
|- | |- | ||
| | |CableCurrentLimit | ||
|A | |A | ||
|Based on the PP resistance. The current limit of the charging cable for AC charging. | |Based on the PP resistance. The current limit of the charging cable for AC charging. | ||
|- | |- | ||
| | |EvseCurrentLimit | ||
|A | |A | ||
|Based on the CP PWM. The current limit of the charging station for AC charging. | |Based on the CP PWM. The current limit of the charging station for AC charging. | ||
|- | |- | ||
| | |AdcHwVariant | ||
|digit | |digit | ||
|raw AD value of the hardware variant coding input. Used to detect which variant of Foccci the software runs on. | |raw AD value of the hardware variant coding input. Used to detect which variant of Foccci the software runs on. | ||
|- | |- | ||
| | |AdcIpropi | ||
|digit | |digit | ||
|raw AD value of the current sensor for the charge port lock motor driver. | |raw AD value of the current sensor for the charge port lock motor driver. | ||
|- | |- | ||
| | |LockState | ||
| | | | ||
|State of charge port lock | |State of charge port lock | ||
|- | |- | ||
| | |StopReason | ||
| | | | ||
| | | | ||
Line 276: | Line 280: | ||
| | | | ||
|- | |- | ||
| | |CanWatchdog | ||
| | |100 ms | ||
| | |Time since last ChargeCurrent update. When it reaches 30 (3s) the charge session is stopped | ||
|- | |- | ||
| | |cpuload | ||
| | | | ||
| | | | ||
Line 316: | Line 320: | ||
Let's go over the items in the screenshot one by one. Note that the IDs are decimal! (256=0x100, 258=0x102, 264=0x108, 265=0x109) | Let's 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-existent 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. | ||
*''' | *'''EvseVoltage''' - Transmits the charger's present output voltage back to the vehicle. | ||
*''' | *'''EvseCurrent''' - Transmits the charger's 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 car's 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). | *'''opmode''' - Observe the weird gain - this is forged to map Clara state "CurrentDemand (13)" to CDM state "ConnectorLocked (4)". In my car's 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). | ||
*''' | *'''EvseMaxVoltage''' - Transmits the EVSE's maximum output voltage back to the vehicle. | ||
*''' | *'''EvseMaxCurrent''' - Transmits the EVSE's maximum output current back to the vehicle. | ||
*''' | *'''BatteryVoltage''' - 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. | ||
*''' | *'''TargetVoltage''' - Transmits the charge end voltage to the EVSE. | ||
*''' | *'''ChargeCurrent''' - 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 car's 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. | *'''soc''' - In CDM this isn't normally a percentage value but some encoded kWh value. In my car's 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 car's charge enable flag. When 0 will stop the CCS session. | *'''enable''' - The car's charge enable flag. When 0 will stop the CCS session. | ||
As an additional safety measure you could connect CDM pin 4 (charge enable) to Clara's 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 have actually implemented this). | As an additional safety measure you could connect CDM pin 4 (charge enable) to Clara's 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 have actually implemented this). |
Revision as of 09:05, 23 February 2024
Disclaimer: This Page is still work in progress! Any information written here is a draft only and should be handled as such. Contributions are more than welcome. If you have questions, please ask them in the discussion section of the page or in the OpenInverter Forum.
This page is about the reference software for the Fully OpenSource CCS Charge Controller (Foccci). CCS32Clara (also referred to as "Clara") is currently under development by the OpenInverter Community.
Here you will find documentation (or reference) on how to setup Clara, News on the development, diagrams, open ToDos, etc.
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 |
EconomizerDuty | % | 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 | |
LockDuty | % | -100 | 100 | 30 | H-bridge duty cycle for operating the lock. Use negative value if lock polarity is swapped |
LockRunTime | ms | 0 | 10000 | 1000 | Timeout for lock operation |
LockClosedThresh | dig | 0 | 4095 | 0 | Lock feedback value for closed |
LockOpenThresh | 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 |
MaxVoltage | V | 0 | 1000 | 410 | Over voltage threshold. Always set about 10-20V higher then desired battery full voltage |
MaxCurrent | A | 0 | 500 | 125 | Absolute maximum charge current |
TargetVoltage | V | 0 | 1000 | 0 | Charge target voltage (volatile) |
ChargeCurrent | A | 0 | 500 | 0 | Instantaneous current setpoint (volatile) |
soc | % | 0 | 100 | 0 | Battery SoC for display on charger (volatile) |
BatteryVoltage | V | 0 | 1000 | 0 | Present battery voltage for precharge state (volatile) |
enable | 0 | 1 | 1 | When 0 charging is stopped/not started (volatile) | |
AcObcState | 0 | 15 | 0 | Feedback from OBC | |
Testing | |||||
DemoVoltage | V | 0 | 500 | 0 | Voltage for light bulb demo. To use the board without CAN, to get an constant voltage. Is ignored as long democtrl is not STANDALONE. Only values between 150V and 250V are accepted, others are treated as zero. |
DemoControl | 0 | 511 | 0 | Enables the standalone demo mode if value is set to STANDALONE. In this mode, no CAN is required and the target voltages for precharge and charging loop are taken from demovtg. | |
ActuatorTest | 0 | 7 | 0 | Tests various outputs | |
logging | 0 | 2047 | Selects which modules log to the serial console |
Spot values
Name | Unit | Description |
---|---|---|
opmode | State of the CCS state machine | |
version | ||
lasterr | Last detected error | |
EvseVoltage | V | Outlet voltage reported by EVSE |
EvseCurrent | A | Outlet current reported by EVSE |
InletVoltage | V | Charge port voltage |
EvseMaxCurrent | A | Maximum current the EVSE can deliver |
EvseMaxVoltage | V | Maximum voltage the EVSE can deliver |
ControlPilotDuty | % | The PWM ratio of the CP line. This is normally 5% for DC chargers, and between 10% and 90% for analog AC chargers.
Typical values are explained here: IEC 62196 Typ 2 – Wikipedia |
temp1, 2, 3 | °C | Temperatures of the temperature sensors. Requires correct calibration values depending on the used NTC types. |
MaxTemp | °C | Maximum of the above |
ContactorDuty | % | Duty cycle of charge port contactor driver |
AdcLockFeedback | digit | Feedback value from charge port lock |
AdcProximityPilot | digit | Analog value of the PP line. This is the raw value of the analog-to-digital-converter in range 0 to 4095. |
ResistanceProximityPilot | ohm | Measured resistance between PP line and ground. Requires correct setting of the parameter ppvariant. |
CableCurrentLimit | A | Based on the PP resistance. The current limit of the charging cable for AC charging. |
EvseCurrentLimit | A | Based on the CP PWM. The current limit of the charging station for AC charging. |
AdcHwVariant | digit | raw AD value of the hardware variant coding input. Used to detect which variant of Foccci the software runs on. |
AdcIpropi | digit | raw AD value of the current sensor for the charge port lock motor driver. |
LockState | State of charge port lock | |
StopReason | ||
checkpoint | ||
CanWatchdog | 100 ms | Time since last ChargeCurrent update. When it reaches 30 (3s) the charge session is stopped |
cpuload |
Errors
The spot value "lasterr" displays the last detected error that lead to a cancellation of charging or to not starting in the first place
Error | Description |
---|---|
CANTIMEOUT | The message mapped to canwatchdog hasn't been received for over 1s or nothing is mapped to canwatchdog |
PLCTIMEOUT | PLC communication with charger timed out |
PRECTIMEOUT | Precharging the EVSE output to specified voltage timed out or battery voltage is below minimum EVSE output voltage |
LOCKTIMEOUT | The connector lock didn't reach the desired position in time |
EVSEFAULT | The EVSE reported an error and stopped |
RELAYWELDED | A welded charge port relay was detected |
Making Clara talk CHAdeMO on the CAN side
A pretty straightforward way to integrate CCS charging into your vehicle is to use the existing CHAdeMO (let's 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.
Let's 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-existent 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.
- EvseVoltage - Transmits the charger's present output voltage back to the vehicle.
- EvseCurrent - Transmits the charger's 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 car's 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).
- EvseMaxVoltage - Transmits the EVSE's maximum output voltage back to the vehicle.
- EvseMaxCurrent - Transmits the EVSE's maximum output current back to the vehicle.
- BatteryVoltage - 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.
- TargetVoltage - Transmits the charge end voltage to the EVSE.
- ChargeCurrent - 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 car's 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 car's charge enable flag. When 0 will stop the CCS session.
As an additional safety measure you could connect CDM pin 4 (charge enable) to Clara's 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 have actually implemented this).
Let's 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 lighter)
- 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.