▲ 179 r/stm32+2 crossposts

Is this finally a real 3-axis FOC gimbal? IMU stabilization is working

A few days ago, these three BLDC motors were still oscillating all over the desk.

Now the encoder feedback, position PID, hard-stop detection, and IMU stabilization are finally working together.

This is my first pass at a stabilization mode inspired by the default behavior of a DJI Pocket 4.

Still a mess of jumper wires, but it finally feels more like a gimbal than a motor-control experiment Next I want to try FPV-style following.

If this were your build, what would you test next before putting a real payload on it?

u/WuBuilt — 6 days ago

No limit switches, no current sensing — would you trust encoder-only hard-stop detection on a gimbal?

This is the next step in my 3-axis FOC gimbal project.

There are no limit switches on this prototype, and I'm not using current sensing for stall detection.

Right now, the basic idea is pretty simple:

The controller is still commanding the motor to move, but if the encoder shows almost no meaningful position change for a short period of time, I treat that as a mechanical hard stop.

In the video, the axis runs into its mechanical limit, detects that it is no longer moving, and then recovers/re-centers.

It seems to work quite reliably in these tests, but I'm not convinced encoder-only detection is enough for every real-world case.

For example, how would you distinguish between:

  • actually hitting the mechanical limit
  • someone physically holding the gimbal
  • a sudden increase in load or friction
  • the motor simply not having enough torque to move

Would you trust this approach on a small gimbal, or would you add current sensing / dedicated limit detection as a second source of information?

I'm especially interested in what failure case you think would break this first.

u/WuBuilt — 8 days ago

I started building a 3-axis FOC gimbal from scratch. This was my first test... the motor was fighting me

I started building a 3-axis FOC gimbal from scratch.

This is the very first prototype test.

At this point:

  • no custom PCB
  • lots of jumper wires
  • unfinished mechanical parts
  • the motor was vibrating like crazy

I was not even sure if this approach would work.

The goal is to build a small gimbal system from the ground up:
hardware → motor control → firmware → stabilization algorithms.

The journey so far has been:
unstable motor → tuning FOC → adding feedback → designing my own PCB → testing different stabilization modes.

I will share the whole process step by step.

For anyone who has worked with BLDC/FOC:
what was your first "the motor is completely out of control" moment?

u/WuBuilt — 15 days ago
▲ 50 r/esp32

I made a tiny ESP32 robot face. Now I’m trying to give it a neck.

Last time I posted a tiny ESP32 robot face and asked how to make it feel more alive.

A lot of the feedback was about movement, timing, touch, and sound — so I started working on the “neck”.

This is my first bench test with a tiny hollow-shaft gimbal BLDC motor, about 17mm wide and 8.6mm tall. I got it spinning with an ESP32-S3 using FOC.

It is still just an open-loop spin test. The next challenge is Hall feedback, a custom PCB, and tuning the motion so it feels subtle instead of twitchy.

What would you build around a motor this small?

u/WuBuilt — 2 months ago
▲ 264 r/esp32

I made a tiny ESP32 robot face. Now I’m trying to figure out how to make it feel alive.

This originally started as a small ESP32 AMOLED display experiment.

But after adding a few simple expression states like proud, helpless, cautious, and angry, it started feeling less like a UI demo and more like a tiny character.

Right now I’m trying to figure out the next step: not just the body itself, but how to give it actual presence and personality through movement, sound, timing, and interaction.

Would you go with:

  • wheels
  • legs
  • touch interaction
  • sound
  • or something completely different?
u/WuBuilt — 3 months ago