0
\$\begingroup\$

I just wired a CD74HC4067 analog/digital multiplexer to a matrix of leds. The multiplexer is wired to control the LEDs, and is connected to an arduino board, which is connected via USB to my macbook air. Then, I noted something odd: when I approximate my hand to the multiplexer, some leds light up, even if I'm not sending any signals to the multiplexer. I can only assume that my hand is interfering with the signal pins of the multiplexer, which are four. Then, I noticed that when I unplug the AC charger from the macbook, the interference disappears.

I've searched about this kind of interference, and it appears that what is happening is some kind of AC hum touch switch like the one described in this article. It appears that a near by AC current propagates through the room and makes me induce some electric current on things I touch. However, why is it that the interference only works when the macbook is plugged to the AC charger? First of all, the AC part of the charger is far away, the cable that is connected to the macbook is already DC. If the problem was about a near AC current, it'd happen no matter if the cable was connected to the macbook.

If I touch the macbook and approximate the hands to the multiplexer, the interference also disappears completely. I tried to take my macbook away from the multiplexer to see if the AC signal was being generated inside the macbook but the interference appeared to stay the same.

\$\endgroup\$
  • 1
    \$\begingroup\$ Can you supply the schematic of your board and some photos? There is a "classic cause" of the type of behaviour you describe, but before jumping to conclusions, it would be good if we can confirm/deny that possibility by checking what you have actually built :-) \$\endgroup\$ – SamGibson Jul 22 '16 at 1:20
  • 1
    \$\begingroup\$ Is EVERY input pin of the 74HC4067 connected to either a signal, Vcc or Gnd? \$\endgroup\$ – FiddyOhm Jul 22 '16 at 1:54
  • 1
    \$\begingroup\$ @FiddyOhm the VCC, GND and EN pins are connected to both 5V, GND and GND. The control pins S0, S1, S2, S3 are connected to arduino digital pins, but without any signal coming from the arduino yet. \$\endgroup\$ – Guerlando OCs Jul 22 '16 at 3:02
  • 1
    \$\begingroup\$ @SamGibson the schematic is simple, since I don't know how to generate it, I'm gonna describe it to you: it's a 16x16 LED matrix, so there are two 74HC4067, one control the positive pins of the matrix, and one controls the negative. So in one board, the 16 output pins are connected to the 16 positive pins of the matrix, and the SIGnal pin of the chip is connected to the VCC (with a resistor to not burn the leds out). The same for the other chip, but connected to the negative pins of the matrix, and SIGnal connected to GND. In both boards, the ENable pin is grounded, as required. \$\endgroup\$ – Guerlando OCs Jul 22 '16 at 3:06
  • 1
    \$\begingroup\$ @SamGibson i meant that, the arduino is on, the pins are connected, but I'm not digitalWriting anything to them \$\endgroup\$ – Guerlando OCs Jul 22 '16 at 3:21
2
\$\begingroup\$

the [Arduino pins wired to S0-S3 on the 74HC4067 pins are connected] but I'm not digitalWriting anything to them

That means that those Arduino pins are still in their power-up default state of inputs - as are the S0-S3 pins on the 74HC4067. This means you have inputs connected to inputs, without anything actively driving them into one logic state or the other.

On CMOS ICs, their inputs are typically such high impedance, that they can be influenced by external electric fields (e.g. from your body/hand), unless actively driven by an appropriate output or a pull-up/down resistor etc. The behaviour and connections you have described fit with this expected result.

Assuming your schematic intends the LEDs to be off when S0-S3 = 0, then connect a pull-down resistor between each Sx pin and 0 V i.e. 4 resistors per 74HC4067 (10k is a reasonable resistor value for this purpose) and re-test.

Your 74HC4067 outputs should then no longer be affected by moving your hand nearby, even when the 74HC4067 inputs are not being actively driven by the Arduino, as those pull-down resistors will keep S0-S3 at logic 0 (unless they are actively driven to logic 1 by the Arduino, when you have programmed it to do so).

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Exactly right, and quick aside, the reason it matters that your laptop is plugged in to see the effect clearly is because your outlet is probably earth grounded. \$\endgroup\$ – vicatcu Jul 22 '16 at 4:39

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.