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 ON_OFF DISPLAY TM1637

Post by ELECTRONICA67 »

Hello everyone,

I want to keep a count using the TM1637 display, the idea is to not consume battery unnecessarily, among the commands that the component has are SetBrightness 0-7 and ON Display 0-off, 1-on. I want the display to be off and turn it on when I want to see the count on the display, I connected a switch that when pressed would turn on the display showing the count, but since I powered the circuit the display turns on and with the command I can't get it to work correctly (I think that command is to see off or visible segments) :?:

I'm not sure if I have a wrong sequence or if it's a Flowcode error, I'm including the program that I'm testing, I would appreciate it if someone could check it and guide me, I have the circuit set up and programmed, but as I mentioned, the 0000 segments don't turn off.

Best Regards
Enrique
Attachments
ON_OFF_TM1637.fcfx
(15.14 KiB) Downloaded 102 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 »

Circuito
Attachments
tm1637.jpeg
tm1637.jpeg (37.43 KiB) Viewed 3327 times

chipfryer27
Valued Contributor
Posts: 1607
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: ON_OFF DISPLAY TM1637

Post by chipfryer27 »

Hi

I can only simulate but it does not look like the On/Off command is working.

However you could try just clearing the display.

In the attached the counter increases every 300mS or so. Nothing is displayed until you press the button.

I do not know how much this will save in battery power compared to on/off though.

Regards
Attachments
ON_OFF_TM1637_clear.fcfx
(13.36 KiB) Downloaded 101 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 »

Thank you very much, Chipfryer :)

For now it works well in simulation, tomorrow I will test the circuit in practice; do you think it would save even more energy, if the Flowcode on-off command worked correctly would it save more energy :?: (I had not worked with this display before)

Do you think I could report it as a Flowcode failure :?:

The idea is to power the circuit with 3 AA batteries.

Best Regards !!!
And again I am very grateful for your help.

Enrique

chipfryer27
Valued Contributor
Posts: 1607
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: ON_OFF DISPLAY TM1637

Post by chipfryer27 »

Hi

I'll look up the datasheet later but I would imagine that On/Off would consume less.

Matrix will most likely see this post themselves and look at the component.

To save more power, you could perhaps have your chip sleep until it needs to do something, if that's possible in your application.

Regards

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 have an internal timer that measures 24 hours, when it starts it sends a pulse and 4 hours later it sends another pulse, when it completes 24 hours later, the cycle starts again. . . I think I can't use "sleep" because for the internal timer :?:

Saludos

chipfryer27
Valued Contributor
Posts: 1607
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: ON_OFF DISPLAY TM1637

Post by chipfryer27 »

Hi

If your design can support, you could perhaps use the internal 32KHz osc whilst sleeping and change up to a faster one when needed as this would draw minumim power. How accurate does your 24hrs cycle need to be?

I have had a look at the datasheets I can find and none go into any detail regarding power consumption if On/Off.

Regards

PS
Timer 1 can be incremented during sleep using an external crystal / clock so that may be an option to explore.

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

Re: ON_OFF DISPLAY TM1637

Post by medelec35 »

Hello.
I have got a Quad 7seg display using TM1637.
The simulation is not working as I expect it to, although embedded hardware is spot on for me.
The brightness of the display does vary from 0 to 7.
I would suggest using 0 to 2.
When the number is below a value you can clear the leading 0's
E.g. if the value is below 10 taking 7 for an example then instead of 0007 just have 7 with the other3 LED's cleared
You can use a decision branch for that.
Tuning the display off by setting the On to 0 when not required does work on embedded.
When I get a chance I can improve the simulation side, so it more closely represents embedded hardware.
Martin

chipfryer27
Valued Contributor
Posts: 1607
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: ON_OFF DISPLAY TM1637

Post by chipfryer27 »

Hi Martin

Thanks for the added advice in reducing the needed characters. That will certainly reduce consumption.

However in the original post, the On/Off did not appear to work in hardware. Did it work for you?

Regards

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

Re: ON_OFF DISPLAY TM1637

Post by medelec35 »

Hi Iain,
Thank you for your continuous support, it's greatly appreciated by us all.
Yes, it does.
All the functions for me worked on hardware as stated in my previous post.
medelec35 wrote:
Thu Nov 07, 2024 9:47 am
although embedded hardware is spot on for me.
There could be an issue with the switch hardware side controlling the function.
@ELECTRONICA67.
Hi Enrique, can you provide the full schematic of your hardware?

Edit: Sorry. I have found some embedded issues.
I will get these fixed ASAP
Martin

Post Reply