haran
Posts: 34
Joined: Fri Jan 13, 2017 1:22 pm
Location: Spain

Which led matrix to use

Tue Feb 14, 2017 4:23 pm

Hello I trying a project with a rasp b+. I hope that I would be useful for the rasp zero, but I'm already in the develop time.
I just have a thermostat telegram controlled with WiFi. Not to much complex but enough for my interest. It takes a sensor value and decides if turn off or on a relay. So I need some gpio for this use. I would like to add a led matrix in order to show current temperature and humidity, but I'm in doubt about the gpios they need to work. I would need to show 2 number, a coma, another number and the Centigrades symbol or percent one.
How many gpios I would need?

User avatar
RST8
Posts: 64
Joined: Tue Nov 25, 2014 1:57 pm

Re: Which led matrix to use

Tue Feb 14, 2017 4:38 pm

I would suggest using a 8*8 matrix module that uses the MAX7219 chip, they have 5 pins, two for power and 3 for control. They can be daisy chained, so you only need 3 pins from the Pi.
GPIO 10 (MOSI)
GPIO 8 (SPI CS0)
GPIO 11 (SPI_CLK)

Have a google for SPI LED Matrix, there are plenty of Pi examples and they are reasonably cheap, the last set I bought 5 ready assembled off ebay for around £11.

There are some Python libraries that do the heavy lifting for you, some I found a bit slow beyond a couple of matrices, but I was doing animation, not just updating a few numbers.

Joe

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

Re: Which led matrix to use

Tue Feb 14, 2017 5:19 pm

RST8 wrote:I would suggest using a 8*8 matrix module that uses the MAX7219 chip, they have 5 pins, two for power and 3 for control. They can be daisy chained, so you only need 3 pins from the Pi.
GPIO 10 (MOSI)
GPIO 8 (SPI CS0)
GPIO 11 (SPI_CLK)
Have a google for SPI LED Matrix, there are plenty of Pi examples and they are reasonably cheap, the last set I bought 5 ready assembled off ebay for around £11.
There are some Python libraries that do the heavy lifting for you, some I found a bit slow beyond a couple of matrices, but I was doing animation, not just updating a few numbers.
Joe
FWIW, Here's an example of such "daisy-chaining" (or, as I call it in my 'C' code, "cascading"):
http://www.cpmspectrepi.uk/raspberry_pi ... odule.html
and here's an 8-digit LED display module that also uses the MAX7219 :
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

haran
Posts: 34
Joined: Fri Jan 13, 2017 1:22 pm
Location: Spain

Re: Which led matrix to use

Tue Feb 14, 2017 7:14 pm

Thank you both. I've been seeing about and I have a couple of questions. I prefer the dot matrix than bars one and I only need with white leds. I've seen this one
https://www.virtuabotix.com/product/led ... rtuabotix/
This is good for my project... another thing. I need two at list. Can these fit together? I can't see how...

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

Re: Which led matrix to use

Tue Feb 14, 2017 8:40 pm

haran wrote:Thank you both. I've been seeing about and I have a couple of questions. I prefer the dot matrix than bars one and I only need with white leds. I've seen this one
https://www.virtuabotix.com/product/led ... rtuabotix/
This is good for my project... another thing. I need two at list. Can these fit together? I can't see how...
That appears to be a variant (white cf. red) of the module of my first link. Cascading/Daisy-chaining is possible, but they cannot easily be mounted close together.
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

haran
Posts: 34
Joined: Fri Jan 13, 2017 1:22 pm
Location: Spain

Re: Which led matrix to use

Tue Feb 14, 2017 9:22 pm

Maybe they can be put together with the pins from top to bottom. I only need two. Is it needed something else than these dot led matrices?

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

Re: Which led matrix to use

Wed Feb 15, 2017 12:15 pm

haran wrote:Maybe they can be put together with the pins from top to bottom. I only need two. Is it needed something else than these dot led matrices?
I'm not sure if a led matrix (or multi-digit 7-segment led) display is the best/simplest solution for your "display needs". Unless you need to read it from "quite a distance" (eg. several metres) then may be an I2C-based 16 x 2 alphanumeric LCD display would me more appropriate. There is more existing python, 'C' (and other languages) code "out there" already since such displays are used by many many folks. FWIW, here's a link to my page to the various display types I've played with:
http://www.cpmspectrepi.uk/raspberry_pi ... plays.html
(and else where within my website** are examples of different ways of interfacing to them)
Trev.
** see sig. for "homepage" link.
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

haran
Posts: 34
Joined: Fri Jan 13, 2017 1:22 pm
Location: Spain

Re: Which led matrix to use

Fri Feb 17, 2017 1:40 pm

Thank you for your advise. Really i think that this type of led matrix is the best for my proyect. I will try to show the current temperature and humidity. It will be inside a wooden box and the thin wood in the front side would let to transparent the led light. I hope that it could be understand (i'm not very good with languages). So there will be a wooden box with the pi inside and when a button clicked it would show the temp or humidity. In a few seconds the led would swich off and the wooden box will only seem just a wooden box.
Also i will include some leds for the state of the heating, if it is programed or not, if the heating is working or not, and maybe another one to show if the rasp is working or not, but this is another story.
I have bought two matrices yet. They come with the chip and they should be able to wire in cascade. Maybe i will have to ask for help again...
In any case i will tell my problems and/or solutions.
Regards,

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Which led matrix to use

Sun Mar 05, 2017 6:49 pm

we have just got the MAX7219 modue ourselves so are looking for some good example code to play with... any suggestions please????
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

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

Re: Which led matrix to use

Sun Mar 05, 2017 6:56 pm

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

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Which led matrix to use

Sun Mar 19, 2017 4:15 pm


Hi thank you for that
And apologies for late response...

Also do I need to use a breadboard and what would be the correct pinouts for use direct to the Pi???
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

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

Re: Which led matrix to use

Sun Mar 19, 2017 4:30 pm

You need to have a reliable connection from your MAX7219 to your RPi. Doing that with a breadboard for hardware testing is a good idea.

To find which pins go where, read the instructions with Richard Hull's code library.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”