Accurate Current Sensing and Pushing

Hello all,

I am building a very complex multi-dimensional magnetic levitation device. I have full functionality using l298h motor bridges, however these can not support the amperage we will need when the device undergoes up to 9 gs.

Battery: 11.1v with up to 90 amps burst.

As per our calculations, at most we will be pushing 8.7 amps of current. So, I will need two devices:

One that is compact, accurate with error less than 1%, can read many times a second, interfaces with arduino, and can handle up to 8.7 amps of current.

The other must also be compact, interface directly with the battery, can handle harsh adjustment of current quickly, and also has a very low error.

Any help is greatly appreciated, including help with logic to control three solenoids using a given device. I have been on the software side for several years but am just getting into hardware.

Thank you!

So want bandwidth do you need in this current sensor?

This is too vague:

can read many times a second

Ditto:

can handle harsh adjustment of current quickly

My apologies.

Being new to the hardware side of things, I struggle to understand what you mean by bandwidth, but I believe you're asking how many times/sec it would need to be able to read?

Is it unrealistic to be looking for something to measure 8,000 times/sec and sample that at 16,000 times/sec ? That is what I've built my current model around.

The same would be ideal for the current pushing device, if at all possible.

Thank you for your help and patience, just trying to learn.

Is it unrealistic to be looking for something to measure 8,000 times/sec and sample that at 16,000 times/sec ? That is what I've built my current model around.

No, you can't measure at one rate and sample at another, measuring is sampling!

Lets say 16kSPS. That's beyond the default range of the Uno ADC.

For accuracy/precision of 1% I'd suggest a shunt + opamp differential amp circuit to boost the voltage.
Typical instrumentation amps are rather slow, so I'd go with a fast precision rail-to-rail opamp
or a specialised current sensing chip, which is basically a packaged precision differential amp.

Have the shunt on the gound return, so its not jumping about at high voltage. I presume you aren't
reversing current? Otherwise you'd have to sense on the ground return of the motor driver.

Routine values of 10A and sporadic surges of say 30A would suggest a shunt value of around 5mΩ,
meaning something like a x50 gain on the differential amp would be good. That would give 250mV/A
sensitivity.

To avoid being swamped in PWM switching noise its best to do the ADC readings in lock-step with the
PWM waveform (using one of the timer libraries to both provide an easy interface to the time overflow
interrupt and set the PWM rate).

I think you meant precision, not accuracy, BTW, in your original posting?

MarkT:
No, you can't measure at one rate and sample at another, measuring is sampling!

Lets say 16kSPS. That's beyond the default range of the Uno ADC.

So am I correct in my saying that the Arduino maximum ADC read is 10,000/second?

MarkT:
For accuracy/precision of 1% I'd suggest a shunt + opamp differential amp circuit to boost the voltage.
Typical instrumentation amps are rather slow, so I'd go with a fast precision rail-to-rail opamp
or a specialised current sensing chip, which is basically a packaged precision differential amp.

Have the shunt on the gound return, so its not jumping about at high voltage. I presume you aren't
reversing current? Otherwise you'd have to sense on the ground return of the motor driver.

Brilliant! If you don't mind reviewing them, I'll be linking my proposed components as I find them. Do you have any recommendations for specialised current sensing chips offhand?

MarkT:
Routine values of 10A and sporadic surges of say 30A would suggest a shunt value of around 5mΩ,
meaning something like a x50 gain on the differential amp would be good. That would give 250mV/A
sensitivity.

To avoid being swamped in PWM switching noise its best to do the ADC readings in lock-step with the
PWM waveform (using one of the timer libraries to both provide an easy interface to the time overflow
interrupt and set the PWM rate).

Yes! I will be reversing current on two of the solenoids. Thank you for the heads up on PWM switching, I'll definitely utilize that timer library. I'll also link to that for your review, if that's okay.

MarkT:
I think you meant precision, not accuracy, BTW, in your original posting?

Yes I always screw that up haha, thank you. Karma added

So am I correct in my saying that the Arduino maximum ADC read is 10,000/second?

No, that is simply the default. You can sample much faster with some loss of accuracy.

Wierzclicky:
So am I correct in my saying that the Arduino maximum ADC read is 10,000/second?

If I say "default", its not the same thing as saying "maximum", you'd need to tinker with the
ADC clock settings using direct register manipulation or find a library that does it for you.

The point I was making that 8kSPS might be easier to start with.

Wierzclicky:
Hello all,

I am building a very complex multi-dimensional magnetic levitation device. I have full functionality using l298h motor bridges, however these can not support the amperage we will need when the device undergoes up to 9 gs.

Battery: 11.1v with up to 90 amps burst.

As per our calculations, at most we will be pushing 8.7 amps of current. So, I will need two devices:

One that is compact, accurate with error less than 1%, can read many times a second, interfaces with arduino, and can handle up to 8.7 amps of current.

The other must also be compact, interface directly with the battery, can handle harsh adjustment of current quickly, and also has a very low error.

Any help is greatly appreciated, including help with logic to control three solenoids using a given device. I have been on the software side for several years but am just getting into hardware.

Thank you!

What is your electronics, programming, arduino, hardware experience?

So you need a current sensor for input and a current control device for output and the arduino to control the current so that what phenomenon occurs.

Can you post a picture or diagram of your levitation rig please?

What are you using to measure current with?
If you are levitating, are you also measuring position?

Thanks.. Tom... :slight_smile: