[WIP] Porsche 981 Cayman S

Tell us about the project you do with the open inverter
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

[WIP] Porsche 981 Cayman S

Post by Mitchy »

Just laying the framework for my project outline.

A bit about me:
I'm Mitch.
From Canada
I work with Automation/Controls/AC Drives, have a general knowledge of programming and looking to dig into more of the EV side of things.
Been involved with a few projects, my past project was a BMW E30 that ran megasquirt and had an array of modern items grafted to the engine - Turbocharged, etc.
Currently I have a 997 Turbo, which is modestly upgraded. However it's not a 'project', too costly to get creative with.

Project:
The project morphed over the ages, First it was to buy a 987 and attempt a LS swap...
My father has been looking to do an EV conversion for a while, and with the general grassroots shift of conversions, it seemed like a good area to both experiment and aid the community as much as possible.
Although the 987 is a great chassis, I favoured the 981 for several reasons

A few weeks back I purchased a 981 Cayman with slight accident damage. Less engine/trans
Overall the body appears straight, no major issues in getting it back operational.
Cayman In Transit.png
Stats:
2014 981 Cayman S
  • Moderately optioned, but without PASM Suspension.
  • Electric Steering Standard!
  • PDK Car (Can bus shifter)
Plans:
  • Tesla 'Sport' LDU
  • I-Booster - Panamera Hybrid is drop in, but other 1st gen I-Boosters should be no issue with adapter
  • I-Pace Batteries (or similar)
  • Tesla Gen 2 (or 3) charger
  • Framework for CCS (will plan within HVJB)
Obstacles
  • CanBus! (Hoping EV-Builder can help) - I Do have some experience with Can, but not having an operational car may cause some issue.
  • Packaging of Batteries
  • Inspection/Registration for my Local DMV... It'll likely be the first conversion that I know of in my Province.
Future hopes may be to use a Front Drive Unit and convert to AWD pending battery space and discharge current.
Those that know the 981/991 chassis will know that with the Gas Tank removed, the front space is a rather large void. So Base plan is battery storage if needed. The 981 can use the front subframe and hubs from the 991 4S/Turbo 🙂

**I'll populate this more in the coming days...**
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Porsche 981 Cayman S (2014)

Post by EV_Builder »

Nice!

Dump a log i will take a look at it.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Just a quick status update, as I've been lacking for the last few months.

I've been working on my garage and getting the space ready for the conversion.
The car does have some front accident damage that will need to be fixed, so once that is taken care of I'm hoping to jump into the conversion.

Thus far I've purged everything of the ICE ancillaries, Been sizing up for battery packs, ect.
The plan so far is to mimic the Tesla LDU installation much like the setup BoxsterEV has (981 subframe is different than the 986)

I may try to source a ID3/4 VDU590 sized battery, My mockups seem to allow me to place the full 82kw battery in a 96s3p config.
with the LG e78 cells.
Hoping they can offer up a short term C-Rate of 5-8C to get me to my power goals.

Will attach some pictures shortly of the De-ICEd chassis.
User avatar
x.l.r.8
Posts: 22
Joined: Thu Apr 04, 2019 11:43 pm
Location: Toronto

Re: Porsche 981 Cayman S (2014)

Post by x.l.r.8 »

Have you checked the local laws. At present you cannot build/convert a car to EV in Ontario. Not sure where you are in Canada but certain provinces will not touch it for insurance or registration.
If somethings worth doing, its worth getting it wrong a few times first.
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

x.l.r.8 wrote: Sun Mar 20, 2022 7:03 am Have you checked the local laws. At present you cannot build/convert a car to EV in Ontario. Not sure where you are in Canada but certain provinces will not touch it for insurance or registration.
This is definitely a risk to the project.
I'm in a province without yearly inspections/emissions, and the inspections are relatively straight forward, so I'm hoping it's more of a bureaucratic issue than actually passing the safety test.
Insurance will be a bit difficult. Although given its salvage title, I'll likely stick with base coverage. Given the other cars on the road locally, some quite modified it shouldn't be too much of an 'issue'.

Will post the first of the conversion work when I get my PTC heater element from ZeroEV tomorrow!
Porsche982ev
Posts: 4
Joined: Fri Jun 17, 2022 9:21 pm

Re: Porsche 981 Cayman S (2014)

Post by Porsche982ev »

Hey Mitchy, any updates/progress you can share regarding this project? Have you started planning out your drive unit cradle/subframe? Do you know yet if the 981 will allow the Model S LDU to fit within the engine compartment if its mounted in reverse orientation from the Model S?
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Just a quick update:
TLDR - About 2 weeks out from most key parts arriving.

Currently in the part collection phase of things.
Hoping to cache up some updates and be able to post semi-regular once things get rolling.

Just received the Sport LDU, so I'll be hoping to mock it up in the coming weeks.
Waiting on the IBooster, LDU Openinverter board, and Batteries; these all should arrive in the next week.
I settled and went the Volt Gen 2 battery route. Right now I've sourced two packs, with a potential to see if I can fit a 3rd, but I suspect that's very optimistic.
Was very mixed on the battery choice. The use case is general city/fun, so range is secondary; newer cell chemistries seem aimed at energy vs power. Felt that the Volt batteries was the easy way out... The biggest reason is I could source them within a few nearby provinces for ~$2000 each, so my investment is minimal to get things running.

There is room in the front tank area for a Front Drive Unit; it'll just need to be clocked 15* farther upright.
Having AWD isn't the highest on my list, but keeping an eye out for a cheap SDU to use for mockup - I suspect once I have the batteries it'll be clear that I won't have room for both the motor and an optimal battery size. More to come on that.

I have most of the Canbus decoded, I'm sure i'm missing a few key things to please the ABS and other systems but for now I can send the key signals to mimic the engine/trans. The 718 should share the same basic architecture.
Haven't settled on a VCU yet, but likely will use the STM32-VCU; just modified to strip out some of the Zombieverter Toyota I/O
I'm planning to post any of the CAD files I ultimately use, so it should be pretty much the same for the 718.

I've also ordered a CR-Lizard 3d scanner... So pending how well it works, I'll post my scans. So far I've just been using a photogrammetry scan I did, came out surprisingly well, +/- 1mm in most of my spot check dimensions;
Porsche982ev
Posts: 4
Joined: Fri Jun 17, 2022 9:21 pm

Re: Porsche 981 Cayman S (2014)

Post by Porsche982ev »

Mitchy,

I am very interested on how much spoofing will be involved in getting everything working without CANbus fualts. I would love to be able to utilize unused menu items in the in-dash display. Like change fuel level to SoC, adjust/scale range for battery capacity, I would also like to scale and use the tachometer to display Amp draw and just get a gauge face overlay done up at a print shop. Can you share your CANbus files for your car?
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

I have a DBC file in draft, Should soon be ready to issue.
I took a pause on the canbus side of things to start ordering parts and fixing the crash damage on the tub. It's been a slow process I'll admit.
EV_Builder is miles ahead of me, He's converting a Panamera and much more versed in the can decoding.
I have to give him credit as he's been the real pioneer.
I've tried to do this process without pestering him for help, as this is more of a personal challenge; But good to know he's there if I hit a wall.

I do know that you'll be able to modify the temp ranges of the cluster and such with PIWIS III and engineering mode.
I've looked at enabling the hybrid screens, but fear it may screw up more than just enabling the screen on the cluster. (such as the speedo being converted into a power meter).

Below is the Canbus I've managed to sniff thus far. Keep in mind my chassis had no engine, so I've basically been only able to sniff data with the Key On-Engine Off state.

ECM has two Canbus channels, 2nd channel is more for safety related stuff.

The list below has the typical names from Bosch - You'll find much of the below codes are identical to the VW MQB platform (DBC File found on OpenAI Github: https://github.com/commaai/opendbc/blob ... b_2010.dbc)

Code: Select all

On Log	DBC	Hex	Dec	Name	      ECU TX	ECU RX	ECM2
Y		0x010	16				
Y		0x011	17				
Y	Y	0x040	64	Airbag_01		Y	
Y	Added	0x080	128	Motor_01	Y		
Y	Y	0x081	129	Motor_02	Y		
Y	Added	0x082	130	Getriebe_01		Y	Y
Y	Added	0x083	131	Getriebe_02		Y	Y
Y	Y	0x086	134	LWI_01		Y	
Y	Y	0x0AA	170	Motor_13	Y		
Y	Added	0x0AB	171	Getriebe_07		Y	
Y		0x0B0	176				
Y	Added	0x100	256	ESP_01		Y	Y
Y	Y	0x101	257	ESP_02		Y	Y
Y	Added	0x102	258	Getriebe_03		Y	Y
Y	Added	0x103	259	ESP_03		Y	Y
Y	Y	0x104	260	EPB_01		Y	Y
Y	Y	0x105	261	Motor_03	Y		
Y	Y	0x106	262	ESP_05		Y	Y
Y	Y	0x107	263	Motor_04	Y		
Y	Added	0x10B	267	LS_01		Y	Y
Y	Added	0x10E	270	TSK_04	Y		
Y	Added	0x111	273	TSK_05	Y		Y
Y	Added	0x114	276	Motor_10	Y		
Y		0x133	307				
Y		0x308	776				
Y	Added	0x309	777	BEM_01		Y	
Y	Y	0x30B	779	Kombi_01		Y	Y
Y	Y	0x30E	782	Motor_05	Y		
Y	Added	0x312	786	TSK_03	Y		
Y		0x383	899				
Y		0x384	900				
Y	Y	0x385	901	Charisma_01		Y	
Y	Added	0x38A	906	GW_FWK_01_Ant_PAG		Y	
Y	Y	0x391	913	OBD_01	Y		
Y	Y	0x392	914	ESP_07_FR		Y	
Y		0x393	915	WBA_02	N/A		
Y		0x39C	924	Gateway_05		Y	Y
Y	Y	0x3A5	933	Motor_15_PAG	Y		
Y		0x3B2	946	BEM_03			
Y	Added	0x3BF	959	Klima_01		Y	
Y	Y	0x3C0	960	Klemmen_Status_01		Y	Y
Y	Added	0x440	1088	Motor_06	Y		
Y		0x441	1089	Getriebe_04		Y	
Y		0x471	1137	Licht_hinten_01		Y	
Y	Y	0x520	1312	Airbag_02		Y	Y
Y		0x523	1315				
Y	Y	0x585	1413	Systeminfo_01		Y	
Y		0x590	1424	Kessy_02		Y	
Y		0x5EE	1518				
Y	Y	0x5F0	1520	Dimmung_01			
Y	Y	0x640	1600	Motor_07	Y		
Y	Y	0x641	1601	Motor_Code_01 	Y		
Y	Y	0x642	1602	SRV_INTL_1	Y		
Y		0x644	1604	Gateway_11		Y	
Y	Y	0x647	1607	Motor_09	Y		
Y		0x64C	1612				
Y		0x6AA	1706				
Y		0x6AC	1708				
Y	Y	0x6B2	1714	Diagnose_01			Y
Y	Y	0x6B4	1716	VIN_01			
Y	Y	0x6B7	1719	Kombi_02		Y	
Y		0x6C0	1728				
Y		0x6C1	1729				
Porsche982ev
Posts: 4
Joined: Fri Jun 17, 2022 9:21 pm

Re: Porsche 981 Cayman S (2014)

Post by Porsche982ev »

Wiring diagrams for Porsche 981 platform
Attachments
2013 - 2016 Porsche Cayman Boxster Base S GTS GT4 981 Wiring Diagrams.pdf
(5.28 MiB) Downloaded 165 times
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

To add while someone is likely waiting for my 981/991 DBC file,
Lately someone uploaded a ton of OEM docs to the RusEFI github,
Found this Spreadsheet which basically matches my findings exactly:
https://github.com/rusefi/rusefi_docume ... .13_02.xls
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Project Update 1:
  • Batteries: Chevy Volt Gen 2 & Chevy Spark Modules - 2x 18.4 kWh = ~36.8 kWh
  • LDU Sport Drive has arrived!
  • OpenInverter Board in hand (Not yet assembed)
  • I-Booster arrived and mocked up for fitment. Minor adaption required.
  • PTC Heater from ZeroEV arrived, Mocked up, Awaiting install in Heater core

- Volt battery has arrived, The shop that sent it crated it amazingly! The volt battery assembly weights ~200kg.
Broken down the battery subassemblies weigh:
2x12S = 77.9 lbs / 35.3 kg
12S & 16S = 89.5 lbs / 40.6 kg
12S & 2x16S = 140.9 lbs / 63.9 kg
1 Pack total weight = 308.3 lbs / 139.8 kg

