simplefoc / Arduino-SimpleFOC-PowerShield

A powerful Arduino shield for running BLDC motors using the FOC algorithm
MIT License
99 stars 26 forks source link

INA240 version #6

Open PixelMutation opened 2 years ago

PixelMutation commented 2 years ago

The version of INA240 is not specified in the BOM. According to the datasheet there are 4 versions. To clarify, is it INA240A2, since that is what is used on the regular FOC shield?

GovP commented 2 years ago

Also curious! Tried with A3 and they (specifically the INA240 over 3 attempts) keep frying. Could be another issue e.g. voltage but wondering if using the wrong spec.

askuric commented 1 year ago

Hey guys, Sorry for the delay, I've forgotten to reply. It depends on the currents you're interested in measuring.

The board has a resistor of 1milliOhm (it can be changed as well) and since usual ADC voltage is 3.3V. INA240 gains are:

The current range will be:

max_current = 3.3V/2 / 0.001milliOhm / gain (V/V)

So A1 would give you a range of 3.3/2/0.001/10=165 Amps :D A2 will give you a range of 3.3/2/0.001/50=33 Amps With A3 range will be 3.3/2/0.001/100=16.5 Amps And for A4 3.3/2/0.001/200= 8.25 Amps

So in my case I've used the A2. But the rule of thumb would be to use the highest gain possible for your application.