You are here

From where can I access the FOC code?

2 posts / 0 new
Last post
vimi94
Offline
Last seen: 5 years 3 days ago
Joined: 2019-04-26 16:24
Posts: 18
From where can I access the FOC code?

I need to access the FOC code where the transformation from three phase currents to Id and Iq takes place. Also from where can I access the stator phase current data for all three phases. I want to log all three stator phase currents.

 

Teslafly
Offline
Last seen: 3 weeks 8 hours ago
VESC Free
Joined: 2017-09-21 08:55
Posts: 17

https://github.com/vedderb/bldc/blob/master/mcpwm_foc.c

Should have what you are looking for. It is what runs the main foc loop.

 

As for phase currents, there is a scope like log feature that can capture a couple hundred adc readings. Perhaps that would fork for your current logging?