0
\$\begingroup\$

I have the following circuit that should light up two LEDs at the exact same time:

(Edit: Removed incorrect 1.64V enable input because, though I now understand it's on the low side, it is not a part of the question that I need an answer to -- it's when the input is 0V that I get the flicker.)

I am using this analogue switch.

When I have 0V on 1E/4E, the 1Z/Y and 4Z/Y switches rapidly close and open -- I took a video with a 1200fps camera and they appear to flicker on and off every 2ms-5ms or so. The LEDs do not flicker identically, but are both flickering rapidly nonetheless.

Is there something wrong with my wiring? Or did I maybe fry this analogue switch somehow?

\$\endgroup\$
7
  • \$\begingroup\$ Why are you using 1.64V at enable inputs when the \$V_{IH}\$ of the IC is around 3V? \$\endgroup\$
    – nidhin
    Jan 18, 2015 at 19:00
  • \$\begingroup\$ I'm going to ask the silly question here, but are you sure you've connected them to 0V and not left them floating? Measure the difference between the input and both ground and Vcc. \$\endgroup\$ Jan 18, 2015 at 20:00
  • \$\begingroup\$ My first circuit since high school. I'm looking for the silly questions. :) -- Between input and ground: 0V, Between input and Vcc: 5.11V, Between Vcc and ground: 5.11V... This means that the input is not floating, right? The input comes from this circuit \$\endgroup\$ Jan 18, 2015 at 20:15
  • \$\begingroup\$ Okay, here's the next one. Is the supply voltage regulated? Set your DMM to AC volts and measure between Vcc and ground. \$\endgroup\$ Jan 18, 2015 at 20:30
  • \$\begingroup\$ Hahah... that wasn't what I was expecting. 10.4V AC >.< Heh, this makes sense that the DMM would pick up on AC when it's pulsing DC, but I totally didn't think of that earlier (instead, I think I did some dumb test with a 1200fps video and an LED to see if it was pulsing haha) \$\endgroup\$ Jan 18, 2015 at 20:40

2 Answers 2

0
\$\begingroup\$

As the 74HCT4066 is a CMOS part, the inputs are very high impedance and must be connected to something at all times. If they are left unconnected, they will float around to random voltages - an un-connected input cannot be assumed to be a logic zero.

Connect 10K resistors between all unused logic inputs (even the ones for the sections you are not using) and Ground to ensure that the inputs are indeed "Low" when you remove your +1.64 volt input (and that is a bit low to be guaranteed to be considered a "High".)

According to the datasheet, the enable inputs should be above 2.0 volts to be certain to be recognized as "High" or logic 1, and below 0.8 volts for a "Low" or logic zero.

Also, 1.6 volts is a bit low for most red LEDs. We normally run LEDs with a voltage somewhat higher than their rated forward voltage, with a resistor in series to limit the current to an acceptable value (which can be much less than their recommended maximum current).

\$\endgroup\$
3
  • \$\begingroup\$ Thanks Peter, I obviously have a few problems. :) Dealing with them one at a time: 1) Flicker with 0V input should be fixed by adding 10K resisters on unused inputs to make the circuit look like this 2) Input voltage or Vcc should be adjusted to match spec. If I understand correctly, I could just decrease Vcc to 2.0V, which would mean that my 1.64V input would be guaranteed to be HIGH (>1.5V min in spec) 3) LEDs are just temporary. :) These two switches will be used to test latency between button presses on separate devices. \$\endgroup\$ Jan 18, 2015 at 19:26
  • \$\begingroup\$ The recommended operating voltage for the 74HCT4066 is 4.5 to 5.5 volts - it is intended to be compatible with bipolar TTL logic like the 74LS family. The 74HC4066 (no "T") can be used down to 2 volts but the "ON" resistance is much higher than at 5 volts. Beware that the datasheet covers two different parts - 74HC and 74HCT. Be sure you are looking at the right specs! \$\endgroup\$ Jan 18, 2015 at 20:11
  • \$\begingroup\$ Ah, great catch, thanks Peter! I was incorrectly looking at the HC4066 and now see where you got your numbers from. Now I understand that 1.64V is right on the edge of where it may or may not be interpreted as a HIGH (between 1.6 and 2.0V). \$\endgroup\$ Jan 18, 2015 at 20:27
0
\$\begingroup\$

As Ignacio mentioned in the comments to the question, this behaviour was caused by using a switching AC-DC converter. Using a linear DC power supply fixed the problem.

\$\endgroup\$

Your Answer

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

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