Тёмный
No video :(

#63 Cascade MAX7219 7-Segment LED displays - easy! 

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

New! ralphbacon.blog
The ubiquitous MAX7219 7-segment display is easy to get working as my previous videos #9 - #11 demonstrated. But getting more than one to work in a cascaded manner is bit more tricky so I've demonstrated here exactly how to get two (or more) connected and then how to communicate with them.
Once you get the idea of how the signalling works then talking to them becomes much, much easier and my code demonstrates this with a 'walking list of number' across two such devices - and, yes, I'm still using the Keypad Matrix as a method of entering numbers to do all this!
--------------------------------------------------------------------------------------------------------
The enhanced sketch (compared to the original) I'm using is here:
--------------------------------------------------------------------------------------------------------
bit.ly/MAX7219C...
--------------------------------------------------------------------------------------------------------
You'll need the MAX7219.h library (which you can get from my earlier videos) or from here in zipped form:
--------------------------------------------------------------------------------------------------------
www.dropbox.co...
--------------------------------------------------------------------------------------------------------
The MAX7219 data sheet holds a wealth of information and you can get that here:
--------------------------------------------------------------------------------------------------------
datasheet.octop...
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?

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

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 36   
@dekipet
@dekipet 2 года назад
It is interesting. You stumble upon a project with a module you haven't messed up much, and here, Ralph already has made a video.
@RalphBacon
@RalphBacon 2 года назад
I knew you would need this information one day, Dejan, so I made this video some while ago now, just waiting for you to watch it!
@alanpowell328
@alanpowell328 7 лет назад
Ralph, I've got a project in mind for a countdown for new year on large 7seg displays with text on the alpha numeric displays. This stuff is so useful in helping me to understand and I will also use your coding in my project. The debug routines are very useful and I'm already incorporating one into all my new Arduino sketches. Keep it up Mate and enjoy your holiday.
@RalphBacon
@RalphBacon 7 лет назад
+Alan Powell It's great that this has helped you with your project (and that debug routine is pretty useful too, I must admit!). Thanks for your best wished for my holiday (sooo looking forward to it, first one this year). The weekly (-ish) videos are still scheduled (go on, ask me how much work THAT was!) and I may even be able to login in to respond to comments if I can find a wifi point somewhere on my travels. Thanks for your post, great to hear from you.
@stevdogvan
@stevdogvan 7 лет назад
This is a brilliant project Ralph, thanks for taking the time to do it. My project is just about done, will demo it to you some how. enjoy your holiday, Big thumbs up.
@RalphBacon
@RalphBacon 7 лет назад
+ Stevdogvan Cherry That's brilliant news, so glad it's working out. Why don't you upload a video of your project? Then everyone can see the fruits of your labour! Yes, I'm sooo looking forward to my holiday, leaving Sunday, back in about 3 weeks. But the weekly videos have all been scheduled in my absence. Thanks for your post, great to hear from you.
@SpeccyMan
@SpeccyMan 7 лет назад
About half way through this video the thought occurred to me 'why not use binary coded decimal' for the buffer as it would halve its size. A byte can contain 2 binary coded decimal digits, so buffer 0 (or 1 if you prefer) would contain BCD digits 0 & 1 then buffer 1 (or 2) would contain digits 2 & 3, etc. Something to experiment with perhaps? Very instructive video as always.
@RalphBacon
@RalphBacon 7 лет назад
+Nick B Hey, Nick, that's a great idea to save some memory, every byte counts with the Arduino's limited storage. In case others reading this are wondering what BCD (Binary Coded Decimal) is all about have a quick look at my video #8 which explains all. Now, Nick, as it happens I'm doing another very quick (part of a) future video on the MAX7219 7-segment displays and how to program the individual segments (rather than letting the unit figure it out by magic) as I've been asked this by another subscriber. I'll see if I can get the time to put the data into BCD format. And that will be the absolute last video I ever do on the ubiquitous MAX7219 7-segment LEDs as I think it will have been fully covered by then! What was that? Never say never. Yeah, I know... Thanks for posting, a great point to make.
@danielm3574
@danielm3574 9 месяцев назад
Just to know. At our friend Ali (express), you can buy these displays. HOWEVER !... there can be a mistake in the schematics of your unit, as they installed a small diode (1n4148?) glass type, close to the input connector, called D1. (this is for 7segment 8 digit boards). Remove this diode , or bridge it. it causes issues that the display does not show the correct info, but rather erratic things. after bridging, no more issue. Cascading resulted in a serious voltage drop between VCC, and after the 9th board, i had 2.2V, and no more 5.25 as on the input. This is a schematic error, as the MAX chip was fed 5V "after" the diode, causing issues. I just wanted to share this vital info, for others, if they would get frustrated :)
@RalphBacon
@RalphBacon 9 месяцев назад
Hmm. Interesting that they would do that. As it happens I run a separate power cable to every other segment, to avoid voltage drops (and the high current running through the initial segment(s). That approach works well (see my video about my World Clock, videos #256, #264). It might not then matter about the diode which I can only assume is there for reverse polarity protection.
@rolfbissinger
@rolfbissinger 10 месяцев назад
Hi Ralph I'm trying to connect 2 7 segment display the way you did in this video but it doesn't work, can you explain to me how you did the wiring? Dout to din,/ cs to C's/ clk to clk?
@RalphBacon
@RalphBacon 10 месяцев назад
Let me just cast my mind back 6 years and remember what I did... oh yes, I remember this very well, even what I had for breakfast that day (it was a Tuesday). So, wiring. The output of the first strip is just connected, pin for pin, to the next one as though it were one long strip. So VCC and GND are obvious, Dout goes to Din, Load and CLK go to CS and CLK. That's it. Now send the data down the wire, remembering that you now have 2 x 8 digits, so the FIRST digit on the right is digit 16.
@SIM3PAUL
@SIM3PAUL 5 лет назад
Thank you for the amazing tutorials Mr. Bacon, SUBCRIBED!
@RalphBacon
@RalphBacon 5 лет назад
Roger, Roger, Ralph to Paul's Flight Deck, message received and understood. And greatly appreciated. You are now a true Arduinite.
@SIM3PAUL
@SIM3PAUL 5 лет назад
at 39:19 you mention "the Arduino is fast, but not at 9700 baud". What do you recommend setting the baud to? The tutorials that came with my Arduino Uno R3 have 9600 as the default. Thanks!
@RalphBacon
@RalphBacon 5 лет назад
Just checked that bit of the video, Paul, and I definitely say ninety SIX hundred baud rate, which is what I normally use just for debugging - sending messages back to the debug window aka serial monitor. Sometimes, if you need it to work real fast, at the risk of some data corruption, use 115200.
@SIM3PAUL
@SIM3PAUL 5 лет назад
@@RalphBacon My apologies for the wrong value there Ralph. What rate would you recommend for moderately fast and not have to worry about data corruption? I'm building a B737-800 cockpit and I just want to make sure it's not slow, but also pretty stable. Thanks!
@RalphBacon
@RalphBacon 5 лет назад
The question is, Paul, are you using the serial ports to transfer data to something else or just for debugging purposes? If it's the former then you have locked yourself out of the serial monitor window for simple debugging. You can use other digital (GPIO) pins for actual serial data transfer using the SoftSerial library. Regarding speed, try the full 115200 first, but the cable lengths must not be too long. If you're really after data serial transfer look at my video #106 on the RS485 modules, very cheap but very reliable too, over long, long distances if you need that.
@StarflightVirtual
@StarflightVirtual 3 года назад
Hello, nice Video !! But one question...i tried the same config, but the second Max display is darker then then the first one. Then i mesured on the first MAX more Volts then on the Secon one. Is that the same in your config ? Matthias
@RalphBacon
@RalphBacon 3 года назад
You should probably run separate, independent +5v supplies to both MAX7219 modules as they can consume quite a bit of current and the voltage drop from the first can affect the second. Make sure the 5v supply is suitably rated (I would suggest 5v @ 2A).
@StarflightVirtual
@StarflightVirtual 3 года назад
@@RalphBacon Hello, yes i did it like that .. thanks !!
@shahbaztech7064
@shahbaztech7064 2 года назад
I want to attach three max7219 seven segment display with arduino nano which show different data (1. Show total price 2. Show total litter 3. Show per liter rate) How I. Connect it which show different data
@RalphBacon
@RalphBacon 2 года назад
You just daisy-chain the three displays (one after the other) and then decide where you want the data to go (which digit), just as per this demo (except I use just two displays but you will have three). Be careful that the Arduino may not have enough 5v power for all three devices, so you _may_ need a separate 5v power supply for the displays. Just connect the separate power +5v to the first display and the GND too.
@SIM3PAUL
@SIM3PAUL 5 лет назад
I'm really building up frequent flyer miles in these comments, apologies for soliciting Ralph. On my Arduino Mega2560 R3, it will not power on with USB 3.0 cable alone, but my Arduino Uno R3 will. The Mega powers up when I connect the 5v adapter just fine. I thought the 5v usb power would be sufficient power, have you had this issue or is this by design? Thanks! Paul
@RalphBacon
@RalphBacon 5 лет назад
No, I've not had this issue _per se_ but I've had similar issues with a recent ESP8266 device. It depends, I believe, in what you're plugging the other end of the USB device into. Whether it's your PC's USB socket, phone charger Wall Wart, something else... they all have different power capacities. That all said, a Mega 2560 doesn't take _that_ much juice 100mA, maybe, when idle). You could put a multimeter on it and see how much power it is taking (have you plugged any power-hungry shield on it, for example?). No worries on the comments, Paul, it's what this channel is here for! And a Happy New Year 2019!
@saintpine
@saintpine 6 лет назад
Unfortunately there is a design error in the display module you are showing. You would have an issue only when daisy chaining more the two modules. The Vcc OUT is connected AFTER D1, in other words, the first module with work on Vcc -- Voltage drop over D1 ie: 4.3V, the second will work at 4.3V minus Voltage drop over D1 = 3.4V, the next module will work in an unpredictable manor working under 2.7V. The solution is to de-solder the D1 and jumper the pads. or the solution I prefer, solder a pin on the via that is near the diode (you can see the Pcb track going from diode to the via. and place the Vcc power connection on this pin. DO NOT connect each module directly to 5V leaving the diode in place, because the chip will work at 4.3V and supply the logic level to the next module that requires the logic in a 5V range.
@RalphBacon
@RalphBacon 6 лет назад
This is more than interesting, saintpine, it's quite worrying. I have a meter long strip of the 8x8 matrix LEDs, also controlled by MAX7219s. It all works just fine but I was going to supply 5v at various lengths along the route. I wonder if they too have diodes in the VCC path? Now, I don't quite understand what you say in your last sentence; the MAX7219 will work up to 5.5v so what's the issue with supplying 5v at strategic points along the strip of cascaded modules? Can you just explain that bit, please?
@saintpine
@saintpine 6 лет назад
Hi, all the RU-vid videos I've seen have the diode in series with the Vcc and does NOT have an electrolytic capacitor in parallel VCC GND, but all the schematics I've seen there is NO diode in series but they all have a 10 to 33uF electrolytic capacitor in parallel to the power line. As is written, I see my last sentence is nonsense, the issue I had is better described below (I hope :P) I have now 5 modules in cascade working without issues, for some reason the last modules showed nonsense and I had no clue for what reason, in the end I figured it could be because though I was supplying 5Vcc to all modules, the chip itself is working at 4.3V (5V - Voltage drop over D1) hence, supplying 0 to 4.3V logic to the next chip that had the diode bypassed and was working on 0 to 5V range. Now I'm not sure this is the solution to the issue, or it simply worked once I bypassed ALL the diodes. But I suppose supplying 5V to each module directly should be a solution, because every chip will be working on 4.3V and supplying a logic level in the range of 4.3V to the next chip that is working on a 4.3V range. I've ordered another 10 pieces, so I suppose I could try myself. I have no clue about the 8x8 matrix.
@saintpine
@saintpine 6 лет назад
I checked with an oscilloscope, the 5Vcc power line gets quite noisy due to the multiplexing, I suppose it would be a good idea to place the missing electrolytic capacitor on each module. it's the two via's you see below D1. On some modules, the Display is mounted on a DIP socket and the capacitor is places inside the socket. It won't be a problem in our version to solder the capacitor on the rear side. Value between 10 to 33uF at least 10Vdc.
@RalphBacon
@RalphBacon 6 лет назад
Your reasoning is sound; as you have another 10 on order you will be able to empirically test out your hypothesis and report back here (I hope). The matrix MAX7219 items I mentioned have a direct connection Vcc from one end of the module to the other, no diode; hence my reasoning of supplying 5v at various stages of the multi-module item I have, so that all the current is not flowing down the first module's copper track (and overloading it).
@roberteliassen5020
@roberteliassen5020 7 лет назад
Excellent work, many thanks and a big thumbs up, although it doesn't seem to increase any counter... Anyway... Think I've discovered a little bug in your code. In printBuffer(), in the for-loop, you have 'cnt
@RalphBacon
@RalphBacon 7 лет назад
Hey Robert, that 'bug' was deliberate to see if you were paying attention, well spotted! Consider yourself promoted to full Arduinite status. Glad you liked the video and also that you posted here, nice to see you around.
@roberteliassen5020
@roberteliassen5020 7 лет назад
It's the old habbit of jumping to the comment section, in the middle of the video, just to state a point. Sorry for that. I've been a software developer since the Stone Age (well, early 80s that is). That explains my behaviour. It's in the spinal core. I'll try to behave in the future. ;-) Really like you channel by the way. It's a little more 'computerish' than Julian Ilett (which is one of my favorites) and a lot less scarier than Big Clives stuff (although he is quite funny).
@RalphBacon
@RalphBacon 7 лет назад
Don't apologise for jumping in, it's good that you watched it! Interesting how you see my channel positioned differently to the other two (who I have never heard of, of course, heh heh. I wonder if they even know about me, new boy on the block?) Anyway, we all provide different content which is good for everyone. Interesting that we're all from the UK!
@roberteliassen5020
@roberteliassen5020 7 лет назад
I'm from Norway by the way. And I have to say I prefer to listen to people from the UK. Not only because you are a lot easier to understand, but also because I like all the different accents in the UK and the nearby islands. And as a non-english speaking bloke, I do learn a lot of fun phrases. Like "blow this for a game of soldiers" in the end of this video. I had to Google that...
@roberteliassen5020
@roberteliassen5020 7 лет назад
Ha-ha! :) After watching Dave Jones for a while, I got used to Google sayings and phrases. What's a "bobby-dazzler"? What is so great about the intestines of a waterfowl? (“the ducks guts”) Where is "the old dart"? Who is this Bob person, any how can he be everyone’s uncle? (“Bob’s you uncle”). How come “bugger all” being nothing? :)
Далее
#62 NeoPixel demo plus eBay Goodies
22:59
Просмотров 2,1 тыс.
#67 Vibration and other switches for your Arduino
34:57
The coolest robot I've ever built!
19:40
Просмотров 4,6 млн
#80 Scrolling LED Matrix MAX7219 *Updated*
30:16
Просмотров 17 тыс.
The cheap Chinese bulb that won't turn off
10:27
Просмотров 10 млн