Category Archive

Uncategorized

SSD1306: OLED Screen for Motor Control!!


Posted on May 30, 2020 by admin

A while ago I bought a bunch of cheap 128×64 OLED screens off eBay to attach to random things. They were cool but I never really progressed to using them in actual projects. But in this time of Corona quarantine, I decided to give the screens a go again. It is pretty easy to find arduino libraries for these screens. I wasted no time porting one of the simpler libraries for use on an STM32F401, mostly just changing it to use the mbed I2C calls. This proved to be actually somewhat annoying, but eventually with some aggressive scoping and reading

0

STM32G4: CORDIC vs sinf() for Motor Control


Posted on April 14, 2020 by admin

Today I decided to decided to turn on the CORDIC in my STM32G431 and compare its speed at calculating sines and cosines to the sinf() function in the math.h library. I also decided to evaluate the performance of how we can use the CORDIC to more quickly calculate the DQ transforms when doing motor control. First up: evaluating sinf. We declare a float s and assign it to the value of sinf(theta). We measure the time it takes by scoping PA_7. Here is the code: The results of this were interesting. sinf takes a surprisingly variable amount of time to

0

Turning on the STM32G431RB


Posted on April 10, 2020 by admin

A while ago I bought some STM32G4 nucleos, with the intent to eventually switch to them for my motor control needs. The G4 series is ST’s newest line of micros, incorporating the rich set of analog peripherals of the F3 series with the clock speed of the F4 series. The G4s have on average more memory than the F3 series, but not as much as the F4s. Here are the datasheets of the three previous micros I have used extensively and some of their features: STM32F303K8: 72 MHz, 64 Kb flash, 16 Kb RAM, dual 5 MSPS ADCs, Ultrafast Comparators,

0

Making Maple Syrup with The Ecraperator


Posted on March 24, 2020 by admin

Back in high school I made a wood fired evaporator out of sheet metal. I called it “The Ecraperator” for obvious reasons. Over a random weekend I had some time to go back home and fire it up again. Here it is, ready to be lit, with my dad for scale. Its lit!! The maple syrup goes in a tray that was left over from my grandpa’s maple syrup days. The ecraporator itself is just a box with a piece of dryer vent attached to the back. The long chimney helps provide a strong draft. So in my high school

0