A quick look at Charlieplexing

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

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

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

    Happy New year! I hope it will be a good one for everyone

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

    Finally! Great explanation.. I'd been wondering how you set the floating state of the "off" pin... it never occurred to me to make it an input! You guys are so clever!

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

      it's not called Daveplexing for a reason though :p

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

      Unexpected Maker unexpected solution? 😀

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

      it's a good way to drive a 1-wire interface. set the port to low, set it to "output" to drive the pin low, set to "input" to let the pullup resistor pull it high. read state of pin while an "input" to read data back

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

    Brilliant write up on how it all works, especially what happens with the "not connected" pin as being an input, great!

  • @MrOO-ix5qr
    @MrOO-ix5qr 2 ปีที่แล้ว

    thanks Brian for detailed explanation of logic and code to execute it.

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

    It was a new concept for me, and you explained it beautifully through an actual project

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

    Thank you for the explanation. You explained it very well!

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

    Hi Brian! Fantastic explanation. I bet animating the graphics was a lot of work, but it really helps illustrating the various paths. Great job!

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

      Thanks Hari! The video editor I use actually makes that highlighting an animation stuff pretty easy, it's pretty much the main reason I use it!

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

    Great video, glad to see people from Eire making videos

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

    Hi there. Thank you very much for this. You have helped me in some questions. My only question is, could you do this for 4 rgb leds and 4 pins on d5 d6 d9 d10 pwm pins.

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

    Good stuff .. I had a few questions on this process I'm goin to work with a 4 pin output and based on the formula I'm only limitd to 12 leds .. can there be an exception to put more? And how do u determine the value of the resistors to use? Is it similar as if they were runnin in series or parallel?

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

    Really enjoyed the video and thanks a lot for the shoutout :)

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

    Thanks for the video! Good reference, and well produced :-)

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

    Hello, I would like to ask you something that happens to me in my circuit when I turn on 2 LEDs, a third lights up very little but it is only in a combination, what could it be?

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

    Great concise video. I was wondering how the DC was dealt with, Tri-state FTW.

  • @Magic-Smoke
    @Magic-Smoke 5 ปีที่แล้ว

    Very clear explanation thanks Brian!

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

    Great concept for controlling many LEDs!
    Next project could be a 3x3x3 LED cube controlled by an Attiny85

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

      That's 27 LEDs and technically you only have 5 pins for that technique. That would give you 5*4 Leds. Sadly the reset pin isn't as powerful as an IO pin, so even with setting the fuse to use it that way wouldn't help.

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

    Best wishes for the New Year Brian. An awesome, well explained, and concise instructional video to kick-off 2019. :)

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

    Really clear explanation; many thanks!

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

    Great video. You can also use the charlieplexing technique to multiplex inputs instead of driving outputs. Great if you want to scan a lot of buttons :)

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

      Good solution, if you don't necessarily need to be able to press buttons simultaneously.

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

    You can light more than one LED at a time, but only a handful and it gets pretty complex, and if you were aiming for consistent brightness no matter how many LEDs are operating, it becomes even more pointless rather than just running through every combination of pin values and having consistent delays between them.

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

      I always wondered how you could match that with what you want to show. It would help with brightness if you have less frames to go through.

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

    Charlie would be proud.

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

    Thanks mate. This is a super useful tutorial...

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

    You technically could also light 2 leds at a time (as your d3 pin shows nicely but a little dim) although you are limited in the choices which 2 you can light at one time. If you do bigger Charlieplexing matrixes you could even light up more at a time and have a bigger choice of which leds are lit together. But keep in mind the maximum current a pin can source or sink (as mentioned in other comments here). Not sure if it’s better to get each led it’s own resistor then if you would want to do this because of the brightness. But maybe I’ll try that out one day.

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

    Thanks, really amazing. Is there some Arduino library for it?

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

    can't believe I've only just realized why its called PBC3

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

      Sure an Irish lad like you you'd never know 😂

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

      @@amosba I thought it was version 3 of the board LOL!!!

  • @ahmedal-musharraf9242
    @ahmedal-musharraf9242 5 ปีที่แล้ว

    Thanks for the great video Brian.

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

    This could be a really great tutorial, but the audio seems to switch on and off all teh time on my ipad :-(

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

    Excellent video Brian!

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

    Does this only work with LED's?

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

    Very interesting video

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

    Thanks for sharing this video sir .. sir can you please Send the link of the arduino code what you have explained in this video sir can you please

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

    Nice to see a short, usefull video. Most of your video's are long live streams, those are to long for me to watch.

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

      Thanks, I'll be stepping away from the streams this year so hopefully I'll get more short videos out.

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

    bro, can I use this method for switches?

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

      I'm not sure, matrixing switches is usually what people do to increase the amount of switches on lower number of pins. Or using a voltage ladder to get multiple on a single adc pin

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

      @@BrianLough there's a guy using this method to use switches but he programed it using flashforth, i really don't know how this works th-cam.com/video/y4f3FxIT9EI/w-d-xo.html

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

    good old esp8266 pin hell.

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

      It's a war zone..

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

    useful vid...….have a great new year !

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

      Thanks Andy, many happy returns!

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

    hello
    new year wishes of good fortune to all the smart kids
    to be honest it isn't led related, but more related to one of your older videos which intrigued me, and a little missed purchase i made recently.
    to the point
    after watching your video about hacking bluetooth modules into hid device controllers i begin to wonder, how much work would it be to build monster budule project from that, arduino nano, tp4056 and ... 3$ chinese dualshock 3 knokof gamepad. basically making it into pc compatybile wireless controller
    i made a bad decision during hollyday season by purchasing 3 colorfull "ps3 gamepads" from alliexpress
    i was mostly looking for a pink and yellow controllers and they were so cute and colorfull on the picture, but as it later turned out they are not compatybile with wireless ps3 connection pc even after installing reqired for oryginal ps3 pads drivers and programs
    butthe pas itself is solid, and easy to hack all buttons are triggered from separate membrane flex on a plasic bed, analogs can be desoldered and we get some bluetooth glue logic to probe,, 400mAh lion flat battery , 2 vibration motors, and a big empty shell to play with.
    i could hack it myself making it into normal hid pad on the wire, i done atmega 8 conversions to retro pads in the past, but this just asks for being pc wireless gamepad, so i am looking for some help, or guidence
    thanks for reading to the end

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

    mmm... setting a pin LOW is actually equivalent to grounding it? Or how can current flow from a pin high to one low if the low one is not a real gnd???

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

      Gpio pins can sink a small amount of current, normally the same as they can source. It's fine to do this for LEDs, but you couldn't run a motor off it 😂

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

      yup. Low is zero is equivalent to GND. Ground is not always earth though. Ground is the 0 reference and everything else is measured in reference to that. You can also connect earth to ground. Then ground is referenced to earth.

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

      @@BrianLough For Atmega328p each GPIO pin can source (when high) or sink (when low)
      20 mA at VCC = 5 V, 10 mA at VCC = 3 V. However there are also limits to total current sourced or sinked of all the pins on the same port, as well as limits on total current for the whole microcontroller.

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

      @@bornach since Charlieplexing often means having only one Led turned on at a time, the current would be kept under said total current anyway. With ultra bright LEDs and some resistors it's easy to go sub 20mA as well. My knight rider badfe runs at around 5 to 8 mA iirc