Anyone used a Teensy LC

I’m running the Deng FOC 3.0, which includes an ESP32, in all modes using the simpleFOCstudio. However I’m a great Teensy fan. I see the Teensy 3.2 and 4 are supported and been tested but they are all unavailable right now. However Amazon has some Teens LC (which are 3 series Teensy). I want to replace the ESP32 with the Teensy LC

Anyone tried the Teensy LC with simpleFOC?

My goal is to replace the Acutonix Servos and bungees with BLDC motors in my flight sim joystick project.
image

Tried the Teensy 3.6 and seemed to get good results.

The Teensy LC not so much, at first it seemed to behave but then I found the current from my 24v PSU required an order of magnitude more current and sound rougher on the motor with the LC and would sometimes ask for more than 2 amps, this never occurred with the 3.6 or ESP32 LOLIN lite.

I guess the LC is not up to the job

Performance-wise it should be, but perhaps there is a problem with the PWM driver or some other incompatibility… Needs investigation.

May I ask which IDE you’re using, @Carl ? Is it ArdunioIDE or PlatformIO?

HI, I’m using the Arduino IDE. More info and questions as I try and get up to speed.
Teensy LC

Teensy LC, In velocity/voltage mode with the voltage set at 12 V,
1.+12v gives 98 rad/sec with 1.25 amps on my 24v supply, sounds rough.
2.-12 gives 121 r/sec with 0.73 amps on my 24v supply, sounds not smooth

Back to the Teensy 3.6. In velocity/voltage mode with the voltage set at 12 V,

1.+12v gives 156 rad/sec with 0.25 amps on my 24v supply, sounds not smooth.
2.-12 gives 193 r/sec with 0.12 amps on my 24v supply, sounds smooth

Why would they be different?

Also, the motor keeps disconnecting seemingly randomly, requiring a microcontroller reboot. Any clues how I can fault find this?

What position sensor are you using?

I’m using the Hall sensor in the motor

Hi Carl,

Yeah, the hall sensors aren’t super-accurate… for a guess as to what is going on, I think that perhaps the alignment isn’t finding the zero-point perfectly, so you’re getting different performance in the two directions…

You can try nudging the alignment point after calling initFOC() by modifying motor.zero_electric_angle slightly, and seeing if it improves the performance/makes it more symmetric.

1 Like

Hi Runger, you were not joking about nudge. simpleFOC detected 5.24, the optimum balanced performance for current and speed is 5.157.

Teensy 3.6. In velocity/voltage mode with the voltage set at 12 V,

1.+12v gives 178 rad/sec with 0.145 amps on my 24v supply, sounds smooth.
2.-12 gives 179 r/sec with 0.147 amps on my 24v supply, sounds smooth

So I guess if I dont want to hand tune I should use an AS5600 style sensor?

Teensy LC, In velocity/voltage mode with the voltage set at 12 V,
1.+12v gives 100 rad/sec with 1.0 amps on my 24v supply, sounds not smooth
2.-12 gives -100 r/sec with 1.0 amps on my 24v supply, sounds not smooth

Teensy LC is balanced but the current is almost very high. Seems LC currents are in the same magnitude as the 3.6 currents up to 75 rad/sec

Even better, an SPI based sensor like the AS5048A, AS5047* or one of several other models from Monolithic Power, MagnaTek and others. SPI will have much better performance than I2C, which is really too slow, and will limit the Teensy MCU’s otherwise very fast performance.

For the TeensyLC, I wonder why the difference is so big - if you’re really hitting its performance limits, or some other problem exists with this MCU. The fact that currents are similar until 75rad/s does kind of indicate that might be the case though.

I’m going to try the AS 5048A and see what improvement performance that gives AND

I keep getting motor disconnections (I can move the motor by hand as if I had powered off) Once disconnected I get these readings in the simpleFOCStudio.
image
Col 2 is voltQ and Col 6 is monitored velocity.
I can quite easily reproduce this by having the system operating correctly in velocity/voltage mode, commanding 0 velocity then moving the motor back and forth (i.e. changing direction) through a small angle. It may take a few seconds but it always disconnects.

I this an artifact of using hall sensors, which otherwise are working well?
Anyone seen this using AS5048A sensors?

I think it might be… I believe there are some other posts in the forum to that effect… I think we also have an issue on GitHub to track it. :frowning: