What about sharing led pins with the switches? Either drive each switch with the normal led scan, or have a switch only scan after every led frame where you pulse one the switch pins. You can use the analog in put to read what will be a 0 or 3v signal from each switch, in sequential order. Resistors on the output of each switch will isolate the driving pin if multiple buttons are pressed.
@SojournerDidimus6 ай бұрын
@@gsegallisYes, you can charlieplex buttons as well, note you must add a diode to each switch to prevent button presses from shorting out rows in your LED matrix.
@Dazza_Doo5 ай бұрын
If (Amazing_Videos) next_video() ; Are these floats or doubles? They are written as Ints 😉 - jk
@swarupsahu66115 ай бұрын
Is there any way to stream analog videos over wifi using esp32
@SojournerDidimus5 ай бұрын
@@swarupsahu6611 What do you mean? Analog video by definition cannot be transmitted via WiFi. However, it is possible to digitize analog video and transmit the digitized video over WiFi, that can also be to an esp32. Note that you will probably need to choose a format and size that the esp32 can handle, but KZbin is doing the same; on low bandwidth devices it will select a higher compression for you.
@piconano6 ай бұрын
I've used this technique in 1995. Learned it from some mailing list or BBS or Yahoo groups while working on a 68HC11 project. It didn't have a name back then, but a multiplexing trick someone knew and passed it along. Now this Charlie dude comes along and grabs the glory in 2003 while some other smart dude who was the true inventor of this technique got shafted and forgotten.
@fluiditynz6 ай бұрын
If you were on the PIClist then I posted around 1998. Microchip posted it in a book of tricks as "Charlieplexing" after Y2K. They also posed a simpler version of a matrix keypad in that same booklet, using a resistor ladder like bitluni did here. My one was around 2001 and I was surpriced to see that also pop up as known, later by Microchip. Mine was for an elevator manufacturer, a customer of mine then and I was maxing out the capabilities of an AtMega chip I was using for lift monitoring. If you wiki it, someone went in the waybackmachine and found my piclist entry for bipolar tristated LED multiplexing and even stuff preceeding it. So it doesn't get Grahamplexing either 😅 Lots of things like this have their time to be invented. Many inventions were independently invented and some the glory was stolen for sure but usually it starts with publicity of some breakthrough and inventive minds using it to finish a mental puzzle. For me it was simply wanting to drive a large number of LEDs and knowing that PICs can tristate. Using bipolar LED pairs gave me twice the LEDS I'd get from multiplexing alone. I did another one more recently with 20 off an 8 pin CH32V RISC-v micro but bitluni's used a few more LEDs than that...
@seanabsher55776 ай бұрын
if you don't patent or at least make your work known... you tend to get forgotten. I'm sure Charlie wouldn't mind taking the back seat if the other person was able to prove their "invention", right?
@Biru_to6 ай бұрын
Pretty sure multiplexing has existed for long enough nothing significant has been invented the past decade or so for driving a tiny LED display like this.
@redtex6 ай бұрын
"Трёхзначная сигнальная система" описана в патенте AEG-Telefunken в 1979г. Шах и мат.
@stevekean5126 ай бұрын
@seanabsher5577 Carl Fredric Gauss is not forgotten, yet they continue to discover routines, etc. in his unpublished works. Poor students come to him with a solution and he would open a bottom drawer, rustle some papers and show the student he'd found that answer 10 years before. Lol
@mikeselectricstuff6 ай бұрын
A couple of other tricks you can do : Measure the battery voltage and adjust the LED drive duty to maintain constant-ish current. for the buttons, use the LED matrix pins to scan a "1" across the pins, with a resistor from each pin through a switch to a common line, with a pulldown resistor, sensing with an ADC, or maybe logic level if that can work with the LED drive stuff. Or you could use 3 dual diodes instead of the series R's. Could maybe flip the button pin to input briefly for the measurement.
@grindfi6 ай бұрын
wait, we can do a color screen if you find 3.3v rgb leds, the resolution will be 3 times lower, but color is color
@rich10514146 ай бұрын
@@grindfi If you have Red green and blue subpixels, you can stagger the LEDs for more perceived resolution. You would not gain back all the resolution, but it would help. So the resolution would cut in a third, but then you could double the 'virtual resolution' with staggered LEDs, which would appear to about 1.5x the actual resolution.
@SojournerDidimus6 ай бұрын
@@rich1051414This reminds me of the Apple II subpixel trick. They used alternating green and magenta subpixels, allowing a white pixel at twice the horizontal accuracy.
@DwAboutItManFr5 ай бұрын
FINALLY THE PERFORMANCE I NEED.
@_Mackan6 ай бұрын
Of all channels to play Bad Apple, this was not one of them. Though, it was funny
@ok-tr1nw6 ай бұрын
You forgor afew words!
@ReplicateReality5 ай бұрын
Is that your professional opinion?
@gn0st1c6 ай бұрын
@6:48 don't miss this part! There is no music, yet you'll be playing it in your head. now that's hell of a music compression.
@matthewvenn6 ай бұрын
Great explanation of charlie-plexing!
@Jimmymcjimthejim6 ай бұрын
The 3.2V max in the LED datasheet is referring to the forward voltage of the LED when 5mA is flowing through it. Typically it is 2.8V, but variation from part-to-part could make the forward voltage as high as 3.2V. This specification does not refer to the maximum allowable voltage; typically LEDs are specified by the maximum current (30mA for this particular LED). If you were to apply 3.2V to one of these LEDs from a high-current power supply, the current would likely be higher than 5mA. Typically microcontrollers have current limiters on the IO pins, and a decent output resistance, which allows you to drive LEDs with them.
@alexanderscholz88556 ай бұрын
Main Question is, will it run Doom?!? Awesome 😁😎‼️‼️‼️
@ilSySTeMli6 ай бұрын
Love the Little Quirky Projects, Hope to see You soon on the Streams , cheers .
@MadScientist2676 ай бұрын
Certainly interesting...
@PsychogenicTechnologies6 ай бұрын
A fantastic explanation: dunno why I had so much trouble wrapping my head around it--wish this had been out before I made the script and the video! Great job, thanks!
@techh3x47 күн бұрын
bro i'm literally making a homemade matrix just to play bad apple. i laughed so hard by the time you booted the megaplex lmao
@miege906 ай бұрын
nice project, never heard of charlieplexing before
@Splarkszter6 ай бұрын
What is this obsession with bad-apple?
@thefatmoop6 ай бұрын
If u have adc you can make the buttons connect different resistors and make a voltage divider that outputs different voltages. Can cram a lot of buttons on 1 adc pin
@ETORERIGO5 ай бұрын
Well, it would be a bit of a problem because he also has a 3 volt input and a 5 volt input, which would cause some problems in adc, but i like your idea, the resistor keypad trick is used in almost every cheap thing where mcu pins are limited
@KTPDAILY5 ай бұрын
you are wonderful for making us smarter so thank you
@noanticheat6 ай бұрын
Imagine a real monitor using LEDs instead of OLED displays and being able to get to insane refresh rates. We could actually achieve this using micro LEDs for a RGB >1080p screen. This would be the future of monitors
@SharpsBox3 ай бұрын
Make it so!
@zoey101dogwablog6 ай бұрын
Another fantastic project in fantastic depth and detail! Pure gold!!
@anthonywilliams70526 ай бұрын
Just an idea but with all those LEDs maybe we can use it as a touch screen too by using the current draw from reflected light or as a light sensor.
@artursmihelsons4156 ай бұрын
Excellent video, again! 👍 Great LED driving idea! Didn't thought about it as way to drive LED matrix. But I used similar method with all 3 states for other different projects.. 😂
@supreme_xenon6 ай бұрын
Nice demo of the mysterious MV
@fluiditynz6 ай бұрын
Well done bitluni. You might need a small cap on your keypad resistor ladder, could be the led direct drive is affecting the adc performance. If you can get an accurate sample while resetting tristates during persistance of visiin before the next frame then thats an easy sw solution
@laserquant6 ай бұрын
Bitluni again :-) wonderful.
@tim_allen_jr6 ай бұрын
This gives me a idea for a project 🧠📈✨️
@SojournerDidimus6 ай бұрын
Adding a tiny plastic shroud around your battery will make the negative protected. If your board is designed with a Vcc plane instead of a ground plane this will allow for the metal battery connector.
@codebeat41926 ай бұрын
I did some experiments with Charlieplexing a few years ago, it is a great technique but you have to select your components carefully and you need to keep the tracks as short as is possible. The biggest problem with Charlieplexing is ghosting (and to avoid this), especially when the LEDs are very sensitive. Using resistors (best way is without) can also introduce ghosting or a too slow update/pin switching speed. A too fast update speed (without resistors) can shorten the lifetime of the LEDs or can brownout the pins of the microcontroller over time. You need to find a safe balance between speed (without ghosting), visibiity and (overall) current. Remember we can only see 24 frames per second so there is enough room to skip frames (blank = no output) to reduce the current and also extend battery life. And because of a lower speed (and completely off states) there is enough time to read the state of the buttons without interference (many times). I think you need to slow down to make it better.
@yoctoflop6 ай бұрын
Why do people believe the 24fps thing?? If you're referring to the flicker fusion rate, sure, but we can certainly see above 24fps. I can see light fixtures flicker at 60hz.
@Roxy532806 ай бұрын
This is proof that Bad Apple!! can be played on anything in the world.
@rdyer87646 ай бұрын
Always interesting stuff!
@rustygear93706 ай бұрын
@ 13:43 That's the techniest Rick Roll I've ever seen
@TheMrMinecrafttnt6 ай бұрын
I think you can go to creditcard size it does make it more confortable to push Buttons 😅
@Jimmymcjimthejim6 ай бұрын
Also, CR2032 batteries are lithium. Just not rechargeable.
@Davedarko6 ай бұрын
Welcome to the I-designed-a-charlie-plexed-led-handheld-club :)
@certified-forklifter6 ай бұрын
noooooo why is one led broken :( very nice project, i really like the design
@Davedarko6 ай бұрын
one out of TEN THOUSAND (not good at counting, it was a lot)
@Khatoblepas6 ай бұрын
I wonder, if you could make a 720*400 matrix it might be possible to make a ttl led monochrome monitor. It'd be a challenge to get the aspect ratio right but it might be a promising avenue.
@moth.monster6 ай бұрын
Ooh, that's a cute little chip alright. Might be able to finally make my dream of a 1-wide DIP microcontroller dingle a reality...
@jet_mouse95075 ай бұрын
I didn't figure out until going back after finishing the video - only 1 column of LEDs is on at a time! I was confused at first. I think you should add a micro-sd slot! Anyways, it's a really cool project
@o0julek0o6 ай бұрын
Ofc cnlohr was involved! What a surprise (not)!!
@Shack2836 ай бұрын
scientist: *creates a helpful device* me: can it run Doom?
@scotdotwtf5 ай бұрын
i love your channel ❤
@danielmelendrez16166 ай бұрын
Oh, no! There is one dead soldier there. Press F for paying respects... U__U
@mikeselectricstuff6 ай бұрын
Probably worth squeezing a 5 cent SPI flash on there for much more content
@thesecretengineer6 ай бұрын
I think he had run out of pins for the micro, but with his bigger one now who knows, He's on live tonight I think (wednesday) as "Bitluni Live" at 20-00 UTCish, I'll be their.
@vishalkumar0403936 ай бұрын
Nice project. 👏
@protiumx6 ай бұрын
This is awesome! Do you share schematics and code in your Patreon? I'd love to be able to just order the board and play with the code
@EdwinNoorlander6 ай бұрын
Nice project, I think je can also connect a button on each line from the led matrix.
@DrRickDaglessMD6 ай бұрын
Do you plan on releasing the firmware open-source? I'd love to look at how you drive the display and abstract the charlieplexing logic in code!
@AmaroqStarwind6 ай бұрын
Now if the LEDs where a lot smaller (and greater in quantity), you added RGB, and you gave it control electronics (and power electronics) to match... You could make the world's fastest computer monitor.
@sc0or6 ай бұрын
For those who don't want to use a "strange" MCU with a typical "Chinese" datasheet, there is a PI4IOE5V6416 I2C 16-bit expander for any other MCU. 50mA I/O current capability, R/W pin configuration (a Z-state), 24TQFN, up to two devices on a same bus Yeah, and thank you for the great idea for my big matrix 8x5x30 indicator ) Merely lost a hope to find a good one manufactured
@Dzatoah6 ай бұрын
Charlieplex.. interesting name, where does it come from??
@TheEmbeddedHobbyist6 ай бұрын
in the old days it was just call multiplexing 🙂 a bit like the hyperloop is just a new name for BRUNEL’S ATMOSPHERIC PIPE 🙂
@mikeselectricstuff6 ай бұрын
I think it was named after an engineer at one of the semi. manufacturers who wrote an appnote describing the technique
@TheEmbeddedHobbyist6 ай бұрын
it's the same way that I bit bang i2c, I set the output low to pull the line down and set it to an input to let it go high. this give me a open collector type output on uC. so data is transferred just by changing port from output to input and not changing what's on the port, always a low. Works for me.
@fluiditynz6 ай бұрын
It got named Charlieplexing after a Maxam guy who did it but I invented before him, published before him (on the PICist) and apparently others were before me too. It's one of those things that was going to occur to inventive people once tristating of microcontroller pins was available.
@andymouse6 ай бұрын
In a Charlieplexed LED matrix, each LED is connected between two microcontroller pins. By selectively setting these pins to high, low, or as high-impedance inputs, the LEDs can be individually controlled. The name "Charlieplexing" is derived from Charlie Allen, who developed this technique.
@wolpumba40996 ай бұрын
Amazing!
@landspide6 ай бұрын
Brilliant 👍
@ranganatennakoon6 ай бұрын
Its great !
@garrukapex66934 ай бұрын
If you ever sell these I’d be very interested in buying one, I’ve been looking for an entry point into the ch32v and I’d love to try to implement Tetris on it!
@Marc_Wolfe6 ай бұрын
I have a flash light that does at least some of this for it's 4 charge indicator LEDs. It's a no-name chinese thing that uses 4 18650s.
@modarsoos6 ай бұрын
nice job 👍
@GNARGNARHEAD6 ай бұрын
that's really cool 😃
@Sensoger6 ай бұрын
I can't wait to play Doom on a megaplex
@austinmarhold63586 ай бұрын
Please tell us more about the compression algorithm!
@horryportier75396 ай бұрын
I swear if i see one more bad apple on any type 2d matrix im gonna die
@MaxCarponera6 ай бұрын
Maybe am wrong, but If you connect the diodes in the matrix in antiparallel, so 2 diodes for every positiion, and still use the H-L-Z levels, you get n² matrix. Be 1 and 2 the antiparalell diodes, pin A column, ping B rows.. Then they light when: B/A Z L H Z - - - L - - 1 H - 2 - Rest of columns does not light because are Z
@redtex6 ай бұрын
Только n(n-1)\ n=16
@pietrolemes77596 ай бұрын
How about this, but with a esp32 using all available pins to get the most pixels as possible. No buttons, no nothing, only wifi and this board becomes a wifi display. How many pixels would that be?
@PaulSpades6 ай бұрын
25*24. 600 pixels monochrome pixels. But I doubt you can drive that many leds in series from the micro. So, use some proper multiplexers (which can also stack channels, but with a delay in responsiveness). Also, that board already has 1 dead led out of 240. Which is fixable (as opposed to lcd and oled panels), but you're probably going to have a pretty high failure rate. This is a good solution for low res displays or public displays, though. I would make it bigger, go for 16 or 20 leds in series and try different aspect ratios (like 8*30). Some of the public digital displays and scrolling text displays might already use this technique.
@gsestream5 ай бұрын
so how about a 4K led wall. that might be better to do automated.
@DanelonNicolas6 ай бұрын
I'm speachless it's so cool.... how much would pcbway charme for this? XD
@sandswalker6 ай бұрын
Amazing project! I assume that you are using a timer for driving the sound through the buzzer, how did you convert the music to PWM values?
@kplatt89125 ай бұрын
The battery case will still short to the USB
@thexht79272 ай бұрын
How do you program the CH32V003 without the SWIO pin?
@floppydisk45005 ай бұрын
Is there any way you can get multiple of these tiny little microcontrollers to work together to get a dual core system with more memory and storage?
@SharpsBox3 ай бұрын
Include a temperature or light sensor and you have an analog computer?
@marshpw6 ай бұрын
where does the sound come from? edit: you explain it :)
@ziomalZparafii6 ай бұрын
Very nice board but what is Bad Apple? Some music or some inside joke? From this short part I thought it's Rick Astley and you are rick rolling us 🙃
@thienvungo18295 ай бұрын
do anyone noticed that one led is dead?
@sajalsanthosh6 ай бұрын
I would love to know how the bad apple compression works!
@thesecretengineer6 ай бұрын
Huffman encoding and lowering the frame rate, He's normally live tonight (Wednesday) at 20-00 UTC as "Bitluni Live", you can watch him do these projects their.
@gewinnercomic49993 ай бұрын
I hate that one broken Led
@MaDmanEXE6 ай бұрын
Please tell us about that compression
@Slushee6 ай бұрын
Why did you order so many!? Are you selling them somewhere?
@0osk6 ай бұрын
jlcpcb has a minimum order size of 5 boards
@Slushee6 ай бұрын
@@0osk Those don't look like five silly
@0osk6 ай бұрын
@@Slushee oh youre right im dumb, i didnt go back to look. i have no clue then. he doesn't have any links to buy them so maybe he got a deal where buying that many was the same price as just buying 5. I've gone on that site before and for some configurations they charge the same amount whether you buy 5 or 10 boards.
@Slushee6 ай бұрын
@@0osk Nah you're not dumb dw xD
@PaulSpades6 ай бұрын
Maybe he gives them out to friends to make games for them. It definitely has better potential than the 8by8 display console he made a while ago.
@TSangTaoChanel5 ай бұрын
What is the distance between each LED?
@frown6 ай бұрын
Make a 55" version...
@captheobbyist64345 ай бұрын
a tiny microrocessor with 4kb of memory: 23 thousand frames per second gaming laptop with intel cpu: 40 frames per second
@YuHayate6 ай бұрын
now make it water proof :)
@Arek_R.6 ай бұрын
Why use this awkward uC tho? There are sub $1/2 ST micros.
@redtex6 ай бұрын
Сигнальная система с использованием третьего состояния описана в патенте от 1979 года. При чём здесь какой-то Чарли??
@nuclear_tractor59576 ай бұрын
Looks cool:) What is the current limit on the microcontroller io pins? The current of one LED is 20mA, but there are 16 of them in one column... I don’t think the pin can output more than 100mA. Or maybe the LEDs do not work simultaneously within the same column? Then how many LEDs can light at the time in one column?
@redtex6 ай бұрын
Одномоментно может светиться только один светодиод.
@multiplysixbynine6 ай бұрын
This might be a good place to use a shift register or port extender.
@graealex6 ай бұрын
Can you link the software USB implementation?
@redtex6 ай бұрын
Неплохо. Умеешь мигать светодиодами.
@mk0xf1e6e65 ай бұрын
I think it's ch32x035 not ch32x35
@jordantekelenburg4 ай бұрын
Is the code and schematics available?
@prof9556 ай бұрын
You have not working led in new board 😅
@altamiradorable6 ай бұрын
Can you display Never Going to Give You Up by Rick Astley ?🤣
@eDoc20206 ай бұрын
Rewatch around the 13:33 timestamp.
@peter.stimpel6 ай бұрын
It is somehow strange to listen the educating luni, instead of a luni doing funny stuff. However, I like it.
@backdemoletor46545 ай бұрын
Why can't I join the discord server?
@user-wi5vi7dd3z6 ай бұрын
So charlieplexing is basically like the "anti ghosting" technique used for keyboards but instead of the buttons it uses leds? :D
@MichaelOfRohan4 ай бұрын
Wtf is bad apple
@Kyoz6 ай бұрын
🤍
@2000jago6 ай бұрын
Now that's more than just a bit looney...
@khanra176 ай бұрын
Please watch other videos for Charli Plexing. Lots of great videos available & personally this is the worst explanation I've ever watched!
@MrMegaPussyPlayer5 ай бұрын
0:51 And that is a bad LED (3rd row from the bottom, 7th from the right)