0
\$\begingroup\$

I want to test the analog inputs of a CD4051BE multiplexer, so I created four voltage dividers in order to measure four different values of analog input. I connected them to the I/O0 - I/O3 ports of the IC and connected the output port of the IC to the analog input of an arduino board.

After that I read the values of each one voltage divider using the select lines, and it worked as expected.

I have five pieces of CD4051BE in my possession (bought from the same shop), so I decided to try them all. I was surprised by the fact that every each one was delivering different values, about 5-10% of maximum value.

Mt guess is that it happens due to a slightly different internal resistor for each one IC. If this is the case, how can a multiplexer be used for manupulation of several analog sensors, since accuracy errors occur?

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ This might be cause by variations in the internal resistance of the mux switches, in combination with the load the A/D input poses. To reduce or eliminate this effect, put a buffer (opamp in voltage follower mode) between the mux and the A/D input. \$\endgroup\$ – Wouter van Ooijen Mar 2 '16 at 18:04
  • \$\begingroup\$ Sorry to bother you, but since my knowledge in electronics in quite limited, could you be more specific? Thank you in advance. \$\endgroup\$ – user3060854 Mar 2 '16 at 18:12
  • \$\begingroup\$ What was the dwell time you used when making the analogue measurement and how many samples did you average? \$\endgroup\$ – Andy aka Mar 2 '16 at 18:21
  • \$\begingroup\$ I set the select lines, wait for 50msec, make only one measurement, wait for 1 sec and then again the same loop. \$\endgroup\$ – user3060854 Mar 2 '16 at 18:28
  • \$\begingroup\$ What, exactly, is A0, your analog measurement point? \$\endgroup\$ – WhatRoughBeast Mar 2 '16 at 19:24
2
\$\begingroup\$

I have just repeated your test with 3 random different 4051 ICs.

I just used a DVM to measure the voltage on the multiplexed pin - pin 3.

In each case, the voltage on pin 3 was the same to 3 decimal places and was the same as the voltage on the potential divider on the input.

I presume the problem must be in the way you are reading the analogue input. Have you tested the voltage on pin 3 with a DVM to verify your results?

\$\endgroup\$
  • \$\begingroup\$ That's an interesting point. I will try it soon. \$\endgroup\$ – user3060854 Mar 2 '16 at 21:10
  • \$\begingroup\$ I just tried it and I have to say that you are right. The voltage was the same to 2 decimal places (2 or 3, it doesn't really make any difference). So I will have to check for any interference between the multiplexer and the analog input of the MCU. \$\endgroup\$ – user3060854 Mar 2 '16 at 22:29
2
\$\begingroup\$

The problem is the multiplexer has resistance, this resistance can vary from device to device (I wouldn't expect that) and it does change with temperature and the amount of current through the device. You will also have common mode issues as you get near 0V. The CD4051 is not the most accurate device, but these problems are inherent to all analog switches.

A voltage follower buffer might help to give you a better measurement. The ADC should be high impedance so I wouldn't expect it to draw much current. Is the voltage pin on the arudino 5V tolerant? That might be a problem.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Just check my comment for HandyHowie's answer. So I think that I should check how the cirquit reacts by adding a voltage follower buffer. \$\endgroup\$ – user3060854 Mar 2 '16 at 22:34
  • \$\begingroup\$ What is the range on the ADC input? Is it 0V to 3.3V? \$\endgroup\$ – Voltage Spike Mar 2 '16 at 23:01
  • \$\begingroup\$ It is 0.0 - 5.0V. \$\endgroup\$ – user3060854 Mar 3 '16 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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