Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic gate driver support for Telsa Model 3 inverter #49

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

davefiddes
Copy link
Contributor

Pull in the tested tesla::GateDriver from commit
bc109b82 of the c2000-inverter project for the Tesla Model 3 inverter native. This targets the STGAP1AS but this appears to be identical to the STGAP1BS from a programming perspective.

A simple TeslaModel3 class is created to initialise and poll the operation of the gate driver.

The Tesla Model 3 inverter board is identified
automatically via the expected resistor divider
network.

The GPIO allocation for the gate driver is a
placeholder only and will need further elaboration.

Tests:

  • Core gate driver has been tested with HV on an original Tesla Model 3 inverter with TI C2000 MCU and open-loop PWM generation. No faults experienced in normal operation. Faults trip with incorrect PWM generation (dead-time, deliberate IO glitches, etc).
  • STM32 code compile tested only.

Pull in the tested tesla::GateDriver from commit
bc109b82 of the c2000-inverter project for the Tesla
Model 3 inverter native. This targets the STGAP1AS
but this appears to be identical to the STGAP1BS from
a programming perspective.

A simple TeslaModel3 class is created to initialise and
poll the operation of the gate driver.

The Tesla Model 3 inverter board is identified
automatically via the expected resistor divider
network.

The GPIO allocation for the gate driver is a
placeholder only and will need further elaboration.

Tests:
 - Core gate driver has been tested with HV on an
   original Tesla Model 3 inverter with TI C2000 MCU
   and open-loop PWM generation. No faults
   experienced in normal operation. Faults trip with
   incorrect PWM generation (dead-time, deliberate IO
   glitches, etc).
- STM32 code compile tested only.
@jsphuebner
Copy link
Owner

Thanks Dave. Before merging, do you understand why the test fails?

@jsphuebner jsphuebner merged commit 2a96f91 into jsphuebner:MG_DU Jan 7, 2025
1 check failed
@jsphuebner
Copy link
Owner

Found it, I introduced the problem

@davefiddes
Copy link
Contributor Author

Sorry, I should have mentioned the failure in the PR. I didn't want to muddy the waters with an MG related fix.

@jsphuebner
Copy link
Owner

No worries. It's still not going through. Doesn't seem to build the libopeninv tests and consequently goes "file not found" when trying to run it

@davefiddes
Copy link
Contributor Author

I see. It looks like libopeninv out of date compared to stm32-sine. Probably down to my changes to both landing about the time Damien was branching for his MG changes. An uptick to libopeninv should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants