RTC CLOCK on BLUE PILL with Four 7 segments

What are you developing?
zmemw16
Posts: 1577
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by zmemw16 » Tue Jul 04, 2017 10:23 am

@Pito
2. when multiplexing 4 digits, the 8 resistors (7 segments + dot) shall be 566/4 = ~150ohm each..
Or something like that.
would you like to re-think that ?
multiplex - drive one at a time, fast enough that they don't flicker.
stephen

User avatar
Pito
Posts: 1690
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by Pito » Tue Jul 04, 2017 10:28 am

Why???
Thinking makes me a big pain.. :roll:
The common cathodes (4 in this case) require an external switch as well - the max current in particular common cathode will be 8x I_per_segment, which is also off the limits, sure..
Last edited by Pito on Tue Jul 04, 2017 10:38 am, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1577
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by zmemw16 » Tue Jul 04, 2017 10:37 am

the displays all use the same digital drives A-F & dot.
the displays are multiplexed, so only one is active at a time.
stephen

User avatar
Pito
Posts: 1690
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by Pito » Tue Jul 04, 2017 10:42 am

@stephen: but mind in static mode a digit will be continually "on" (ie all 8 segments), but in muxed mode and 4 digits the active digit's segments will be "on" only for 1/4 of the time (approximately, the overhead not counting here) thus you need ~4x bigger current per segment to achieve the same "visual brightness" as in the static mode - therefore the 8 anode's resistors (we talk here the common cathode setup) have to be 4x smaller (again not considering the nonlinear ratio of the LED's brightness/current).. ;)

And of course you need external switches for the common cathodes (ie low side npn transistor or nfet) as the currents of the active segments sum up and worst case the cathode current of the particular digit will be 8x Isegment, way off the stm32 current limit.

PS: the popular MAX7219 does not require resistors in the segments as it uses a "current source" in the segments (and those currents are programmable). That is a different scenario to our stm32 as the stm32 does not possess such a "current sourcing" capability.
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1577
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by zmemw16 » Tue Jul 04, 2017 4:03 pm

what static mode ? who mentioned static ?
oh, for setting the clock, increase the pwm for the current digit and decrease it for the other digits.
bright for the digit being set, dimmed down for the rest.
stephen

fredbox
Posts: 96
Joined: Tue Jul 07, 2015 4:44 pm

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by fredbox » Tue Jul 04, 2017 10:44 pm

The easy way to get a small 4 digit 7-segment clock display is to use one of the TM1637 modules from Ali or eBay. Two data lines, power and ground, a small amount of code and you are good. These displays are simple enough that you can bit-bang without a library - see this example.

If you need 8 digits, there are plenty of inexpensive MAX7219 seven segment modules.

But I will agree that it's fun to wire the individual displays and write the code to make it work.

unuldinei
Posts: 11
Joined: Tue Jul 21, 2015 8:32 pm
Location: Bucuresti RO
Contact:

Re: RTC CLOCK on BLUE PILL with Four 7 segments

Post by unuldinei » Mon Jul 24, 2017 6:01 pm

Yeah, there are many ways to light a 7 segments LCD and thanks for all the good advice !

Now Luckylight is on the table...
LUCKYLIGHT KW4563ASA COMMON ANODE
No special modification of USB library requirement just cancel the jtag function
One rows of pins solder directly to the pcb
DS18B20 senzor display
HMI on serial USB maple port, check HMI with +++ ;
DFU still not working well
TDV Time to alternate display clock or temperature in EEPROM, value 1-30 seconds
Link to new version of this RTC CLOCK :
https://drive.google.com/drive/folders/ ... sp=sharing


Image

Post Reply