Pages: [1] 2   Go Down
Author Topic: analogreference and resolution question (STILL NEED HELP)  (Read 1258 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

Im new to arduino and I wanna know something about analogread and reference. I have an input from a shunt that measures amps of a circuit.  It outputs a value between 0 and 50 mV.  I wanna use the analogreference and the aref pin to lower my upper limit to 50 mV, So then I can read in raw voltage between 0 and 50 mV with 1023 steps because its 10 bit?

Is there a way to set aref to 50 mV using a 5 volt power supply?

Also, do I need a resistor in the analog input? safety? or a diode? im not sure.

Thanks
« Last Edit: July 27, 2011, 05:24:44 pm by jcarabet » Logged

0
Offline Offline
Shannon Member
****
Karma: 199
Posts: 11649
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, you cannot use Aref below 1.1V - you need to amplify your signal before conversion.
Logged

[ I won't respond to messages, use the forum please ]

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33295
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is an internal 1.1V reference voltage you could use. However you can apply a lower external voltage than this but there is little point because then you get into the noise of the system and the values returned in the least significant bits are meaningless. This is true of all A/D converters when you use them with lower than the recommended reference voltage.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so how would I amplify the signal coming out of the shunt? And just for practice, how do I lower the 5V pin to around 100 mV for the aref pin.

Thanks
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33295
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use a non inverting operational amplifier.

Not sure where you get 100mV from. The 1.1V reference is built in and switched to by software.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So like this?

http://www.radioshack.com/product/index.jsp?productId=2062547

How would I even hook that up?

I hate how they never give you specs...
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you don't know how to hook up an op-amp, then you need to start a little closer to ground zero. I'd find a tutorial and learn a little.

In case you didn't get what Grumpy_Mike is trying to tell you: The minimum allowable Vref is 1.0 volts. You can't use 100 mV. You'd be better off using the internal reference, Vint, since you don't gain anything by supplying your own.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2557
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

May be you can change shunt value, to get higher voltage?
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Normally shunt resistances are chosen so as to not effect the circuit they are measuring. The OP possibly doesn't have the option of raising the shunt resistance enough to help. If he doesn't want to amplify the signal, an alternative would be to use an external ADC with a large enough dynamic range to accurately handle the 0-50 mV signal and read it into the Arduino for further processing and display. A 24-bit ADC would give you about 0.1 microvolt resolution with a 1 volt reference. Ought to do the trick.
Logged

Montreal
Offline Offline
Faraday Member
**
Karma: 27
Posts: 2557
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't agree with your logic. If OP have no knowledge to build simple OPA amplifier, how he/she could follow your advise to implement external 24-bit ADC? It doesn't make any sense.
 I just assume, that OP probably doesn't work on something high power or high precision, when increasing shunt resistance wouldn't be desirable. The same time it is the easiest way for someone w/o electronics background. If shunt resistor "build-in" IC, there is always option to add external one.
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wasn't using any logic. I was just suggesting an alternative. If OP is going to have to wire something up based on a tutorial or suggestion rather than from their own knowledge, an external ADC is no more complicated than an op-amp. You didn't say how much higher you would suggest raising the shunt resistance. You have to worry about compliance voltage problems if you raise it to much.

I would like to hear more about the application.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well the OP didn't state what full scale amps through the shunts creates the 50mv drop, but typically one doesn't like the wasted power and decreased voltage that results when raising the resistance of the shunt. I would think a op-amp set for a gain of 20 and using the internal band-gap reference would get the best results for the least complexity. A good low noise op-amp with rail to rail output capablity is not a hard component to spec, design, and build these days.

Lefty

Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 0
Posts: 861
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Agreed. I wouldn't use the 741 from Radio Shack in the link in this application.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33295
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I hate how they never give you specs
This is a very old OP amp, I was using them in the 1970s you need something more modern. However the data sheet is readily available on line.

How about this one:-
http://uk.farnell.com/microchip/mcp6273-e-p/op-amp-2-0v-single-cs-r-r-8dip/dp/1852086

Quote
How would I even hook that up?
Start by reading the theory of them here:-
http://en.wikipedia.org/wiki/Operational_amplifier
and here:-
http://en.wikipedia.org/wiki/Operational_amplifier_applications

Remember you need to work out the resistors for a gain of about 20.
Logged

London
Offline Offline
Faraday Member
**
Karma: 10
Posts: 6248
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may want to consider as a possible alternative to a shunt, the current sensing device here: http://www.sparkfun.com/products/8883
Logged

Pages: [1] 2   Go Up
Jump to: