# 7-Segment display won't light up fully for each number in 2-Bit Counter

My 7-Segment display is not lighting up all the segments. I am supposed to recreate the TinkerCad circuit below in physical form. It's supposed to count from 0 to 3 and then reset to 0, and then count to 3 again, and so on. For 0, only the B segment turns on, and for 2, the E segment does not turn on. The TinkerCad circuit works fine, but when I build it physically, it does not work. I've checked multiple times, my wiring seems correct. Please help, I have like 4 circuits due on Tuesday, and I'm really freaking out.

This is my Energia code:

int Y_PIN, Z_PIN;

int y_value, z_value;

int counter = 0;

void printOutput();

void setup()

{

pinMode(14, OUTPUT);

pinMode(15, OUTPUT);

Serial.begin(9600);

}

void loop()

{

if (counter == 0)

{

y_value = 0;

z_value = 0;

digitalWrite(14, LOW);

digitalWrite(15, LOW);

delay(1000);

}

if (counter == 1)

{

y_value = 0;

z_value = 1;

digitalWrite(14, LOW);

digitalWrite(15, HIGH);

delay(1000);

digitalWrite(15, LOW);

}

if (counter == 2)

{

y_value = 1;

z_value = 0;

digitalWrite(14, HIGH);

digitalWrite(15, LOW);

delay(1000);

digitalWrite(14, LOW);

}

if (counter == 3)

{

y_value = 1;

z_value = 1;

digitalWrite(14, HIGH);

digitalWrite(15, HIGH);

delay(1000);

digitalWrite(14, LOW);

digitalWrite(15, LOW);

}

printOutput();

counter = counter + 1;

if (counter > 3)

{

counter = 0;

}

}

void printOutput()

{

String outputString = "Counter = ";

outputString += counter;

outputString += ", YZ = ";

outputString += y_value;

outputString += z_value;

outputString += ", Y = ";

outputString += y_value;

outputString += ", Z = ";

outputString += z_value;

Serial.println(outputString);
return;

}

• you will probably get a larger pool of people willing to help you if you provide a real schematic. There is a schematic editor available if/whenever you edit your question. It is in the tool bar, and looks like a schematic. Mar 7 at 2:03
• Break down the problem into smaller pieces and be systematic. If the Y bit (green) doesn’t work then certainly the rest of your circuit won’t, so fix that first. Simplify your code to just write a ‘1’ to Y. No green? Is problem software (Arduino didn’t put out ‘1’ – check with voltmeter) or hardware – is LED in backwards, or wiring bad? Mar 7 at 2:53
• Please do post a proper schematic. And, please specify the 7-segment display by part number. Since you appear to be having trouble with that part. Mar 7 at 5:50
• A warm welcome to the site. Please note that it's not a free design house or homework-answering service. Please don't just write a few lines then dump a lot of big pictures and a big listing that make it a hard-to-read scrollfest. Please edit your question and greatly improve it. Show your own work and own findings in considerable detail with any schematic. The schematic tool here is easy to use. The better the quality of your question, the better the quality of the answers it will attract. If you're busy 'freaking out' instead then engineering may well not be for you. Again, welcome. Mar 7 at 9:10
• So you're saying because I'm having trouble with this, I am not cut out for engineering? Please tell me you're not saying that. I have nothing going for me except pursing an EE degree, without that, I have nothing. @TonyM Mar 7 at 18:56

Okay, so the E segment does not turn on according to your description.

The E segment is pin '1' on the LED digit (assuming standard pinout). It is driven by the HC04 inverter pin 2. The inverter is driven by pin 13 of the Arduino.

You do not initialize pin 13 as an output and do not attempt to alter its output state, so not sure what good things you expect are going to happen.

• What do you mean by did not initialize pin 13? I'm using pins 14 and 15 on the LaunchPad, not 13. Mar 7 at 3:14
• Your wiring diagram shows digital pin 13 on an Arduino Uno. If you have something else.. well who knows? Mar 7 at 3:20
• Oh yeah i changed them to pins 14 and 15 because 12 and 13 presented the same issue. I guess I will change them back Mar 7 at 3:22

It looks like you are using common cathode 7-segment. You have segment b tied to VCC and you are trying to use a single resistor for current limiting to all segments. You should directly ground your cathode and use individual current limiting on each segment to make the brightness more predictable and not dependent on the number of lit segments. Instead of tying segment b directly to VCC, tie it to the output on one of your inverters and tie that inverter input to ground.

• Ok i will try that thanks Mar 7 at 18:46

schematic, Schematic, SCHEMATIC, S.C.H.E.M.A.T.I.C

In the communication of electrical engineering concepts, there is nothing more important than a schematic. To paraphrase Rear Admiral Joshua Painter in "The Hunt For Red October":

"An Engineer don't take a dump, son, without a schematic."

Separate from that, there needs to be a current limiting resistor for ((each)) segment of the display. Without them, the driving circuits will fail sooner rather than later. In fact, this might be the cause of what you are seeing.

Also, there is no way to determine if your physical assembly matches the graphic; the view of many connections are blocked by other connections.

This site has many circuit wizards (and me), and we're here to help. But you have to row your side of the boat. Think. Have you given us enough clear-and-unambiguous information to frame the question? Really?