FOC for haptic control

Hi I’m in your forum because I saw the Steer by wire example
My question:

would it be feasable to build a system which simulates train and tramway controls like

fahr2
( without mechanics of course ).

Force feedback would be realized outside of FOC with a strain gauge.
Rotation angle is measured with an magnetic encoder.

The operator should feel some sort of friction, dents and end barriers.
This should be selectable by parameters to adapt simulation to different vehicles.

I have the following parts at hand:

  • diverse NUCLEO 64
  • X-NUCLEO-IHM08M1 driver up to 48V / 15Arms
  • 14bit ams magnetic encoder
  • 42BLF03 BLDC motor, 25V, 78W, with ususal hall sensors

I develop my SW with VisualGDB from SYSPROGS, a super plugin for MS VS

Welcome @RolfSte !

It sounds like a feasible project! But you won’t know for sure unless you give it a try :wink:

All this sounds very good, which AMS sensor is it? Many Nucleo boards are supported “out of the box”, and getting new ones running is not so hard if necessary.

Never seen this before! Can it compile for Arduino? Even if you use a Nucleo Board, SimpleFOC is an Arduino library and needs Arduino framework to run.

Thanx

I have an AS5048B Sensor.
Would ST X-NUCLEO-IHM08M1BLDC driver fit ?

As I am using MS VS for different languages over decades,
VisualGDB is the perfect fit for me. So I can work
with C++ on uC side and C# and F# on PC side
with the same tool.
It’s mighty but easy to use tool for coding and debugging

  • single step, watch variables etc. -
    not only Arduino projects, but also over 1000 popular uC types.
    Also developing for Linux and Android can be done.
    It’s not free, but it’s worth it’s price.

When I’m done with my current project,
I will turn to my FOC controlled tramway and train drive controller.

I have never tried it, but I very much assume it will work.
Current sensing might not work out of the box but I’m fairly sure it can be supported too. You’ll have to route out some I2C pins for the sensor, but that should be no problem, the Nucleo boards have the pins extending downwards as well.
It looks like a nice driver board (if a little large for my purposes).

I2C sensors are a bit slow, the sensor will limit your performance. Maybe you can switch to the AS5048A, which is SPI and much faster.