SimpleFOC DriveShield - A big (more powerful) brother of the SimpleFOCSheild

I’ve been getting some good results with my ESP32S3 :slight_smile:

Now trying to get current sense working… do you know what the correct shunt resistance and gain we should be using for this board?
e.g

InlineCurrentSense current_sense = InlineCurrentSense(I_SHUNT_RESISTANCE, I_GAIN, I_A_PIN, _NC, I_C_PIN);

What are the correct values for I_SHUNT_RESISTANCE and I_GAIN?

InlineCurrentSense current_sense = InlineCurrentSense(0.066f, A0, A2);
with
current_sense.skip_align=true; before initFOC()
works for me.

Hey guys,

So the boards have the ACS712-20A with the 100mv/A gain.

But these chips work on 5V so I’ve scaled them to 3.3V using a simple voltage divisor.
So the final gain is:

100mV/A \times \frac{10k \Omega}{14.7k\Omega} = 68 mV/A

So the correct configuration should be:

InlineCurrentSense current_sense = InlineCurrentSense(68.02f, A0, A2);

@pleycothh, the constructor takes the gain values in mv/A not in V/A so it should be 68 not 0.068.

1 Like

Oh well this is much better than my try, but we need to work together, and I think it should have a microcontroller included, maybe I did not look closely enough but it appears you need to wire your own mcu in?

How can we collaborate? I need a board that can do stepper motors too. Also it needs an MCU. I would prefer the pico 2 but I just rolled with the STMG431CU or whatever because that’s what we were using last time. The pico 2 has floating point now and 2 cores rather than one which is pretty useful.

I’m aware there are various timer features in the STM MCUs that are useful but not in the picos, but I don’t think we actually use them much?

Let’s face it we are both once again for the umpteenth time going down the same road. We start by needing a board and there is still nothing that suits the role. So we have to roll our own. But is it actually going to be useful to the next person? You probably wouldn’t use mine and I can’t use yours.

The driver stage and MCU stage could be made on different areas of the board for instance so you can disconnect them and highjack the driver should you wish to wire in a new MCU. But it comes pre-wired and ready to use if you are good with a pico 2, for instance. Solutions like that can get us some tangible progress here.

Otherwise we are all going to be laying pebbles nobody can use, not stepping stones that allow the next people (which might be us on another project) to reach further. I’ve been saying this stuff for like 3 years and we have made very slight progress… but still no actual working design that’s ready to roll.