CR4 - The Engineer's Place for News and Discussion ®


Previous in Forum: Shear Pin Relay   Next in Forum: Effect of Power Factor Correction in Fuel Consumption
Close
Close
Close
15 comments
Member

Join Date: Feb 2011
Posts: 7

Analog Input on CPU

04/20/2017 10:42 AM

I want to use AD 22100 temperature sensor with 0-5V output and don't want to loose resolution of ADC. Can anyone tell me, how analog input 0-10V on Siemens cpu is designed? Is it a simple voltage divider to lower voltage from 10V to 5V for ADC input on MCU? Could I use a signal conditioner like this to adjust the SPAM and OFFSET to 0v = 0 mA and 5V = almost 20 mA.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain, and now disconnecting as Little England and Wales (not too sure about Wales bit, either). Kettle's on.
Posts: 25917
Good Answers: 683
#1

Re: Analog input on CPU

04/20/2017 10:43 AM

Yes. Siemens can do this and, joy of joys, it's only a simple telephone call.

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Register to Reply Score 1 for Off Topic
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9418
Good Answers: 444
#2

Re: Analog Input on CPU

04/20/2017 11:13 AM

Siemens make a lot of CPUs. Any particular one?

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 10004
Good Answers: 122
#3

Re: Analog Input on CPU

04/20/2017 11:42 AM

You cannot adjust the SPAM, that really depends on how many cookies you are getting.

Signal conditioners are used all the time, but in many cases where ultimate precision and accuracy are not needed, you can use a simple high impedance voltage divider and get acceptable results, just remember to include the signal factor (if needed) in any further logic tree about this temperature.

Why not use a digital temperature sensor (if the temperature range matches your application).

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru

