Go Down

Joolz

Aug 02, 2012, 09:50 pm
I just purchased the attopilot sensor https://www.sparkfun.com/products/9028 to measure current. Now the specs say this thing achieves a 37mA / bit resolution with a 12 bit ADC, referenced to 5 V. However my duemilanove works with a 10 bit adc. What's the math here?

Thanks

wanderson

#1
Aug 02, 2012, 10:01 pm
The math will be complicated by what value you use for AREF with that device.  The device outputs a range of 0 - 3.3V, so if you use a standard 5V reference each bit of the A2D represents ~ 4.9mV

and from the data sheet;

Analog Voltage Outputs for Sensed Parameters:
o 50V/180A = 63.69mV / Volt 18.30mV / Amp
o 50V/90A = 63.69mV / Volt 36.60mV / Amp
o 13.6V/45A = 242.3mV / Volt 73.20mV / Amp

So for the first range, 63.69/4.9 so about each volt will equate to thirteen possible values ...

But the math your looking for is probably best summarized from this bit of code from the Sparkfun provided example sketch;

Code: [Select]
`  //Measurement  VRaw = analogRead(A0);  IRaw = analogRead(A1);    //Conversion  VFinal = VRaw/49.44; //45 Amp board  //VFinal = VRaw/12.99; //90 Amp board  //VFinal = VRaw/12.99; //180 Amp board      IFinal = IRaw/14.9; //45 Amp board  //IFinal = IRaw/7.4; //90 Amp board  //IFinal = IRaw/3.7; //180 Amp board`

Of course all of the above changes if you change the default AREF value, which you probably should to obtain maximum resolution from the device.

Joolz

#2
Aug 02, 2012, 10:31 pm
Haha thanks for the sketch, though I still don't get how you arrive to those figures.

wanderson

#3
Aug 02, 2012, 10:43 pm
Ok.  Try this process

Max voltage 13.6 V in produces a signal of 3.3V

To convert ADC to input voltage

675/13.6 produces about 49.5 steps per volt.

Joolz

#4
Aug 08, 2012, 02:40 am
excellent , thanks a lot

sergiozambrano

#5
Sep 17, 2012, 06:20 am
I only "heard" about arduino but this time I finally found a use for it. This would be my first project

I also need a 50% positive offset square wave generator from 15-600Khz preferably not less than 5 volts. Have you been able to build it?

Thanks

MarkT

#6
Sep 18, 2012, 03:04 pm

I only "heard" about arduino but this time I finally found a use for it. This would be my first project

I also need a 50% positive offset square wave generator from 15-600Khz preferably not less than 5 volts. Have you been able to build it?

Thanks

I'd ask that in a separate post if you want people to notice, and choose a relevant subject line.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up