How to Charlieplex LEDs with an Arduino

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

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

  • @georgechambers3197
    @georgechambers3197 5 ปีที่แล้ว +9

    I tried to read about Charlieplexing but just didn't really get it. This really makes it clear, at least to me. Thanks for the video and the code!

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

    Thank you, I think I finally get Charlie plexing. I’ve seen it used with keyboard inputs but could never wrap my brain around it. Great video Paul, I’m going to be spending some time at the breadboard tomorrow that’s for sure. Now I need to dig through my chips and see if I can do this without the Arduino.
    One more thing I think the upload has some sound issues, someone commented that your mic sounded odd but the music at the end has the same tinny sound to it so I am not sure your mic is the issue. More likely TH-cam has messed up your sound.

  • @didierdelay6623
    @didierdelay6623 5 ปีที่แล้ว +13

    Is there something wrong with you microphone? This video sounds wierd!

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

      It's a compression artifact. Why it's happening I don't know, but it's the same effect you get when you recompress music that was previously compressed.

  • @hadireg
    @hadireg 5 ปีที่แล้ว

    Nice!! Those things you say why we didn't think about it by ourselves! :)
    Thanks Paul!

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

    Shouted you out in my last video, really learned a lot from you over the years

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

    That very cool. What is high Z is it just like a standby mode?? Iv heard it mentioned before with logic gates or something!!!?

  • @ismailtan
    @ismailtan 5 ปีที่แล้ว

    My lazy ass would grab something like ws2812, but this could save the day one day. I will definitely try it out one day. Electronics keep surprising me. Thanks for sharing this witchery.

  • @htkevo5273
    @htkevo5273 5 ปีที่แล้ว

    I love you and your videos and I’m super sorry about your condition❤️❤️❤️

  • @MalagasOnFire
    @MalagasOnFire 5 ปีที่แล้ว

    This happens maybe in some powerbanks where the LED bargraph is multiplexed by small number of pins of control chip but it is a tool to keep handy. The LED matrix looks like a truth table

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

    Great video! thanks for posting this, it was incredibly informative.

  • @jonelectronics510
    @jonelectronics510 5 ปีที่แล้ว

    Nice little project! I remember when I was first introduced to sinking and sourcing using a lm741 across a positive and negative rails....mind blowing!

  • @Explore-Gobal
    @Explore-Gobal 4 ปีที่แล้ว

    I'll check out the whole video and read the comments, but right off the bat, can the brightness of each led be controlled also? Say have led1 come on at 100%, led 2 at 75%, led 3 at 50% and led 4 at 25%? Put another way, PWM. Can this work with PWM?

    • @learnelectronics
      @learnelectronics  4 ปีที่แล้ว

      I don't think so.

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

      You won't be able to use pwm directly, but if your io pins and controller is fast enough you should be able to control the brightness of each led individually by just changing the amount of time you turn each led on manually in your code.

  • @toddduffett1378
    @toddduffett1378 5 ปีที่แล้ว

    Hi, thanks for the clear explanation.
    You mention using a 7 segment led display but with common anode ( or cathode) designs I'm not clear how to wire the pins or adjust the code since the legs of the LEDs on the common rail are all connected. Any recommendations where I can find and explanation of how to do this?

  • @cynthiacavanaugh6458
    @cynthiacavanaugh6458 5 ปีที่แล้ว

    Is there any risk of damaging the inputs or outputs by switching from input to output so quickly and often, and is there a noticeable performance impact of switching between input and output modes? Like enough to make a difference in brightness of segments of rapidly switched LED digits?

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

    Just reading another comment there and it reminded me of something i wanted to ask!! Do you need to use resistors with leds when using arduino in general?? Or can it damage it? I know it can source a max of 20mA but would it strain it's self with no resistors when using leds is more what I'm trying to say???? P.s. That Charlie plexing is very cool. And I will definitely put it in my pocket for again.

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

      Yes, resistors are necessary when working with LEDs. They will draw as much current as they can until they pop or burn out the source.

    • @ntd0
      @ntd0 5 ปีที่แล้ว

      You must use resistor for your 5MM LEDs. If you give them 5V directly, Arduino will supply more than 20mA for them, good scenario is LED died because of overcurrent, bad scenario is your Arduino's digital pin or PORT died (because absolute maximum for Arduino Uno pin is 40mA).

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

      LED will draw approximately 20mA when you apply correct voltage for it. You use resistor to drop down the voltage over resistor (current limiting). Let's say your LED's forward voltage drop is "Vf", your source voltage is "Vcc". You want to draw "I" Amps of current from your source. You will calculate the resistor value like this:
      (Vcc-Vf)/I
      For example, Arduino pin is 5V, LED's drop is 2.2V and you want 20mA current to flow.
      (5-2.2)/0.02 = 2.8/0.02 = 140 Ohm

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

      @@ntd0 thanks Nuru

    • @ntd0
      @ntd0 5 ปีที่แล้ว

      @@keithking1985 You are welcome :-)

  • @michaelpadovani9566
    @michaelpadovani9566 5 ปีที่แล้ว

    Sound was a little weird but I followed along and learned something new!

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

    So your using the Arduino as Ground on the 2nd and 3rd tier LED's ? How are they finding ground ? I can't think of why this wouldnt work for driving FET's doing switching, eaaa ?

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

      No grounds per se. When one leg is high and sources current, the other is low and sinks it.

    • @QlueDuPlessis
      @QlueDuPlessis 5 ปีที่แล้ว

      This works with L.E.D.s because they're essentially diodes. This is really a type of crude binary decoder circuit that uses the diode nature of LEDs to complete the decoding logic.
      You might need some extra diodes to get this to work with FETs.
      You could use something like the 40107b dual 2 input nand chips that have open drain, n channel FETs for outputs.
      You'd still need to spend some time working out the logic though.

  • @eriklaken1025
    @eriklaken1025 5 ปีที่แล้ว

    Thank you, Summer is almost over and Then iT,S timé to visit you Channel everyday , so Nice this Charlyplexer." !

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

    Witchcraft!!

  • @MCsCreations
    @MCsCreations 5 ปีที่แล้ว

    Really nice, man! Thanks a lot! 😊

  • @PatrickLangendoen
    @PatrickLangendoen 5 ปีที่แล้ว

    I get what happens when we make one pin low and the other one high. But why do you change the pinmode to input to turn off both leds? That would make the pin float somewhere in between 0 and 5 volts, right? I mean if you make both pins low that would also make both leds turn off.

    • @learnelectronics
      @learnelectronics  5 ปีที่แล้ว

      No it doesn't make them float. It makes them inputs.

  • @taranagnew436
    @taranagnew436 5 ปีที่แล้ว

    how does the pin_config and pin_state turn on/off the leds, is there a video on the topic?

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

    Do an msgqe7 tutorial

  • @haroldpalmer3245
    @haroldpalmer3245 5 ปีที่แล้ว

    Thanks for this

  • @thecongo8505
    @thecongo8505 5 ปีที่แล้ว

    Wow...very cool

  • @weerobot
    @weerobot 4 ปีที่แล้ว

    Awesome..

  • @mikeburton8687
    @mikeburton8687 5 ปีที่แล้ว

    Very interesting

  • @whitehoose
    @whitehoose 5 ปีที่แล้ว

    I love this illogical "logic". Most mortals would just never see that it could or can work. Then someone somewhere decides it does work and uses it and suddenly everyone says, "of course" and it becomes sort of knowledge that everyone uses. (Mabe that excluded creationists - but nothing's perfect). It's actually a jawdroppingly elegant principle.
    There are lots of examples of it (it has a name and I'm damned if I can remember what it is - simultaneous invention??) but if you look at discoveries like Newton and Leibniz with calculus, Darwin and Wallace with evolution. In this case what was impossible yesterday suddenly making perfect sense (or maybe that's the teacher?). It's sort of almost like boolean algebra fits into electronics like a glove but existed long before transistors.

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

    Kewl.