Foccci wakeup/sleep discussions

Development and discussion of fast charging systems eg Chademo , CCS etc
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: Foccci wakeup/sleep discussions

Post by tom91 »

celeron55 wrote: Tue Mar 19, 2024 7:08 pm I would prefer someone to confirm this who has actually tested it though. And I haven't heard of the other brands.
Yes I have ran this a few times, it works. Most chargers will be like this too as the CP in the EV needs a diode, the -12V is for the station to make sure its not a rouge resistance on the CP to ground.
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1024 times
Contact:

Re: Foccci wakeup/sleep discussions

Post by johu »

Added the wakeup code now: https://github.com/uhi22/ccs32clara/com ... 1cafeb7baa and https://github.com/uhi22/ccs32clara/com ... 4cbf3d1d28

First, the wakeup sources
  1. Wakeup pin - bidirectional - level triggered (12V)
  2. Button - level triggered (GND)
  3. PP - optional via solder bridge - level triggered
  4. CP - Edge triggered
So the first 3 inputs will force the Foccci on. It can't turn itself off as long as that wakeup source is active. The last input will only trigger when transitioning from invalid to valid PWM and then Foccci can decide how long to stay awake. All modes always work regardless of software settings - except PP wakeup which can be turned off in hardware.

I came up with 5 modes for the wakeup OUTPUT
  1. Level - as long as the Foccci doesn't decide to turn off, we keep Wakeup on as well
  2. Pulse - When Foccci boots generate a 1s wakeup pulse
  3. LevelOnValidCp - As long as CP is pulsing we keep wakeup on
  4. PulseOnValidCp - Whenever we transition from non-pulsing to pulsing CP we generate a 1s pulse
  5. LevelOnValidPp - As long as PP is valid keep wakeup on
Some application examples
1st, Touran good enough approach
wakeup via PP enabled, WakeupPinFunc=LevelOnValidPp
  1. Foccci turns on as soon as even a non-powered charging cable is plugged in
  2. Wakeup signal is turned on
  3. BMS, VCU etc. is turned on (directly powered from wakeup as it can supply about 1A)
  4. VCU can detect via the level of the wakeup signal that a cable is plugged in and inhibit drive
  5. When charging cable is unplugged (as in PP lost), Wakeup is turned off and the VCU can allow driving
  6. If we wanted to report e.g. welded charge port relays Foccci would have to keep itself running until the car is started in drive mode again. Then something can be displayed on the instrument cluster. Of course this will time out eventually. Should be fine as you at least have to pull away from the rapid charger after charging.
  7. When charging is paused all ECUs stay on and consume 12V power (or HV power via DC/DC)
2nd, the distributed approach
wakeup via PP disabled, WakeupPinFunc=PulseOnValidCp. Here we have a bidirectional wakeup bus. Any ECU connected to it can send or receive wakeup events and the individual ECUs can decide whether they are needed for a particular task or not.
  1. Foccci turns on as soon as CP PWM starts. So either a cable is being plugged in or is already plugged in and now wants to charge
  2. It then turns on the wakeup output for 1s and wakes up all other ECUs
  3. The relevant ECUs will detect that we want to charge and stay on, the other ones turn off
  4. If we turn on ignition the VCU is already on and in charge mode and can inhibit drive
  5. If charging is paused (i.e. cable plugged in but no CP PWM) and we turn on ignition the VCU wakes up the Foccci and queries PP status. If something is plugged in drive is inhbited
  6. If Foccci detects an error e.g. welded relays, it stores that error to flash. When woken up by the VCU it report its non-zero error code
  7. When charging is paused, ALL ECUs can turn off and no 12V power is consumed. When CP comes back, the cycle restarts
The second approach is more versatile but it also means all devices need to support this method.
So I think there can be an intermediate approach:
3rd accessible sleep approach
Here we only have a wakeup bus between VCU and Foccci. All other devices are powered up by other means, like VCU controlled relays. Wakeup via PP is disabled, WakeupPinFunc=LevelOnValidCp
  1. Foccci turns on as soon as CP PWM starts. So either a cable is being plugged in or is already plugged in and now wants to charge
  2. It then turns on the wakeup output this waking up the VCU
  3. The VCU determines via CAN message from Foccci whether we want to AC or DC charge and turns on needed components. Components needed in both cases that have low power consumption (e.g. BMS) can also be driven from the wakeup signal directly
  4. If we turn on ignition the VCU is already on and in charge mode and can inhibit drive
  5. If charging is paused (i.e. cable plugged in but no CP PWM) and we turn on ignition the VCU wakes up the Foccci and queries PP status. If something is plugged in drive is inhbited
  6. If Foccci detects an error e.g. welded relays, it stores that error to flash. When woken up by the VCU it report its non-zero error code
  7. When charging is paused, ALL ECUs will turn off and no 12V power is consumed. When CP comes back, the cycle restarts
Someone care to transfer this to the wiki? And better still garnish it with diagrams?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1595
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 75 times
Been thanked: 304 times

Re: Foccci wakeup/sleep discussions

Post by Bigpie »

Is focci able to detect the duty of CP and if it's over 5% switch over the CP to the OBC for AC charging?
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
tom91
Posts: 1308
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 103 times
Been thanked: 216 times

Re: Foccci wakeup/sleep discussions

Post by tom91 »

At the moment no, as ran out of pins. So you would need an external VCU to do this, easily done with something like Zombie ;)
Founder Volt Influx https://www.voltinflux.com/
Webstore: https://citini.com/
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1024 times
Contact:

Re: Foccci wakeup/sleep discussions

Post by johu »

Bigpie wrote: Fri Apr 05, 2024 12:02 pm Is focci able to detect the duty of CP and if it's over 5% switch over the CP to the OBC for AC charging?
Like Tom says, it's not really intended.
What I do see is removing the 2k7 from foccci and just paralleling OBC and Foccci. Then the 2k7 inside the charger is used to enter state B. So when DC charging Foccci switches to state C, when AC charging Foccci doesn't touch CP and leaves this to the charger.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
Bigpie
Posts: 1595
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 75 times
Been thanked: 304 times

Re: Foccci wakeup/sleep discussions

Post by Bigpie »

Might just do the Damien Maguire method then, normally closed on a relay to AC charger and flip a switch for CCS
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
evMacGyver
Posts: 111
Joined: Tue Jun 15, 2021 5:44 pm
Location: Finland
Has thanked: 21 times
Been thanked: 5 times

Re: Foccci wakeup/sleep discussions

Post by evMacGyver »

For AC charge using CAN controlled chargers its software change and something that would work for me. Or is there some downsides to think? Isn't it like LIM does AC, at least cable/charge currents are available thru can bus?

Plan is to charge from solar, have Johu or anyone else done this type of AC charger control? What would be best approach keeping plug connected, how charger could get vehicle to sleep and wake when needed? Is there any another way than stop sending CP completely during nights and start again next day? PP is low all the time.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1024 times
Contact:

Re: Foccci wakeup/sleep discussions

Post by johu »

The EVSE should shut down CP (or make it 12V) when setting current limits below 6A. Or and least when sending an explicit stop command.

In that case you'd omit PP wakeup. CP wakeup is always active. So basically go with the 3rd approach from here viewtopic.php?p=69417#p69417

Foccci will then sleep 10s after CP stops pulsing and wake back up when it starts.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply