Mastiff37
Posts: 3
Joined: Sun Nov 20, 2016 4:14 pm

Large clock display?

Sun Nov 20, 2016 4:28 pm

I'm interested in doing a project that requires a large timer readout. Something like a simple LED alarm clock display is all I need, but I'd like it to be non-tiny, and ideally easy to interface with programatically. Any suggestions? So far I've only found the tiny adafruit displays.

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: Large clock display?

Sun Nov 20, 2016 4:42 pm

something like this?:

https://webonastick.com/vtclock/

i've found it handy for non-touch 2.2" LCD displays, but since it's software, it can scale up to HDTV size by changing the console font in /boot/cmdline.txt

willie
on the one-digit-at-a-time Gulf of Mexico

Mastiff37
Posts: 3
Joined: Sun Nov 20, 2016 4:14 pm

Re: Large clock display?

Sun Nov 20, 2016 5:01 pm

I'm sorry, I don't see what that link has to do with rpi?


I think this 1.2" one would be good enough:

https://learn.adafruit.com/adafruit-led ... t-backpack

But I only see instructions and such for arduino. Anyone know if there software support for this device for raspberry pi?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4992
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Large clock display?

Sun Nov 20, 2016 5:11 pm

Mastiff37 wrote:I'm sorry, I don't see what that link has to do with rpi?
I think this 1.2" one would be good enough:
https://learn.adafruit.com/adafruit-led ... t-backpack
But I only see instructions and such for arduino. Anyone know if there software support for this device for raspberry pi?
FWIW, you may also find this (similar, but SPI-based) module of interest:
http://www.cpmspectrepi.uk/raspberry_pi ... odule.html
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
DougieLawson
Posts: 35520
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Large clock display?

Sun Nov 20, 2016 6:29 pm

Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Large clock display?

Sun Nov 20, 2016 7:38 pm

Mastiff37 wrote:I'm sorry, I don't see what that link has to do with rpi?
I think this 1.2" one would be good enough:
You claimed you wanted a "Large clock display" and now you think that a 1.2" display is good enough? It would seem only natural if you needed a "Large clock display" for someone to suggest repurposing a mess of VT220 terminals you might have laying around into a text based jumbotron or even just the single 52" big screen LED LCD 4K curved super HDTV tv. These things could all be driven from a pi, especially the hdmi tv screen.

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Large clock display?

Sun Nov 20, 2016 8:37 pm

Mastiff37 wrote:I'm interested in doing a project that requires a large timer readout. Something like a simple LED alarm clock display is all I need, but I'd like it to be non-tiny, and ideally easy to interface with programatically. Any suggestions? So far I've only found the tiny adafruit displays.
You really need to define what you mean by "large". And how many characters ("mm:ss", "hh:mm:ss", "hh:mm:ss.sss" or something more elaborate?). And also if you have any special size or power (e.g. battery) requirements.

I have a clock in my living room that uses a Pi and an Adafruit 2.8" PiTFT screen to display 4 digits that are about an inch tall. Extremely readable from anywhere in the room (that was the goal). Screenshot below. Using the Offiicial Raspberry Pi 7" Touchscreen, you could easily show 6 digits nearly 3 inches tall. Or, you can hook up any HDMI screen of any size you want. Use an HDMI projector and put your timer on the side of a building.

If you go with actual 7-segment LEDs, like a traditional LED clock, there aren't enough GPIO pins on the Pi to directly drive much more than 3 digits. If you use an LED display board that understands SPI or I2C, the Pi can easily accommodate that, and then you could do more digits. Adafruit has 4-digit 7-segment LEDs (with I2C interfaces) up to 1.2 inches tall (in Red, Yellow, and Green), but they don't go higher - I'm guessing - in part because there isn't much demand for it - most people who want a larger display go to actual video of some sort. This is also why most of the documentation you find for using 7-segment LEDs is oriented towards Arduinos: on the Pi most folks don't bother with the display limitations of 7-segment LEDs when they can just do video (with tens or hundreds of thousands of pixels and colors). On the Arduino, with less memory and CPU, the lower requirements and overhead of 7-segment LEDs is more compelling.

