MAX7219 LED multiplexing tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 116

  • @rishusadhukhan5451
    @rishusadhukhan5451 ปีที่แล้ว +4

    I can't see any video like this. This is much more interesting and fill with information. I can't see any youtuber who make a video about the hardware and software together with full information. I appreciate it and I say that "keep going". Never give up.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      Thank you so much, this is very kind of you, and I am glad you found my video useful. Have a great day!

  • @zambodiazook
    @zambodiazook 2 ปีที่แล้ว +7

    Thank you for posting, I dreamed of these displays in 1988 - it is wonderful seeing this in reality

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +3

      I am so glad that this video brought you happy thoughts! Was there any particular application you had in mind? A clock, or some scientific instrument? I would love to use these in a future project (and not just in a tutorial), and I am always looking for inspirations. Have a wonderful weekend!

  • @maxvideodrome4215
    @maxvideodrome4215 ปีที่แล้ว +4

    I really dig how a YT content creator is using something other than Arduino.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      Ha, thanks, I am glad you like my videos :) Honestly, I believe everyone should use what they want. For me, I get more joy out of using PIC microcontrollers, because I like to work at the level of registers, and I do not really like to use a lot of libraries or pre-built stuff. And in my videos I try to share this excitement. But of course it is also a bit hypocritical from my side, because I still use C to write the code, and not pure assembly. Arduinos are fantastic for some, so: to each their own 🙂

    • @maxvideodrome4215
      @maxvideodrome4215 ปีที่แล้ว +1

      @@FriendlyWire I am the same way. I’ve been programming PICs since 2004. I am not a fan of libraries because I like to know how to drive things myself. (Aside from using I2C and SPI libraries for consistency). I find Arduino sharpens my skills because certain parts/modules documentation is only in the form of Arduino libraries. I need to pull those apart to write my own for PIC (like eink displays/etc)

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@maxvideodrome4215Oh yeah, definitely, there is lots to learn from libraries :)

  • @mostafanfs
    @mostafanfs 2 ปีที่แล้ว +1

    You obviously enjoy your work! and so do we!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thanks so much, Mostafa! :) And yes, I do!

  • @jumbledfox2098
    @jumbledfox2098 ปีที่แล้ว +2

    Thank you so much for this. I'm super excited to make more electronics :3

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      That's great, and thank you for your nice comment! Best of luck! :)

    • @jumbledfox2098
      @jumbledfox2098 ปีที่แล้ว +1

      @@FriendlyWire thank you! The only thing I'm a bit scared of at the moment is powering my projects. Do you have any videos about such things? Thanks!

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      @@jumbledfox2098 Oh, I feel you, this can be a bit scary indeed. I don't have a dedicated video on this, sorry. What kind of project do you want to power? Does it have a lot of LEDs? If you want to stay in electronics, I would recommend to get a proper bench power supply, either a switched one (cheaper) or a linear one (more expensive). Let me know, I am happy to guide you :)

    • @jumbledfox2098
      @jumbledfox2098 ปีที่แล้ว +1

      @@FriendlyWire thank you! My project includes 51 seven segment displays controlled via 7 max7219 chips, since each chip only powers one display at a time I'd need enough amps for 7*8 leds, however I don't know how many each segment uses. When I figure that out would I just need to use a power supply that can deliver that many amps (plus a bit more for the esp32 microcontroller as well as just in case)? I'd like to power it via USB c from a wall outlet if possible, I've used a barrel jack on a previous project but I didn't really know what I was doing haha (and usb c looks infinitely nicer than a barrel jack)

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      @@jumbledfox2098Okay, that's a lot of LEDs, but totally doable! Each LED, conservatively speaking, takes 20mA at full brightness. Call that 1.2A. Let's add another 300mA for anything else, just in case, so 1.5A is what you need. Makes less than 10W at 5V, so: totally doable for USB type C. But: it is too much for a regular computer USB port, which is capped at 5W, so keep that in mind. I would recommend getting a standard USB type C charger/wall adapter [like this 20W version here: www.amazon.com/dp/B0B9X2SFMH/], and a USB type C chassis adapter that is rated for that current [ like this one here: www.amazon.com/dp/B0BY7VHWRR/ ]. In your circuit, make sure to add a large-ish capacitor (100uF) close to each MAX7219, as well as a 100nF bypass capacitor. Add a very small resistor (100 Ohms or so) in series with each of the 100uF capacitors, this prevents a current surge when you first plug in the power.
      Let me know if you have any questions, and I hope it helps!

  • @techkri
    @techkri 2 ปีที่แล้ว +4

    Thanks so much for this video :) I was looking for this exact video.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you, I am happy you like it!

  • @A-D-D-F_Toxic
    @A-D-D-F_Toxic 2 ปีที่แล้ว +1

    What would you do for R-SET (2:32) if you had a few different LEDs in your matrix that have a different voltage than the rest?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Different voltages is no problem :) R-set sets the current, and most LEDs work well at the same current. A red LED needs around 1.9V and a blue LED needs 2.5V, but at 20mA they have the same brightness. So I think you can use any LED you like, as long as they have the same current. (If they have different current requirements some of the LEDs may look dim.) Hope that helps!

    • @A-D-D-F_Toxic
      @A-D-D-F_Toxic 2 ปีที่แล้ว +1

      @@FriendlyWire ah, thank you! I’m slowly remembering my electronics class stuff

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@A-D-D-F_Toxic No worries, happy to help! Thank you so much for your interest, Ryan, and have fun with the MAX7219 :)

  • @WintermuteDigital
    @WintermuteDigital 2 ปีที่แล้ว +3

    Excellent video and clear explanations. Keep it up!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Thank you so much, it means a lot. Glad you liked the video! :)

  • @makcimenuka7904
    @makcimenuka7904 ปีที่แล้ว +1

    Very good tutorial. Thanks.

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      Thank you, I am glad you like it!

  • @shwetaringe2785
    @shwetaringe2785 2 ปีที่แล้ว +5

    Thank you for such detailed explanation. It helped a lot. Your are doing fabulous job. Please keep doing.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Wow, thank you so much, will do! :) Have a great day!

  • @bwack
    @bwack 3 ปีที่แล้ว +2

    Thanks. I like the MAX7219. The 7-segment modules are very handy :)

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว +1

      Glad you liked the video! Yes, they are so useful for debugging, too.

  • @75slaine
    @75slaine 3 ปีที่แล้ว +1

    Fantastic details as always

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      Thank you, Glen, so glad you liked it!

  • @thomasschellekens5084
    @thomasschellekens5084 2 ปีที่แล้ว +2

    very nice original work, insightful diagrams, very helpful.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you, Thomas, glad you like it! But I have to admit, there are a many other tutorials for the MAX7219 out there :)

  • @StrangeGarage
    @StrangeGarage 2 ปีที่แล้ว +1

    That's a pretty good video, my dog.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thanks so much, glad you like it! :)

  • @goesintite
    @goesintite 2 ปีที่แล้ว +1

    Thanks for the intro to MPLab

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you, Miguel, I am glad you like it! :)

  • @KasimirvonFinck
    @KasimirvonFinck 2 ปีที่แล้ว +2

    Hey! Really cool explanation. I am doing an Art-Installation and have to light up 21 IBC containers (the large 1000l water tanks that you may use without water and rather put a light inside ;) ) For years i stayed away from two major electronic subjects... Transistors and multiplexing ;D just the gap was too braod and too easy to overcome and bypass. But not anymore. I am digging in and your video and the ones from great scott help alot. Your's though does speak to me much more as i want to understand what is happening on signal level to understand what im doing and why on the micro controller side.
    The project is to be wireless ... of course ;) (has to do with the visitors and safety blah) so I was going to use three ESP32 controllers and one master ESP32 controller for controlling the LEDs.
    To be power efficient and stay in my tiny artist budget, I want to use either 3 single 3W High power LEDs or three 1W RGB LEDs in parralle per container times 21 container in three groups.
    So that each group has 7 Containers with 3 LEDs each.
    I thought it would be ok to use the MAX7219CNG IC and MOSFETS to drive the LED. On the ESP32 side I am planning to use WLED for easy control, though am not 100% sure how the rollout will work.
    BUT now im considering the length of the cables etc. and worry about WHERE to ideally place the controller and how as the cable length might interfere.
    In any case: Thank you very much for the video!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      Thank you for your kind words, Kasimir! I am so happy to hear that this video speaks to you, it really means a lot.
      For your project I am thinking the best solution depends a lot on the requirements of the images/patterns to be displayed. What is your target refresh rate? What kind of color depth do you need? I have never used ESP32's because of their complexity, and I like to set every bit in every register myself, but they sure sound like fantastic devices to play around with.
      Driving the MAX7219 outputs with MOSFETs may work, but you have to make sure you do some sort of manual current limiting in this case, because the MAX7219's do that automatically with that one external resistor. But of course in this case it would only regulate the gate current, and the drain-source current is independent of the gate current for mosfets.
      Good luck with your project! I am happy to help out with as much as I can, and thank you again for your interest and your nice words :)

  • @AussieTrucking
    @AussieTrucking 2 ปีที่แล้ว +1

    thank you for making this it helped a lot. How do you use the button to change what is displayed on the dot matrix?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Hey there, I am glad you liked the video! Inside the code you will have to react to the button press, and basically you can send out anything you want to the display. What kind of information do you want to display?

    • @AussieTrucking
      @AussieTrucking 2 ปีที่แล้ว +1

      @@FriendlyWire im wanting to be able to have 4 different icons loaded but only change when the button is pressed.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@AussieTrucking What's your experience in programming in C? It's not so difficult, especially if you only want to display static images. Did you check out the companion article? friendlywire.com/tutorials/max7219/

    • @AussieTrucking
      @AussieTrucking 2 ปีที่แล้ว +1

      @@FriendlyWire i have no experience in programming lol. Its peaked my interest with the LED's. I've had a look at that link I understand a little but it in a way makes sense.

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@AussieTrucking Oh I see! Then this project is maybe a bit involved to get started. You can have a look at this video here (th-cam.com/video/e4Q2dYVedPY/w-d-xo.html) where I go through all the basics, and perhaps this one here (th-cam.com/video/mUhzqDD6dg4/w-d-xo.html) about more details with getting all setup.
      What kind of symbols are you looking to display? You can reach me on social media (@FriendlyWire, Twitter preferred) or via email (at the bottom of my website www.friendlywire.com). If it's only simple symbols I will be happy to send you the code that generates/creates them with button presses :)

  • @hthharrison7764
    @hthharrison7764 3 ปีที่แล้ว +1

    Thanks for the tutorial 👍🙂

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      Thank you, happy you like it!

  • @ESEben10
    @ESEben10 10 หลายเดือนก่อน +1

    Thank you for the clear tutorial! I get a FYM-23881C dot display , what is RGB unlike yours, what is one colour. It has 32 pins and with a MAX7219 I'll be able to drive only one colour. So, is that that I need three MAX7219 for each display to make light R,G or B ? Or there is a single driver that can handle this kind of display?

    • @FriendlyWire
      @FriendlyWire  10 หลายเดือนก่อน +1

      Thank you, glad you liked it :) That's a good question! I would have just went along with using three MAX7219's for this, since this chip is readily available and not so expensive. There are probably RGB drivers for this purpose, but it would most likely be more expensive. And at this point you could also make an 8x8 matrix from the comparatively cheap WS2812 LEDs (which are RGB to begin with).

    • @ESEben10
      @ESEben10 10 หลายเดือนก่อน +1

      Thank you!

    • @FriendlyWire
      @FriendlyWire  10 หลายเดือนก่อน +1

      @@ESEben10 Hope it helps. Let me know what you decided to do in the end, I would love to see the build. Have a great day! :)

    • @ESEben10
      @ESEben10 10 หลายเดือนก่อน +1

      @FriendlyWire what I have in mind right now is to place a switching device with at least 3 switching positions between the drivers and displays and tie together their switch position select pins. This way I can commute between R,G and B using only one driver per display. I was thinking on demuxes but I would need a bunch of them per display . The easiest way I found to implement a switch is using microcontrollers (like stm32f405 or f407) with enough gpio's pins to use one of it per display. But it is nevertheless a tricky solution.

    • @FriendlyWire
      @FriendlyWire  10 หลายเดือนก่อน

      @@ESEben10 One switched driver per display will be very difficult I think, since you have to write the new color data to the MAX7219 every single time when you switch to a different color, and that may mess up the multiplexing stability and will lead to flickering, unless you are super fast.

  • @anhthodung92
    @anhthodung92 3 หลายเดือนก่อน +1

    Thank you ! I from Vietnam's

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      Glad you like it! Best wishes from Germany!

    • @anhthodung92
      @anhthodung92 3 หลายเดือนก่อน +1

      @@FriendlyWire I admire your country very much !

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน +2

      ​@@anhthodung92 Thank you! I have always wanted to visit Southeast Asia more, I love the food so much :D

  • @flashcorp76
    @flashcorp76 ปีที่แล้ว +1

    😊Nice, where is the Clock tuto ? That would be cool 👍🏻

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว +1

      Thanks! You're the first one to ask, if you contact me via email I can send you the .c-file :) My email is at the bottom of my website www.friendlywire.com

  • @amermusinbegovic3882
    @amermusinbegovic3882 ปีที่แล้ว +1

    What simulation program do you use?

    • @amermusinbegovic3882
      @amermusinbegovic3882 ปีที่แล้ว +1

      I'm trying with proteus , can't make it work

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@amermusinbegovic3882 Actually I don't use a simulation program. Is something not working? Are there error messages?

  • @mishavillanueva7191
    @mishavillanueva7191 2 ปีที่แล้ว +1

    Whats the difference with cd4026 with simple counter using 7 segement display?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      The CD4026 can only display 0,1,2,3,4,5,6,7,8,9, and that's it. Also, it can only change from 0 to 1, from 1 to 2, from 2 to 3, and so on. The MAX7219 allows you to display anything you want on a 7-segment display. It's not a counter, it is a display driver, so it is more flexible while not so specialized.

    • @mishavillanueva7191
      @mishavillanueva7191 2 ปีที่แล้ว +1

      @@FriendlyWire got it. But can i use it as a counter as cd4026 i mean can i substitute to it?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@mishavillanueva7191 It's not a direct substitution, you have to use it with a microcontroller. If you need a counter alternative to the CD4026 I would recommend the CD4017 (on which I also have a video: th-cam.com/video/BZjO2TuS2Vk/w-d-xo.html ) or perhaps the CD4510. Hope that helps! If you don't mind me asking, what is your project about? :)

  • @StoriesoftheSoul1018
    @StoriesoftheSoul1018 2 ปีที่แล้ว +1

    Can I use Mikro C for software compiler

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Yes, I think Mikro C supports PIC controllers. But the XC8 version I am using in my videos is completely free, and then you can follow the videos more directly. Both ways work :)

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว +1

      @@FriendlyWire Thank youuuuu thank you for such a generous reply. All the best wishes for you....😊🤞🤞

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@StoriesoftheSoul1018 Thank you, and don't hesitate to get in touch if anything doesn't work, we will figure this out :)

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว +1

      @@FriendlyWire Alright Sir ☺️

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว

      Hi, once again here to bother you, actually just wanna ask that can we change the code for dot matrix module

  • @jeksontivane2455
    @jeksontivane2455 2 ปีที่แล้ว +1

    Como comandar matriz de led, sem programa?

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Without a program this is probably more difficult with the MAX7219 (since it is designed to work with microcontrollers). In that case I would recommend to build your own discrete driver out of transistors.

    • @jeksontivane2455
      @jeksontivane2455 2 ปีที่แล้ว +1

      @@FriendlyWire oh thank

  • @StoriesoftheSoul1018
    @StoriesoftheSoul1018 2 ปีที่แล้ว +1

    Sir can I use pic16F877 instead of pic 16f1455

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      Yes, of course, this is possible. You need to change to code slightly to accommodate for that. This tutorial is about the MAX7219 driver, and when you follow the steps it will be easy to adjust the code.

  • @Envai_Çesit
    @Envai_Çesit 3 ปีที่แล้ว +1

    Thanks

  • @dilanlakshitha2737
    @dilanlakshitha2737 2 ปีที่แล้ว +1

    thank you

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you, Dilan, glad you like the video! :)

  • @StoriesoftheSoul1018
    @StoriesoftheSoul1018 ปีที่แล้ว +1

    Sir will u please guide me through the problem I'm getting errors in line 69-70 and 82-83.. please sir. I'm doing project for dot matrix module

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      What are the error messages?

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 ปีที่แล้ว +1

      @@FriendlyWire sir I'm doing it with pic18f452 may be that's why I'm getting the errors, how I would resolve them.. just in 69-70 and 82-83 lines..please sir guide me about it

    • @FriendlyWire
      @FriendlyWire  ปีที่แล้ว

      @@StoriesoftheSoul1018 Yes, this code is for the PIC16F1455, so the code needs to be changed to work with the PIC18F452. Lines 69-70 are for the pullup resistors of the PIC16F1455, the PIC18F452 may not have these registers. And lines 82-83 turn off the analog features on the pins RC2 and RC3 of the PIC16F1455.
      Which pins of the PIC18F452 are you planning to use? And did you create a new project inside the MPLAB IDE specifically for the PIC18F452?

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 ปีที่แล้ว

      @@FriendlyWire yes sir as according to the code I have use the pins for pic18 as you have used for pic16..
      But the problem I'm receiving is how to disable the features of the pins of pic18 to match it with pic16..
      As you have disable the feature of analog in ur pic microcontroller..
      What would be the command syntax for my pic18 microcontroller

  • @StoriesoftheSoul1018
    @StoriesoftheSoul1018 2 ปีที่แล้ว +1

    Hi, sir the great calm explanation. Thank you 💕.
    Sir I hope u don't mind, can u share the code.
    Regards

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      Thank you for your kind words! The entire source code is on my website: friendlywire.com/tutorials/max7219/

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว +1

      @@FriendlyWire got it thanks alot ✨✨

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว

      @@StoriesoftheSoul1018 Happy to help, and best of luck!

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว +1

      @@FriendlyWire 🤗

    • @StoriesoftheSoul1018
      @StoriesoftheSoul1018 2 ปีที่แล้ว +1

      Hi 👋.
      Sir I'm having an error in code for dot matrix module with max7219 in Mikro C

  • @novocanal7153
    @novocanal7153 2 ปีที่แล้ว +1

    Please, https for your homepage. http not runing :-( Firewall here

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      I coded this website in static HTML, the only javascript is from the image gallery, so you should be safe. I have heard several people mention they cannot view my website, may I ask from where you are watching, and what your browser is?
      //edit: I turned on SSL, it should work now as soon as it is activated by the provider.

    • @novocanal7153
      @novocanal7153 2 ปีที่แล้ว +1

      @@FriendlyWire from Brazil. I use Chrome. https is ok now. Thank you so much!!

    • @FriendlyWire
      @FriendlyWire  2 ปีที่แล้ว +1

      @@novocanal7153 Glad it's working now!

  • @rrssmooth6643
    @rrssmooth6643 4 หลายเดือนก่อน +1

    Jesus christ, looking again at video, you are one clever bastard.

    • @FriendlyWire
      @FriendlyWire  3 หลายเดือนก่อน

      Hahaha I am glad you like the video, thanks! :)

  • @bigtronicas.a.s354
    @bigtronicas.a.s354 2 ปีที่แล้ว +1

    high vibe

  • @07ring07
    @07ring07 3 ปีที่แล้ว +1

    👍

    • @FriendlyWire
      @FriendlyWire  3 ปีที่แล้ว

      Glad you like it, have a great day :)

  • @rrssmooth6643
    @rrssmooth6643 6 หลายเดือนก่อน +1

    I thought I could figure out arduino, driving me nuts

    • @FriendlyWire
      @FriendlyWire  6 หลายเดือนก่อน

      Sorry for your frustration! Sometimes these things can drive us nuts indeed... Can I help with anything?

    • @rrssmooth6643
      @rrssmooth6643 6 หลายเดือนก่อน +1

      @@FriendlyWire I will just keep working at it, cannot believe school children know how to do it. I figure little things out more and more.

    • @FriendlyWire
      @FriendlyWire  6 หลายเดือนก่อน

      @@rrssmooth6643 That's awesome, good luck, and don't give up, you can do it!