Page 1 of 1
Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Fri Apr 03, 2026 3:16 am
by alucas
I have my brake sensor wired to Din_Brake and my brake lights are on a relay run by the BrakeLight output using SL2Func. When I press the brakes I don't get brake lights.
I think that the BrakeLight is only triggered via regen braking and that is why I don't get bake lights when the car is sitting not in run mode and not regen braking. I just wanted to check that is the case before I go do some funny wiring. I like the relay as it is a combo fuse-relay setup, and my rewiring to have both regen baking and the old braking would bypass the fuse and use the old cars system which has 3 fuses for the whole cars electrical system.
Is my assumption about BrakeLight correct?
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Fri Apr 03, 2026 10:50 am
by manny
Yes regen only
Code: Select all
if (Param::GetInt(Param::potnom) < Param::GetInt(Param::RegenBrakeLight)) {
// enable Brake Light Ouput
IOMatrix::GetPin(IOMatrix::BRAKELIGHT)->Set();
} else {
IOMatrix::GetPin(IOMatrix::BRAKELIGHT)->Clear();
}
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Tue Apr 07, 2026 4:49 pm
by alucas
I ended up modifying the code so that when the bake is pressed the BRAKELIGHT goes on.
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Tue Apr 07, 2026 5:12 pm
by tom91
alucas wrote: ↑Tue Apr 07, 2026 4:49 pm
I ended up modifying the code so that when the bake is pressed the BRAKELIGHT goes on.
I would strongly suggest you do not rely purely on the zombie to turn your brake lights on and always retain the "OEM" method and parallel the zombie one. If the zombie fails for whatever reason you still have the 12V wiring/relays to fall back on.
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Sun Apr 12, 2026 10:42 pm
by modellfan
Is there any reason , why this regen brake light is not implemented for sdu ?
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Mon Apr 13, 2026 8:20 am
by tom91
Who knows, its a completely different code base. also I believe the tesla boards were running low on IO pins so some functions were not included.
Re: Zombiverter Din_Brake will it trigger BrakeLight D_out
Posted: Sun Apr 26, 2026 9:57 am
by allard
tom91 wrote: ↑Tue Apr 07, 2026 5:12 pm
I would strongly suggest you do not rely purely on the zombie to turn your brake lights on and always retain the "OEM" method and parallel the zombie one. If the zombie fails for whatever reason you still have the 12V wiring/relays to fall back on.
I think Tom is right; from a security perspective it is better to leave the OEM wiring. However if you, like me, don't have the wire anymore and it is hard to rewire because it is in an unreachable place, you can consider using this code:
Code: Select all
selectedInverter->SetTorque(torquePercent);
// START Brake light control - activate on regen OR physical brake press
bool brakeLightOn = false;
if(Param::GetInt(Param::potnom) < Param::GetInt(Param::RegenBrakeLight))
// Check for regen braking
if(torquePercent < Param::GetFloat(Param::RegenBrakeLight))
{
brakeLightOn = true;
}
// Check for physical brake press using parameter
if(Param::GetBool(Param::din_brake))
{
brakeLightOn = true;
}
// Set brake light output
if(brakeLightOn)
{
// enable Brake Light Ouput
IOMatrix::GetPinOut(IOMatrix::BRAKELIGHT)->Set();
} else {
IOMatrix::GetPinOut(IOMatrix::BRAKELIGHT)->Clear();
}
// END Brake light control - activate on regen OR physical brake press
// speed = ABS(selectedInverter->GetMotorSpeed());//set motor rpm on interface
// NO ABS allowed on speed as we need to know direction
speed = selectedInverter->GetMotorSpeed(); // set motor rpm on interface
see also:
https://github.com/daan0308/Stm32-vcu/t ... eak-input_
I think it would not hurt to add this to the code base anyway since it can also work in parallel with the OEM wiring.
Allard