Pages: [1] 2   Go Down
Author Topic: Analog screen meter  (Read 2171 times)
0 Members and 1 Guest are viewing this topic.
south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Money for nothing.

Need help --- suffering major brain strain. Consider the following .....
It should be simple to set up a series of muxed voltage divider networks such that the V+ and V- pins of  a fully differential 10 bit analog to digital converter can be switched thus (say): 1 to 2 volts, 2 to 3 volts,  3 to 4 volts, and 4 to 5 volts i.e. they have a zero to1 volt (say) range between the V+ and V- inputs. (I know other factors come into it --- I'm trying to create a simplified scenario).
Now suppose Vref is then set at 1 volt.
Therefore each one volt sub-range is capable of a resolution of 1 mV i.e. the 1000 steps are divided between (depending on which setup is switched in) 1 and 2 volts, 2 & 3 volts, 3 & 4 volts etc. etc.

So with the addition of a mux and a little programming logic, one can get around 1.25 mV resolution from a 5 volt 10 bit ADC over the WHOLE 5 VOLT RANGE instead of, as would normally occur, 5 mV resolution. A cheap 10 bit ADC acts as a 12 bit ADC.

Experts have told me the above is twaddle. Is this so?

« Last Edit: September 19, 2011, 12:28:10 am by qmt5 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The error in your thinking is setting the reference voltage to one volt. When you do that everything you measure above that will read as 1024, you won't get any increase in resolution, the measurements are always relative to ground.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK I thought he wanted to use the arduino's analogue input.

The other thing to remember is that the resistors making up the potential divider would have to be at least as accurate as the resolution of the A/D, so for a 10 bit A/D you would have to have 0.1% tolerance resistors. When it comes to A/D conversion, as with other things, there is no such thing as a free lunch.
Logged

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Reply to KE7GKP
I'm feeling my way into a new subject -- you all know more than me & I appreciate your help. What I don't need is someone who got out of the wrong side of bed accusing me of spamming & "playing stupid games".. If you don't know the answer to my query stay out of it.
To everyone else....
Thanks for taking the time. Re Grumpy_Mikes suggestion ; yes that's true but I thought that because V- is acting like a sort of 'floating ' earth then the 1024 steps wouls be limited to each 'block' of one volt (sorry if I'm using the wrong terminology --- like I said, newbie).
If you've got plenty of money then a 16 or 24 bit ADC would be a lot simpler, sure. But if all you've got is time I'd like to know if it's possible before I spenf the money on bits.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Money for nothing.

...but are the chicks for free?

/sorry, couldn't resist - Dire Straits and all...  smiley-cool
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Dire Straits


My favorite band from the 70s, and Mark Knoffler is still my favorite lead guitarist.

Lefty
Logged

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear KE7GKP
OK I get that you don't like spammers. I don't like spammers. Nobody likes spammers. Their own mothers don't like spammers. I'm sorry you got disappointed  that there is no real way of saving money by getting 16 bit resolution from a cheap chip. So am I !!
If I minded looking stupid I wouldn't ask stupid questions. Someeone said if you ask stupid questions you look stupid --- if you don't ask stupid questions you stay stupid.
Re differential input -- surely if it didn't do what I said the manufacturers wouldn't put it in a chip; what other reason would there be for it?
Re efficiency -- we're hobbyists, friend. We'll spend 20 hours cooking up something we could buy for $10, working in effect for 50 cents an hour because it's FUN!!
So far is one person says it's tricky and in-efficient. What I need to know is can it be done?
 
Logged

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I hope is final word on subject, with more risk of  appearing even stupider --- when I think of it, isn't what I want to do very similar to the logic in an auto-ranging multimeter? If so, what's so damned impossible, or stupid or unreasonable about it? Here we go, KE7GKP --- lay it on me. Waiting....
Seriously, it's all very esoteric. The concept of earth seems to be relative only, and there is no absolute standard earth other than some arbitrary less than a higher potential. What I read about differential input in an adc seems to my poor old brain to push the idea of being able to select a range in which the bottom input is still higher than the chip earth. If I've got it that wrong maybe I should take up something simpler before I electrocute myself.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 167
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

isn't what I want to do very similar to the logic in an auto-ranging multimeter?

An auto-ranging multimeter always references to ground... wait, what was the question again?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and there is no absolute standard earth other than some arbitrary less than a higher potential.
There is, it is the potential of a stake in the ground. A lot of people mix up this with the common signal point in a circuit as these are often tied together. I think you are missing the point about the accuracy you need on those potential dividers. There is a concept called Monoticity basically it means that a higher reading is given by higher voltages. A not altogether unreasonable thing to ask from an A/D.
With your scheme you need a very high order of accuracy on your resistors so that the readings made on one range map to a reading on the range next to it. With only 1% resistors you can't do that. That is why a good auto-ranging multimeter is quite expensive or rubbish.
Logged

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Mike, it's all pretty new to me but I had found a couple of things I didn't fully understand (quotes below) which suggested my idea was feasible. But I see what you mean about accuracy. If you're interested, the second reference below deals with the overlap problem. It's possible but not simple.
Anyhow, hope I'm not loading the forum too much. I'll stop now. Never been in a forum before.
"... have contemplated using a normal ADC with a MUX http://www.sparkfun.com/products/9907 and tune each section to a seperate voltage range, then scan till its in range and ADC the signal then. I didn't want to have to manipulate the data that much. Or use a 4 2.5V ADCs using relative ADC line references and scan 0 - 2.5, 2.5 - 5, 5 - 7.5 , and 7.5 - 10. Then add them together in the end to get the total ADC...."
http://electronics.stackexchange.com/questions/7597/24bit-or-better-adc-at-10v-with-at-least-100ksps
"..... prepared to make a table of values of U R which we can threshold with the
measured value to determine when to switch ranges. An ..."
http://jameskbeard.com/Rowan/Electronics_I_ECE_Materials/Microcontroller_Breath_Analyzer_Lab_Protocol_01.pdf


