ON_OFF DISPLAY TM1637

For general Flowcode discussion that does not belong in the other sections.
ELECTRONICA67
Posts: 143
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Flowcode v10 Re: ON_OFF DISPLAY TM1637

Post 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
Attachments
on-off.jpeg
on-off.jpeg (46.37 KiB) Viewed 1766 times

medelec35
Matrix Staff
Posts: 1998
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: ON_OFF DISPLAY TM1637

Post 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.
Martin

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Flowcode v10 Re: ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

The switch is connected to VCC 4.6v with a pull down resistor 4k7 to ground
Attachments
res.jpeg
res.jpeg (38.27 KiB) Viewed 1762 times

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Flowcode v10 Re: ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

Te envio el diagrama y software
Attachments
IOC819dplySW.fcfx
(36.71 KiB) Downloaded 71 times
diag.jpeg
diag.jpeg (26.78 KiB) Viewed 1760 times

medelec35
Matrix Staff
Posts: 1998
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: ON_OFF DISPLAY TM1637

Post by medelec35 »

Thanks for the diagram, you have answered my question
Can you try this version.
Attachments
ON_OFF_TM1637 medelec35.fcfx
(15.46 KiB) Downloaded 79 times
Martin

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Re: ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

Sure, let me have a second.

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Re: ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

Digits turned off at 0 but the count keeps the segments on
Attachments
con.jpeg
con.jpeg (43.6 KiB) Viewed 1752 times

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Flowcode v10 Re: ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

The circuit without the display consumes 1 mA, with the display it increases to 6 mA

ELECTRONICA67
Posts: 143
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 26 times
Been thanked: 9 times

Flowcode v10 Re: ON_OFF DISPLAY TM1637

Post 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.

medelec35
Matrix Staff
Posts: 1998
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: ON_OFF DISPLAY TM1637

Post 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.
Martin

Post Reply