The Spark battery is comprised of 6-16s modules. I went this route as the battery was amazingly cheap and since each battery is separate I get multiple end caps. I intend to combine the modules into different blocks, but having extra quick connect fittings will make life easier.

- LDU unit seems to be in great shape. I was a bit concerned with reading the forum, as well as the long documented issues with LDU replacements.
The unit I purchased came from a 2013; as such it was a gamble that it was a early revision... The yard was unable to give me any details about the rev model, so I ordered hoping it was a reman unit. Thankfully it's a -P revision which puts the replacement at 2018.
The donor only had 40,000km so either way it's had an easy life.

- Thanks to Johannes I just received the OI board. All looks great and well packaged! Will prep to install over the weekend and hopefully spin the motor for the first time soon. I opted to pay extra as DHL packages to Canada all default to Ocean Freight now it seems; As my I-booster took 3 months to arrive!

- I-Booster - After many parts bin investigations, It appears that many of the recent Audi Hybrids use the same form factor I-Booster as the existing Vac boosters. That being 2 diagonal bolts (rather that the more common 4 bolt pattern).
The I-Booster PN is: 4M2614105 from a 4M Audi Q7 - This booster primarily has Flexray, but I'm hoping it's failsafe action is similar to the other canbus boosters.

Currently in the process of fitting the booster, It'll require a slight lengthening of the ball end, as well as shortening the threads on the existing bolts; as the 981 has a blind hole where the new bolt bottoms out on.

- PTC Heater is ready to install.
Attachments
IMG_2232.JPG
IMG_2231.JPG
IMG_2230.JPG
IMG_2223.JPG
IMG_2222.JPG
IMG_2190.JPG
IMG_2189.JPG
IMG_2188.JPG
IMG_2180.JPG
IMG_2173.JPG
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Canbus:

For the Canbus I first started to replay the existing signals,
Then mapped each one to variables. This allows me full control over the signal vs just trying to decrypt the messages adjusting the bytes to get at each bit.
Likely lots more work to go, but here's basically my formulation structure (note it's a working draft and VERY rough...) :

Code: Select all

void Motor1_Msg()
{
Motor1[0] = (0x00 & (0x0FU)) | ((dMO_Mom_o_ex & (0x0FU)) << 4);
Motor1[1] = ((dMO_Mom_o_ex >> 4) & (0x3FU)) | ((dMO_Mom_m_ex & (0x03U)) << 6);
Motor1[2] = ((dMO_Mom_m_ex >> 2) & (0xFFU));
Motor1[3] = (dMO_Mom_Loss & (0xFFU));
Motor1[4] = ((dMO_Mom_Loss >> 8) & (0x03U)) | ((dMO_Mom_Limitation & (0x3FU)) << 2);
Motor1[5] = ((dMO_Mom_Limitation >> 6) & (0x0FU)) | ((dMO_Mom_driverrequest & (0x0FU)) << 4);
Motor1[6] = ((dMO_Mom_driverrequest >> 4) & (0x3FU)) | ((bMO_Kickdown & (0x01U)) << 6) | ((bMO_KD_Error & (0x01U)) << 7);  
}

void Motor2_Msg()
{
Motor2[0] = (0x00 & (0x0FU)) | ((dMO_Mom_ZWR & (0x0FU)) << 4);
Motor2[1] = ((dMO_Mom_ZWR >> 4) & (0x3FU)) | ((dMO_Mom_Soll & (0x03U)) << 6);
Motor2[2] = ((dMO_Mom_Soll >> 2) & (0xFFU));
Motor2[3] = (dMO_Mom_Is & (0xFFU));
Motor2[4] = ((dMO_Mom_Is >> 8) & (0x03U)) | ((bMO_Status_CylDeact & (0x01U)) << 2) | ((bMO_Status_Normal & (0x01U)) << 3) | ((bMO_StartStop_Status & (0x03U)) << 4) | ((bMO_StartStop_Motorstop & (0x01U)) << 6) | ((bMO_StartStop_Restart & (0x01U)) << 7);
Motor2[5] = (bMO_E_Drive_Active & (0x01U)) | ((iMO_gearposition & (0x0FU)) << 1) | ((iMO_StartStop_driverrequest & (0x03U)) << 5) | ((bMO_StartStop_StopReady & (0x01U)) << 7);
Motor2[6] = (iMO_momentintegral & (0xFFU));
}

void Motor3_Msg()
{
Motor3[0] = (0x00 & (0x0FU)) | ((bMO_QBit_AccPedal_01 & (0x01U)) << 4) | ((bMO_QBit_Motortorque & (0x01U)) << 5) | ((bMO_QBit_driverbrakes & (0x01U)) << 6) | ((bMO_QBit_Speed_01 & (0x01U)) << 7);
Motor3[1] = (dMO_Speed_01 & (0xFFU));
Motor3[2] = ((dMO_Speed_01 >> 8) & (0xFFU));
Motor3[3] = (bMO_in_idle & (0x01U)) | ((bMO_Interlock & (0x01U)) << 1) | ((bMO_BLS & (0x01U)) << 2) | ((bMO_driver_brakes & (0x01U)) << 3) | ((bMO_Consistency_Brakeped & (0x01U)) << 4) | ((bMO_clutch_switch & (0x01U)) << 5) | ((bMO_Timeout_ESP & (0x01U)) << 6) | ((bMO_Motor_runs & (0x01U)) << 7);
Motor3[4] = (iMO_set_speed_idle & (0xFFU));
Motor3[5] = (iMO_Accelpedal_raw_01 & (0xFFU));
Motor3[6] = (bMO_first_inaccuratelim & (0x01U)) | ((bMO_QBit_stressfactor & (0x01U)) << 1) | ((iMO_stressfactor & (0x3FU)) << 2);
}

void Motor4_Msg()
{
Motor4[0] = (iWBA_CurrentGear & (0xFFU));
Motor4[1] = (iWBA_CurrentGear & (0x0FU)) | ((iWBA_TargetGear & (0x0FU)) << 4);
Motor4[2] = (iMO_oilpressure & (0xFFU));
Motor4[3] = (dMO_displayspeed & (0xFFU));
Motor4[4] = ((dMO_displayspeed >> 8) & (0x0FU)) | ((bWBA_ShiftSugg_Available & (0x01U)) << 4) | ((0 & (0x01U)) << 6) | ((dMO_boostpressure & (0x01U)) << 7);
Motor4[5] = ((dMO_boostpressure >> 1) & (0xFFU));
Motor4[6] = (dMO_KVS & (0xFFU));
Motor4[7] = ((dMO_KVS >> 8) & (0x7FU)) | ((bMO_KVS_Overflow & (0x01U)) << 7);
}

void Motor5_Msg()
{
Motor5[0] = (0x00 & (0x0FU)) | ((iMO_AC_Pwr_reduce & (0x03U)) << 4) | ((iMO_Freig_Reku & (0x03U)) << 6);
Motor5[1] = (iMO_Klima_Eingr & (0x03U)) | ((bMO_Status_Normal & (0x01U)) << 2) | ((bMO_PwrReduct & (0x01U)) << 3) | ((bMO_PartFiltRegen & (0x01U)) << 4) | ((bMO_MinMotorSpd_Priorty & (0x01U)) << 5) | ((bMO_Freig_Anlass & (0x01U)) << 6) | ((bMO_Aussp_Anlass & (0x01U)) << 7);
Motor5[2] = (bMO_MAX_desiredspeed & (0xFFU));
Motor5[3] = ((bMO_MAX_desiredspeed >> 8) & (0x01U)) | ((bMO_MAXMotorSpd_Priorty & (0x01U)) << 1) | ((bMO_Luftpfad_aktiv & (0x01U)) << 2) | ((bMO_v_Begrenz_Aktiv & (0x01U)) << 3) | ((bMO_v_Begrenz_Aktivierbar & (0x01U)) << 4) | ((bMO_Verbot_EKP & (0x01U)) << 5) | ((bMO_Anf_Pruefimpuls & (0x01U)) << 6) | ((bMO_Anf_KL75 & (0x01U)) << 7);
Motor5[4] = (MO_Charisma_FahrPr & (0x07U)) | ((MO_Charisma_Status & (0x03U)) << 3) | ((MO_Charisma_Umschaltung & (0x03U)) << 5) | ((bMO_Handshake_STH & (0x01U)) << 7);
Motor5[5] = (MO_MIN_desiredspeed & (0xFFU));
Motor5[6] = (MO_Drehzahlbeeinflussung & (0xFFU));
}

void Motor6_Msg()
{
Motor6[0] = (bMO_Kuehlerluefter_MUX & (0x01U)) | ((iMO_coolerfan_1 & (0x7FU)) << 1); //---Mux'd 2nd PWM state | ((iMO_coolerfan_2 & (0x7FU)) << 1)
Motor6[1] = (iMO_HYB_Status_HV_Ladung & (0x07U)) | ((bMO_ITM_Warnung_Pumpe & (0x01U)) << 3) | ((iWIV_Display_active & (0x01U)) << 4) | ((bWIV_OilLevel_Warn & (0x01U)) << 5) | ((bWIV_sensorerror & (0x01U)) << 6) | ((bWIV_Slope & (0x01U)) << 7);
Motor6[2] = (iWIV_OilLevel & (0x0FU)) | ((iMO_Status_HWP & (0x03U)) << 4) | ((bMO_Kat_Warnung & (0x01U)) << 6) | ((bMO_Vorglueh_Lampe & (0x01U)) << 7);
Motor6[3] = (bWIV_OilSystem_aktiv & (0x01U)) | ((bWIV_not_operating & (0x01U)) << 1) | ((bWIV_Overfill_Warn & (0x01U)) << 2) | ((bWIV_running_engine & (0x01U)) << 3) | ((bMO_HYB_Text_1 & (0x01U)) << 4) | ((bMO_HYB_Text_2 & (0x01U)) << 5) | ((bMO_HYB_Text_3 & (0x01U)) << 6) | ((bMO_HYB_Text_4 & (0x01U)) << 7);
Motor6[4] = (iMO_Text_Motorstart & (0x0FU)) | ((bMO_HYB_Text_5 & (0x01U)) << 4) | ((bMO_HYB_Text_6 & (0x01U)) << 5) | ((bMO_HYB_Text_7 & (0x01U)) << 6) | ((bWIV_Oeldyn_avl & (0x01U)) << 7);
Motor6[5] = (bMO_Text_MSG_Workshop & (0x01U)) | ((bMO_Text_ParticleFilter_Regen & (0x01U)) << 1) | ((bMO_Text_Error_Fuelsys & (0x01U)) << 2) | ((iWIV_OilQuantity & (0x1FU)) << 3);
Motor6[6] = (bMO_System_Light & (0x01U)) | ((bMO_OBD2_Light & (0x01U)) << 1) | ((bMO_TempHot_Light & (0x01U)) << 2) | ((bMO_Particle_Light & (0x01U)) << 3) | ((bMON_Winter_Mode & (0x01U)) << 4) | ((bWIV_OilLevel_not_avail & (0x01U)) << 5) | ((bWIV_Refill_indicator & (0x01U)) << 6) | ((bWIV_Overfill_deactiv & (0x01U)) << 7);
Motor6[7] = (bWIV_Underfill_Warn & (0x01U)) | ((bMO_FuelCap_Light & (0x01U)) << 1) | ((bMO_Text_Fuelcap_warn & (0x01U)) << 2) | ((bWIV_Ena_Oilpress_Motor & (0x01U)) << 3) | ((bWIV_OilPress_Warn & (0x01U)) << 4) | ((iMO_Avus_Motorschutz & (0x03U)) << 5) | ((bMO_HYB_Ready & (0x01U)) << 7);

}

