Тёмный

#9 Arduino and LED 7-segment displays using a MAX7219 - Part 1 

Ralph S Bacon
Подписаться 54 тыс.
Просмотров 16 тыс.
50% 1

7-segment LED displays are easy to control with an Arduino and a MAX7219 - just 3 wires (plus power supply) and a few lines of simple C++ code.
You don't need to be a rocket scientist to display the numbers 0 thru 9 (and the letters HELP) on a 7-segment LED display unit. So you can display the temperature or distance or... you get the idea!
It's simple so just watch this and follow me through the steps.
Part 2 (video #10) follows on from this one. Subscribe so you don't miss it.
All code (for all three video parts) can be found here:
github.com/RalphBacon/MAX7219...
--
If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
My channel is here:
------------------------------------------------------------------
/ ralphbacon
------------------------------------------------------------------
How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
[You can also use this link: / ralphbacon ]

Наука

Опубликовано:

 

17 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@shuoshan6990
@shuoshan6990 6 лет назад
Your tutorial is the only one that worked on my device. I've followed numerous other tutorials using the ledControl library but none of them work. Thank you so much!
@RalphBacon
@RalphBacon 6 лет назад
You're most welcome Shuo. There are further videos on the MAX7219 (8 x 8 matrix, not 7-segment LEDs), that give scrolling messages too, which may be of interest to you. Thanks for posting.
@shuoshan6990
@shuoshan6990 6 лет назад
Thank you Ralph, now I'm interested in using the 8x8 matrix display for my next project! I'll make sure to check out your videos.
@jonjon6137
@jonjon6137 7 лет назад
Nice job, that was very good, well presented & reasonably easy to understand.
@RalphBacon
@RalphBacon 7 лет назад
Thank you Jon Jon! There's a more recent video #63 on cascading two (or more) MAX7219 displays together which is a little more complicated but once you understand the concept, it too is "reasonably easy" to understand (like most things really). Thanks for posting, good to hear from you.
@1065411
@1065411 8 лет назад
thanks very helpful
@RalphBacon
@RalphBacon 8 лет назад
+mojtaba jamea I'm glad it was useful. Plenty more are planned to help us get the most from our Arduinos! And do spread the word about this RU-vid channel!
@TheWilsky
@TheWilsky 3 года назад
Hi Ralph. Fantastic videos. If i wanted to build a 7 digit 7 segment led all with individual push button for each separate digit. Is there a diagram and code available for this project? TIA.
@RalphBacon
@RalphBacon 3 года назад
Yes, you can. Look at video #13 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-CTaJWKsJjIk.html for how to control what you see on the 7-segment display. Then you can just use 7 individual buttons rather than a matrix switch.
@ananthannarayanan1742
@ananthannarayanan1742 4 года назад
Hi Ralph, Can you do a tutorial using 7-segment Led display using MAX7219 to count the number of time an inductive sensor detects metal object as well as reset back to "00000"?
@RalphBacon
@RalphBacon 4 года назад
Frankly, Ananthan, there are enough videos on this to allow you to do that for yourself. You need to break the project (if that's what it is) into its constituent parts and build each one separately (on breadboard is fine).
@slevany
@slevany Год назад
Hello Ralph, what should I do to light a specific segment(s) combination not included in the BCD ?? For example, to light segments a, b, f, g ? Is it possible ? Many Thanks.
@RalphBacon
@RalphBacon Год назад
Yes, it's possible. Instead of sending down a digit such as "9" you send down the individual bit pattern you want lit (just as you say). Look at my more recent videos for an example. Searchable PDF of all my videos in the video description of all videos.
@saintpine
@saintpine 6 лет назад
1:33 Beware the Diode D1. There is an issue cascading more than two Displays, here is the solution to the problem: There is a Diode D1 mounted from Vcc di The MAX, and the Vcc OUT is unfortunately connected to the output of the diode and NOT to the input Vcc. I thought at first that the best solution would be as you have done, but I found that sporadically gibberish ended up on the display. Maybe because the Max would receive about 4.2V and send logic 0 to 4.2V to the next module that's powered at 5V. In the end the best solution is to de -solder the Diode and jumper the pads OR there is a via hole just after the diode (on the module in this video it's a via, I see something soldered in place), solder a pin and use this for VCC in.
@RalphBacon
@RalphBacon 6 лет назад
I saw your post for the updated video #63 about cascaded displays, and asked you a question, so I won't repeat it here, but it's quite a design flaw, it would seem.
@saintpine
@saintpine 6 лет назад
I answered your question on #63. Sorry for the duplicated message, I thought it could be important, I wrote the same message on both posts, not everyone watches all posts. In fact, I'm jumping from one video to another of yours in accordance to what interests me at that moment. Well done with your videos, I don't understand why you're so underrated. Good luck with your channel.
@RalphBacon
@RalphBacon 6 лет назад
Glad you like the videos, and yes, it would be nice to get more views and subscribers, all in due course, perhaps!
@squalazzo
@squalazzo 6 лет назад
can matrix and 7segments max7219 modules be mixed on same esp8266 or arduino? Can they share the same DIN and CLK and change only the CS pin, or what? Thanks in advance
@RalphBacon
@RalphBacon 6 лет назад
They can be mixed if using SPI, squalazzo, as you rightly say, each unit has a separate Chip Select (CS) pin that switches that item on. Whether things run smoothly when mixing items is another matter - you'd probably have to try it out. Alternatively, instead of hardware SPI, you could use software (bit-banging) SPI for the other device.
@squalazzo
@squalazzo 6 лет назад
thanks, i'll try :)
@jigarpanchal7995
@jigarpanchal7995 4 года назад
Can we improve seven segment display brightness?? using max7219 ic. it's possible??
@RalphBacon
@RalphBacon 4 года назад
The MAX7219 haa a brightness control (0-100%) but maybe you need a better _contrast_ which you can do by placing some red lighting gel over the display. It's cheap and available on eBay in A4 sheets or bigger. See here: www.ebay.co.uk/itm/106-PRIME-RED-Heat-Proof-Coloured-Transparent-Acetate-Gel-Sheet-Crafts-Lighting/162838930358?var=461875848563&hash=item25e9f4e3b6:m:mJ3-OhCp_12ZWAlAxj2cCzA
@shahbaztech7064
@shahbaztech7064 2 года назад
How to control the decimal point. I want to show a float value on max 7219
@RalphBacon
@RalphBacon 2 года назад
The decimal point is just another dot as far as the MAX7219 is concerned. So output each character of the floating point (as a String) and send the dot as part of the character where you want it to appear.
@yogajangkungs
@yogajangkungs 7 лет назад
hi, nice video. i have a question, can i pull those two 4 digit 7 segment off the board and then replace it with 2 or 3 digits 7 segment LED?
@RalphBacon
@RalphBacon 7 лет назад
+I Gusti Ngurah Dhyana Yoga Well, if the type of LED you're replacing it with is identical (that is, common anode/cathode with the pins connected to the correct segments (a-h plus dp) then I see no reason why it would not work. If the LED you're replacing it with is different you could still make it work by wiring the LED manually to the board (via flexible jumper cables) although at that point you might ask yourself whether it's all worth it - you could get a MAX7219 chip and wire it up yourself for your particular LED array. Quite a bit of work but all do-able. Thanks for the interesting question. My question to the manufacturers is why they don't just make a 4-digit version of this that is extendable to 8-digits; I mean, not everyone needs 8 digits even if the MAX7219 supports that many.
@yogajangkungs
@yogajangkungs 7 лет назад
Ralph S Bacon hi thanks for the answer. yeah i also think that 2 or 3 digit 7 segment LED are more convenient to use because we can arrange the digits to odd or even number with those two kinds of 7 segment combination. hmm 1 more question, how many LEDs is the MAX7219 could handle if i want to build my own 7 segment configuration? can you give me some reference how to do it?
@RalphBacon
@RalphBacon 7 лет назад
+I Gusti Ngurah Dhyana Yoga The MAX7219 can address 64 individual LEDs, so a standard 7-segment LED (plus its decimal point, making 8 segments per digit) means the MAX7219 can support 8 digits - that's why they are manufactured like this. If you look at tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/ you'll see the pinout of the MAX7219 near the top of the page. Each segment (a - h plus dp) is common for all digits and then (via I2C) each digit is switched on / off in turn. Could be tricky if you're not familiar with multiplexing but my code would still work if you wired it up correctly. That's the best I can do but Google may be your best friend (or the Arduino forum forum.arduino.cc/index.php) who live helping people with questions as long as you show you have done your homework / Googling first!
@yogajangkungs
@yogajangkungs 7 лет назад
Ralph S Bacon but are you able to unplug the 7 segments off the MAX7219 module board?
@RalphBacon
@RalphBacon 7 лет назад
Well that depends on how the hardware has been built. If the leds have been soldered in, then no. If they have been plugged in then yes. Look very carefully at the pictures of the hardware before purchase is the best advice I can give.
@ramerestrera2478
@ramerestrera2478 3 года назад
good day sir, do you have a link for a code of a project using 7 segment to display real time and temperature, thanks
@RalphBacon
@RalphBacon 3 года назад
All the code I have is in my GitHub for this video ( github.com/RalphBacon/MAX7219-7-Segment-LED ) but if you can load the demo code you can figure out exactly how to show the time and temperature, I am sure!
@ramerestrera2478
@ramerestrera2478 3 года назад
@@RalphBacon thank you sir
@TheWilsky
@TheWilsky 3 года назад
Hi Ralph. Thank you so much for replying. Do you do freelance work at all whereas I could hire your services to provide me with a component list a wiring diagram and a code to program 7 individual single block digits each with their own button that on each press cycles through numbers 1-9. Thank you in advance. Kind regards Wil
@RalphBacon
@RalphBacon 3 года назад
No, sorry, I don't do any bespoke work, but if you go to the Arduino forum there are several there who are experienced and do just that. forum.arduino.cc
Далее
LED Displays with Arduino - 7-Segment & Dot-Matrix
44:43
Miyagi & Andy panda - minor (пародия Beatrise)
0:30
Кто сделал Катар богатым? #shorts
0:59
Arduino Basics Multiplexing Explained
5:29
Просмотров 19 тыс.
#63 Cascade MAX7219 7-Segment LED displays - easy!
40:24
Make a Flight Sim Radio! | C172 #48
20:18
Просмотров 17 тыс.
Creating Arduino Library for MAX7219 7-Segment Display
7:04
Треш ПК за 420 000 рублей
0:59
Просмотров 253 тыс.