Shop OBEX P1 Docs P2 Docs Learn Events
Help interfacing 0-10v analog sensor to an ltc1298 A/D converter — Parallax Forums

Help interfacing 0-10v analog sensor to an ltc1298 A/D converter

rtowlerrtowler Posts: 29
edited 2006-05-08 00:59 in General Discussion
I am fairly new to electronics (although I did have one of those "101 electronic projects" that radio shack sold as a kid) and the basic stamp but I have completed a few projects and am having a lot of fun. My current project seemed deceptively simple: take an analog sensor that outputs 0-10v and connect it to my basic stamp. I picked up the ltc1298 A/D converter and wired it according to the appkit that Parallax provides. I set up the 1298 in "differential" mode with CH0 set to +. I have the positive lead from the sensor running thru a 190 k ohm resistor to CH0 and CH1 is connected to the sensor's ground. The sensor is powered by an idec 24v DC power supply. The stamp and ltc1298 are on the BS2p20/40 demo board. With everything on, I the voltage differential measured at the 1298 is ~0-5v. With fingers crossed, programmed the stamp.

Wow. It works. Sort of. The values are jumping around quite a bit. I know that the output of the analog device is quite stable so what is going on? I put a scope on it (I am a 120lb. o-scope weakling, but I am learning) and I can see that when connected to the 1298 my stable signal is now fluctuating over 500mv which is pretty much the range I am seeing in the stamp output. If I disconnect the sensor from the 1298 it smoothes right out. What is going on?

Obviously I am missing some basic knowledge about electronic circuits and how components interact with each other. Can anyone provide some tips? Topics I should look at? General circuits that would be appropriate for connecting an analog sensor to the A/D converter? Any direction at all?

Clearly I have a lot to learn, and this weekend I will be picking up a basic electronics book (I guess I should get something newer than my ABC's of Electronics published in 1968 tongue.gif ) Hopefully someone can provide a nudge in the right direction and I can get this working!

-Rick

Comments

  • BongoBongo Posts: 65
    edited 2006-05-06 01:36
    Hi Rick,

    have the datasheet for the 1298 in front of me. Suggest read notes 7 and 8, page 4. Supply voltage range for 1298 is 4.5 to 5.5 volts. Analog input max = Vcc (supply voltage) +0.05 volts for guaranteed output code.

    But you are inputing 10 volts? And 190K resistor is for?

    Need voltage divider to bring your 0-10 volt down to 0-4.095 volt for easy 12 bit conversion. Use metal film resistors. If you sensor cannot supply enough current for the 1298's input requirements, buffer with an op amp. Remember op amp's generally cannot output rail to rail.

    Suspect you may have the wrong idea re use of differential inputs.

    Hope this helps

    bongo
  • rtowlerrtowler Posts: 29
    edited 2006-05-06 04:06
    Thanks for the reply, Bongo.

    And yes, your post is most helpful. Voltage dibider That's what I was looking for. I've already found a website that has a diagram and calculator to work out the details.

    http://hyperphysics.phy-astr.gsu.edu/Hbase/electric/voldiv.html

    And while I don't totally understand notes 7 and 8 on the spec sheet right now, I think I can work my way thru them.

    Thanks!

    -r
  • Robert@HCCRobert@HCC Posts: 80
    edited 2006-05-06 04:19
    In regards to the 1298 - I was also wondering about something.... Looking at the pdf at the parallax site, I am a bit confused. What is connected to CHO and CH1? Is that what differential means? output from sensor goes to both CHO nad CH1 and it compares the two?

    Thanks for any replies,
    Robert
  • BongoBongo Posts: 65
    edited 2006-05-06 05:24
    I could not find the pdf on the parallax site, so can not be certain of what you are looking at.· I think I have attached the applicable Linear datasheet, so you can use that.

    From page 9:

    Although they share the same basic design, the LTC1286 and LTC1298
    differ in some respects


    The LTC1286 has a differential input and has an external reference input pin. It can measure signals floating on a DC common-mode voltage and can operate with reduced spans to 1V. Reducing the spans allows it to achieve 244mV resolution.

    The LTC1298 has a two-channel input multiplexer and can convert either channel with respect to ground or the difference between the two. The reference input is tied to the supply pin.



    Does this clarify the situation?



    bongo
  • Robert@HCCRobert@HCC Posts: 80
    edited 2006-05-06 09:16
    Sorry about that Bongo - I have attached the pdf I was talking about, as well as a jpg from the pdf that pertains to my question. I am wondering what connects to CHO and CH1 , where it shows 0-5v going into the pins. I understand the rest of the connections, just not the connections for CH0 and CH1. This is input for the ADC from my ( for instance) sensor, right? If I use both channels, what connections do I make here? In my case , I wish to connect a MPX4115 pressure sensor. It has three pins i need to use, VOUT, VCC and GND. What connections do I make from here to the ADC at CHO and CH1? VOUT from sensor to both CH pins?

    Also, If I just use it with a single channel, am I correct in thinking I use either CH0 or CH1 with a connection from the VOUT on the pressure sensor and set that up as appropiate in my code?


    Thanks again for taking the time to look at my problem! Its is greatly appreciated!
    Robert

    Post Edited (Robert@HCC) : 5/6/2006 10:06:43 AM GMT
    420 x 300 - 14K
  • rtowlerrtowler Posts: 29
    edited 2006-05-06 17:06
    Robert,

    CH0 and CH1 are the analog "inputs". So yes, you would connect say VOUT to CH0 and then set up your program such that you read CH0 in non-differential mode. The demo program in the 1298 AppKit can be easily modified to do this and would be a good place to start. In fact, it is set up this way and all you have to do is remove the code that toggles reading from both channels.

    Bongo, can you clarify note 7 on the datasheet? As I understand it, Vcc needs to be at least 50mv higher than the max analog signal. What I don't understand is this line "To acheive an absolute 0 to 5v input range will therefore will require a minimum supply voltage of 4.95v over initial tolerance, temperature variations and loading." O.k. Now that I think about it more, I think they are talking about the 1286 in that sentence.

    -Rick
  • BongoBongo Posts: 65
    edited 2006-05-06 22:49
    rtowler said...


    Bongo, can you clarify note 7 on the datasheet? As I understand it, Vcc needs to be at least 50mv higher than the max analog signal.

    It is stating maximum analog input may not be more than 50mV higher than the supply, ie not the other way around.




    What I don't understand is this line "To acheive an absolute 0 to 5v input range will therefore will require a minimum supply voltage of 4.95v over initial tolerance, temperature variations and loading." O.k. Now that I think about it more, I think they are talking about the 1286 in that sentence.


    This is an example that covers both devices.· This example relates to the first statement.



    -Rick
    Figure 8 on page 16 should explain your original complaint.· The capacitor being switched (a switched capacitor ADC?) will be inducing the wobbly voltage trying to source the current through your resistor.

    The device input impedence is going to drop with an increase in frequency, but obviously for any sort of reasonably fast conversion you are going to need a fairly hefty current, hence the need for an op amp.

    Sourcing·via your 190k resistor would be like trying to suck a steak through a drinking straw.
  • rtowlerrtowler Posts: 29
    edited 2006-05-07 16:54
    Bongo said...


    Sourcing via your 190k resistor would be like trying to suck a steak through a drinking straw.

    blush.gif

    Too funny. Thanks for clarifying this. I work this up with an op-amp.

    Thanks for your help.
  • BongoBongo Posts: 65
    edited 2006-05-08 00:59
    I don't think the funny bit's mine.· I may have stolen it from someone else............



    bongo
Sign In or Register to comment.