void Motor7_Msg()
{
Motor7[0] = (bMO_QBit_Intake_Air_Temp & (0x01U)) | ((bMO_QBit_Oil_Temp & (0x01U)) << 1) | ((bMO_QBit_Coolant_Temp & (0x01U)) << 2) | ((bMO_HYB_Error_HV_Net & (0x01U)) << 4) | ((bMO_active_gearboxheating & (0x01U)) << 5) | ((iMO_shutoff_valve_open & (0x03U)) << 6);
Motor7[1] = (iMO_Intake_Air_Temp & (0xFFU));
Motor7[2] = (iMO_Oil_Temp & (0xFFU));
Motor7[3] = (iMO_Coolant_Temp & (0xFFU));
Motor7[4] = (iMO_Elevation & (0xFFU));
Motor7[5] = (bMO_map & (0x01U)) | ((iMO_CANversioninfo & (0x3FU)) << 1) | ((bMO_Trans_Cooling & (0x01U)) << 7);
Motor7[6] = (iMO_Mom_Inertia_02 & (0x1FU)) | ((iMO_heatingPumpCtrl & (0x07U)) << 5);
Motor7[7] = ((iMO_heatingPumpCtrl >> 3) & (0x01U)) | ((bMO_VoltageReq & (0x01U)) << 1) | ((iMO_Runtime_heaterpump & (0x3FU)) << 2);
}

void Motor9_Msg()
{

  
}

void Motor10_Msg()
{
Motor10[0] = (0x00 & (0x0FU)) | ((bMO_Sig_Accelpedal & (0x01U)) << 4) | ((bMO_BKV_lowpress_warn & (0x01U)) << 5) | ((iMO_cylinderdeact & (0x03U)) << 6);
Motor10[1] = (iMO_accelpedal & (0xFFU));
Motor10[2] = (bMO_overruncutoff & (0x01U)) | ((iMO_rel_intake_pressure & (0x3FU)) << 1) | ((bMO_rel_intakepipepressure & (0x01U)) << 7);
Motor10[3] = (iMO_BKV_Vacpressure & (0xFFU));
Motor10[4] = (iMO_BKV_PedalPos & (0xFFU));
Motor10[5] = (dMO_Mom_Traegheit_Summe_ro & (0xFFU));
Motor10[6] = ((dMO_Mom_Traegheit_Summe_ro >> 8) & (0x03U)) | ((iMO_ANC_Kennfeld_Anf & (0x03U)) << 2);
}

