Help interfacing 0-10v analog sensor to an ltc1298 A/D converter
rtowler
Posts: 29
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 ) Hopefully someone can provide a nudge in the right direction and I can get this working!
-Rick
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 ) Hopefully someone can provide a nudge in the right direction and I can get this working!
-Rick
Comments
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
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
Thanks for any replies,
Robert
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
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
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
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.
Too funny. Thanks for clarifying this. I work this up with an op-amp.
Thanks for your help.
bongo