ADS1234 interfacing with ATMEGA8

Discussion in 'Embedded Systems and Microcontrollers' started by priyersi, Feb 27, 2013.

  1. priyersi

    Thread Starter New Member

    Feb 25, 2013
    7
    0
    Hi all,
    I am trying to use ADS1234 to measure the output of a load cell. I am using an ATMEG8 A uc to read data from the ADS and send to a PC. ATMEGA is running with an internal oscillator of 8MHz. UART baud rate is 9600. A USB to TTL serial cable (3.3V ) is used to connect to the PC.Both the ADS and AT MEGA are powered by the output of LM117S 3.3 regulator which has an input of 5v,1A.
    Now my problem is that when i connect the load cell output to the ADS(currently only one channel is used) the AT MEGA starts sending some unreadable data or sometimes stops sending data. Without the inputs it sends some decimal numbers. The load cell when connected draws about 27mA and also the 3.3V drops to about 3.24.
    I tested the ADS using a signal generator by giving some Milli volt inputs and it was giving not accurate but almost correct data. But when i changed the ouptut impedeance of the gen. ADS starts giving incorrect data, With an impedance of 2R ADS saturates at ~18mV(almost correct) but at 50R it happens at ~270mV.
    The ADS has the following settings
    GAIN = 128
    SPEED = 0
    AVDD=5V
    DVDD=3..3V
    REFP=5V
    REFN=0V
    Can any one help me to find out the problem!
    (Please forgive my mistakes if any, i am new to this forum.)
    Many Thanks
    Priyesh
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think your testing setup is wrong. I would not have used any signal generator for testing purpose. I would have used a fresh 1.5 volt battery. And a restive voltage divider. And some precession multiturn pot. All connected together with as short leads as possible. For the reference some calibrated precession voltmeter. Then taken several measurement over the full scale. Also then using it in 50R mode. The instrument will expect that it is 50ohm in the other end. Connecting a a 50ohm resistor at in parallel with the input on the ADC. Will help a lot on the result i think
     
    priyersi likes this.
  3. priyersi

    Thread Starter New Member

    Feb 25, 2013
    7
    0
    Thanks for your quick reply. Now the ADS part is clear. I connected two pots as you said and is giving me good results.
    But the problem that i mentioned about the ATMEGA8 A -UART is still alive. Could you please spend a second for that?
    Thanks
     
  4. priyersi

    Thread Starter New Member

    Feb 25, 2013
    7
    0
    Finally got it. It was the problem with the ATMEGA's internal oscillator. When power supply changes Fosc changes, which in turn changes the baud rate of UART.
    Thanks
     
  5. Diegogr

    New Member

    Mar 8, 2013
    2
    0
    Hi Priyes, finally how did you resolved the problem whith the AMETGA8 UART? Did you have to change the baud rate?
    Thank you!
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    :confused:
    I think his last post answers your question. Change the baud rate generator to match the desired baud rate and the oscillator frequency.
     
  7. Diegogr

    New Member

    Mar 8, 2013
    2
    0
    Yes, but what is the fosc value of the ATMEGA running with the internal oscillator of 8MHz and 3.3V?
    Thanks
     
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    8MHz..............
     
Loading...