ADC signal into PLC

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
cdenk
Posts: 74
Joined: Thu Aug 15, 2002 1:01 am
Location: Lagrange, Oh.
Contact:

ADC signal into PLC

Post by cdenk »

I have a Tri-Plc T100MD-888+ PLC. It has Analog 0 - 5 volt input, and 5 volt reference voltage available. I have a fuel level sensor that is 0 - 90 ohm range to interface, only need around 50 or so steps, and can handle calibration/non-linearity with lookup table or Basic programing. <p>Also what would be the easiest way to get temperature readings, say -30F to +130F, nearest degree resolution would be more than enough.<p>Spent all the budget on the PLC, buying a $250 signal conditioner is not an option.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: ADC signal into PLC

Post by philba »

Need more info on the fuel level sensor. datasheet?<p>If it is truely just a variable resistor, then you should be able to do the following:
Image
where VR1 is your sensor and R1 is matched to close to VR1's max value. The voltage range of the output will be Vref * R1/(VR-max + R1) to Vref. Not perfect but easy. Watch out for the current through VR1 and R1. at 5V and VR1 of 0, an R1 of 100 ohms will pull 5/100 Amps. That would be 250 mW so you should use at least a 1/2 watt resistor (give yourself some margin of error). Check the wattage of the sensor as that could be a big issue. Use R2 to limit the current into the ADC, I'd experiment with it to get the highest possible value while still getting correct results. I'd try 10K to start with. Strictly speaking, it's not necessary but I would do it for peace of mind. I'd also use 1% or better for R1. <p>You might not be able to use the 5V reference if it can't supply 50 mA. Regular +5 supply would probably be OK though. This approach is not energy efficient but then the PLC probably isn't either...<p>A much better way would be to use an op amp to bias the input and enough gain to get a 0-5 V range. You may need to do it if the sensor can't handle much wattage. That get's more complex, though and its not clear from your posting that you are looking for this level of sophistication.<p>Phil<p>[ June 19, 2005: Message edited by: philba ]</p>
cdenk
Posts: 74
Joined: Thu Aug 15, 2002 1:01 am
Location: Lagrange, Oh.
Contact:

Re: ADC signal into PLC

Post by cdenk »

Thanks for the reply, I'll have to give it a try<p>Yes, the sensor is a true variable resistance. I don't have any more info, other than it is GM (General Motors) standard type sensor and would aaume the wattage is sufficient to handle a mechanical gauge. The only info was 0 - 90 ohm range. The OP-AMP solution is within my capabilities of building, just don't know enough to design, at least a stating point, and then fine tune components.
rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: ADC signal into PLC

Post by rstofer »

re: scaling and offset with Op Amp: read chapter 4 of "Op Amps For Everyone", a free book you can download from www.ti.com. The main emphasis is single ended rail-to-rail op amps which do a great job of feeding in to controllers which typically have a fairly low input impedance.<p>For example, it is recommended that the source have a maximum 10k impedance when feeding a PIC. Often this implies an op amp is required to feed the input.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: ADC signal into PLC

Post by philba »

In this case the impedence will be pretty low (mostly R2) so just about any ADC out there can handle it. I still favor the op amp solution but the voltage divider approach is very easy<p>[ June 19, 2005: Message edited by: philba ]</p>
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

Re: ADC signal into PLC

Post by L. Daniel Rosa »

Yes, the voltage divider is easy. For this application it may work well. With a 10 bit ADC only the bottom 5% is needed (I'd prefer more) so the nonlinearity won't get out of hand. Just the same I'd prefer a current regulator.<p>An op-amp buffer on a sensor is always a good idea. Loading sensors reduces their accuracy.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: ADC signal into PLC

Post by philba »

funny, the sensor probably directly ran the fuel meter - no electronics at all. I think it would handle load pretty well. Probably would survive the EMP from a nuclear blast. heh heh. <p>One thing I though of is how you want to handle the region at empty or full. Since some ADCs and op amps don't get real close to the rails you might want to compensate for that. It might see almost empty as empty, for example. If accuracy of "empty" is important, I'd lift the empty reading off of 0V a bit just to make sure that you would see a true empty. Similar for full.
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

Re: ADC signal into PLC

Post by L. Daniel Rosa »

That's a good point about getting too close to the supply rails, philba. There are some op-amps that have PNP input transistors to allow readings down to the negative rail.
cdenk
Posts: 74
Joined: Thu Aug 15, 2002 1:01 am
Location: Lagrange, Oh.
Contact:

Re: ADC signal into PLC

Post by cdenk »

Yes, I did read that the Op-Amps typically don't like being close to the rails, and as part of the voltage divider resistance between Vref and ground for the sensor I was going to be at the ground side. I am waiting on a Mouser order (hopefully today) that includes some Jfets and CRD's (not my initials but current limiting diodes :) :) ) to play with. Will try to get to bread boarding this weekend. Is there a way to post schematics on this board. Thanks again for the help. :)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests