How to fix a specific design problem and turn led on and off with shift register output signal

led

I've made a design mistake in one of my prototype boards and I need help to fix it.

The circuit is a common-anode 7-segment display driver based on a 74HC595 shift register and an Atmega328 uC. The problem circuit is shown below.

problem circuit

I wanted to control the led (the display decimal point) with the QA signal (output pin 15 on the 595), but the problem is that the LED is always on, regardless whether QA is HIGH (5V) or LOW (0V). I made the mistake because I though I was driving a common-cathode display, so I thought that the +12V source was actually GND.

How can I fix it, easily, with the least amount of through-hole parts and taking the least space on the board?

My only guess would be to add a 7V zener (reverse biased) between R1 and LED1 like in the figure below. Assuming a voltage drop of 2V on the LED, it would be OFF when QA is HIGH, because the voltage on the zener would be around 5V (12-2-5=5V), less than required for the zener to conduct, while it would be ON when QA is LOW, because the zener would then be submitted to around 10V (12-2=10), which is a higher voltage than required for it to conduct.

enter image description here

Would adding the zener work? Or I just don't know how zener diodes work at all?

Best Answer

Since you have a push-pull output, you can use a NMOSFET as a low-side drive. You could even point-to-point it with the right SMD MOSFET.

schematic

simulate this circuit – Schematic created using CircuitLab