void Motor13_Msg()
{
Motor13[0] = (0x00 & (0x0FU)) | ((dMO_Praed_Mom & (0x0FFU)) << 4);
Motor13[1] = (dMO_Praed_Mom & (0xFFU));
Motor13[2] = (0x00)
Motor13[3] = (iMO_VirtFahrpedal_TStatACC & (0xFFU));
Motor13[4] = (bMO_TankEntl_Diag_Aktiv & (0x01U)) | ((bMO_Katheizen_Aktiv & (0x01U)) << 1) | ((bMO_St_Leerlauf_Adapt & (0x01U)) << 2) | ((bMO_Sportstart & (0x01U)) << 3) | ((iMO_Kuehlw_Volumenstrom & (0x03U)) << 4);
Motor13[5] = (dMO_Dyn_Mom & (0xFFU));
Motor13[6] = ((dMO_Dyn_Mom >> 8) & (0x0FU);

}

void Motor15_Msg()
{
Motor15[0]=0xFF;
Motor15[1]=0xFF;
Motor15[2]=0xFF;
Motor15[3]=0xFF;
Motor15[4]=(dMO_Powermeter & (0xFFU));
Motor15[5]=((dMO_Powermeter >> 8) & (0x0FU)) | ((bMO_ExhaustFlap & (0x01U)) << 5) | ((bMO_Led_ExhaustFlap & (0x01U)) << 6) | ((bMO_EngBayHot & (0x01U)) << 7);
Motor15[6]= (iMO_EngBayTemp & (0x3FU)) | ((bMO_Gearsuggest & (0x01U)) << 6) | ((bMO_GearEco & (0x01U)) << 7);
Motor15[7]=(iMO_PDKtemp & (0xFFU));
}

void Gearbox1_Msg()
{
Gearbox1[0] =(0x00 & (0x0FU)) | ((bGE_Schaltvorgang & (0x01U)) << 4) | ((iGE_Status_Kupplung & (0x03U)) << 5) | ((bGE_Verbot_Ausblendung & (0x01U)) << 7);
Gearbox1[1] =(dGE_MMom_Soll & (0xFFU));
Gearbox1[2] =((dGE_MMom_Soll >> 8) & (0x03U)) | ((iGE_MMom_Status & (0x03U)) << 2) | ((bGE_Freig_Mmom_Soll & (0x01U)) << 4) | ((0x00 & (0x07U)) << 5);
Gearbox1[3] =(dGE_MMom_Vorhalt & (0xFFU));
Gearbox1[4] =((dGE_MMom_Vorhalt >> 8) & (0x03U)) | ((bGE_Freig_MMom_Vorhalt & (0x01U)) << 2);
Gearbox1[5] =((0x00 & (0x01U)) << 7);
}

void Gearbox3_Msg()
{
Gearbox3[0] = (0x00 & (0x0FU)) | ((bGE_Freig_Langfr_Schutzmom & (0x01U)) << 4) | ((dGE_Uefkt & (0x03U)) << 6);
Gearbox3[1] = ((dGE_Uefkt >> 2) & (0xFFU));
Gearbox3[2] = (iGE_Zielgang & (0x0FU)) | ((iGE_StartStop_Info & (0x03U)) << 4);
Gearbox3[3] = (dGE_Langfr_Schutzmom & (0xFFU));
Gearbox3[4] = ((dGE_Langfr_Schutzmom >> 8) & (0x03U)) | ((bGE_Performance_Start_LB & (0x01U)) << 2) | ((0x00 & (0x01U)) << 3) | ((iGE_Waehlhebel & (0x0FU)) << 4);
Gearbox3[5] = (dGE_Eingangsdrehz & (0xFFU));
Gearbox3[6] = ((dGE_Eingangsdrehz >> 8) & (0x3FU)) | ((bGE_Notlauf & (0x01U)) << 6) | ((bGE_Codierung_MSG & (0x01U)) << 7);
}

void Gearbox4_Msg()
{
Gearbox4[0] = (iGE_Index_Fahrwid & (0xFFU));
Gearbox4[1] = (iGE_Heizwunsch & (0x03U)) | ((bGE_OBD_Status & (0x01U)) << 2) | ((bGE_LFR_Adaption & (0x01U)) << 3) | ((iGE_OBD_AbsperrVent & (0x0FU)) << 4);
Gearbox4[2] = (iGE_Grenzkriechmoment & (0x3FU));
Gearbox4[3] = (drivemode & (0x07U)) | ((0x01 & (0x03U)) << 3) | ((0x00 & (0x03U)) << 5) | ((bGE_Freigabe_Verfallsinfo_WFS & (0x01U)) << 7);
Gearbox4[4] = (iGE_Verlustmoment & (0xFFU));
Gearbox4[5] = (launchcontrol & (0x01U)) | ((dGE_amax_moeglich & (0x3FU)) << 2);
Gearbox4[6] = ((dGE_amax_moeglich >> 6) & (0x07U));
Gearbox4[7] = (iGE_Sumpftemperatur & (0xFFU));
}

void WBA2_Msg()
{
  WBA2[0] = (0x00 & (0x0FU)) | ((bWBA_Senderkennung & (0x01U)) << 4) | ((bWBA_Lampe_Shift_Lock & (0x01U)) << 5) | ((bWBA_Effizienzmodus & (0x01U)) << 6) | ((bWBA_Kurzzeittipp & (0x01U)) << 7);
  WBA2[1] = (bWBA_Blinken & (0x01U)) | ((iWBA_Getriebevariante & (0x0FU)) << 1) | ((iWBA_GE_Warnung & (0x07U)) << 5);
  WBA2[2] = (iWBA_Fahrstufe & (0x0FU)) | ((iWBA_eing_Gang & (0x0FU)) << 4);
  WBA2[3] = (iWBA_GE_Texte & (0x07U)) | ((bWBA_Schaltschema_Aktiv & (0x01U)) << 3) | ((iWH_Warnung & (0x07U)) << 4) | ((iWBA_GE_Zusatzwarnungen & (0x01U)) << 7);
  WBA2[4] = ((iWBA_GE_Zusatzwarnungen >> 1) & (0x03U)) | ((bWBA_Segeln_aktiv & (0x01U)) << 2) | ((bGE_Tipschaltempf_verfuegbar & (0x01U)) << 3) | ((iGE_Sollgang & (0x0FU)) << 4);
}

void Hybrid1_Msg()
{
  Hybrid1[0] = (0x00 & (0x0FU)) | ((iMO_HYB_IstStatusK0 & (0x03U)) << 4);
  Hybrid1[1] = (dMO_HYB_max_ind_VM_Mom & (0xFFU));
  Hybrid1[2] = ((dMO_HYB_max_ind_VM_Mom >> 8) & (0x03U)) | ((iMO_HYB_Zielzustand & (0x07U)) << 2) | ((iMO_HYB_Startmodus & (0x07U)) << 5);
  Hybrid1[3] = (bMO_HYB_Startmodus_PQ3x & (0x01U)) | ((bMO_HYB_Stoppmodus & (0x01U)) << 1);
  Hybrid1[4] = (dMO_HYB_VM_Mom_oE & (0xFFU));
  Hybrid1[5] = ((dMO_HYB_VM_Mom_oE >> 8) & (0x03U)) | ((bMO_HYB_VM_aktiv & (0x01U)) << 2) | ((bMO_HYB_Schaltverhinderung & (0x01U)) << 3);
}

void Hybrid2_Msg()
{
  Hybrid2[0] = (0x00);
  Hybrid2[1] = ((iMO_HYB_E_Faktor & (0x0FU)) << 4);
  Hybrid2[2] = (dMO_HYB_Drehzahl_VM & (0xFFU));
  Hybrid2[3] = ((dMO_HYB_Drehzahl_VM >> 8) & (0xFFU));
  Hybrid2[4] = (bMO_HYB_LowSpeedModus & (0x01U));
  Hybrid2[5] = (0x00);
  Hybrid2[6] = (0x00);
  Hybrid2[7] = (0x00);
}

void Hybrid3_Msg()
{
  Hybrid3[0] = (iMO_ePowermeter & (0xFFU));
  Hybrid3[1] = (0x00);
  Hybrid3[2] = (iMO_Zust_Antrieb & (0x0FU)) | ((iMO_Zust_Betriebsstrategie & (0x07U)) << 4) | ((bMO_W_Reku_normiert_ueberlauf & (0x01U)) << 7);
  Hybrid3[3] = (iLadezustand & (0xFFU));
  Hybrid3[4] = (iEnrgfluss_State & (0xFFU));
  Hybrid3[5] = (dMO_W_Reku_normiert & (0xFFU));
  Hybrid3[6] = ((dMO_W_Reku_normiert >> 8) & (0x0FU)) | ((dMO_Powermeter_hyb & (0x0FU)) << 4);
  Hybrid3[7] = ((dMO_Powermeter_hyb >> 4) & (0xFFU));
}

void Hybrid4_Msg()
{
  Hybrid4[0] = (0x00 & (0x0FU)) | ((dMO_HV_Spannungsfreiheit & (0x03U)) << 4) | ((dMO_Reku_Leistung & (0x03U)) << 6);
  Hybrid4[1] = ((dMO_Reku_Leistung >> 2) & (0xFFU));
  Hybrid4[2] = (dMo_Powermeter_Grenze & (0xFFU));
  Hybrid4[3] = ((dMo_Powermeter_Grenze >> 8) & (0x0FU)) | ((iMO_Gesamtst_Spgfreiheit & (0x03U)) << 4) | ((iMO_Tankbereitschaft_Status & (0x03U)) << 6);
  Hybrid4[4] = ((iMO_Gesamtst_Spgfreiheit >> 2) & (0x01U));
  Hybrid4[5] = (dMO_Energieinhalt_BMS & (0xFFU));
  Hybrid4[6] = ((dMO_Energieinhalt_BMS >> 8) & (0x0FU)) | ((iMO_HYB_Status_Betriebsstrategie & (0x07U)) << 4) | ((bMO_Boost_aktiv & (0x01U)) << 7);
}
I've tried to map each variable as best as possible with English descriptions:

Code: Select all

//-------------ESP_01---------------//
  float fESP_Speed_Avg = 0.0;
  uint8_t iESP_01_Checksum = 0;
  uint8_t iESP_01_Counter = 0;
  uint8_t iASR_Action_Fast = 0;
  uint8_t iASR_MSR_Action_Fast = 0;
  uint8_t iASR_TransControl = 0; // Signal to Trans on ESP action, 0=None, 1=ASR_Shiftmap, 2=Downshift, 3=DisableShift
  bool bASR_Deactivated = 0; // ASR System Deactivated
  bool bESP_Deactivated = 0; // ESP System Deactivated
  bool bESP_Systemstatus = 0; // ESP System Error
  bool bOBD_Misfire = 0; // OBD Hide Misfire during ESP Torque Management
  bool bOBD_QBit_Failure = 0; // OBD Status Bit
  bool bESP_QBit_v_Signal = 0; // ESP using subsitute values
  bool bABS_Active = 0; // ABS System Active
  bool bASR_Request = 0; // ASR Request
  bool bMSR_Request = 0; // MSR Request
  bool bEBV_Active = 0; // Electronic Brake Force Active
  bool bEDS_Active = 0; // Electric Diff Lock Active
  bool bESP_Active = 0; // ESP Active
  bool bESP_ASPActive = 0; // ESP Stablization Active
  bool bESP_KD_Failure = 0; //KD Failure

//-------------ESP_02---------------//
  uint8_t iESP_02_Checksum = 0;
  uint8_t iESP_02_Counter = 0;
  bool bESP_QBit_YawRate = 0; // Quality bit indicating the Yaw Rate value is bad
  bool bESP_QBit_longitudinalaccel = 0; // Quality bit indicating Longitudinal Acceleration value is bad
  bool bESP_QBit_Querb = 0; // Quality bit indicating Lateral Acceleration value is bad
  bool bESP_standstillflag = 0; // Set when no movement is measured from wheel rotation (Used by Nav,etc)
  float fESP_lateralaccel = 0; // Lateral Accel
  float fESP_longitudinalaccel = 0; // Longitudinal Accel
  float fESP_Roll_Distribution = 0; // -1 to +1 value Indicates Under/Oversteer. Negative = Understeer, 0=neutral, Positive = OversteerUsed by the Active Suspension
  bool bESP_QBit_Anf_Vert_Wank = 0; // Quality bit indicating the Roll Distribution value is bad
  float fESP_yawrate = 0; // Z-Axis Yaw Rate (Only Postive, Use Sign bit to determine +/-)
  bool bESP_VZ_yawrate = 0; // Yaw Rate sign (0=Pos, 1=Neg)
  bool bESP_Emergencybrakedisp = 0; // Emergancy Braking Detected
  bool bESP_VoltageReq = 0; // Increase Voltage to aid braking?

//-------------ESP_03---------------//
  uint8_t iESP_03_Checksum = 0;
  uint8_t iESP_03_Counter = 0;
  bool bESP_FL_FwdRev = 0; // Front Left 0=Forward, 1=Reverse
  bool bESP_FR_FwdRev = 0; // Front Right 0=Forward, 1=Reverse 
  bool bESP_RL_FwdRev = 0; // Rear Left 0=Forward, 1=Reverse
  bool bESP_RR_FwdRev = 0; // Rear Right 0=Forward, 1=Reverse
  float fESP_FL_wheelspeed = 0; // Front Left Speed
  float fESP_FR_wheelspeed = 0; // Front Right Speed
  float fESP_RL_wheelspeed = 0; // Rear Left Speed
  float fESP_RR_wheelspeed = 0; // Rear Right Speed

//-------------ESP_04---------------//
  uint8_t iESP_Messages = 0; //ESP Fault Msg; 0=No Action 1="Autohold" 2="Autohold Distrubance" 3="Hillhold Distrubance" 4="Resume Manual Brake"
  bool bESP_HDC_Light = 0; // Hill Decent Control Light 
  bool bESP_Light = 0; // ESP Light
  bool bABS_Light = 0; // ABS Light
  bool bBK_Light = 0;  // Brake Fault Light
  uint8_t iESP_Acoustics = 0; // Noise Warning for Cluster
  bool bESP_Diagnosis = 0; // ESP Diagnosis in progress - Extend Timeout for msg receivers
  uint8_t iESP_Text_02 = 0; // 0="No Text" 1="ESP Fault" 2="ABS Fault" 3="ESP & ABS Fault" 4="Brake Service Req" 5="ASR Fault" 6="ESP Switched Off" 7="ASR Switched Off" 8="ESP & ASR Active" 9="Hillhold Fault" 10="Loss of Brake Assist" 11="ASR Activated" 12="ABS/ASR Fault" 13="Check Tire Pressure" 14="Autohold Fault" 15="Offroad Mode" 16="Autohold Msg1" 17="ESP Sport" 18="ESP Forced Activation" 19="ESP Button On" 20="Traction Control Active" 21="Exit 22="Traction Control Off" 23="PASM Off"
  bool bESP_Off_Light = 0; // ESP Off Light
  float fESP_m_wheelspeed = 0; // Frequency Value for Wheelspeed (hz)
  bool bESP_ASR_Light = 0; // ASR Light
  uint16_t dESP_spdsense_VA = 0; // Front Axle wheel speed delta (Absolute Value)
  bool bESP_Errorstatus_spdsense = 0; // Wheel Speed Sensor Error
  bool bESP_spdsense_Overflow = 0; // Pulse Meter Calc Overflow
  bool bESP_QBit_spdsense_VA = 0; // Quality bit indicating that at least one of the front wheelspeed values are bad
  uint8_t iESP_Displaywarnings = 0; // 0="" 1="Brake Warning" 2="Exit Warning" 3="Stability Control Warning"
  float fESP_HDC_controlspeed = 0; // HDC Speed Setpoint (km/h)
  bool bESP_BKV_Warning = 0; // Brake Booster Warning to Cluster
  uint8_t iESP_numberofteeth = 0; // Number of teeth on trigger wheel (used for calculation with wheelspeed Frequency value)

//-------------ESP_05---------------//
  uint8_t iESP_05_Checksum = 0;
  uint8_t iESP_05_Counter = 0;
  bool bESP_QBit_brakepressure = 0; // Quality bit indicating that Brake Pressure value is bad
  bool bESP_QBit_brakethreshold = 0; // Quality bit indicating that Brake Threshold value is bad
  uint8_t iESP_threshold_vac = 0; // 0="No Pressure" 1="Vac <= 450mBAR", 2="Vac > 450mBAR", 3="Sensor Error"
  float fESP_brakepressurev = 0; // Brake Pressure (BAR)
  bool bESP_driver_brakes = 0; // Bit set when brake pressure over threshold value indicating active braking
  bool bESP_Verz_TSK_aktiv = 0; // Feedback to the powertrain coordinator/ACC that the ECD deceleration request is currently being implemented
  bool bESP_steeringintervention_ADSv = 0; // In the case of a vehicle-stabilizing steering intervention by the ADS system, ACC/GRA should be deactivated.
  bool bESP_Consistency_TSK = 0; // Error-TSK checksum, the message counter, the long timeout and DLC. Is also set when a deceleration request is greater than an applicable threshold.
  bool bESP_Brakejerk_AWV2 = 0; // The signal serves as a feedback to the ACC that a requested AWV2 brake pressure is carried out. The positive feedback triggers a corresponding driver information in the instrument cluster
  bool bESP_Consistency_AWV2 = 0; // Error-AWV request (ACC control unit) regarding verification of the checksum, the message counter, the long timeout and DLC.
  bool bECD_Error = 0; // ESP cannot execute deceleration control/brake control due to an internal error, with error entry in ESP.
  bool bECD_not_available = 0; // ESP can temporarily not execute the deceleration control/brake control due to on conditions
  bool bESP_Status_BrakeTemp = 0; // ECD brake disc temperature model. Feedback for the sender of an ECD delay request
  bool bESP_Autohold_Standby = 0; // Feedback to EPB that the driver has requested the Autohold function
  bool bESP_HDC_Standby = 0; // HDC function switched on via the HDC button
  bool bESP_HDC_active = 0;  // HDC function Active
  bool bESP_HBA_active = 0; // Hydraulic Brake Assistant has been activated in the controller
  bool bESP_Prefill_triggered = 0; // Prefill Triggered
  bool bESP_reversing_detected = 0; // Indicates Reverse State detected
  bool bESP_Status_Starthilfe = 0; // Hillstart Assist Active
  uint8_t iESP_StartStop_Info = 0; // Start/Stop Info Status
  bool bESP_ESP_act_FL = 0; // ESP Intervention Active for Front Left 
  bool bESP_ESP_act_FR = 0; // ESP Intervention Active for Front Right 
  bool bESP_ESP_act_RL = 0; // ESP Intervention Active for Rear Left
  bool bESP_ESP_act_RR = 0; // ESP Intervention Active for Rear Right 
  float fESP_BKV_vacpressure = 0; // BKV Vac Pressure (mBAR)
  bool bESP_Autohold_active = 0; // Feedback to EPB that Autohold is active
  bool bESP_FStatus_Starthilfe = 0; // Hillhold not available
  bool bESP_Verz_EPB_aktiv = 0; // Delay request is executed by EPB
  bool bECD_brakelight = 0; // Brake Light Control Signal for ECD
  bool bESP_Delay_EPB_verf = 0; //  EPB Delay is available
  bool bESP_Status_Brakepressur = 0; // Indicates Brake Pressure > 2.0 BAR
  uint8_t iESP_requirement_EPB = 0; // EPB Request Signal; 0="No Request" 1="Request On" 2="Request Off" 3="Reserved"

//-------------EBP_01---------------//
  uint8_t iEPB_01_Checksum = 0;
  uint8_t iEPB_01_Counter = 0;
  bool bEPB_QBit_longitudinalaccel = 0; // Quality bit indicating Longitudinal Acceleration value is bad from inclinometer
  bool bEPB_QBit_Clutch_Pos = 0; // Quality bit indicating that Clutch Peddle Position value is bad
  bool bEPB_BCM2_Motor_Wakeup = 0; // Wakeup bit sent to BCM to wakeup ECU
  bool bEPB_Release_Status = 0; // EPB Status - Indicates Released
  float fEPB_Brake_Req = 0; // Control request to other systems (e.g. ESP) to brake while driving, triggered by the handbrake switch (ECD function) (m/s2)
  float fEPB_longitudinalaccel = 0; // Longitudinal acceleration signal (% G-Force) from inclinometer
  float fEPB_Clutch_Pos = 0; // Total travel of clutch pedal 10% to 90%
  bool bEPB_Driveoff_Detect = 0; //  EPB indicates a recognized drive-off request. The signal can be used to inform an SG that requests clamping via CAN (e.g. ESP-SG) that there is a desire to move off and that the EPB wants to release.
  uint8_t iEPB_Error_Status = 0; // EPB Error Status: 0="No Error in EPB - AVH allowed to run from ESP" 3="Error in EPB - AVH is not allowed to be executed by ESP"
  uint8_t iEPB_Switch_Position = 0; // EPB Switch Request Status: 0="No Request" 1="Request Open" 2="Request Close" 3="Error"
  bool bEPB_QBit_switchpos = 0; // Quality bit indicating that the Switch Position value is bad
  bool bEPB_Consistency_ACC = 0; // EPB has detected an error regarding the ACC messages (timeout, BZ, CHK, DLC) 
  uint8_t iEPB_clampingforce = 0; // Clamping force in kN (Whole # Int Value)
  uint8_t iEPB_Status = 0; // Status Value:  0="Brake open" 1="Brake closed" 2="Actuator Moving" 3="Error"
  bool bEPB_KD_Error = 0;

//-------------BEM_01---------------//

//-------------BEM_03---------------//

//-------------Shifter---------------//

  uint8_t iGS_GearLeverPos = 0; // Gear Lever Position on Init
  uint8_t iGS_TipSport = 0; // Tip +/- Sport Postion
  uint8_t iGS_Checksum = 0; // Checksum Value for Plausibilty
  uint8_t iGS_Counter = 0; // Counter Value

//-------------Motor_01---------------//
  uint8_t iMotor_01_Checksum = 0;
  uint8_t iMotor_01_Counter = 0;
  uint16_t dMO_Mom_o_ex = 1021; // Engine Torque w/o external factors
  uint16_t dMO_Mom_m_ex = 1021; // Engine Torque w/o mechanical losses
  uint16_t dMO_Mom_Loss = 1021; // Engine Torque with mechanical losses
  uint16_t dMO_Mom_Limitation = 1021; // Max engine torque
  uint16_t dMO_Mom_driverrequest = 850; // Driver torque request
  bool bMO_Kickdown = 0; // Kickdown Switch
  bool bMO_KD_Error = 0; // Memory Error
//-------------Motor_02---------------//
  uint8_t iMotor_02_Checksum = 0;
  uint8_t iMotor_02_Counter = 0;
  uint16_t dMO_Mom_ZWR = 1021; // Minimum engine torque with ignition angle retard
  uint16_t dMO_Mom_Soll = 1021; // Target torque without P and D component of the idle controller
  uint16_t dMO_Mom_Is = 1021; // Actual torque without P and D component of the idle controller
  bool bMO_Status_CylDeact = 0; // Cylinder deactivation status 1="one or more cyl deactivated"
  bool bMO_Status_Normal = 0; // Status Normal
  bool bMO_StartStop_Status = 0; // Status: 0="Not available" 1="System Available no release" 2="System Available Release OK" 3="System Available at least one release not ready"
  bool bMO_StartStop_Motorstop = 0; // Engine stopped by Hybrid Control
  bool bMO_StartStop_Restart = 0; // Engine restart pending signal
  bool bMO_E_Drive_Active = 0 ; // E-Drive Active
  uint8_t iMO_gearposition = 0; // Gearposition - 0="N" 1-8="Gear#" 13="R"
  uint8_t iMO_StartStop_driverrequest = 0; // 0="init" 1="Disabled" 2="Enabled" 3="Required"
  bool bMO_StartStop_StopReady = 0; // 0="Not Ready", 1="Ready"
  uint8_t iMO_momentintegral = 254; // % Torque Remaining
//-------------Motor_03---------------//
  uint8_t iMotor_03_Checksum = 0;
  uint8_t iMotor_03_Counter = 0;
  bool bMO_QBit_AccPedal_01 = 0; // Quality bit indicating that Accel Peddle Position value is bad
  bool bMO_QBit_Motortorque = 0; // Quality bit indicating that Motor Torque value is bad
  bool bMO_QBit_driverbrakes = 0; // Quality bit indicating that Driver Brake value is bad
  bool bMO_QBit_Speed_01 = 0; // Quality bit indicating that RPM value is bad
  uint16_t dMO_Speed_01 = 0; // RPM (Value is RPM*4)
  bool bMO_in_idle = 0; // Idle Bit
  bool bMO_Interlock = 0; // Clutch/Interlock Switch Pressed
  bool bMO_BLS = 0; // Brake Light Status Signal
  bool bMO_driver_brakes = 0; // Bit indicating braking by Driver 
  bool bMO_Consistency_Brakeped = 0; // Brake Peddle Consistancy fault
  bool bMO_clutch_switch = 0; // Clutch Switch Pressed
  bool bMO_Timeout_ESP = 0; // ESP CAN Timeout alarm
  bool bMO_Motor_runs = 0; // Motor Run Status
  uint8_t iMO_set_speed_idle = 0; // Target Idle Speed
  uint8_t iMO_Accelpedal_raw_01 = 0; // Accel Peddle % Value
  bool bMO_first_inaccuratelim = 0; // Engine Torque Inaccuracy bit 1="> 8%"
  bool bMO_QBit_stressfactor = 0; // Quality bit indicating that Stressfactor value is bad
  uint8_t iMO_stressfactor = 62; // Current motor Reserve 0="No Torque Remaining" 100="Full Torque Available"
//-------------Motor_04---------------//
  uint8_t iMotor_04_Checksum = 0;
  uint8_t iMotor_04_Counter = 0;
  uint8_t iWBA_CurrentGear = 0; // Current Gear
  uint8_t iWBA_TargetGear = 0; // Target Gear
  bool bMO_Emode = 0; // Eco-Mode toggle
  uint8_t iMO_oilpressure = 0; // Oil Pressure
  uint16_t dMO_displayspeed = 0; // RPM
  bool bWBA_ShiftSugg_Available = 0; // Indicates if Shift Suggestions are enabled
  uint16_t dMO_boostpressure = 0; // Boost Pressure
  uint16_t dMO_KVS = 0; // Fuel Consumption (microL) Used to calculate fuel consumption on cluster
  bool bMO_KVS_Overflow = 0; // Calc Overflow 
//-------------Motor_05---------------//
  uint8_t iMotor_05_Checksum = 0;
  uint8_t iMotor_05_Counter = 0;
    // Likely all of the below can be set to static for now
  uint8_t iMO_AC_Pwr_reduce = 0; // Air conditioning compressor power reduction (Just set to 0=100%) 1="75%" 2="50%" 3="25%"
  uint8_t iMO_Freig_Reku = 0; // Motor Generator/Alternator Voltage Output Increase value 0="Generaton Off" 1="Boost Voltage" 2="Reduce Voltage" 3="Generation on"
  uint8_t iMO_Klima_Eingr = 0; // AC Compressor Intervention, 0="No Intervention" 1="Compressor Off" 2="Compressor Power Reduction" 3="Switch Off - Overheat"
  bool bMO_PwrReduct = 0; // Motor Power Reduction Active
  bool bMO_PartFiltRegen = 0; // Particle Filter Regeneration Active
  bool bMO_MinMotorSpd_Priorty = 0; // Priorty of the engine speed 1="force"
  bool bMO_Freig_Anlass = 0; // Auto Start Allowed
  bool bMO_Aussp_Anlass = 0; // Starter Disengage signal (Motor Speed stable after start)
  uint16_t bMO_MAX_desiredspeed = 0; //
  bool bMO_MAXMotorSpd_Priorty = 0; // Priorty of the engine speed 1="force"
  bool bMO_Luftpfad_aktiv = 0; // Method of controlling engine speed 0="Ign Cut Only" 1="Air&Ign"
  bool bMO_v_Begrenz_Aktiv = 0; // Speed Limitation active
  bool bMO_v_Begrenz_Aktivierbar = 0; // Speed Limitation can be activated
  bool bMO_Verbot_EKP = 0; // MSG sends prohibition of EKP activation to the BCM
  bool bMO_Anf_Pruefimpuls = 0; // Request from the MSG to the BCM to send a test pulse to diagnose the wake-up line on permanent low
  bool bMO_Anf_KL75 = 0; // KL75 Switch off/on
  bool bMO_Handshake_STH = 0; // Aux Heating Request
  uint8_t MO_Charisma_FahrPr = 0; // Current Driving Program
  uint8_t MO_Charisma_Status = 0; // Driving Program Status
  uint8_t MO_Charisma_Umschaltung = 0; // Driving mode start/stop Status
  uint8_t MO_MIN_desiredspeed = 0; //
  bool MO_MinMotorSpd_Priorty = 0; // Priorty of the engine speed 1="force"
  uint8_t MO_Drehzahlbeeinflussung = 0; // Engine speed trim % for CVT
//-------------Motor_06---------------//
  uint8_t iMotor_06_Checksum = 0;
  uint8_t iMotor_06_Counter = 0;
  bool bMO_Kuehlerluefter_MUX = 0; // Mux value for cooling fan PWM
  uint8_t iMO_coolerfan_1 = 0; // Activation duty cycle (PWM) of the cooler fan 1
  uint8_t iMO_coolerfan_2 = 0; // Activation duty cycle (PWM) of the cooler fan 2
  uint8_t iMO_HYB_Status_HV_Ladung = 0; // 0="HV charge_not_necessary" 1="HV charge_necessary_approvals_required" 2="HV charge running" 3="HV charge_successful_engine start_possible" 4="HV_charge_aborted" ;
  bool bMO_ITM_Warnung_Pumpe = 0; // Text display: 'Switch off engine immediately, switched water pump defective / jammed'
  uint8_t iWIV_Display_active = 0; // Dipstick display function active
  bool bWIV_OilLevel_Warn = 0; // Signal indicates when the oil level has fallen below the minimum threshold
  bool bWIV_sensorerror = 0; // Faulty oil level/oil temperature (TOG) sensor
  bool bWIV_Slope = 0; // "Vehicle is not level, measurement inaccurate"
  uint8_t iWIV_OilLevel = 7; // 8 segments of the oil level
  uint8_t iMO_Status_HWP = 0; // Main Water pump status to HVAC unit - Set to '2' to indicate water pump is pumping
  bool bMO_Kat_Warnung = 0; // The signal turns on a warning lamp in the instrument cluster to indicate that the catalytic converter is overheating
  bool bMO_Vorglueh_Lampe = 0; // Glow Plug Light
  uint8_t iMO_TankFlapControl = 0; // Controls the tank flap lock - Init_no_action unlock_tank_flap lock_tank_flap
  bool bWIV_OilSystem_aktiv = 0; // Displays the oil system measurement menu
  bool bWIV_not_operating = 0; // "Engine not warm, measurement inaccurate"
  bool bWIV_Overfill_Warn = 0; // "Oil level has exceeded the overfill threshold"
  bool bWIV_running_engine = 0; // "Measurement not possible with the engine running"
  bool bMO_HYB_Text_1 = 0; // "Hybrid system error please stop vehicle in a safe place"
  bool bMO_HYB_Text_2 = 0; // "Error hybrid system please visit workshop"
  bool bMO_HYB_Text_3 = 0; // "Please restart engine"
  bool bMO_HYB_Text_4 = 0; // "E-mode interrupted"
  uint8_t iMO_Text_Motorstart = 0; // no_display engine_in_stop_mode StartStopp_deactivated_for safety reasons System_demands_restart Engine running_necessary Unwanted_engine standstill Engine_starts Clutch_actuated Selector_lever_in_PN_position Brake_press
  bool bMO_HYB_Text_5 = 0; // "Hybrid functions not available"
  bool bMO_HYB_Text_6 = 0; // "Electric driving is currently not possible"
  bool bMO_HYB_Text_7 = 0; // "Traction battery is being charged, please do not switch off the engine"
  bool bWIV_Oeldyn_avl = 0; // Oil level measurement available
  bool bMO_Text_MSG_Workshop = 0; // "Engine Service Required"
  bool bMO_Text_ParticleFilter_Regen = 0; // "Particulate filter requires regeneration"
  bool bMO_Text_Error_Fuelsys = 0; // "Error in the fuel system"
  uint8_t iWIV_OilQuantity = 0; // Oil Volume between Min and Max
  bool bMO_System_Light = 0; // EGas/Preheating light
  bool bMO_OBD2_Light = 0; // Sets MIL light
  bool bMO_TempHot_Light = 0; // Sets Hot Coolant Light
  bool bMO_Particle_Light = 0; // Sets Particle Filter Light
  bool bMON_Winter_Mode = 0; // Sets winter mode
  bool bWIV_OilLevel_not_avail = 0; // Sets the Oil Level not Available message
  bool bWIV_Refill_indicator = 0; // Refill Indicator disable
  bool bWIV_Overfill_deactiv = 0; // Deactivates the overfill warnig 
  bool bWIV_Underfill_Warn = 0; // Oil level Low
  bool bMO_FuelCap_Light = 0; // Fuel Cap Light in Cluster
  bool bMO_Text_Fuelcap_warn = 0; // Fuel Cap warning in Cluster
  bool bWIV_Ena_Oilpress_Motor = 0; // Switches off the cluster internal oil calc and uses the WIV_OilPress_Warn
  bool bWIV_OilPress_Warn = 0; // Low Oil Pressure
  uint8_t iMO_Avus_Motorschutz = 0; // Speed Warnings 0="No Warning" 1="Speed Level 1" 2="Speed Level 2" 3="Speed Level 3"
  bool bMO_HYB_Ready = 1; // Sets hybrid mode ready - Signal to Cluster for GreenMode

//-------------Motor_07---------------//
  uint8_t iMotor_07_Checksum = 0;
  uint8_t iMotor_07_Counter = 0;
  bool bMO_QBit_Intake_Air_Temp = 0; // Quality bit indicating that Intake Air Temp value is bad
  bool bMO_QBit_Oil_Temp = 0; // Quality bit indicating that Oil Temp value is bad
  bool bMO_QBit_Coolant_Temp = 0; // Quality bit indicating that Coolant Temp value is bad
  bool bMO_test_soundactuator = 0; // External Speaker Actuator Test
  bool bMO_HYB_Error_HV_Net = 0; // DC-DC converter fault for Hybrid (Set to 0)
  bool bMO_active_gearboxheating = 0; // Information for the gearbox as to whether a valve for gearbox heating must be activated
  uint8_t iMO_shutoff_valve_open = 0; // Air conditioning valve control status: not_available control_valve_permissible valve_open valve_close
  uint8_t iMO_Intake_Air_Temp = 0; // Intake Air Temp (sent to cluster for outside air temp if not equipped)
  uint8_t iMO_Oil_Temp = 0; // Oil Temp
  uint8_t iMO_Coolant_Temp = 0; // Coolant Temp
  uint8_t iMO_Elevation = 0; // Correction factor altitude (1 corresponds to 1013 mbar)
  bool bMO_map = 0; // KMTR map cooling equipped? = Set to 0
  uint8_t iMO_CANversioninfo = 0; // Either 0 or 1, likely 0 on first scan, then 1 to indicate Motor03@10ms
  bool bMO_Trans_Cooling = 0; // Transmission cooling valve activation
  uint8_t iMO_Mom_Inertia_02 = 0; // Mass inertia of the motor (J) in kgm²
  uint8_t iMO_heatingPumpCtrl = 0; // 0-100% heating pump control
  bool bMO_VoltageReq = 0; // Request for voltage increase
  uint8_t iMO_Runtime_heaterpump = 0; // Time to run Pump for Turbocharger cooldown

//-------------Motor_09---------------//
//Motor09 has a MUX code for the engine type; So Just copying my existing 4 Can Messages to Mimic - No Checksum either
//-------------Motor_10---------------//
  uint8_t iMotor_10_Checksum = 0;
  uint8_t iMotor_10_Counter = 0;
  bool bMO_Sig_Accelpedal = 0; // Accelpedal Ramp Rate Sign (0= Positive, 1= Negative)
  bool bMO_BKV_lowpress_warn = 0; // Warning indicating that there is not enough vacuum for the Brake Booster (Set to 0 for OK)
  uint8_t iMO_cylinderdeact = 0; // Engine cylinder deactivation status
  uint8_t iMO_accelpedal = 0; // Accel Pedal Ramp Rate (%/Sec)
  bool bMO_overruncutoff = 0; // ESP checks the vacuum sensor for plausibility only when fuel cut-off is active
  uint8_t iMO_rel_intake_pressure = 0; // Intake vacuum pressure
  bool bMO_rel_intakepipepressure = 0; // (Set to 1) 0= Modeled, 1= Taken from Intake
  uint8_t iMO_BKV_Vacpressure = 0; // Brake Vac Pressure (The maximum value is limited to 1012 mbar)
  uint8_t iMO_BKV_PedalPos = 0; // Brake Pedal Position
  uint16_t dMO_Mom_Traegheit_Summe_ro = 0; // Motor inerta +/- Torque
  uint8_t iMO_ANC_Kennfeld_Anf = 0; // ANC Map Switching

//-------------Motor_13---------------//
  uint8_t iMotor_13_Checksum = 0;
  uint8_t iMotor_13_Counter = 0;
  uint16_t dMO_Praed_Mom = 0; // Predicted Engine Torque
  uint8_t iMO_VirtFahrpedal_TStatACC = 0; // Cruise Control 'Virtual' Pedal position
  bool bMO_TankEntl_Diag_Aktiv = 0; // Tank Vent Diagnostics Active, 1 = Active
  bool bMO_Katheizen_Aktiv = 0; // Converter Heating Status, 1 = Heating
  bool bMO_St_Leerlauf_Adapt = 0; // Idle Adaption status, 1="Complete"
  bool bMO_Sportstart = 0; // Sport Mode Status to BCM2
  uint8_t iMO_Kuehlw_Volumenstrom = 0; // Cooling Water Flow status
  uint16_t dMO_Dyn_Mom = 0; // Dynamic Motor Torque

//-------------Motor_15---------------//
  uint8_t iMotor_15_Checksum = 0;
  uint8_t iMotor_15_Counter = 0;
  uint16_t dMO_Powermeter = 0; // Powermeter value The initial value (4093) is permanently output for non-hybrid vehicles.
  bool bMO_ExhaustFlap = 0; // Exhaust Flap Open (to BEM)
  bool bMO_Led_ExhaustFlap = 0; // Exhaust Flap LED On
  bool bMO_EngBayHot = 0; // Engine Bay Hot - Cluster Message & Light illuminated
  uint8_t iMO_EngBayTemp = 0; // Temperature in the engine compartment in °C to the BCM2
  bool bMO_Gearsuggest = 0; // Upshift Arrow shown in Cluster
  bool bMO_GearEco = 0; // ECO Upshift Arrow shown in Cluster
  uint8_t iMO_PDKtemp = 0; // PDK Oil Temp

//-------------TSK_03---------------//
  uint8_t iTSK_03_Checksum = 0;
  uint8_t iTSK_03_Counter = 0;
  uint16_t dFAS_Wunschgeschw = 0; // FAS Desired Speed Shown in Cluster
  uint8_t iFAS_Status_Prim_Anz = 0; // ACC Icon display: 0="No Display" 1="Green"=Active
  uint8_t iFAS_Primaeranz = 0; // Text for Cluster (There's a ton, Need to transpose)
  uint8_t iFAS_Status_Anz = 0; // Special Status Display (Not used, but a few different types)

//-------------TSK_04---------------//
  uint8_t iTSK_04_Checksum = 0;
  uint8_t iTSK_04_Counter = 0;
  uint8_t iTSK_zul_Regelabw = 0; // Request permissible control deviation between ECU and Transmission
  uint8_t iTSK_ax_Getriebe = 0; // Acceleration request for the gearbox
  uint16_t dTSK_Wunsch_Uebersetz = 0; // With ACC/GRA operation downhill, the TSK tells the transmission that an increase in speed is desired in order to have more drag torque and thus connected to create the necessary deceleration to keep the speed constant
  bool bTSK_Freig_WU = 0; // Approval of the TSK translation request
  bool bTSK_Limiter_aktiv = 0; // The information as to whether the maximum speed limiter is active
  uint8_t iTSK_Status_GRA_ACC_02 = 0; // ACC Status

//-------------TSK_05---------------//
  uint8_t iTSK_05_Checksum = 0;
  uint8_t iTSK_05_Counter = 0;
  bool bTSK_QBit_Steigung = 0; // Road Gradient QBit
  uint8_t iTSK_Status_GRA_ACC_01 = 0; // ACC Status
  uint8_t iTSK_Fahrzeugmasse = 0; // Vehicle mass (kg)
  uint8_t iTSK_Fahrzeugmasse_02 = 0; // Vehicle mass (kg)
  bool bTSK_QBit_Fahrzeugmasse = 0; // QBit for mass
  uint8_t iTSK_Steigung = 0; // Road gradient (%)
  uint8_t iTSK_Getriebeinfo = 0; // Gearbox Type: 0="Manual" 1="Auto" 2="PDK" 3="CVT"
  bool bTSK_Codierung_ACC = 0; // ACC Coding check - 0="No ACC Coded" 1="ACC Coded"
  bool bTSK_Zwangszuschaltung_ESP = 0; // Force ESP on (or prevent it from being disabled) 0="No force" 1="Force On & Prevent Disable"
  bool bTSK_Freig_Verzoeg_Anf = 0; // Decel Release Request Status; 0="Decel Request Not Released" 1="Decel Request Released"
  uint8_t iTSK_Verzoeg_Anf = 0;// Decel Request to Brake (m/s2)

//-------------Getriebe_01---------------//
  uint8_t iGetriebe_01_Checksum = 0;
  uint8_t iGetriebe_01_Counter = 0;
  bool bGE_Schaltvorgang = 0; // Signals Gear Change Active
  uint8_t iGE_Status_Kupplung = 0; // Clutch Position (0 when in reverse); 0="clutch open" 1="Clutch Modulating" 2="Clutch Closed" 3="Error"
  bool bGE_Verbot_Ausblendung = 0; // Fuel Cut for Smooth Shifts (Set to 0); 0="disabled" 1="enabled"
  uint16_t dGE_MMom_Soll = 0; // Gearbox Request Additional Motor Torque (Set to 1022 for no action)
  uint8_t iGE_MMom_Status = 0; // Motor Torque Setpoint Status (Set to 0 for no torque request)
  bool bGE_Freig_Mmom_Soll = 0; // Set if Torque Request is active 
  uint16_t dGE_MMom_Vorhalt = 0; // Torque Reserve
  bool bGE_Freig_MMom_Vorhalt = 0; // Torque Lead Gear Intervention (Set to 0 to be disabled)

//-------------Getriebe_02---------------//

  uint8_t iGetriebe_02_Checksum = 0;
  uint8_t iGetriebe_02_Counter = 0;
// All of these values can be set to a fixed value to simplify CAN
  uint8_t iGE_Anf_Zylabsch = 0; // Cyl Deactivation; 0="Switching Allowed" 1="Prohibited" 2="Error" 3="VHB Recommended"
  uint8_t iGE_Synchro_Zeit = 0; // sync time
  uint8_t iGE_Mom_Begr_Gradient = 0; // Gradient limitation
  uint8_t iGE_Anheb_Solldrehz_Leerlauf = 0; // Target Idle Speed
  uint16_t dGE_Vorsteuermoment = 0; // Pre-Control Torque
  bool bGE_Drehzahlmesser_Daempfung = 0; // Rev Counter Damping display (0="Normal" 1="Dynamic")... I assume 1=Less Dampening
  bool bGE_Schubabschalt_Unt = 0; // Fuel cutoff support (Set to 1)
  uint8_t iGE_HYB_DZ_Eingriff = 0; // Hybrid Speed intervention; 0="None" 1="Slip Start" 2="Low Speed Mode"

//-------------Getriebe_03---------------//
  uint8_t iGetriebe_03_Checksum = 0;
  uint8_t iGetriebe_03_Counter = 0;
  bool bGE_Freig_Langfr_Schutzmom = 0; // Long Term Torque Release Status
  uint16_t dGE_Uefkt = 1000; // Transmission Speed Ratio (%)
  uint8_t iGE_Zielgang = 0; // Gear Display Value 
  uint8_t iGE_StartStop_Info = 0; // Start Stop Availability signal
  uint16_t dGE_Langfr_Schutzmom = 1021; // Torque Limitation (init=1022)
  bool bGE_Performance_Start_LB = 0; // Launch Control Ready Status
  uint8_t iGE_Waehlhebel = 0; // PRNDS Position; 0=Intermediate Pos, 1=Init, 5="Park" 6="Reverse" 7="Neutral" 8="Drive" 9="Sport" 10="Eco" 11="Sport+" 12="Tip Sport+" 13="Tip Sport" 14="TipDrive" 15="Error"
  uint16_t dGE_Eingangsdrehz = 0; // Value for Load Impact behavour - Init=16382, 
  bool bGE_Notlauf = 0; // Gearbox Fault
  bool bGE_Codierung_MSG = 0; // Gearbox Code Error

//-------------Getriebe_04---------------//
  uint8_t iGE_Index_Fahrwid = 0; // Normalized % Grade
  uint8_t iGE_Heizwunsch = 0; // Heating valve demand status (Set to 1 for no heat demand)
  bool bGE_OBD_Status = 0; // MIL Light - ECU sends signal to cluster (forwarded from gbx to ecu to cluster)
  bool bGE_LFR_Adaption = 0; // Fuel Adaption, set to 0="Suitable for Adaption"
  uint8_t iGE_OBD_AbsperrVent = 0; // Cooling valve status for Gearbox
  bool bGE_Freigabe_Verfallsinfo_WFS = 0; // Immo Auth Key Loss (Set to 0 for no loss)
  uint8_t iGE_Grenzkriechmoment = 0; // Creep Limit Torque
  uint8_t iGE_Verlustmoment = 0;// Gearbox Calculated Torque Loss
  uint16_t dGE_amax_moeglich = 0; // Max Accel Value in Current Gear
  uint8_t iGE_Sumpftemperatur = 0; // Transmission Sump Temp

//-------------Getriebe_07---------------//
  uint8_t iGetriebe_07_Checksum = 0;
  uint8_t iGetriebe_07_Counter = 0;
  bool bGE_Kuehlw_Absperrventil = 0; // Open PDK Clutch Cooling Water Valve Close Request
  bool bGE_Kuehlw_Absperrventil_2 = 0;  // Open PDK Gear Cooling Water Valve Close Request
  bool bGE_Akt_Mom_Reserve = 0; // Torque Reserve active - in neutral
  bool bGE_Freig_Drehzahllimit = 0; // Speed limitation active
  bool bGE_Freigabe_Synchro_PAG = 0; // Relase of the speed limitation
  uint8_t iGE_Getriebestatus = 0; // Gearbox Status; 0="inactive" 1="Race start preparation" 2="start up" 3="Creep" 4="wheel slip" 5="Approach wrong rolling direction" 6="Creeping wrong roll direction" 7="Race start active" 8="Comfort approach" 9="Wrong rolling direction comfort approach" 10="Req. LL control normal approach" 11="Req. LL regulation comfort start" 12="Sailing active" 13="Start delay request" 14="clutch torque gear lowered" 15="error"
  uint16_t dGE_Synchro_Wunschdrehz_PAG = 0; // Downshift Engine Requested Speed  
  uint16_t dGE_Kupplungsmoment = 0; // Clutch Take Up Torque

//-------------WBA_02---------------//
  uint8_t iWBA_02_Checksum = 0;
  uint8_t iWBA_02_Counter = 0;
  bool bWBA_Senderkennung = 0; // Multiplex Signal (Set to 0 to mimic signals from Gearbox)
  bool bWBA_Lampe_Shift_Lock = 0; // Cluster shows: 'To engage a gear, please press the brake'
  bool bWBA_Effizienzmodus = 0; // 'Eco' driving program 'D' is replaced by 'E'
  bool bWBA_Kurzzeittipp = 0; // Short Term Jog Mode
  bool bWBA_Blinken = 0; // Control Error Lamp and Flash Cluster Display
  uint8_t iWBA_Getriebevariante = 0; // Gearbox Type - PDK uses 8="2x3shiftbywire"
  uint8_t iWBA_GE_Warnung = 0; // 0="No Text" 1="Continue driving (+ yellow gearbox error symbol)" 2="Continuation only possible to a limited extent (+ yellow gearbox error symbol)" 3="only DL transmission: further travel only possible to a limited extent. No reverse gear" 4="Re-registration_procedure_operate_the_brake" 7="Performance_Start_possible"
  uint8_t iWBA_Fahrstufe = 0; // Auto Gear Position 0="intermediate position" 1="Gear"
  uint8_t iWBA_eing_Gang = 0; // Gear: 0="None Selected" 1="Init" 2="1" 3="2"... 10="9"
  uint8_t iWBA_GE_Texte = 0; // 0="No Text" 1="To engage a gear, please press the brake" 2="For R/N/D press the brake and start engine" 3="Risk of Rolling - Not In Park" 4="Caution Timeout_P_is_inserted" 5="Re-registration_procedure_operate_the_brake" 6="P_only_at_standstill_possible" 7="Race start_active"
  bool bWBA_Schaltschema_Aktiv = 0; // Transmission request to display the shift pattern in the cluster
  uint8_t iWH_Warnung = 0; // Cluster shows: 'Selector lever error, gear change possible (yellow gear symbol)''
  uint8_t iWBA_GE_Zusatzwarnungen = 0; // 0="No Text" 1="Transmission overheating warning level I" 2="Transmission overheating warning level II" 3="Transmission error Please stop and shift to P"
  bool bWBA_Segeln_aktiv = 0; // Transmission Coast Mode?
  bool bGE_Tipschaltempf_verfuegbar = 0; // Signaling whether or not an upshift recommendation is available in tip mode.
  uint8_t iGE_Sollgang = 0; // Suggested Next Gear

//-------------Hybrid_01---------------//
  uint8_t iHybrid_01_Checksum = 0;
  uint8_t iHybrid_01_Counter = 0;
  uint8_t iMO_HYB_IstStatusK0 = 0;
  uint16_t dMO_HYB_max_ind_VM_Mom = 0;
  uint8_t iMO_HYB_Zielzustand = 0;
  uint8_t iMO_HYB_Startmodus = 0;
  bool bMO_HYB_Startmodus_PQ3x = 0;
  bool bMO_HYB_Stoppmodus = 0;
  uint16_t dMO_HYB_VM_Mom_oE = 0;
  bool bMO_HYB_VM_aktiv = 0;
  bool bMO_HYB_Schaltverhinderung = 0;

//-------------Hybrid_02---------------//
  uint8_t iMO_HYB_E_Faktor = 0; 
  uint16_t dMO_HYB_Drehzahl_VM = 0;
  bool bMO_HYB_LowSpeedModus = 0;

//-------------Hybrid_03---------------//
    //No Checksum
  uint8_t iMO_ePowermeter = 0; // ePowermeter display (driving reserve electric until the combustion engine starts (combustion engine starts at 100%))
  uint8_t iMO_Zust_Antrieb = 0; // State for Range Calculation; 0="Gas Only" 1="EV Only" 2="Gas&EV" 3="Regen"
  uint8_t iMO_Zust_Betriebsstrategie = 0; // Signals the current status of the operating strategy; 0="No Hybrid" 1="Depleating" 2="Soft-Depleating" 3="Sustaining" 4="Increasing" 5="Fremdgesteuert"
  bool bMO_W_Reku_normiert_ueberlauf = 0; // Motor control unit internal regen meter overflow, which is evaluated by the Cluster to record the Regen work/performance.
  uint8_t iLadezustand = 0; // Battery Charge Level
  uint8_t iEnrgfluss_State = 0; // Energy flow between the axles, battery, electric motor and combustion engine (Create Lookup)
  uint16_t dMO_W_Reku_normiert = 0; // Motor control unit internal regen meter, which is evaluated by the cluster to record the regen work/performance.
  uint16_t dMO_Powermeter_hyb = 0; // Display values in the cluster 0="Lower end brakes/grey" 340="Lower end CHARGE" 1020="READY" 1870="Upper end EFFICIENCY" 3400="100%" 4080="MAX"

//-------------Hybrid_04---------------//
  uint8_t iHybrid_04_Checksum = 0;
  uint8_t iHybrid_04_Counter = 0;
  uint16_t dMO_HV_Spannungsfreiheit = 0; // HV System Status; 0="Energized" 3="De-energized"
  uint16_t dMO_Reku_Leistung = 0; // Regen Power
  uint16_t dMo_Powermeter_Grenze = 0; // Available power meter reading for Cluster
  uint8_t iMO_Gesamtst_Spgfreiheit = 0; // HV system Status; 0="Init" 1="HV De-energized" 2="HV Energized" 3="Error"
  uint8_t iMO_Tankbereitschaft_Status = 0; // 
  uint16_t dMO_Energieinhalt_BMS = 0; // Energy content of the traction battery
  uint8_t iMO_HYB_Status_Betriebsstrategie = 0; // Hybrid Status; 0="Off" 1="Active"
  bool bMO_Boost_aktiv = 0; // Boost Mode for Powermeter

//-------------NMH_Motor---------------// 0x6C1
  bool bNMH_MO_Start_1 = 0; // 0->1 signals Sleep -> Start
  bool bNMH_MO_Start_2 = 0; // 0->1 signals PrepareToSleep -> Start
  bool bNMH_MO_Normal_Mode_1 = 0; // 0->1 signals Start -> Normal
  bool bNMH_MO_Normal_Mode_2 = 0; // 0->1 signals ReadyToSleep -> Normal
  bool bNMH_MO_Car_WakeUp = 0; // 0="not implemented"
  uint8_t iNMH_MO_Per_WakeUp = 0; // 0="not implemented" 1="CAN wakeup" 2="I/O wakeup" 3="woken up via terminal 15" 4="wakeup pin"
  uint8_t iNMH_MO_Fkt_WakeUp = 0; // 0="When accessory wake"
  bool bNMH_MO_NM_aktiv_Klemme_15 = 0; // Terminal 15 on
  bool bNMH_MO_NM_aktiv_Diagnose = 0; // Diagnosis at terminal 15 off
  bool bNMH_MO_NM_aktiv_Start = 0; // Minimum active time state 'Start'
  bool bNMH_MO_NM_aktiv_EKP_Vorlauf = 0; // EKP pre-run
  bool bNMH_MO_NM_aktiv_STH_Betrieb = 0; // STH operation
  bool bNMH_MO_NM_aktiv_HV = 0; // Shutdown HV system
  bool bNMH_MO_kein_NL = 0; // no local / SG internal lag before wakeup
  bool bNMH_MO_NL_Kuehlerluefter = 0; // Radiator fan control / auxiliary water pump (local / SG internal run-on before wakeup)
  bool bNMH_MO_NL_Diagnose = 0; // Diagnostic functions (local / SG internal run-on before wakeup)
  bool bNMH_MO_NL_WFS = 0; // Immobilizer (local / SG internal run-on before wakeup)
  bool bNMH_MO_NL_EEPROM = 0; // EEPROM access RAM/ROM tests (local / SG internal run-on before wakeup)
  bool bNMH_MO_NL_Sonstige = 0; // Other local / SG internal post-runs before wakeup
  bool bNM_MO_01_NM_aktiv_Betankung = 0; // refueling pressure tank
  bool bNM_MO_Signalfehler = 0; // When saving a CAN signal error, this must be displayed at least once in the NM message.
  bool bNMH_MO_TimeOut_Fehler = 0; // Active timeout error memory entry
  bool bNMH_MO_CAN_Diag_deaktiv = 0; // CAN bus-related self-diagnosis deactivated
  bool bNMH_MO_KompSchutz = 0; // Function restriction due to component protection active
  bool bNMH_MO_Mute_Mode = 0; // Functional restriction due to mute mode active
  bool bNMH_MO_Transport_Mode = 0; // Function restriction due to transport mode active
  bool bNMH_MO_Abschaltstufe_aktiv = 0; // Function switch-off due to switch-off switching stage
  bool bNMH_MO_Eindraht_Fehler = 0; // Single-wire fault detection
  bool bNMH_MO_Lokalaktiv = 0; //Indicates whether the SG was still active after terminal 15 was OFF and after the corresponding MAX active time
  bool bNMH_MO_Subsystemaktiv = 0; // Indicates whether a subsystem of the SG was still active after terminal 15 was OFF and after a corresponding MAX active time

//-------------NMH_Gearbox---------------// 0x6C2

  bool bNMH_GE_Start_1 = 0; // 0->1 signals Sleep -> Start
  bool bNMH_GE_Start_2 = 0; // 0->1 signals PrepareToSleep -> Start
  bool bNMH_GE_Normal_Mode_1 = 0; // 0->1 signals Start -> Normal
  bool bNMH_GE_Normal_Mode_2 = 0; // 0->1 signals ReadyToSleep -> Normal
  bool bNMH_GE_Car_WakeUp = 0; // 0="not implemented"
  uint8_t iNMH_GE_Per_WakeUp = 0; // 0="not implemented" 1="CAN wakeup" 2="I/O wakeup" 3="woken up via terminal 15" 4="wakeup pin"
  uint8_t iNMH_GE_Fkt_WakeUp = 0; // 0="When accessory wake"
  bool bNMH_GE_NM_aktiv_Klemme_15 = 0; // Terminal 15 on
  bool bNMH_GE_NM_aktiv_Diagnose = 0; // Diagnosis at terminal 15 off
  bool bNMH_GE_NM_aktiv_Start = 0; // Minimum active time state 'Start'
  bool bNMH_GE_N_Haltephase = 0;  // Active if immobilizer after-running before CAN wakeup is active - AL gearbox only
  bool bNMH_GE_Positionsanzeige = 0;  // Display of gear in cluster; 0="Disabled" 1="Enabled"
  bool bNMH_GE_kein_NL = 0; // no local / SG internal lag before wakeup
  bool bNMH_GE_NL_Daten_EEPROM = 0; // EEPROM Save Active (local / SG internal run-on before wakeup)
  bool bNMH_GE_NL_Drucksens = 0; // Active if Gbx Pressure sensors are showing pressure before CAN wakeup
  bool bNMH_GE_NL_Abtrieb = 0; // Active if Gbx speed sensor is showing moving before CAN wakeup
  bool bNMH_GE_NL_Waehlhebel = 0;  // Active if lever is not in P or N before CAN wake-up - AL gearbox only
  bool bNMH_GE_NL_Wegfahrsperre = 0;  // Active if immobilizer after-running before CAN wakeup is active - AL gearbox only
  bool bNM_GE_Signalfehler = 0; // When saving a CAN signal error, this must be displayed at least once in the NM message.
  bool bNMH_GE_TimeOut_Fehler = 0; // Active timeout error memory entry
  bool bNMH_GE_CAN_Diag_deaktivv = 0; // CAN bus-related self-diagnosis deactivated
  bool bNMH_GE_KompSchutz = 0; // Function restriction due to component protection active
  bool bNMH_GE_Mute_Mode = 0; // Functional restriction due to mute mode active
  bool bNMH_GE_Transport_Mode = 0; // Function restriction due to transport mode active
  bool bNMH_GE_Abschaltstufe_aktiv = 0; // Function switch-off due to switch-off switching stage
  bool bNMH_GE_Eindraht_Fehler = 0; // Single-wire fault detection
  bool bNMH_GE_Lokalaktiv = 0; //Indicates whether the SG was still active after terminal 15 was OFF and after the corresponding MAX active time
  bool bNMH_GE_Subsystemaktiv = 0; // Indicates whether a subsystem of the SG was still active after terminal 15 was OFF and after a corresponding MAX active time
  bool bNMH_GSG_Subbusaktiv = 0; // Indicates if a SubBus is active
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Finally here's an example of my 10ms output loop along with the XORID checksum scheme used for all of the canbus messages:

Code: Select all

void CANout10()
{
    msg.id = 0x080;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Motor1[0]);
    msg.buf[2] = Motor1[1];
    msg.buf[3] = Motor1[2];
    msg.buf[4] = Motor1[3];
    msg.buf[5] = Motor1[4];
    msg.buf[6] = Motor1[5];
    msg.buf[7] = Motor1[6];
    msg.buf[0] = 0x80 ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);

    msg.id = 0x081;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Motor2[0] );
    msg.buf[2] = Motor2[1];
    msg.buf[3] = Motor2[2];
    msg.buf[4] = Motor2[3];
    msg.buf[5] = Motor2[4];
    msg.buf[6] = Motor2[5];
    msg.buf[7] = Motor2[6];
    msg.buf[0] = 0x81 ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);

    msg.id = 0x105;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Motor3[0] );
    msg.buf[2] = Motor3[1];
    msg.buf[3] = Motor3[2];
    msg.buf[4] = Motor3[3];
    msg.buf[5] = Motor3[4];
    msg.buf[6] = Motor3[5];
    msg.buf[7] = Motor3[6];
    msg.buf[0] = 0x04 ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];

    Can1.write(msg);

    msg.id = 0x0AA;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Motor13[0] );
    msg.buf[2] = Motor13[1];
    msg.buf[3] = Motor13[2];
    msg.buf[4] = Motor13[3];
    msg.buf[5] = Motor13[4];
    msg.buf[6] = Motor13[5];
    msg.buf[7] = Motor13[6];
    msg.buf[0] = 0xAA ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);


    msg.id = 0x082;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Gearbox1[0] );
    msg.buf[2] = Gearbox1[1];
    msg.buf[3] = Gearbox1[2];
    msg.buf[4] = Gearbox1[3];
    msg.buf[5] = Gearbox1[4];
    msg.buf[6] = Gearbox1[5];
    msg.buf[7] = Gearbox1[6];
    msg.buf[0] = 0x82 ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);

    
    msg.id = 0x083;
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Gearbox2[0] );
    msg.buf[2] = Gearbox2[1];
    msg.buf[3] = Gearbox2[2];
    msg.buf[4] = Gearbox2[3];
    msg.buf[5] = Gearbox2[4];
    msg.buf[6] = Gearbox2[5];
    msg.buf[7] = Gearbox2[6];
    msg.buf[0] = 0x83 ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);

    msg.id = 0x0AB;   // Gearbox7
    msg.len = 8;
    msg.buf[0] = 0;
    msg.buf[1] = t10msAccum | (Gearbox7[0] );
    msg.buf[2] = Gearbox7[1];
    msg.buf[3] = Gearbox7[2];
    msg.buf[4] = Gearbox7[3];
    msg.buf[5] = Gearbox7[4];
    msg.buf[6] = Gearbox7[5];
    msg.buf[7] = Gearbox7[6];
    msg.buf[0] = 0xAB ^ msg.buf[7];
    msg.buf[0] = msg.buf[0] ^ msg.buf[6];
    msg.buf[0] = msg.buf[0] ^ msg.buf[5];
    msg.buf[0] = msg.buf[0] ^ msg.buf[4];
    msg.buf[0] = msg.buf[0] ^ msg.buf[3];
    msg.buf[0] = msg.buf[0] ^ msg.buf[2];
    msg.buf[0] = msg.buf[0] ^ msg.buf[1];
    Can1.write(msg);

    t10msAccum = t10msAccum + 1;
    if (t10msAccum == 16)
    {t10msAccum = 0;
    }    
    }
