I am appending all my replies in one post because the forum is stopping me from making too many replies as a new user.
@ dlloyd
I think 7805 is currently not shutting down because I have got same results with 7.5 V on supply. I am using a heat sink already and the current draw into 7805 is less than 200mA because the top 50mA are going directly into the display via the main supply (the same 7.5V in this case).
I think your suggested problem was appearing when there was no heatsink and 7805 was outputting approx 4V.
The heatsink was removed momentarily when I thought I should replace it with a new 7805. But, after verification that 7805 is okay, I am put the original one with heat sink back on.
MarkT:
I tried putting on the 10uF caps on the input and output but it did not help my cause.
@ PaulRB
Previously suggested using the 3.3V to power up 74595. So, in order to achieve that I cut the Vin to shift registers. And, even before I could hook it up to the 3.3V from ESP, I realized that it produced the correct results. I don't know where the SRs are getting the power from now. May be through the LATCH and CLK or may be through the ULN connected next to it. However, it getting it from somewhere and working fine. The voltage at Vcc of SRs is 2.3V.
Now, I just need to understand why this is happening and if this is a sustainable approach?
This is of course, suggesting that the problem is related to the mismatch between the logic voltage and the operating voltage of the 74HC595s. The better way to approach this was to use the 74HCT14 to buffer between your ESP and the shift registers.
No, this is not sustainable as you are indeed "phantom powering" the shift registers and the ULNs which is way out of specification. You need to feed real 3.3 V to them from your ESP.
I still suspect however that the logic level mismatch is not the actual problem. And were you to rebuild, you should base it on TPIC6B595s.
Something we have not discussed so far, but just what has been powering the ESP all this time?
It is clearly both. That is precisely what the "HCT" series is - all that series are by definition, level shifters. So if you had used 74HCT595s, there would never be any requirement for level shifting.
Not to say that 74HC series chips should not always work with clean 3.3 V logic - as they indeed should (but Schmitt trigger devices such as the 74HC14 in the non-"T" version just may be fussy). Which is why I continue to suspect some other problems (layout) in your setup.
So no, not safe to conclude that at all. For the meantime however (which is to say, until a board re-design), if it works, well, it works.
So you were working on the circuit, cutting tracks, while it was still powered up? That's not wise. At these voltages I don't think you could injure yourself, but you could easily damage components. Always work on a circuit with the power disconnected.
As others have pointed out, the shift registers are receiving power through the esp pins, phantom powering, which could damage the shift registers and/or the esp. Never apply a voltage to any pin of any chip that is higher than the Vcc voltage on that same chip. That's when phantom powering occurs, because of the Electro-Static Discharge (ESD) protection diodes built into chips to protect them during handling.
It was off during the cutting. Then after cutting, I wanted to see if Vin of IC is properly disconnected to output of 7805. To make sure, I plugged back the power and the epiphany happened
but according to the 74hc595/74hct595 data sheet, if I'm reading it correctly, at 5V supply, a high input is 3.5V or over for the 74hc595. So the 3.3V signal from the esp isn't enough. But for the 74hct595, it's 2.0V or over, so no problem. This is exactly what @Paul_B said, of course. But with a 3.3V supply, 74hc595 accepts anything over around 2.3~2.5V as high, so the esp signals are ok. For 74hct595, you can't run that on 3.3V supply, the minimum is 4.5V, so you would need to run it at 5V, but that's ok, it can still accept the esp's signals.
Ok, previously I have got the first two digits to work fine.
But, here is the last one: I thought it would be okay but this one is showing '8' meaning high on all outputs of SR all the time.
I have put on the 220nF fairly close to the third SR.
Also, when I try to check the output voltages for 2nd shift register, it changes its value as DMM probe is touched. Is it Electro-static discharge or something?
Don't take this as a sarcastic joke, I really mean it. Start over from scratch with a new PCB design. Take into account the suggestions that have already been offered, and do some online research on the topics that were discussed.