Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best Method To Quantise Multiple Analogue Signals?

Status
Not open for further replies.

Himszy

New Member
Hi,

Problem:
I have 13 0-5V 'stepped' signals that will have four voltage levels at Vss, 1/3*(Vdd-Vss), 2/3*(Vdd-Vss) and Vdd. I'd like to sample at 1kHz (Nyquist's Theorem) and essentially end up with a 2 bit value for each signal.



I've thought about doing it onboard with a PIC 18F4520 (just because it's the one I'm most familiar with), but the high (10bit) resolution is overkill and the ADC happens sequentially meaning it would take rather a long time and wouldn't give me a comparison of the waveforms to each other at a single instance of time.

Individual ADCs are again very high in both cost (particularly important with 13 signals in total) and board space. Another option I see would be to create my own flash ADC but again cost and board space.

Would it be better to multiplex the signals by attenuating each one by specific weighted amounts and then use the PICs onboard ADC to create a 10bit value that could then be related to the signal values?

Any other suggestions? I've never had to do any ADC work before and looking on RS Components it doesn't strike me that there's a suitable chip....

Cheers,
 
If you multiplex the 13 signals to one ADC, you only need a sampling rate of 13KHz. If you put the PIC's internal ADC into the 8bit mode, and run it on the fastest clock allowed, it would seem you could get a 13kHz sampling rate. You could also "overclock" the ADC, or take the answer before the ADDone bit gets set. A successive approximation ADC gets the most sig. bits first; and you do not care about the least sig. bits...
 
The way I was planning on multiplexing them wouldn't work in hindsight....only for digital signals.

Would I know that the most significant bits have been set? I'm assuming I'd need to implement this with a timer and interrupt? It does still cause the problem of taking a sequential reading. I'm interested in the difference between the signals at an instance so it's less than ideal if I'm honest.
 
The skew in sampling the 13 signals using a single ADC shouldn't be a problem, but if it is, you need either 13 ADCs which are all strobed at the same time, or 13 Sample/Holds, which are then multiplexed to a single ADC using an analog muliplexer. I haven't tried it, but should be able to start an ADC conversion (in the PIC), wait a fixed delay, and then read the ADC result register. The MSBs should get set early in the conversion process. At any given ADC clock rate, the minimum delay to get just the two MSBs should be constant...
 
If you've got 13 signals each of which can have 4 levels (2 bits) then the result will be 26 bits of data. Therefore there is now way that you can get all that data onto one reading of a 10 bit ADC converter.

In theory you could combine up to 5 signals with suitable resistive dividers and then read them with the ADC. However, that would rely on incredibly accurate voltages and resistors, and I would suggest 2 could be combined, or 3 if the voltages are very accurate and you buy good resistors.
 
If you're going to use a MUX to steer the sample to the MCU, why not use 3 comparators instead of the ADC? You end up with a digital read instead of an analog, and it should go much faster. If your uC doesn't have 3 separate internal muxes, the use external ones or reconfigure your internal one to change the reference. Have your thresholds be at 1/6 * Vdd, 1/2 * Vdd, and 5/6 Vdd. From those three digital inputs, you can determine what your input voltage is.
 
The way I was planning on multiplexing them wouldn't work in hindsight....only for digital signals.

Would I know that the most significant bits have been set? I'm assuming I'd need to implement this with a timer and interrupt? It does still cause the problem of taking a sequential reading. I'm interested in the difference between the signals at an instance so it's less than ideal if I'm honest.

hi,
The HEF4067 is a 16 to1 Analog/Digital mux/demux IC.
 

Attachments

  • HEF4067B_CNV_3.pdf
    106.9 KB · Views: 204
I think that's the most elegant solution. Although I'm one comparator short on a 4520 so if I go up to a 18F27J53 and read in all my values, when finished poll a single channel, as soon as that changes I know to read again.

Cheers,
 
If you are going to change micros anyway, why don't you just pic one of the many PIC18s that has 13 or more ADC channels?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top