Which is not to say it hasn't been done on the Pi: How to drive a 7 segment display directly on Raspberry Pi in Python.

That PiTFT screen I mentioned:
chronos_screen_20161120_115745.jpg
1" tall numbers on 2.8" PiTFT
chronos_screen_20161120_115745.jpg (19.32 KiB) Viewed 10545 times
Last edited by CarlRJ on Sun Nov 20, 2016 8:51 pm, edited 1 time in total.

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Large clock display?

Sun Nov 20, 2016 8:42 pm

stderr wrote:It would seem only natural if you needed a "Large clock display" for someone to suggest repurposing a mess of VT220 terminals you might have laying around into a text based jumbotron...
I think you may be substantially overestimating the percentage of the world's population who have "a mess of VT220 terminals laying around." I'm in the relatively small group who know what they are and who have used them in the past, and even with those qualifications, I don't have any laying around, much less a whole mess of them.

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Large clock display?

Sun Nov 20, 2016 8:56 pm

DougieLawson wrote:Buy this: https://thepihut.com/products/zeroseg and learn to program it.
Very cool board (thanks for bringing it to my attention), but those digits work out to about 3/8" tall - given that "Large" was the first word of the OP's request, I don't think this is particularly applicable.
Last edited by CarlRJ on Sun Nov 20, 2016 11:28 pm, edited 1 time in total.

Mastiff37
Posts: 3
Joined: Sun Nov 20, 2016 4:14 pm

Re: Large clock display?

Sun Nov 20, 2016 9:00 pm

Sorry. I'd like the display to be easily visible across a room. 4" or more would be awesome, but realistically, 2" or so would suffice.

The reason I'm thinking 7 segments is because I thought it would be simplest. I'm happy to hear of alternatives. In my mind, I should be able to write some simple python to update a 7 segment display, vs. getting into graphics or something to render large digits on a higher resolution thing. I'm not a total novice at coding, but I have essentially no experience doing graphics or user interfaces.

I should point out that my project would entail the device being outside, or in a garage or someplace. Using an old monitor or something is not what I had in mind, I'd like to keep it somewhat compact, and may want to build a rudimentary enclosure if I get it working how I want.

Thanks.

User avatar
DougieLawson
Posts: 35520
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Large clock display?

Sun Nov 20, 2016 9:02 pm

He could build his own board with 2x4x7-seg displays and a MAX7219 processor. That's not restricted to the 3/8" LEDs. You can also drive 8x8 LED matricies with those chips.

I can easily read those LEDs from 7ft away even with my old eyes.
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
rpdom
Posts: 14701
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Large clock display?

Sun Nov 20, 2016 9:53 pm

You could make a 7-segment display from a series of ws281x RGB LED strips. You'll just need a little code to translate the time into LED numbers. One advantage of this is that you can change the colour of the display if you want to and do effects like fading the segments between states.

I may buy some more 5V strips and do that myself :-)

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Large clock display?

Sun Nov 20, 2016 10:03 pm

rpdom wrote:You could make a 7-segment display from a series of ws281x RGB LED strips. You'll just need a little code to translate the time into LED numbers. One advantage of this is that you can change the colour of the display if you want to and do effects like fading the segments between states.
How about the 8x8 matrix stuff such as: https://learn.adafruit.com/adafruit-led ... 8x8-matrix . I haven't actually used them but the idea seems sound. The price might be a bit hard to deal with unless you get them from pluto, of course. Free shipping!

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Large clock display?

Sun Nov 20, 2016 11:21 pm

Mastiff37 wrote:Sorry. I'd like the display to be easily visible across a room. 4" or more would be awesome, but realistically, 2" or so would suffice.
Hmm, SparkFun has a Large Digit Driver board, which they say can be chained together in multiples, and some 6.5" 7-Segment LEDs to go with them. No Raspberry Pi code for it though.
Mastiff37 wrote:The reason I'm thinking 7 segments is because I thought it would be simplest. I'm happy to hear of alternatives. In my mind, I should be able to write some simple python to update a 7 segment display, vs. getting into graphics or something to render large digits on a higher resolution thing. I'm not a total novice at coding, but I have essentially no experience doing graphics or user interfaces.
Running 7-segment LEDs might save you a little work on the coding side of the project (actually, maybe not even that, if you have to light each segment yourself), but it's going to be more work on the hardware side (wiring and soldering and such).

FWIW, the code below is the entirety of what it takes to write a full-screen digital clock on a Raspberry Pi using PyGame (which is part of the pre-installed software on the Pi). The two os.putenv lines make this work on a framebuffer screen, like the Adafruit PiTFT, but it can be readily tweaked for any other graphical screen. Provided here just to show that graphics programming doesn't have to be that mysterious. (For displaying text of any size with PyGame, it's just a matter of putting the text you want into a string, asking a font object to render that string into a block of pixels, then asking the screen object to display that block of pixels at the desired location - rinse/repeat.)

Code: Select all

#!/usr/bin/env python3

import os, time, pygame

# Initialize PyGame...
os.putenv('SDL_VIDEODRIVER', 'fbcon')  # works for 320x240 Adafruit PiTFT
os.putenv('SDL_FBDEV', '/dev/fb1')     # which is treated as a framebuffer
pygame.init()
pygame.mouse.set_visible(False)
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
pygame.font.init()

# Miscellaneous setup for clock...
font_hhmm = pygame.font.Font(None, 135)
font_ss = pygame.font.Font(None,  75)
black = (0, 0, 0)      # RGB tuples
green = (0, 255, 0)
last_second_shown = 0  # seconds past the epoc (midnight 1970-01-01 UTC)

# Loop to display updated clock each second...

while True:
    now = time.time()
    current_second = int(now)

    if current_second != last_second_shown:  # if a new/different second...
        last_second_shown = current_second
        tm = time.localtime(now)

        screen.fill(black)  # erase everything

        # draw HH:MM on screen
        hhmm = '{:02}:{:02}'.format(tm.tm_hour, tm.tm_min)
        hhmm_surface = font_hhmm.render(hhmm, True, green, black)
        xy = (5, 5)  # where to draw
        screen.blit(hhmm_surface, xy)

        # draw :SS on screen (following HH:MM, slightly smaller)
        ss = ':{:02}'.format(tm.tm_sec)
        ss_surface = font_ss.render(ss, True, green, black)
        xy2 = xy[0] + hhmm_surface.get_width(), xy[1] + 10  # follows HH:MM
        screen.blit(ss_surface, xy2)

        pygame.display.update()  # and have PyGame display the updated screen

    pygame.time.wait(200)  # Wait 1/5th of a second before checking again

W. H. Heydt
Posts: 10569
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Large clock display?

Mon Nov 21, 2016 1:57 am

Mastiff37 wrote:I'm interested in doing a project that requires a large timer readout. Something like a simple LED alarm clock display is all I need, but I'd like it to be non-tiny, and ideally easy to interface with programatically. Any suggestions? So far I've only found the tiny adafruit displays.
I use "dclock". You can specify size and placement of the clock display, plus a myriad of other parameters. You could fill a 40" screen with it...if you happen to have 40" display... (I'm using an RPF 7" display.)

bewbzandweinerz
Posts: 1
Joined: Wed Aug 16, 2017 10:15 pm

Re: Large clock display?

Wed Aug 16, 2017 10:24 pm

https://www.flickr.com/photos/oskay/3328458202/


What about this for size? ^




Also,

I, too, am looking for help in connecting 4 18 segment (2 decimal points) displays up to my pi. I'm a noob that's just starting out so any pointers would be appreciated.

Thanks for reading!

User avatar
Pekka
Posts: 20
Joined: Mon Nov 19, 2012 4:11 pm

Re: Large clock display?

Thu Aug 17, 2017 4:19 am

Mastiff37 wrote:
Sun Nov 20, 2016 5:01 pm
I think this 1.2" one would be good enough:
https://learn.adafruit.com/adafruit-led ... t-backpack
Anyone know if there software support for this device for raspberry pi?
Here is a set of C programs to drive the Adafruit display: https://github.com/FSKMTM/7-segment-LED

Return to “General discussion”