spiff
Posts: 20
Joined: Thu Jul 14, 2022 8:44 pm
Location: Toronto
Has thanked: 1 time
Been thanked: 1 time

Re: Porsche 981 Cayman S (2014)

Post by spiff »

x.l.r.8 wrote: Sun Mar 20, 2022 7:03 am Have you checked the local laws. At present you cannot build/convert a car to EV in Ontario. Not sure where you are in Canada but certain provinces will not touch it for insurance or registration.
Have you confirmed this? Looking at this MTO site, it looks like it is not prohibited...
http://www.mto.gov.on.ca/graphics/engli ... -faq.shtml
User avatar
x.l.r.8
Posts: 22
Joined: Thu Apr 04, 2019 11:43 pm
Location: Toronto

Re: Porsche 981 Cayman S (2014)

Post by x.l.r.8 »

I have seen the new site, it seems all you need to do is comply for a safety. but reading and doing are different. but I'm going to try and register the porsche just for an exercise
If somethings worth doing, its worth getting it wrong a few times first.
spiff
Posts: 20
Joined: Thu Jul 14, 2022 8:44 pm
Location: Toronto
Has thanked: 1 time
Been thanked: 1 time

Re: Porsche 981 Cayman S (2014)

Post by spiff »

Any update on this project? Does the large drive unit physically fit in the 981 subframe/chassis?
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Porsche 981 Cayman S (2014)

