ULN2803+74HC595+4 digit- 7Seg

High all,
I’m looking for some help with my project. I am relatively new to this, so I know that my understanding is still quite limited. I am building a clock, using the shift register, which then talks to the ULN2803 and grounds the cathodes on my common anode display.

The Arduino is a pro mini.

I tested my sketch on a breadboard, up to the 595 and gave the 2803 a quick test to make sure it is working, seemed simple enough, though I did something silly and didn’t record what I had done with the 2803 to make it work. At the time it seemed obvious and wouldn’t need to be reassessed.

Attached is how I have the display portion of this clock set up. Differences being that there is a 0.1uF capacitor between ground and power on the 595 and power from pin 10 is linked to pin 16 as demonstrated here.

My reasoning behind this combination was that I already had the 595’s and I knew they couldn’t hold up to more then 70mA total, so after some reading, this seemed like the best shot.

Characteristics are that the ULN2803 grounds always, it is not switching and I thought that perhaps my 595 was burnt out, but I have tried the same grounding, and resistor setup on a breadboard with fresh chips and new LED and am still getting the same response. I set pin 10 as output and digitalWrite it HIGH, and applying this to an input on the 2803 does nothing. However, applying voltage from the voltage rail does dim it, to the point that it is just a tiny glowing dot, but it should be switching completely off when it has an input of 5 volts. I’m not sure what I am looking at entirely, but digital write is working. When it is not applied to anything it reads 3.94V, however when it is applied to the 2803, it reads 0.86V. This is similar to what I am seeing on the 595. The rail on the other hand reads 4.82V when free, and 2.74V when attached to the 2803.

There is some glimmer of hope. When I place a 150ohn resistor on the output of the 2803 to any power as a pull up resistor, the light goes completely off and comes back on when it is supposed to. I can deal with adding pull up resistors. So I guess my problem is, why doesn’t the 595 or my Arduino outputs switch the 2803, but the power rail does, and why isn’t the LED very bright at after going to all this effort. Finally, is it odd to have a pull up resistor on the output? I seem to see lots of them on the inputs.

Thanks for reading, I hope I have given enough information. Happy to give more to fix this problem

The display's anodes should not be connected to D1. Try +5V.

Typically you would want to use Common Cathode displays since the common pin carries the sum of all the segment currents. The ULN2803 can ground 500 mA. The Arduino pin can ground an absolute maximum of 40 mA. Since 40/7 is about 5.7 you will only be able to draw 5.7 mA per segment before displaying an ‘8’ risks frying the Arduino pin. Your LEDs aren’t going to be very bright.

If you used Common Cathode displays the 74HC595 can source more then the 10 to 20 mA needed to get bright LEDs and the ULN2803 can sink the 70 to 140 mA at the cathodes.

Thanks for the reply guys. I have been at this for days trying to figure out a solution to my problems and just realised that I had done something really silly. I was inputing to the outputs and expecting an input on the outputs sigh. I had it grounded fine, but everything else was around the wrong way. Relieved and frustrated right now. Also, thanks johnwasser. I had totally neglected the Arduino pins, I'm embarrassed to say. Some transistors or FET's should fix that end of things though if my understanding is correct?

the 74HC595 can source more then the 10 to 20 mA

No it can’t! It’s only rated for 70mA Absolute Max on its Vcc pin - so you’d want to limit the outputs to 8 or 9mA each.
Use Common anode display with TPIC6B595, shift register that can sink 150mA/output, so 20mA/segment is no problem.
Or TPIC6C595, 100m/output.