Logged

Boston Suburbs
Offline Offline
God Member
*****
Karma: 14
Posts: 955
I am above your silly so-called "Laws", Mister Ohm.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I totally get what you are saying, and I'm curious as to how this will pan out.  I think it may be that scaling on the resistor accuracy is the inherent gotcha... certainly seems to be the kind of thing I end up learning after coming up with some grand scheme in my mind.. LOL

I've always liked the idea of measuring the charge time of a capacitor against a comparator.  Not sure if this is a used method, and I suspect sample rate is the gotcha there, but I'd always thought that a comparator vs. a known quantity ought to be darn accurate.  Comparators are built in to the Arduino also, but I don't think the language addresses them directly, I think you need to go under the hood for a few lines of C and fiddling to use them.. though probably worth it, if only for the fiddle factor.  Kinda surprised comparator functions aren't part of the language actually, now that I think about it..

1000% on the "Of course someone else has done it better, cheaper, faster, and thirty years ago to boot!" -- I have a great passion for re-inventing the wheel, perhaps you'd be a fan of my most recent design, it's rectangular so it's easy to carry....

Arduino (in my humble opinion) is all about "doing it the wrong way" (well, at least be safe, fire is bad, ummkay?) and learning from it.  Take my advice and order some spare 328's, you are going to cook a few of them.  Cheap lessons at $5 each.  In fact, a couple of times I've seen a decent price difference downward on 168's, and I'd think the same happens with 88's.  The 32-16-8 refers to flash program memory, otherwise the chips are largely interchangable-- so if you sketches are small, and you are ending up blowing chips, might make sense to get a few of the cheaper versions if the price point is right...

A thought-- maybe you could revise the title of the post to be more clear.. swarms of broke hobbyists seeing something like "free money" or "Tech Dumpster Around Back" kinda chums the waters, lol.
« Last Edit: September 17, 2011, 01:04:04 pm by focalist » Logged

When the testing is complete there will be... cake.

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As the subject is new to me my approach changes as I learn more. For instance, analog to digital converters are becoming increasingly scarce and expensive in 'thru-hole' form, whereas SMD chips seem to be becoming more available in higher specs with lower prices. Initially I developed a simple and cheap self-aligning device to connect SMD chips without having to solder them, which was fast and reliable. Great for poor old guys like me with the 'shakes'. But recently I discovered reflow soldering with solder paste, and found it to my surprise both fast, simple and reliable. Now, currently available in SOIC packaging is the MCP3422, which has software control for 12, 14, 16 and 18 bit ADC,  has a built in multiplexer, full differential inputs, and built in op amp giving gains of x1, x2, x4, and x8. I can get then for about $2 !!!. Different ball game -- less need for 'stepped' input. But then I found the 74HC4052, which is a serial/analog mux/demux chip. This is analog as well, so you can pass analog values thru the IC !! It's cheap as well.
Digressing, my heading says 'money for nothing'. It meant get $50 worth of adc capacity for under $10. I still think it's possible, but I want to change the heading to something else --- it upsets people. How do I do this?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've always liked the idea of measuring the charge time of a capacitor against a comparator.
The problem is you need to know the exact value of the components. Now if you use the dual ramp method the component values drop out.
http://en.wikipedia.org/wiki/Integrating_ADC

Quote
I want to change the heading to something else
View the first post and hit the modify button. Then change the title and hit save. You can do this on all posts you made, not other peoples but the first post name is what will show up in the list of posts.
Logged

south australia
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm changing the title of this post from 'Money for Nothing', which seems to piss people off, to 'Screen Analog Meter'.  All  this started when I wanted to reproduce an analogue meter on screen with software i.e. moving needle. There is a degree of inertia in a physical system that dampens out 'jitter'. I got a lot of jitter. I tried all sorts of jitter removal --- averaging & hysteresis software solutions,  handshaking, slower and faster data transmission, binary data transfer instead of string transfer. I could set up a for/next loop and get smooth movement, but when I sent data over to processing the poor old needle got delusions of grandeur, thought it was a quantum particle  & tried to be several places at once. I was using a pot for tests & maybe some of it was rough surface, but not all.
I was dropping a lot of data in the transfer. Reason I got off into higher resolution adc's was I thought that might be the answer, and in the process figured a way to get more bits out of a cheap adc --- hence the dumb 'Money for Nothing' heading. But higher resolution isn't the answer. I think it must be in converting the high speed & jumpy stream of data with something like a for/next loop with small steps. I'll see how that goes.
Logged

Pages: [1] 2   Go Up
Jump to: