5
\$\begingroup\$

Problem Statement

I have a circuit that is working, but I don't understand how or why it is working. I designed the following circuit to drive 7-segment displays with a 74HC595. The images below are the relevant bits. The circuit connects three boards with stacking risers, hence the Jn connector convention.

Relevant Schematics

Part of the 7-segment display

The 74HC595 subcircuit

Arduino and power subcircuit

The displays in image 1 are driven with the arduino D10--D13 and A0--A3 pins through 220Ω resistor arrays (not pictured), linking J8 to J1 and J9 to J3. Ground is toggled for each digit of my displays using the 74HC595 pair (10 7-segment displays in all). Seems fine right?

PCB Layout Error

Here is the weird part. During layout, I had a KiCAD error (or a PEBCAK error) in which my GND zone and VCC zone overlapped. It's supposed to look like this:

Correct layout in KiCAD with VCC excluded from GND plane

But it came back from the fab with that zone combined with the GND plane:

Closeup image of PCB showing the VCC trace overlapping with GND plane

The Unexpected Solution/Observation

When I was mucking about with the soldering, I discovered that I could cause the 74HC595 to work correctly by disconnecting the Vcc pin. I intended to disconnect the faulty pins from the ICs and never power that part of the board, instead using a kludge cable to power the Vcc directly from the Vin line. BUT, while doing that, I discovered that this connection was not necessary.

Investigating the Cause

According to the spec sheet https://www.ti.com/lit/ds/symlink/sn54hc595.pdf, the manufacturer reports the following functional block diagram:

Functional block diagram from the *4HC595 TI spec sheet

You will notice that VCC is not on this diagram. This simplified diagram suggests that the IC does not necessarily need power to work. Later in the spec sheet, the Typical Application shows that the IC is powered with 5V (not shown here).

My Questions

  • Why is this circuit working despite the lack of VCC connection to the 74HC595?
  • If this works without VCC in, why bother ever connecting it?
  • Am I courting danger by driving this circuit without powering the 74HC595 properly? See this post: Shift registers(?) failing after being left on a while
  • Can I expect this behavior to be consistent across similar chips e.g., can I use a 74AHCT595 as a drop in replacement without powering the VCC?
\$\endgroup\$
11
  • 2
    \$\begingroup\$ The reason is a bit more complicated. If i remember correctly, I designed this in a version of KiCAD with fill zone priority levels but had to revert to a KiCAD version without priority levels due to linux chicanery. I fabricated this board quite a few years ago, and I am just now getting around to questioning the sanity of it. \$\endgroup\$
    – WesH
    Commented yesterday
  • 2
    \$\begingroup\$ Currently, KiCAD 9.0.2. The original design files report I used 5.0.2 back in 2020, but there were problems with the ubuntu included distro at that time which meant I had to roll back to 4.0.7 or something to produce the gerbers. \$\endgroup\$
    – WesH
    Commented yesterday
  • 4
    \$\begingroup\$ A bit funny but a lot of work went in to writing this question when everyone here probably knew exactly what's happening from your title alone: "Why is my 74HC595 working without VCC?". No need to say anything else. \$\endgroup\$
    – pipe
    Commented yesterday
  • 5
    \$\begingroup\$ @pipe I always tell my students that we aren't born with knowledge, so there is no point in feeling bad for asking. And of course I put work into making a good question. SE is notoriously brutal to folks that don't put in legwork! \$\endgroup\$
    – WesH
    Commented yesterday
  • 3
    \$\begingroup\$ From below, for others: Powering IC's via protection diodes is a very very very bad idea indeed. It may work OK indefinitely, or for 5 years, or be the cause of occasional major or minor problems that are otherwise inexplicable. The protection diodes are therer to protect the IC (no surprise) against excessive voltage excursions on the related pin. Where the current goes and what effects result are not specified as the IC is in non operational parameter range. Worst case can be latchup and/or IC destruction - or failure of your satellite to orbit/chute to deploy/customer to come back. \$\endgroup\$
    – Russell McMahon
    Commented 21 hours ago

3 Answers 3

11
\$\begingroup\$

CMOS chip inputs typically have input protection diodes to VCC and GND, and this chip is no exception, which is why it "works", or appears to.

The datasheet makes no mention of this, as it might have lost in some revision when editing the datasheet, but it is also common knowledge for all CMOS chips and it should be expected that these diodes exist by default, unless otherwise stated.

The chips without VCC supply now suck parasitic current through logic input pins, which means it leeches current from the Arduino GPIO pins.

The datasheet claims maximum input clamp current through IO pin is 20mA. It doesn't say if this is per pin or total, as there may be different limits - but let's assume it's for one and total amount simultaneouly, as you might have one input pin high and other pins low.