Post by EV_Builder »

yeah how are you doing? Let me know if i can help you.
If you have a DBC i can convert it for you to user classes. Much easyer to work with and makes the code user friendly/easyer to work with.

Further some small tips: since i see a repetition coding pattern.

msg.id = 0x0AB; // Gearbox7
msg.len = 8;
msg.buf[0] = 0;
msg.buf[1] = t10msAccum | (Gearbox7[0] );
msg.buf[2] = Gearbox7[1];
msg.buf[3] = Gearbox7[2];
msg.buf[4] = Gearbox7[3];
msg.buf[5] = Gearbox7[4];
msg.buf[6] = Gearbox7[5];
msg.buf[7] = Gearbox7[6];
msg.buf[0] = 0xAB ^ msg.buf[7];
msg.buf[0] = msg.buf[0] ^ msg.buf[6];
msg.buf[0] = msg.buf[0] ^ msg.buf[5];
msg.buf[0] = msg.buf[0] ^ msg.buf[4];
msg.buf[0] = msg.buf[0] ^ msg.buf[3];
msg.buf[0] = msg.buf[0] ^ msg.buf[2];
msg.buf[0] = msg.buf[0] ^ msg.buf[1];
Can1.write(msg);

1) Make a function to fill buf[0] with the correct crc.
2) msg.buf[0] = msg.buf[0] ^ msg.buf[6]; --> msg.buf[0] ^= msg.buf[6];
saves typeing and cleaner IMHO.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Hi All.

