Go Down

Topic: Reading Small voltages (Read 4558 times) previous topic - next topic

retrolefty

#30
Jan 10, 2013, 06:23 pm Last Edit: Jan 10, 2013, 06:32 pm by retrolefty Reason: 1

I am new to this forum but not to op-amps.  I would like to know if the Arduino Mega can do what the INA125 (instrumentation amplifier) does almost (but making a digital output number) sitting at the null point of a wheatstone bridge.  I imagine using the analogReference command and some kind of differential input (hopefully the reference input is an internal voltage) and using one of the rumored gains (5, 10, 20, 40).
I do not see any commands for this in the C language reference.  This is unfortunate because I am using the easily understood C that the Mega uses and so far everything is written in C.

My present input is a 1K resistor in series with a 1K ohm RTD (yes it is not the 100 ohm standard RTD) generating 2.5Vdc. If I have to make the other side of the wheatstone bridge with real resistors and use an op-amp to increase the gain, then that will work but it is considered to be a failure.
Once again what I need is the C instruction keywords and maybe an example showing how to use them.  I am already familiar with analogRead and analogReference.  I need something additional.



The ADC in the atmel mega328 chip's internal ADC hardware supports single-ended inputs only, there is no differential input suitable for measuring across the null point of a DC excited Wheatstone bridge arrangement. There are ways to lower the ADC reference voltage used by the ADC to get smaller resolution step size over a reduced ground to reference voltage measurement range but that is not the same as having differential input capabilities. There are simple to use external I2C ADC chips that have differential inputs, programmable gains, better resolution, etc available such as:

http://www.adafruit.com/products/1085
http://www.adafruit.com/products/1083

Quote
Once again what I need is the C instruction keywords and maybe an example showing how to use them.


I think you are mixing apples and oranges here. The C/C++ programming language keywords have nothing to do with any specific support for anyone's hardware features. Such hardware features must have user or IDE implementers custom written C/C++ functions or libraries written to support a specific microcontrollers hardware features. That's what analogRead() is, a custom written function that knows how to manipulated the internal ADC hardware inside AVR chips supported by the arduino IDE. They are not considered C/C++ 'key words' but rather are functions and library that can be used in programs written in C/C++.

Lefty

WVPhysicist

Good find!  Many thanks especially for the speedy reply.  I am considering the option that I called a failure but I think the parts you identified are a better way. I am afraid of digital interfacing mostly because I once saw hand written PIC16F88 code for it and it was done for me.   I spent a long time fighting assembly language and it is not over yet. One day I will have to face it.
 
Is there a way to question folks on some 100 year old magnetic amplifier technology?

retrolefty


Good find!  Many thanks especially for the speedy reply.  I am considering the option that I called a failure but I think the parts you identified are a better way. I am afraid of digital interfacing mostly because I once saw hand written PIC16F88 code for it and it was done for me.   I spent a long time fighting assembly language and it is not over yet. One day I will have to face it.
 
Is there a way to question folks on some 100 year old magnetic amplifier technology?


The Adafruit folks have a software library available to support those two I2C external ADC chips, so you really don't have to get down to the bare bits on how to control those chips, just use the library functions they provide and it's no more complex then using analogRead() commands.

https://github.com/adafruit/Adafruit_ADS1X15

Lefty

dhenry

Quote
I would like to know if the Arduino Mega can do what the INA125 (instrumentation amplifier) does almost (but making a digital output number) sitting at the null point of a wheatstone bridge.


I don't recall if all Megas do this but some Megas have a differential adc. So you can adc the differential signal between the two legs of a bridge.

Obviously the conversion is subject to the same limitations as the adc module.

dhenry

Quote
I once saw hand written PIC16F88 code for it and it was done for me.


The older PICs are fairly unique in that some of their comparators can be configured as opamp.

dhenry

Quote
Once again what I need is the C instruction keywords and maybe an example showing how to use them.


All of it laid out, quite clearly, in the device datasheet.

WVPhysicist

Whenever digital handshake or software is involved I always run into a brick wall. I am looking ahead at the Adafruit parts and what looks like the driver is very long and it has to find includes.   I don't know where to get the includes unless they are already in the Arduino C library.

This is what I figured is the driver:
https://github.com/adafruit/Adafruit_ADS1X15/blob/master/Adafruit_ADS1015.cpp

I see 300 lines of code, some looks like it repeats.  I have no idea how to handle this stuff or what each line does.

Thanks for the help.

Go Up