Page 2 of 4

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 4:28 pm
by ELECTRONICA67
Hello Lain and Martin

I made the changes in the program, but the segments still stay lit, the hardware is simple 16f819, 2 relays, 2 transistors, TM1637, 1 switch to press and allow you to see the count in tmro, but I think that if the segments stay lit the batteries will run out.

Do you think that the problem of the segments turning off can be corrected or there is a solution for very low consumption :?:

Enrique

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 4:41 pm
by medelec35
How have you wired the switch as you have not mentioned if using a pull-up or pull-down resistor.
You can't just connect a SPST switch to a pin and + supply without having an external pull-down resistor
Or SPST to pin and ground without having an external pull-up resistor or a c code block that enables an internal weak pull-up.
I can't tell from your hardware if you have the external resistor, hence reason for asking for a full schematic.
I have tested the TM1637 Quad 7seg LED and the off is working on embedded hardware, which suggests an issue with your flowchart or hardware or both.

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 4:48 pm
by ELECTRONICA67
The switch is connected to VCC 4.6v with a pull down resistor 4k7 to ground

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 5:08 pm
by ELECTRONICA67
Te envio el diagrama y software

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 5:27 pm
by medelec35
Thanks for the diagram, you have answered my question
Can you try this version.

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 6:14 pm
by ELECTRONICA67
Sure, let me have a second.

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 6:19 pm
by ELECTRONICA67
Digits turned off at 0 but the count keeps the segments on

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 6:26 pm
by ELECTRONICA67
The circuit without the display consumes 1 mA, with the display it increases to 6 mA

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 6:31 pm
by ELECTRONICA67
I assume that with the segments off it consumes less, but when pressing the switch it would only take 1 second to see the recorded count.

Re: ON_OFF DISPLAY TM1637

Posted: Thu Nov 07, 2024 6:36 pm
by medelec35
What the circuit should do is keep counting no matter what.
The display should only be on With the switch pressed.
If that is the case then great!
If the display is on all the time then best to measure the voltage between pin A0 and GND when the switch is not pressed.