Quite a bit delayed with a progress update. I may adjust the format of the build thread to have some posts reserved to allow me to update the various sections of the build.

Brake Booster:
The Audi 4M2 brake booster has been mounted, this wasn't too difficult but needed about 8mm trimmed from the bolts and an M10 extension placed on the rod to correctly use the existing Porsche ball mount
The Porsche booster is basically identical to all VAG parts from 97 Jettas onward.

The Audi Master Cyl was re-used, but the aux port for the pressure accumulator was plugged. this is a 2nd line off of the rear brake port.
I've confirmed that the existing Master Cyl is a 26.5mm unit and similarly sized to the GT3 booster upgrade that is common (27mm I believe)

If i was to re-do this, I'd suggest just getting an aluminum spacer fabricated to space it slightly from the firewall. This also would address an issue with the brake lines which are routed behind the booster unit being a bit too close for comfort, I solved this by bending them slightly, but to keep the lines totally factory, a 1/4" spacer would be perfect.
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Motor mounting:

Rear mount is fabricated with the help of SendCutSend, It mounts onto the transmission mounts of the rear subframe.
I plan to release my mount for anyone who wishes to use it.
Fabricated out of 1/4" aluminum

*Sharp eyed people may find the mistake I made... The mount is symmetrical... except the offset motor mount. When I imported it into SendCutSend, I mistook the back face for the front, thus all my bends were incorrect, resulting in the offset moving the wrong location*
CAD Export.png
Rear Mount Tacked.jpg
Rear Mount Right Side.jpg
Rear Mount Left Side.jpg
Bolts into the existing mounts on each of the subframe pieces:
Rear Mount Top Bolting.jpg
Bottom flange for bottom skidplate/reinforcement:
Bottom Flange.jpg
Motor/Inverter Placement:
Right-
RightSide_Inverter.jpg
Left-
LeftSide_Motor.jpg
CV Placement:
Right (Full Droop)-
Right_CV_FullDroop.jpg
Left (Full Droop)-
Left_CV_FullDroop.jpg
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Motor Mounting

