Completed Project Arduino nano based 4 digit, multiplexed, 7 segment display using 74hc595 and uln2803.

Thread Starter

utilityhacker

Joined May 1, 2014
48
I have built the a simple 4 digit seven segment display driver using Arduino nano as the brains of the project, 74hc595 shift register to multiplex the seven segment displays and an ULN2803 to drive them. I have attached the circuit diagram of the same. I am using a buck converter to drop input voltage from 24v to 7v to drive the Nano and also to power the seven segment displays. The GND of ULN2803 is connected to Arduino GND (beside the Vin pin).
While I was building and testing the code to run on the circuit, I used to connect Arduino to my computer USB port and provide external 7v from buck converter to the ULN2803 to drive the seven segment display and it used to work fine. But when I use buck converter to power both Arduino (at the Arduino Vin) and seven segment display, the Arduino works fine but all the segments of the seven segment display light up. You can see there is also an 16x2 I2C LCD connected which works fine as well.
Following are different cases that I have tried and their results:
  1. Case1: Arduino powered through USB and no power supply to uln2803: Arduino works fine and seven segment display dimly lights and shows right values.
  2. Case2: Arduino powered through USB and uln2803 powered through external 7v: Arduino works fine and seven segment display lights up bright and shows right values.
  3. Case3: Arduino and uln2803 both powered through external 7v (as shown in the circuit) : Arduino works fine but all segments of the 7 segment display light up bright.

From what I have understood while trying to resolve the problem so far is both Arduino and ULN2803 require different power source. I might be wrong and could use some help. Thanks.


Here in this image the circuit is running on test case 1:
IMG_20211121_235938.jpg

Here in this image the circuit is running on test case 2:
IMG_20211105_164501_1.jpg


Here in this image the circuit is running on test case 3:
IMG_20211121_235227.jpg
 

Attachments

ericgibbs

Joined Jan 29, 2010
14,712
hi uh,
If you have 7V on the Emitters and only a 5v Base voltage drive from the Arduino, the transistors will not be switching.

E

Added:
ImaEG 1295.gifge.
 
Last edited:

Thread Starter

utilityhacker

Joined May 1, 2014
48
hi uh,
If you have 7V on the Emitters and only a 5v Base voltage drive from the Arduino, the transistors will not be switching.

E
I have tried it with 5v from the buck converter output instead of 7v and it did not work (all the segment on the display were lit). I increased the voltage because I read that the voltage regulator on arduino nano requires at least 6.5 volts on Vin pin to convert it to 5v for arduino.
 

ericgibbs

Joined Jan 29, 2010
14,712
hi uh.
You can see on that simulation that if the Emitter supply is +7v , then a 0/+5V drive on the Base will never switch Off the transistor.

I read that the voltage regulator on arduino nano requires at least 6.5 volts on Vin pin to convert it to 5v for arduino.

I use an Arduino supply between +7.5v and +9v to connect to the Vin.

You need to redesign the LED driver side of the circuit

E

This is image with 5v on the Emitters.


Update:
Also, you do not need to connect pin 10 of UN2803, the clamp diode
 

Attachments

ericgibbs

Joined Jan 29, 2010
14,712
hi,
What current do the LED's draw from the Uno +5V rail.?

You may need a separate +5V ref for the LED's, depending on the current draw.
E
 

Thread Starter

utilityhacker

Joined May 1, 2014
48
hi,
What current do the LED's draw from the Uno +5V rail.?

You may need a separate +5V ref for the LED's, depending on the current draw.
E
hi,
Per segment current consumption is around 35-40 milli amps.
The LEDs do not draw current from arduino. The buck converter provides the necessary current. I also lowered the the voltage from buck converter to 5v but it does not work.
 

ericgibbs

Joined Jan 29, 2010
14,712
Hi uh,
I suspect the problem is due to the way the power supplies and ground 0V lines are interconnected.
As it works in Steps 1 and 2 and not step3 of your post.

Post a simple diagram showing only the modules and the interconnecting power and 0v lines.
E
 

Thread Starter

utilityhacker

Joined May 1, 2014
48
hi,
Here is a diagram for just the modules and power pins. This is also how I have connected everything right now (case3).
Screenshot (159).png


While checking I also connected the N3906 emitter to Arduino 5v pin instead of the buck converter and it kind of works in the sense that its is brighter than case 1 but not as bright as case 2. I think the arduino is unable to provide enough current to the seven segment displays. Here is a image of the circuit diagram.
Screenshot (160).png
 

Thread Starter

utilityhacker

Joined May 1, 2014
48
hi uh,

You can connect +5V to the 5V pin #27.
If you do it that way don't connect to Vin pin #30.

E
It worked. I connected the buck converter output directly to 5v pin of arduino and the seven segment display lights up bright enough.
Although what I was initially trying to do is provide 7v through buck converter to the arduino and the ULN. Arduino voltage regulator will drop it to 5v for itself, LCD and shift register while the seven segment display would be running on 7v for higher brightness. So switching 7v high side from 5v signal from arduino. Is this achievable without too much change in the existing circuit ? If not I will mark this as solved.
Thanks.
 

ericgibbs

Joined Jan 29, 2010
14,712
hi,
You could reduce one of the 100R to say 82R check the brightness of that one segment, if OK, change all to 82R.
But that will increase the current draw on the 5V rail, so I would connect the transistor Emitters directly o the buck 5V output.

E
 

Thread Starter

utilityhacker

Joined May 1, 2014
48
hi,
You could reduce one of the 100R to say 82R check the brightness of that one segment, if OK, change all to 82R.
E
hi,
Not sure why I did not think of that. I will try it. Thanks.

Also,
I have connected everything like in this image now. So no need to worry about the emitter drawing too much current from arduino, I think.
hi,
This is a marked up diagram.

Check that the Nano out pin is going higher than +4.5V, else the Transistor will not be switched Off.
E
 
Top