Join Date: May 2006
Location: Placerville, CA (38° 45N, 120° 47'W)
Posts: 4341
Good Answers: 157
#8
In reply to #3

Re: Analog Input on CPU

04/21/2017 12:18 AM

Hopefully, Brandon understands the difference between SPAM and SPAN, but I think it is a mistake to take it for granted. Not everyone recognizes sarcasm when they read it...

__________________
Teaching is a great experience, but there is no better teacher than experience.
Register to Reply
Guru
Engineering Fields - Instrumentation Engineering - EE from the the Wilds of Pa.

Join Date: Feb 2006
Location: middle of nowhere, Pennsylvania
Posts: 2427
Good Answers: 57
#10
In reply to #3

Re: Analog Input on CPU

04/21/2017 2:16 PM

Everyone who tries it adjusts Spam. Who can eat it straight out of the can????

Oh, I guess US Army soldiers had to in WWII. My Dad never ate Spam again in his life after getting out of the service.

__________________
Remember when reading my post: (-1)^½ m (2)^½
Register to Reply
Guru

Join Date: May 2006
Location: Placerville, CA (38° 45N, 120° 47'W)
Posts: 4341
Good Answers: 157
#11
In reply to #10

Re: Analog Input on CPU

04/21/2017 11:32 PM

"Everyone who tries it adjusts Spam." What does it mean to adjust Spam?

Actually, I am rather fond of the kind of Spam you are referring to. It's best sliced and browned in a frying pan, but yes, I can eat it right out of the can, sliced as lunchmeat. Unfortunately, my wife thinks it's not healthy, so I rarely get to enjoy it!

Of course I was thinking of computer SPAM, without the slightest thought of SPiced Ham.

__________________
Teaching is a great experience, but there is no better teacher than experience.
Register to Reply
Guru

Join Date: Dec 2016
Posts: 2748
Good Answers: 100
#12
In reply to #11

Re: Analog Input on CPU

04/22/2017 12:53 AM

Register to Reply Off Topic (Score 5)
Guru

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 10004
Good Answers: 122
#13
In reply to #12

Re: Analog Input on CPU

04/24/2017 10:08 AM

Spam: The beverage of real men and Vikings everywhere, some even inhale it!

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply Off Topic (Score 5)
Guru

Join Date: May 2006
Location: Placerville, CA (38° 45N, 120° 47'W)
Posts: 4341
Good Answers: 157
#14
In reply to #13

Re: Analog Input on CPU

04/24/2017 10:48 AM

I'd never heard of Spam as a beverage, but lo and behold: http://www.spam-energydrink.com.

I don't believe it is wise to consume any beverage of that ilk. The poor English on their web page convinces me not to try this one!

__________________
Teaching is a great experience, but there is no better teacher than experience.
Register to Reply Off Topic (Score 5)
Guru

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 10004
Good Answers: 122
#15
In reply to #14

Re: Analog Input on CPU

04/24/2017 11:08 AM

I totally agree that drinking something named "SPAM" is too far out there for most folk, me too. If I need energy, I just take some peanut butter, or even coconut oil (very good to long sustaining energy), and a bit of apple juice brings quick energy and alertness also, but without aggressive ingestion of caffeine.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru

Join Date: Apr 2010
Posts: 5087
Good Answers: 484
#4

Re: Analog Input on CPU

04/20/2017 12:39 PM

I don't know which microcontroller you are using, but usually the analog input has a reference input. You should be able to connect the +5 of the temperature sensor to this reference input as shown in the diagram. The A/D converter converts the input voltage to a digital value between 0 (for 0 volts) and the maximum digital value (e.g. 4095 for a 12-bit converter) for the Reference voltage.

Register to Reply
Guru

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 10004
Good Answers: 122
#5
In reply to #4

Re: Analog Input on CPU

04/20/2017 1:48 PM

I repeat, in that temperature range (to 150 °C, there are digital temperature sensors which only require three wire connection: Vss, GND, and digital one wire (transceive).

Not only that, but multiple sensors can be attached to one digital input, because the sensors have their own IP address built in, thus CPU knows which sensor is being polled.

If that does not sort it out for you, then yeah, by all means go with the 10 or 12 bit analog input (or whatever you have available). If not enough resolution, then utilize special signal averaging to get better results (average some of the digital results).

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru

Join Date: Dec 2016
Posts: 2748
Good Answers: 100
#6

Re: Analog Input on CPU

04/20/2017 7:28 PM

What is the resolution of that ADC? How many bits?

Something to consider: the AD 22100 is accurate to around ±2%. Plus or minus one part in 50. That's actually not very good. If that ADC were only 8 bits, for example, and you didn't condition the sensor's output to the full 0-10V ADC range but input the sensor's 0-5V signal without any scaling - in other words, you're using only 7 of those ADC bits - you'd still have at least twice the ADC resolution needed for a sensor of that (in)accuracy.

Register to Reply
Guru

Join Date: Dec 2016
Posts: 2748
Good Answers: 100
#7

Re: Analog Input on CPU

04/20/2017 7:48 PM

Now, if your Siemen's processor has an ADC reference input, use it in the manner suggested in Rixter's post, above. Otherwise, if that ADC is 8 bits or more and the input range is fixed at 0-10V, I'd simply run the 0-5V signal into the ADC directly and do the appropriate scaling in software. More ADC bits means better resolution but not necessarily better accuracy where that sensor is concerned.

Register to Reply
Power-User

Join Date: Jul 2016
Posts: 268
Good Answers: 9
#9

Re: Analog Input on CPU

04/21/2017 12:06 PM

The more times you process a signal, the more error you include. You need to check to see that doubling the span doesn't introduce more error overall.

Siemens makes 12 to 16 bit resolution input modules, the 16 bit ones, 15 bit plus sign are SM 331 6ES7331-7NF00 or 7NF10- with hardware interrupt at conclusion of conversion.

Their single ended 0-10V input modules are only 13 bit, so not as good resolution as +/-10Vdc at 16 bit conversion, I think.

The 0-5V transducer, if you were able to span it to 1-5Vdc, you'd have a perfect match to a standard Siemens 16 bit as listed above.

Register to Reply
Register to Reply 15 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Copy to Clipboard

Users who posted comments:

Andrew Westman (3); dkwarner (3); James Stewart (4); JohnDG (1); Phys (1); PWSlack (1); Rixter (1); rwilliams (1)

Previous in Forum: Shear Pin Relay   Next in Forum: Effect of Power Factor Correction in Fuel Consumption

Advertisement