Question on TM1637 Schematic

Dear all,
I am currently delving into the realm of Arduino shield and PCB design, and I find myself facing a challenge with my project. Specifically, I have encountered an issue with the 7-segment display, which is not functioning as expected.

To provide some context, I have included the schematic of my design below, and I have also successfully fabricated the PCB based on this schematic. However, despite my best efforts, the 7-segment display remains unresponsive.

I would greatly appreciate it if someone with expertise in this area could take a moment to review the attached schematic and possibly offer guidance or insights on how to troubleshoot and rectify the issue.

Thanks & Regards, Siddharth

Welcome, @sidbij, to the forum! Thanks for posting a schematic right off the bat, it really helps.
7805 regulator family usually need a 0.1 uF capacitor at input and at output for best results - see any number of datasheets on the web, they usually have a reference, or typical, design schematic to look at.
Other than that, nothing jumps out at me as terribly wrong with your hardware, so how about showing us your sketch, please?

Oh, and disconnect your solenoid, or replace it with an LED and resistor - I find many projects get sucked into the morass of debugging solenoid transients while trying to get their code working; instead, get it all working, then add the solenoid, so that you KNOW it's the solenoid causing problems, if it does, when you get to that step.
Ditto with your buzzer, some of those aren't really Arduino-output-compatible.

Thank you @camsysca, your guidance has been invaluable, and you're truly a lifesaver.

Regarding the sketch, I must admit I haven't had the chance to develop it yet. I've been experimenting with various codes I found online, primarily to test each individual component of the project. Fortunately, I haven't encountered any issues with the buzzer so far.

I'll make the necessary adjustments as per your suggestions and take another shot at the PCB. Should I encounter any further challenges or require additional help, I won't hesitate to reach out to you again.

Once more, thank you for your support.

Do you have the correct display? they come in common anode or common cathode. If you have the wrong one it will not light.

You can grab any one of half a dozen example codes(most libraries come with at least one) that will test the 1637 functionality, without confusing the issue with other devices, or adding your own code. I suggest you start there, so that if it doesn't work we can begin debugging using a stable starting point.

1 Like

This made me think you actually had tried some code. Doesn't surprise me that the display is unresponsive, if you haven't tried any code yet.

Hi @gilshultz ,
I don't know. Here is the link to the display, which I am using.
Can you please review it?

Hi @camsysca ,

Thanks for your response.

I tried multiple codes, appended below is one sample. Apologies, I don't have permission to attach a file here. I am confident code isn't an issue here.

Thanks & Regards, Siddharth

// Include the library
#include <TM1637Display.h>

// Define the connections pins
#define CLK 11
#define DIO 12

// Create a display object of type TM1637Display
TM1637Display display = TM1637Display(CLK, DIO);

// Create an array that turns all segments ON
const uint8_t allON[] = { 0xff, 0xff, 0xff, 0xff };

// Create an array that turns all segments OFF
const uint8_t allOFF[] = { 0x00, 0x00, 0x00, 0x00 };

// Create an array that sets individual segments per digit to display the word "dOnE"
const uint8_t done[] = {
  SEG_B | SEG_C | SEG_D | SEG_E | SEG_G,          // d
  SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,  // O
  SEG_C | SEG_E | SEG_G,                          // n
  SEG_A | SEG_D | SEG_E | SEG_F | SEG_G           // E
};

// Create degree celsius symbol
const uint8_t celsius[] = {
  SEG_A | SEG_B | SEG_F | SEG_G,  // Degree symbol
  SEG_A | SEG_D | SEG_E | SEG_F   // C
};

const int buzzer = 10;  //buzzer to arduino pin 9

void setup() {
  Serial.begin(9600);
  pinMode(buzzer, OUTPUT);  // Set buzzer - pin 9 as an output
}

void loop() {
 
  // Set the brightness to 5 (0=dimmest 7=brightest)
  display.setBrightness(7);
  Serial.println("Display Brightness");
  
  //digitalWrite(buzzer, HIGH);

  // Set all segments ON
  display.setSegments(allON);

  delay(2000);
  Serial.println("Display Clear");
  display.clear();
  
  // Show counter 0-9
  int i;
  for (i = 0; i < 10; i++) {
    display.showNumberDec(i);
    delay(50);
  }

  delay(2000);
  display.clear();

  display.showNumberDec(-12);  // Prints _-12
  delay(2000);
  display.clear();

  display.showNumberDec(-999);  // Prints -999
  delay(2000);
  display.clear();

  display.showNumberDec(31, false);  // Prints __31
  delay(2000);
  display.clear();

  display.showNumberDec(31, true);  // Prints 0031
  delay(2000);
  display.clear();

  display.showNumberDec(14, false, 2, 1);  // Prints _14_
  delay(2000);
  display.clear();

  display.showNumberDec(-5, false, 3, 0);  // Prints _-5_
  delay(2000);
  display.clear();

  // Prints 12:34
  display.showNumberDecEx(1234, 0b11100000, false, 4, 0);

  delay(2000);
  display.clear();

  // Prints 15°C
  int temperature = 15;
  display.showNumberDec(temperature, false, 2, 0);
  display.setSegments(celsius, 2, 2);

  delay(2000);
  display.clear();

  // Prints dOnE
  display.setSegments(done);

  while (1)
    ;

 
}

Hi @camsysca ,

One by one I removed all three capacitors: C3, C5, and C4, but all in vain. Still no luck.

The "CC" means it is "Common Cathode"

Understood, but is this in order, or should I be using Common Anode?

Hi, @sidbij
Welcome to the forum.

Can you please post jpg EXPORTED images of your PCB design?

Have you made a prototype and got it working?
OR
Have you designed a PCB before making a prototype?

Tom... :grinning: :+1: :coffee: :australia:
PS. If you have not got a prototype working, can I suggest you do that first on protoboard?

1 Like

I have designed the PCB first. :upside_down_face:

Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

1 Like

What does the TM1637 documentation tell you?

As @TomGeorge you really should prototype this on a breadboard or similar before committing to a PCB!

If you haven't already done that, then do it now.

1 Like

Hi,
What package is the 7805 regulator, what is the current through the 7805?

Have you calculated the power dissipation in the 7805 when regulating from 24V to 5V.

What is the ACTUAL part number on the display?

Tom... :grinning: :+1: :coffee: :australia:

2 Likes

Attached are pictures below.
I have removed capacitors C3, C4, and C5 - in an experiment to try to make it work.


Why do you think they might be stopping it working?

Again, you really should be doing this on a breadboard before committing to a PCB!

Following on from the information you have from post #10 by @awneil , have you looked at the datasheet for the TM1637. The datasheet I have says:

2 Likes

Hey, sorry for the late response.
The components and pcb fabrication was done via JLCPCB. The component datasheet was in mandarin, so took me some time to translate.

You guys are spot on. I should be using a common anode display, that's compatible with tm1637. But that's not what I am doing.

1 Like