0
\$\begingroup\$

I'm designing a multiplexer shield for Arduino, by which it will (hopefully be possible to read up to 64 analog inputs such as potentiometers etc.. Schematics of rev.0.1 can be found here.

I'm using a I/O expander to switch between the inputs of 4x 74HC4067's, all channeled to one of the Arduino's ADC pins. The guiding line for the design is that it will be modular - i.e. the user can connect blocks of 8 pots, sliders, or other resistive inputs to IDC headers. The board should also be easily adapted by advanced users for use with different number of connections in blocks.

When connecting a single 8-input block of resistors to half of a 4067's ports, the remaining ports remain floating. While the user is not supposed to read the inputs of these latter pins, I would prefer to have them tied down to ground.

Edit: I thought of adding a pulldown resistor to each of the 4067s' inputs, than use 50k pots on connected sub-modules. The Atmega328 datasheet says its ADC is optimized for 10k and lower, but a quick calculation gives 5V/51kOhm=0.1mA, so I think it shouldn't slow the ADC too much.

schematic

simulate this circuit – Schematic created using CircuitLab

Going through TI's app note I found the following equation: Pullup resistor calc

I'm looking for a pulldown R value, so I exchanged V(t)=5, Vcc=0, and got (approximatley) R=1kOhm. (C_T=10pF,t=500ns).

So (finally) my questions are:

  1. Is this the right way to calculate the required R value?

  2. This value is quite high, which means it will affect the reading from my inputs. Is there a better way?

  3. I assume pulling the pins down may also help to keep the ICs from damage, is this true, and are there other benefits (or negatives) I'm missing?

Thanks!

UriSh

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

If I understand your question correctly, there is no need to pull up or pull down analog multiplexer inputs. They are just fine floating. You may, however, with to add some protection against ESD or or other voltages outside the power supply range.

The limit to series resistance plus source resistance will be set by the ADC in the Arduino MCU and should be something like a few K, certainly no more than 10K for general purpose applications.

If you want to add resistors you are probably better adding one per input because then you won't get the voltage drop due to the series resistance of the multiplexer (but you'll still be loading the analog output of whatever it is connected to).

\$\endgroup\$
5
  • \$\begingroup\$ Hi, thanks for your answer. I have considered using a 1k pulldown on each pin, than using 50k pots and accommodating for the offset in software. If that's unnecessary, how can I implement a simple (and cheap transients/ESD protection? Thanks again for your answer! \$\endgroup\$
    – uri sh.
    Jul 9, 2018 at 15:15
  • 1
    \$\begingroup\$ Please add a schematic to your question. \$\endgroup\$ Jul 9, 2018 at 15:58
  • \$\begingroup\$ There is a link to my current schematic in the original question, is there a better way of doing that? cdn.hackaday.io/files/1092964676120064/… \$\endgroup\$
    – uri sh.
    Jul 9, 2018 at 16:11
  • \$\begingroup\$ You can use Circuitlab button to show us what you have in mind, pot and 1K. One input only will suffice. \$\endgroup\$ Jul 9, 2018 at 16:14
  • \$\begingroup\$ Suggest you use 10K or 20K pots and lose the 1K, it will make the pots very nonlinear. \$\endgroup\$ Jul 10, 2018 at 4:09
0
\$\begingroup\$

You cannot give a pull up or pull down resistor for the pins if they are supposed to be used by the user (by connecting to the ADC pin) The pull up value or pull down value will mess up the user inputs and give wrong values. (However, a very high value of say 1 Mohms can be given. But it also depends on external circuitry what the user will be connecting and the internal impedance of the ADC of the arduino MCU)

It is okay to leave input pin(the 1:16 switch) floating.

Optionally you can give jumper options for the user to enable or disable pulldowns on your board when pins are not used.

Another point

You are using MCP23S08 chip which is an I2C IO expander. There is a possibility of enabling all the four 1:16 switch outputs. It means, there is a chance of 4 analog outputs from different units can be shorted together and may create a simple error to some serious damage to the sensors or other devices connected. Then that is a real concern.

I would use a simple 1:4 switch to solve this case. an extra IC still but worth the safety

\$\endgroup\$
1
  • \$\begingroup\$ Hi, thanks for your answer. By using the MCP23S08 (SPI, or 008 for I2C) I can switch between all 64 inputs, while still using the same library as in other shields in my system, which rely on these ICs' interrupt capabilities. I am aware to the fact that the user may inadvertently cause damage, and will have to address that issue. I will certainly consider using a DIP switch to turn sections on or off. Thanks again! \$\endgroup\$
    – uri sh.
    Jul 9, 2018 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.