The chip may not work properly without a supply and can damage if more that 20mA is drawn from input pin if there is nothing to limit it.

  1. Chip draws its operating current like a parasite through any logic input pin that is at high level.

  2. It needs supply so it does not load your Arduino pins and damage it, or forget its state if all input pins go low then it gets no power at all.

  3. Yes, there is mild danger for damage to the HC595 or Arduino if you exceed their IO pin current ratings. The danger is in long-term reliability, it is rare that a prototype immediately blows up or smokes a chip up when chip is left without power and large currents flow through their IO pins unintentionally, but it may happen.

  4. It depends. According to AHCT595 data sheet it allows 5.5V input voltage even without a supply voltage, so it does not have the clamping diodes for protection and will not power through IO pins. And in any case it's wrong to use chips without VCC and power them from input pins so it does not make any sense to ask if chips can be powered through IO pins to run without powering them.

Since you need to order new boards anyway, you might as well fix other possible errors. Your PCB does not seem to have supply bypass capacitors anywhere near the IC supply pins, or for any other chip either for that matter. Always read datasheets and do as they suggest, so you don't have to guess why a design acts up and doesn't work normally.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Thanks for the great breakdown of failure modes and answering all the questions. I'm hesitant to fix this, since the prototype has been running for about 5 years now without losing smoke. The max current on each of the LEDs is 20mA, so it seems like the current is unlikely to exceed the max. Good to know about the AHCT though. BTW, the caps were excluded from the simplified drawing. I did not want folks providing answers to get distracted by other parts of the board. Thanks for giving a friendly reminder though. \$\endgroup\$
    – WesH
    Commented yesterday
  • 2
    \$\begingroup\$ @WesH So each individual LED already draws maximum current and more than one LED on at a time may exceed it? The chips are not intended to run properly if normal operating parameters are exceeded, they don't have to work but they do not damage before absolute maximum ratings. If one prototype works flawlessy, it does not mean the other prototypes will. \$\endgroup\$
    – Justme
    Commented yesterday
  • 3
    \$\begingroup\$ Ah, now that is the seemingly obvious bit I missed. Thanks for pointing that out. This IS worth fixing. \$\endgroup\$
    – WesH
    Commented yesterday
7
\$\begingroup\$

If you drive some ICs without voltage on VCC, it can be driven by the inputs through the protective diodes located at the input. This is of course not a good way to supply the IC and if there is not enough resistance at the input, it will destroy the IC.

As mentioned not having dedicated power, but using the inputs as power can make things random in the event that all inputs are low. How are the IC suppose to handle its outputs when all inputs are low and there is no power. And then there are basic reliability from the manufacturer, the inputs are not designed or tested to be used as power input.

\$\endgroup\$
6
  • \$\begingroup\$ Yes, I experienced that many years ago when driving the clock input of a CMOS circuit from a low impedance signal generator. It works from the current through the protective diode to Vcc, but definitely not a good way to power the circuit. \$\endgroup\$ Commented yesterday
  • \$\begingroup\$ Yes...me too :-) \$\endgroup\$
    – Tyassin
    Commented yesterday
  • \$\begingroup\$ Thanks for the answer and actionable recommendation. I would like to learn a little more about what is happening at the chip level for interest's sake. I have now found more information about what causes this in CMOS, but I am yet to find "why" this is not recommended. Can you point me in the right direction? \$\endgroup\$
    – WesH
    Commented yesterday
  • 3
    \$\begingroup\$ @WesH Powering IC's via protection diodes is a very very very bad idea indeed. It may work OK indefinitely, or for 5 years, or be the cause of occasional major or minor problems that are otherwise inexplicable. The protection diodes are therer to protect the IC (no surprise) against excessive voltage excursions on the related pin. Where the current goes and what effects result are not specified as the IC is in non operational parameter range. Worst case can be latchup and/or IC destruction - or failure of your satellite to orbit/chute to deploy/customer to come back. \$\endgroup\$
    – Russell McMahon
    Commented 21 hours ago
  • 1
    \$\begingroup\$ @AaronD Yes. It's certainly done. Here are some prior answers of mine on why it is a bad idea. The first is quite detailed: 2015 electronics.stackexchange.com/a/163680/3288 Also 2015 electronics.stackexchange.com/a/175740/3288 2012 mention along with many more dos anddonts electronics.stackexchange.com/a/25294/3288 \$\endgroup\$
    – Russell McMahon
    Commented 7 hours ago
4
\$\begingroup\$

Most ICs will have protection diodes on all the inputs to GND and VCC. If any input is driven high, this will 'ghost' power onto the VCC line, as long as the logic drive can supply more current than the outputs need. CMOS needs practically no current internally.

Needless to say, this is not a reliable way to power an IC. The supply current is limited, and the voltage a diode drop below what it should be. If all the inputs go low, the IC is now unpowered. Use a wire to connect a 5 V supply from a nearby VCC.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Thanks for the response and recommendation. While it is certainly a problematic situation in some situations, why would this be worth fixing in this example? The display is always on, at least one input is high at all times. I would like to know more about "why". \$\endgroup\$
    – WesH
    Commented yesterday

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.