I've also created 2 clamshell mounts that fit over the existing chassis rails. From this I'll use a 1.5x3" Aluminum Rectangular Tube and have it bolt onto these mounts, welding flanges onto them to cradle the cross brace with thru bolts.
Since the chassis is aluminum, for these clamshell mounts I'll use structural adhesive and rivet.

Off of this cross brace, another structure will be built to mount the motor on its front mount, and then extend down and be triangulated as I need to restore some bracing to the rear subframe from the removal of the factory stamped steel cross-brace.

Scan from CRScan Lizard:
CRLizardScan_RightRail.jpg
Right Rail Clamshell Piece:
Right Rail Clamshell.jpg
Right Rail Clamshell2.jpg
Left Rail:
Left Rail Clamshell.jpg
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Electrical/Canbus

I haven't been too focused on this lately. Building off my previous work, I've been using the Teensy 4.1
I'm hoping to base my VCU off of the example by aot93 here: viewtopic.php?t=2167
I'll mimic the enclosure and some base programming. The Electrical circuits will be a mix taken from the Microsquirt and RusEFI projects.
At the moment I'll need one of the Canbus channels to mimic the factory DriveCan, with the 2nd Canbus channel likely being for the OpenInverter interface, and the final for interface to the BMS and other modules.

Admittedly my CAN mapping is overkill and very unoptimized so I'll definitely be looking to clean up that code before final deployment.
Right now my whole test code is just a single loop, purely ran by a test board with no I/O.

To allow for the 40A circuit into the brake booster, I sourced a 12V fuse block with 7 tap points, the existing battery has 3 fused circuits for the Electric power steering and other high current circuits, the fuse block I chose uses the same fuses and allows the reuse of the factory wiring, just allowing me to add other fused circuits in the future.

I'll most certainly be looking at suggestions and help on how to make the codebase worthy of posting.
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

HV Circuits

Purchased 5 of the cheap Kilovac contactors from Batteryhookup, This should get me started and hopefully let me get started on designing the HV Junction box.

The harvested Panasonic relays/contactors from the Chevy spark battery pack I have will be used for the various heaters and precharge circuits. With the main contactors being used for the charging circuitry.

My cells are from the Chevy Volt Gen 2, as well as the 2016 Chevy Spark
Volt:
ChevyVolt Pack.jpg
Spark:
Spark Pack Exposed.jpg
The two packs are great for spare parts!
Volt Contactor Module:
289300428_568572614676413_3291532201634594117_n.jpg
Spark Contactor Module:
ChevySpark Contactor Assembly.jpg
ChevySpark Contactor Assembly Top.jpg
ChevySpark Contactor Assembly1.jpg
ChevySpark FET Heater Control.jpg
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

HV HVAC heater

The 3kw PTC heater has been fitted to the HVAC box.
This task went pretty straightforward once I settled the fact that it'll require some cutting and adjustment of the plastic of the factory box. Some heat and the plastic was easily formed to allow the heater core to be retrofitted.

The PTC heater was sourced from ZeroEV and then aluminum was epoxied onto the outer edges to allow for a foam seal.
I'm not overly worried about the aluminum casing heating up, it's spaced a decent distance from the PTC element and also encases the HighTemp cutout module.
PTC Heater Assembly.jpg
PTC Heater Assembly_2.jpg
PTC Installed.jpg
HVAC Unit With PTC.jpg
Mitchy
Posts: 82
Joined: Sun Nov 14, 2021 12:16 pm
Has thanked: 2 times
Been thanked: 35 times

Re: Porsche 981 Cayman S (2014)

Post by Mitchy »

Battery Mounting

Much more work to be done for this task, Once I have the front mount fabricated I'll be able to design the battery tray mounting points.
There is enough places to make a box which can be mounted directly to the chassis points using factory threaded points.

I've started mapping this out and will add some CAD dwgs as I go.
Post Reply