I have this TM1637 4 digit 7 segment display module and I have programmed it to display the message "FULL" once a certain event is triggered.
A few weeks ago the display showed the message correctly for an old project but today when I inserted the code into another project, the display shows a wrong message "FUUO".
What seems to be the error in my project? I use the TM1637 library.
The module is connected to 3.3v outlet on my Arduino nano and its powered from a 9v wall adapter.
My previous project was powered by laptop USB port but this new project requires more power than USB port can provide.
if(s >= 100) // If integer greater than or equal to '100'
{
display.setSegments(FULL); // Display the message "FULL"
}
else if(s <=0) // Else if integer less than or equal to '0'
{
display.showNumberDec(0,false);// Display the number '0'
}
Sorry, I didn't post the entire code because I didn't find it relevant since *const uint8_t FULL[] *
was the only code for that faulty message.
Also I thought it was more of a hardware issue than programming issue.
Here is the code ( I change the value of integer 's' and check the display )
#include <TM1637Display.h>
const byte CLK = 4; // Clock pin on D2
const byte DIO = 5; // Digital pin on D3
const uint8_t FULL[] = {
SEG_A | SEG_E | SEG_F | SEG_G, // F
SEG_B | SEG_C | SEG_D | SEG_E | SEG_F, // U
SEG_D | SEG_E | SEG_F, // L
SEG_D | SEG_E | SEG_F // L
};
TM1637Display display(CLK, DIO); // Set TM1637 Module
void setup()
{
display.setBrightness(0xff);
}
void loop()
{
int s = 23;
if(s >= 100) // If integer greater than or equal to '100'
{
display.setSegments(FULL); // Display the message "FULL"
}
else if(s <=0) // Else if integer less than or equal to '0'
{
display.showNumberDec(0,false);// Display the number '0'
}
}
Thanks for posting that.
On seeing it I can only agree with you:-
Also I thought it was more of a hardware issue than programming issue.
Looks like your display has broken.
I would write some code that cycled through the display showing one segment lit at a time to confirm this, but as this display is a module it looks like it is faulty.
I meant I assigned some numbers which value I dont remember, but they showed fine when I did that to check. eg- I assigned 95 and the display showed 95.
The library makes the display unit show numbers from right to left. That means if I give 99, the display will show 0099 (I can also turn off the 00 that comes before the 99).
Hi,
How much current does the digital display consume, are all the segments that light up all the same brightness?
Have you measured the 3.3V to the display with blanked display and loaded display?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
TomGeorge:
Hi,
How much current does the digital display consume, are all the segments that light up all the same brightness?
Have you measured the 3.3V to the display with blanked display and loaded display?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Tom....
I have no idea how much current is being used. The product I bought had no documentation. It works in both 5v and 3.3v.
Here is the datasheet to seedstudios same unit http://www.seeedstudio.com/wiki/Grove_-_4-Digit_Display
Yes all the active segments are lit up in the same brightness evenly. But if I observe very very carefully I can feel them flicker a bit, but its not even noticeably if you don't look very very carefully.
Sorry I dont have a sketch, the test project is very simple, I have only the display module attached to my arduino nano in my tiny breadboard. VCC to 3.3v ( havent tested 5v yet), GND to GND, DIO and CLK pins both go into Digital I/O pins.
Whats funny is that yesterday it showed atleast FU coreectly, today it shows only F. The display has no problem displaying any numbers.
Hi,
80mA max by the data sheet you linked me too.
Check the arduino board specs and see how much it is capable of supplying.
Have you measured the 3.3V pin?
TomGeorge:
Hi,
80mA max by the data sheet you linked me too.
Check the arduino board specs and see how much it is capable of supplying.
Have you measured the 3.3V pin?
Tom....
Today it changed to "FUUO"... wth??
It could be 80mA, or maybe even more (100-200mA?) since it's not seedstudio display model.
The Arduino is a nano clone, it doesn't have any spec sheet, I don't even know the manufacturer?
But it seems to be working without any issues so far.
I will try to measure the 3.3v pin using my multimeter, also I will try plugging it into 5v and see if there is any change.