PDA

View Full Version : Many Analog Inputs



Ioannis
- 8th July 2006, 13:40
Hi.

I have a heavy analog project that requires at least 70 analog values (from pots) to be converted plus 35 buttons. I considered using the PCF8574 as for the digital inputs or even multiplex them in rows and col's.

The difficult part is analog. Any ideas? Any multi channel A/D or multiplexer you have used, could help me decide.

Ioannis

sayzer
- 8th July 2006, 14:57
For 35 buttons, you may consider using resistors for each and read them via an analog port. (One pin)

-----------

Acetronics2
- 8th July 2006, 15:47
Hi, Ioannis

70 pots ... wow, how much hands to drive them ??? two 8 channel low Ron multiplexers could do it ... makes 8 I/O ports

for the keyboard ... 7 port lines can give you 42 buttons ... the trick is just to add a series diodes with each button, and swap the line levels that test the buttons.

Total is 15 I/Os ...

Sorry for Sayzer, but 35 resistors will really be too close a value to each others ( 3% steps ) ... will give a rock'n roll decoding !!! and we do not talk about the POT command !!!

Alain

Ioannis
- 9th July 2006, 14:04
Thanks for the replies.

Well for the buttons I think I 'll choose the matrix method (5x7 or more for the future).

About analog I came up with a scheme like this:

The pots will be grouped in 8 rows by 9 or more columns.

One end will be grounded. The other end will be joined for every row together and powered by a PIC pin output.

All wipers in one column will be joined together through a schotky diode and grounded by a 1M resistor, then input to a Analog multiplexer. The output of the multiplexer will be driving the A/D of the PIC.

I know the above idea will lack precision, but this really does not matter a lot if the error is common for all pots.

For the history, the application is a MIDI controller for a music plug-in that has on software many "analog controls" on screen. The idea is not to use the mouse to change the control but a real knob.

Any comments welcome.

Ioannis

mister_e
- 9th July 2006, 14:53
Most multiplexer provide a low resistor between the IN/OUT, i don't see any kind of problem by using it. just make sure you smooth the signal at the output and you should be in business.
I already done something like that with almost the same requirement. The main difference was that i used few a/d and few multiplexers and all the POT was always connected to AVdd and AVss, the output to the Multiplexer, multiplexer out to an opamp (to match 100K impedance), then to the PIC a/d.

Have fun!

keithdoxey
- 9th July 2006, 19:34
I have a heavy analog project that requires at least 70 analog values (from pots) to be converted

I would be inclined to use a CMOS multiplexer such as a 4051

Use one of these for every 8 pots. Inputs ABC give binary selection of the pot to be sampled. There is also an inhibit pin that disables all switches so can be used as a chip select.

For 70 pots, 9 of these would give you 72 inputs. You could use multiple A/D inputs to sample more than one bank at a time, or just a single A/D input by commoning all the 4051's together.

digital requirements would be ABC + 1 inhibit pin per chip so a total of 12 lines but even that could be reduced by using something like a couple of 74HCT595 to drive the multiplexer chips using just 3 lines.

mister_e
- 9th July 2006, 19:41
yup 4051 was the one i used too. Few I2C i/o expander were used to control those 4051 lines... well i had 27 of them on-board after all :)

Darrel Taylor
- 9th July 2006, 20:44
I went the 4051 route before too, but had several problems.

There are 2 different versions. CD4051 and the 74HC4051.

The CD4051, was completely useless. Very high ON resistance (~300 ohms), and very high cross-talk between channels.

The 74HC4051 was better, lower ON resistance (~80 ohms), but the crosstalk was still unacceptable. Readings were still affected by the input from the other channels.

Ended up using a MAX4617 instead. 10 ohm ON resistance and very good crosstalk rejection. (pin compatable with 4051)

A bit more expensive, but it was worth it.

They also have a couple 16 channel multiplexers. Might help with the POT count.
<br>

mister_e
- 9th July 2006, 20:52
So i had to be lucky... done since 1 year 1/2, no problem, about 1000 unit sold as now....mmm.

Darrel Taylor
- 9th July 2006, 21:17
I suppose it depends on the application. If being 5-10 counts off (10-bit) doesn't matter to your program, then no one will complain.

In mine, it was too much error.

And, only 400 sold (so far).
<br>

mister_e
- 9th July 2006, 21:25
Yup, you're right. In fact the whole 10bit accuracy wasn't really needed. 8 bit was enough to do the job (motorized fader and pots position). longer ones 100mm /256 steps = 0.4mm or so... not a human will see it.

But i'll keep in mind the one you sugested.

Ioannis
- 10th July 2006, 08:15
Thanks to all for the replies.

I found another multiplexer, 74HC(T)4067, 16 to 1 analog. I think it is the one to go (will support 8x16=128 pots maximum!).

Darrel, in your case I suppose that you had AC signals? That's why crosstalk was important. In my case and maybe Steve's DC or low freq does not need any good crosstalk parameter. A HC series might be just fine.

Again thanks to all (and Steve for the files, I got them).

Ioannis