Shop OBEX P1 Docs P2 Docs Learn Events
Data Acquisition of Analog Voltages — Parallax Forums

Data Acquisition of Analog Voltages

gtslabsgtslabs Posts: 40
edited 2007-03-13 02:58 in BASIC Stamp
I am just now getting into microschip applications and like what I see. I want to make a data acquisition system to dump live data into Excel. I saw the Stamp DAQ program and downloaded it today.

I need to measure the voltage from 5 strain gauge type force load cells. The have a 10V excitation which I would provide separately if the stamps can not provide a precise voltage. They return typically 3 mV/V full scale. So a 500 lb load cell would read 3 mv at 500 lbs with the 10V excitation.· Any lower load would be linear fit from 0 to 3mv in general.

Can I use the Basic Stamp microcontrollers to read these analog voltages at these low mv ranges? If not what can I do to acquire these readings.?

Thanks
Steve

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-26 05:35
    This is a very low voltage, very very subject to noise, even to poor contacts in any cabling. You will need a quality instrumentation amplifier that mounts near the load cells and produces a voltage more like 0-5V full range. Download the Parallax tutorial on Basic Analog and Digital from their Stamps in Class page on their website. It shows how to use a Stamp with an external analog to digital converter including sample programs. I suggest you contact the manufacturer of your load cells about appropriate instrumentation amplifiers.

    Tracy Allen's website (www.emesystems.com/BS2index.htm) is chock full of information on using Stamps for data acquisition.
  • DerekDerek Posts: 15
    edited 2007-02-26 05:35
    One way of bringing an analog voltage into the stamp is to use a ADC, because you are dealing with low voltages you may want to use an instrumintation amp and span and offset the voltage range over 5V.

    There are examples of using amplifiers and ADC's in the docs for the process control text.


    EDIT: Dang you beat me too it mike!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-26 05:37
    Also, the Wikipedia is useful: en.wikipedia.org/wiki/Instrumentation_amplifier
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-02-26 17:17
    As Mike says (and thanks for the link-through), this 3mV full scale signal will require an instrumentation amplifier. How deep do you want to get into DIY?

    On the expensive but drop it in end, you can find complete modules from companies like Dataq, Phoenix Contact, Omega Engineering and so forth, some which fit on standard DIN rails and include the 10 volt excitation, a choice of output formats including direct to digital, and additional features like isolation.

    On the next tier are building blocks from companies like Analog Devices. Here is a link to their applications page on weigh scales:
    www.analog.com/en/app/0,3174,999%255F1116,00.html
    These days, a strain gage may be placed right next to a 24 bit analog to digital converter. That makes it relatively easy. Analog devices 77xx series or Linear Tech 24xx series. Here is an application note from Linear:
    www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1155,C1001,C1152,D6637

    On the DIY end, you can build amplifiers from precision op amps. But in all cases, the signal leads should be short, and if not then they should be twisted and shielded and balanced. Also keep in mind the thermocouple effects.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-02-26 17:38
    This probably won't affect the design approach but needs to be considered at some point: Based on the load cell specs, I come up with 30mV f.s., instead of 3mV, with a 10V excitation.

    -Phil
  • gtslabsgtslabs Posts: 40
    edited 2007-02-26 18:39
    Phil, how do you arrive at 30 mv?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-02-26 19:48
    You have to multiply the sensitivity by the excitation voltage to get the fullscale reading. At 3mV/V fullscale, you'd get 3mV with a 1V excitation and 30mV with a 10V excitation.

    -Phil
  • Mohamed RefkyMohamed Refky Posts: 47
    edited 2007-02-26 20:26
    You need a special ADC like the AD7730 for weigh scale applications.It is connected directly to the load cell and outputs serial word that easy to read by BS2.

    Mohamed Refky
  • gtslabsgtslabs Posts: 40
    edited 2007-03-13 02:58
    Mohamed, I received·2 AD7730BN chips today and have been using examples posted here from your project.
    When I run the program I only get zero's for output.· I have a 0.1-1mv signal generated from my 10V external excitation source when I just use hand pressure on the 2500 lb load cell used for bech testing.

    What I assume· is your code is below.

    The other question I have is based on the pin outputs. There is a post giving the locations as follows:
    AD7730 connctions BS2

    (SCLK) pin1
    pin12 (P7)
    (DIN) pin22
    pin13 (P8)
    (DOUT) pin21
    pin14 (P9)
    (RDY) pin20
    pin15 (P10)
    But what is Pin12...Pin15 ? I used the P2,3,4,5 as declaired in the program below.

    In any case I am only getting 00000 because I am using dec5. I tried multiplying the result by **1000 incase I was reading mv back but that did not help.

    And what should the output be? Bits or mv?

    Thanks
    Steve



    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    'Use of an AD7730 in a weigh scale applications. Example codes of writing and reading of registers
    ADdata····· VAR···· Word··· 'variable to hold 16 bit result.
    DATAin····· CON···· 2······ 'AD data input pin.
    DATAout···· CON···· 3······ 'AD data output pin.
    SCLK······· CON···· 4······ 'clock to AD.
    RDY········ CON···· 5······ 'RDY input .
    ' I am using a bipolar analog signal 0-30 mv
    ' I have those wires connected to the AD7730BN chip to pins 10 & 11.
    INPUT 5
    Initial:
    ···· SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$FFFF\16,$FFFF\16]······ 'write 32 ones will reset the AD7730 to the default state
    ···· SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$02]············ 'write to communication register setting next operation as write to mode register.
    ···· SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$3080\16]···· 'write to mode register starting continuous conversion for 10mV input range,unipolar,16 bit data word and 5V reference.
    ···· SHIFTOUT DATAin, SCLK, MSBFIRST, [noparse][[/noparse]$21]············ 'write to communication register setting next operation as continuous read from data· register.
    ···· LOW 2·········· ' set DIN line low to insure part is not reset while in continuous read mode.
    ReadData:
    waitRDY:
    ·· IF RDY = 1 THEN waitRDY···················· 'wait for RDY to go low to indicate output update.
    ··· SHIFTIN DATAout, SCLK, MSBPOST, [noparse][[/noparse]ADdata\16]··· 'read conversion result from data register.
    ···· DEBUG DEC5 ADdata, CR···························· 'display data in decimal.
    ···· PAUSE 500
    ·· GOTO ReadData
    END
Sign In or Register to comment.