Many Analog Inputs


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115

    Default Many Analog Inputs

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    For 35 buttons, you may consider using resistors for each and read them via an analog port. (One pin)

    -----------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Many Analog inputs

    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

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis
    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.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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>
    DT

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    So i had to be lucky... done since 1 year 1/2, no problem, about 1000 unit sold as now....mmm.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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>
    Last edited by Darrel Taylor; - 9th July 2006 at 21:25. Reason: .
    DT

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    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

Similar Threads

  1. Erratic analog inputs .
    By timseven in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 10th October 2009, 22:34
  2. pic18f analog comparator problem
    By david.silaghi in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th May 2009, 09:38
  3. Multiple analog inputs ?
    By rngd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 25th February 2008, 15:13
  4. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  5. analog inputs on 16F716
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th October 2005, 04:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts