Steer by wire - FOC Shield configuration with two equal BLDC motors with encoder and STM32Nucleo

Hi. Im new on FOC to BLDC motors, however, Im trying reply the Steer by wire using two equal motors with encoders, a STM32 446 board and two SimpleFocShields as images, I’ve download the program but only two motors present movements during three seconds. Could you support me?

Juan Mtz.

Apologies but your question doesn’t make sense. It isn’t clear what you are handling problems with and what you’ve tried.

I guess you are trying to follow this?

Whilst this is a great example, unless you have exactly the same hardware then it is unlikely to work first time and you’ll have to build up to a working solution.

How about you tell is more details about your setup and what works/doesn’t work.

I’d first start with the basics e.g does an encoder test work:

And then move to getting one of the motors working in angle mode

Hi Owen, I made the encoders test, they are ok, I convert the radians to degrees and I considered the gear ratio of 40. My encoders are 1024 ppr. I tried again run the complete program with the resolution, but nothing.

The program I’ve tried reply is “Haptic velocity control using SimpleFOCShield and Stm32 Nucleo-64”

I’d recommend making small steps forward:

  1. encoder test (done!)
  2. open loop velocity test
  3. closed loop torque test
  4. closed loop velocity test (tuning velocity PI)
  5. cloosed loop angle test (tuning angle P)
  6. Haptic code
    So you’ve done step 1. Step 6 doesn’t work. I’d suggest step 2. next making sure to be careful with voltage limits (and ideally using current limiting power supply) to keep the driver safe.

Ok, Im going to follow steps 2-6. However Im reading that the BLDC motors support by Simple FOC Shield are motors with R>10 Ohms, and my motors are R<1 Ohms. However, I count with one DVR8301 Booster, But I don´t find information about libraries and how to connect it, The info and libraries found is only for DVR8302. Could you support me to replace the booster?

If your motors phase resistance are about 0.5 ohms then you can still use the SimpleFOCShields but must be super careful to keep current < 2A. The safest approach is to having a current limiting power supply e.g. set to 0.5A (increasing to 2.0A). This will help you set/find safe software limits (e.g. voltage_limit = 1.0f).

You won’t get massive amount of torque out of the shields but it may be enough and certainly good for learning.