Whenever I start to get a little over confident I come watch a video on this channel and very quickly remember I don't actually know anything 😆 awesome work as always!
@@CNLohr You do it, 10 years ago I saw one of your videos and it motivated me to change my career from studying physics to designing hardware and programming microcontrollers, now I am a hardware engineer and every time I see a new video of yours I remember that I can learn and improve every time. Thank you very much!
Well; I feel the same way sometimes. But if you look closely you can break down a lot of that complex stuff into very basic principles for analysis or go the other way round in case of building stuff. For example microcontroller programming is in it's core mostly to find out which bits to set in which register (be it a special register like adc or PWM) to fulfill your task. Then uploading it just to find out that you completely fried you controller either by setting wrong pins as outputs... Or because you where tired and left some solder snippets or wire on your prototyping board... Charles YT-channel remains one of the most inspiring sources for me... So thanks for the video.
@@CNLohr Oh you absolutely do!! I guess I phrased it weird but I meant that I realize I have a lot more to learn and your videos are a great place to do that! Your video on making an esp8266 Minecraft server was one of the first videos I saw about microcontrollers and networking. At the time I felt the same way about not knowing anything but it inspired me to find out about it and now its obvious to me how it and servers in general work. TLDR: you have inspired me and Im sure many more people with your videos and I meant my lack of understanding as a positive!
@@yasirrakhurrafat1142 Roughly; bitbanging is a form of communication that is managed at a higher level than say for example I2C or SPI. I2C and SPI protocols have a part of the chip that is entirely dedicated to managing those protocols, offloading a lot of processing that the "main thread" otherwise had to do. Bitbanging however is done by "higher level" instructions, setting GPIO voltage and timings, coming directly from the main thread(or ISR), meaning all other tasks your program are at chance of being interrupted during the bitbang instructions if not managed correctly. You want to use bitbang if your microcontroller has a decent clock, your program doesnt rely on strict timings, and if your microcontroller lacks silicon for other communication protocols
On most MCUs you can do touch sensing without an ADC - just measure the time it takes for the internal pullup to pull a pin high after forcing it low. Typically in the low tens of uS - longer with a higher external pullup resistor. This works well for resist covered PCB touchpads. You can get better sensitivity/resolution in a few ways - using comparator/reference to increase the input threshold & lengthen the charge time, and input capture peripheral to get better timing resolution.
Thanks. I remember when I was a young engineer, I would look to so many other engineers and see them as absolutely titans of the craft. And there are still some that absolutely blow me out of the water. But I've learned to stand and do things that a younger me never could imagine. And you can too. Just push forward even when everything tries to drag you back.
Clear lcds are so cool! Back in 1985, I had a handful of little battery powered lcd clocks which i would take apart and do stuff with like removing the silvery beige backing film and replacing it with different colors of paper, or flipping the polarizing film so the lcds would be white on black. I was 11 at the time. I thought i was a wizard.
I remember watching videos from you as a kid in my dad's office while waiting for him to finish up teaching his classes 😭 You inspired me so much and I'm so happy to see you're still creating videos! Keep it up!!! :D
long live risc-v for their insane price 2 power ratio! and yeah, saying "very cool" seems almost like an insult for containing THAT much functionality in such compact form, you're an artisan artist dude.
nice, very well done 👌 I was almost rolling my eyes when I read bit banging LCD because you see so much crap everywhere that effectively destroys the LCD. But your solution is really well implemented and I would trust it the life of my LCDs 👏
That was awesome! Now, start playing around with the peripherals in the chip in ways they did not plan on. If the DMA can be set up with any internal address (memory mapped peripheral register you know) as target you can do a lot of fun things. Toggling the LCD signals for example. Writing to the screen buffer is simply transforming the data to the pattern required on the LCD pins and then letting the DMA repeat. If you find you can not "throttle" the DMA sped properly, use a loopback device in the chip together with the DMA so one DMA sends data via a peripheral (either in loopback mode internally, or via a external pin bridge) to itself and another DMA transfers the received data to the target register to update the pins pullup states. Once you start abusing peripherals like this it is hard to stop. It is so much fun!
Some of the modern Microchip PICs have a BUNCH of internal hardware "building blocks" that can be fairly arbitrarily chained up internally output to input (including outputting some of it simultaneously on any number of pins); it's quite fun to set up some elaborate Rube-Goldberg contraption, let it loose, then just sit back and watch the show happen without ever even executing a single instruction of code once the initial setup is done (or just flip a bit here or there in an occasional interrupt triggered by some part of your build). And sure you could achieve the exact same thing by bitbanging some code and whatnot, but I find it much more fun to sit back and let your code _direct_ the action instead of _generating_ it by brute force.
@@AttilaAsztalos Yup, but I still prefer STM as the hardware is smarter than on PIC/AVR. Result is less interrupts required to complete the action. I've done DMA based SD-RAM access on a STM32F103 (Bluepill) for example. 8MB RAM for image processing!
@@1kreature Is the project up anywhere? I haven't heard of anyone doing SDRAM access on a 103, people usually go for SPI SRAMs or bigger devices with a FSMC.
Men will see this and think "Hell yeah!" Big banging is always fire and I'm genuinely surprised how well your connectors worked. Btw your font choice is absolutely on point.
About a week or two ago, I was wondering if you had made any new projects, and I was thinking, oh, that stupid UA-cam algorithm probably dropped you into oblivion. And so I looked at your page and realized, you havent made anything. And then you dropped this gem. Brilliant.
My recent projects have involved the nRF52 and nRF54 dev kits for their BT functionality. I ordered some ch32s 2 weeks ago that i am still waiting on, but im blown away by what you have accomplished here. Makes me excited to dive into the risc-v world! Very impressive stuff. First video ive seen and i hit the subscribe button!
For people that want to learn how to do this stuff life streams with you drying to make the driver (and fail and try something else until its done) would be gold..
I'm thinking that these could be pretty cool if you got 9 or 12 of those screens laid them out in a grid, put an addressable RGB LED behind each screen, replaced the solid coloured backing with frosted translucent film, then programming it all to work like a stream deck type input device with abbreviated button labels. I guess it would all be down to how responsive and reliable the touch recognition could be made. 🤔
A few people have recommended trying with an RGB LED. I admittedly did not think of it. But, now I am curious! I put an LED behind the display and it glows, so it may be worth giving it a shot.
Aww. I really try to make my content something you can watch a few times to get all of. Or maybe after getting an 003 and playing with the project and code yourself!
@CNLohr yep I have a ch32v003 with a custom board. But I couldn't upload my code. I have a 10uf capacitor but maybe the solution is having a 100nf capacitor. You have a lot of experience, do you know is it really obligatory to have a 100nf capacitor. My wchlinke can communicate but cannot configure mcu. I even used the link RV mode but no clue :(
that is some kind of wonderful! I don't believe I've ever seen anything more economical and it never ever occurred to me that you could get touch feedback from a display… Now I'm wondering where else I can get feedback from… LCD displays like my monitor!?Thanks again… I am subscribing… And continued success!
Great to see you succeeding on another project again! :) Last time we were chatting about some esp8266 (was it? I can't remember correctly anymore) and compiler issues. Loong time ago.
i did the USB thing on a board a couple years back and just went with standard HASL. It's worked for at least a thousand insertion cycles. The only problem is having to order the PCB so thin. The board i am soon to replace it with has a standard USB C connector on it now because of this.
That's encouraging. I feel like the tabs in USB C are more fragile than in USB A, but it would make sense for it to be able to survive it. It just makes me really anxious. And also, I worry about oxides forming or flux hanging out on the HASL.
@CNLohr fr4 is surprisingly strong. I imagine a 3d printed case with support around the periphery of the USBC tab would make it even more resilient. I have been following you for years and your "misuse" of microcontrollers and their peripherals has been a big inspiration. Keep it up!
Nifty gadget! Perhaps the new Digispark for open arch RISC-V? Was not aware of this USB bootloader for the ch32v003. Sounds like they made a thing like Micronucleus (tiny85). WCH makes many USB bridge chips in the CH32 line, am a little surprised you picked one w/o the interface for this project. Ah yes, (looked it up), there is a CH32x035 with USB-2 in a 20-pin package. Probably more expensive.
I remember when you asked in the discord server where to find the video of the f to pay respects 3/4 weeks ago and knew something was going on behind the scenes
Hi, can you please tell me, what font do you use in your code editor in 7:05 ? I like it a lot :) It kind of reminds me font which was used in Turbo/Borland Pascal editors in 90's...
It's pretty cool getting this cheap chip to talk USB. Though it's software-driven, for many projects, this could be quite adequate. It would be interesting to know the bandwidth of the USB being driven by software in this way. Very very cool getting the LCD to be a touch sensor. Perhaps the next step is to get the CH32* to run an LLM 🙂?
I thought about using lcd as touch sensor one day, but didn't have this knowledge to achieve it as you did, you did great job here and can you make it sense touch on each segment or even on each part of the segment or it only the whole lcd act as single touch sensor?
Perhaps it could be used as a type of one arm bandit game for kids to learn coding or used to prompt for a key code that is displayed on the screen and then you have to touch when you see the 1000's complement on the display as a type of human test.
Very cool. Have you played with one of those cheap USB C cables which displays voltage and wattage? I would be interested in a teardown and see how they are driving the LED, all for about $3.
Pretty neat! Whats the quality of thats Microcontrollers ADC? Im most familier with the STM32 family due to my job but open for cool alternatives. Are the ADC as noisy as the Esp-32? Could believe how bad they were on the recommend devboard
Did you consider panelization as a manufacturing option? This may allow for huge per-piece cost reduction. Many manufacturers offer free panelization, so you even don't have to do it yourself.
I kind of like these LCD's although the non multiplexed variants (better contrast) as they use so little power, great for battery and solar powered devices. It's just a pity no suppliers make them up as modules like the LED and OLED modules commonly available for Arduino projects.
Have you thought about turning it into a touch sensitive programmable keyboard- maybe you’d require a host microcontroller to register all the keystrokes and controls for the lcd- what do you think?
Yes LCD''s don't care about polarity, but what they do care about is DC bias. The average voltage on an LCD between 2 opposing sides (Seg/Com) needs to be always as close to zero as possible lest the liquid crystal gets charged through ionic migration.
*Creating a USB-Enabled 3-Digit, 7-Segment LCD with Touch Capabilities for Under $1* * *0:03** Introduction:* The video demonstrates creating a USB-enabled device with a 7-segment LCD and touch sensor using a cheap RISC-V microcontroller (ch32v003). * *0:31** Cheap LCDs:* The project utilizes incredibly affordable 7-segment LCDs sourced from AliExpress, costing around 21 cents each in bulk. * *0:58** The CH32V003 Microcontroller:* The core of the project is the ch32v003, a ~10 cent RISC-V microcontroller, chosen for its low cost and versatility. * *1:03** Bit-Banged USB Stack:* The ch32v003 lacks native USB, so a custom bit-banged USB stack was implemented to enable communication with a PC. * *1:21** Custom Bootloader:* A compact bootloader (1920 bytes) was developed, allowing firmware updates directly through USB without a dedicated programmer. * *1:37** Connectorless USB-C Design:* The project features a unique connectorless USB-C design, where the PCB itself acts as the male connector, held in place by the LCD. * *2:24** PCB Fabrication:* The PCBs were ordered from JLCPCB with a 0.6mm thickness and ENIG finish for reliable USB connections, costing $79.39 for 25 boards. * *3:24** LCD Packaging Issues:* The LCDs arrived with damaged pins due to poor packaging, though none were found to be faulty. * *3:36** Initial Firmware and Bootloader:* Basic firmware was written to drive the LCD, and the custom USB bootloader was successfully tested. * *4:56** USB-Induced LCD Interference:* Inserting the USB connector initially caused LCD segments to malfunction due to shorting. This was resolved using UV gel nail polish as an insulator. * *5:44** Driving the LCD:* The LCD is driven by manipulating the COM and SEG lines with specific voltage levels (1/2 VCC) to illuminate segments. * *6:49** Driving at 1/2 VCC:* A custom assembly loop was created to generate the required 1/2 VCC (1.6V) for driving the LCD, as the microcontroller couldn't do this natively. * *7:41** Touch Sensing Implementation:* The LCD is repurposed as a touch sensor by driving all segments low, applying a pull-up resistor, and measuring the voltage rise time with the ADC. * *8:45** ADC Sampling and Oversampling:* The ADC samples the voltage for 375ns to detect the presence of a finger, with oversampling used to improve accuracy. * *9:45** Hysteresis for Touch Detection:* Hysteresis is added to the touch detection Error: unsupported operand type(s) for +: 'NoneType' and 'str' Conclusion:* The project successfully demonstrates a functional, low-cost USB device with an LCD and touch sensor, highlighting the versatility of the ch32v003 microcontroller. * *11:19** Addendums:* UV glue is recommended for insulation, and one LCD output pin is used as the RESET pin, requiring option byte reprogramming. I used gemini-1.5-pro-exp-0827 on rocketrecap dot com to summarize the transcript. Cost (if I didn't use the free tier): $0.02 Input tokens: 15522 Output tokens: 777
I really wanted to use them, but it was just too hard. Needing multiple voltage rails, no good on-chip debugger. Not RISC-V. The 003's just got it all!
I hope it makes you at least a little curious to learn more. Even it's not all in one go. I try to make my projects something that anyone given some time and effort can reproduce and exceed.
Did you need to use the V-cuts? They definitely add to the manufacturing costs. I think JLC also offer programming of chips so you might be able to get your boards made with bootloader included. Not that I like bootloaders. I’ve got myself a selection of CH32V chips recently, I should really get to installing the software stack.
I do prefer v-cuts, but I had another manufacturer do it in a slightly different way that was much more cost effective. I may do a video on that. And I've done my best to make the ch32v003fun software stack approachable.
I don't neeeed v-cuts but they make the edges so nice. One other thing a different manufacturer did was panelize the design in a really convenient way, I may be making a video about that project some time soon.
@@CNLohr Yes your CH32V003fun stack is definitely what I want to use. Personally I’ll be needing the advanced features of the higher-end CH32V chips for my projects (especially CAN on the V307), but if I recall there’s experimental support for the others too, so it’s probably worth going for that instead of some bloated manufacturer-made Eclipse skin + HAL. I guess the V-cut edge makes for a nice edge to the type-C connector. The extra cost of panelisation made me just combine multiple boards and cut them apart via hacksaw.
Funny, I was just thinking about making similar PCB's that plug directly into my computers USB port. I'll be using it for wireless recievers for various projects, as well as some measurement front end interfaces. Maybe I can make some other funny stuff
Would have been much cheaper if you put multiple PCBs on a panel - JLC will panelise for you.
Whenever I start to get a little over confident I come watch a video on this channel and very quickly remember I don't actually know anything 😆 awesome work as always!
Aww, I'm hoping to help push people upwards to doing things themselves!
@@CNLohr You do it, 10 years ago I saw one of your videos and it motivated me to change my career from studying physics to designing hardware and programming microcontrollers, now I am a hardware engineer and every time I see a new video of yours I remember that I can learn and improve every time. Thank you very much!
Well; I feel the same way sometimes. But if you look closely you can break down a lot of that complex stuff into very basic principles for analysis or go the other way round in case of building stuff. For example microcontroller programming is in it's core mostly to find out which bits to set in which register (be it a special register like adc or PWM) to fulfill your task. Then uploading it just to find out that you completely fried you controller either by setting wrong pins as outputs... Or because you where tired and left some solder snippets or wire on your prototyping board...
Charles YT-channel remains one of the most inspiring sources for me... So thanks for the video.
@@CNLohr Oh you absolutely do!! I guess I phrased it weird but I meant that I realize I have a lot more to learn and your videos are a great place to do that! Your video on making an esp8266 Minecraft server was one of the first videos I saw about microcontrollers and networking. At the time I felt the same way about not knowing anything but it inspired me to find out about it and now its obvious to me how it and servers in general work. TLDR: you have inspired me and Im sure many more people with your videos and I meant my lack of understanding as a positive!
Well done! Clearly the data sheet is only a recommendation for CNLohr.
And vague at that.
@@CNLohr what the-
Why do they love you soo much?!
Also what is bit banging mean?
@@yasirrakhurrafat1142 iirc, doing in software a task that's usually done with hardware
@@yasirrakhurrafat1142 Roughly; bitbanging is a form of communication that is managed at a higher level than say for example I2C or SPI. I2C and SPI protocols have a part of the chip that is entirely dedicated to managing those protocols, offloading a lot of processing that the "main thread" otherwise had to do. Bitbanging however is done by "higher level" instructions, setting GPIO voltage and timings, coming directly from the main thread(or ISR), meaning all other tasks your program are at chance of being interrupted during the bitbang instructions if not managed correctly. You want to use bitbang if your microcontroller has a decent clock, your program doesnt rely on strict timings, and if your microcontroller lacks silicon for other communication protocols
If you don't know what bit banging is, you ain't got no idea about real electronics!
On most MCUs you can do touch sensing without an ADC - just measure the time it takes for the internal pullup to pull a pin high after forcing it low. Typically in the low tens of uS - longer with a higher external pullup resistor. This works well for resist covered PCB touchpads. You can get better sensitivity/resolution in a few ways - using comparator/reference to increase the input threshold & lengthen the charge time, and input capture peripheral to get better timing resolution.
Well done! I like to call this sort of activity "spec bending," where you take a piece of technology well past what it's specifications allow for.
They're just suggestions, no one needs to ask permission to ignore the datasheet.
when i was a kid I thought your videos were as impressive but now as someone who occasionally has to write firmware I have profound respect for you
Thanks. I remember when I was a young engineer, I would look to so many other engineers and see them as absolutely titans of the craft. And there are still some that absolutely blow me out of the water. But I've learned to stand and do things that a younger me never could imagine. And you can too. Just push forward even when everything tries to drag you back.
This resonates with me, great message
I am truly speechless! Such a small task, yet it is a profound achievement! Kudos!!!
Yeah, some of the parts of this area are so pretty.
i'm always impressed with what you do with these microcontrollers, keep up the good work
When you find a hammer you really like, everything becomes a nail.
I feel like it was 10 minutes for so much work behind. Trying and achieving to do something nice with such tech is so satisfying. Keep it up man
Thank you for the encouragement. I do a lot of projects, it's just so hard to turn them into videos.
Clear lcds are so cool! Back in 1985, I had a handful of little battery powered lcd clocks which i would take apart and do stuff with like removing the silvery beige backing film and replacing it with different colors of paper, or flipping the polarizing film so the lcds would be white on black. I was 11 at the time. I thought i was a wizard.
You were a wizard. Feel free to own it.
I remember watching videos from you as a kid in my dad's office while waiting for him to finish up teaching his classes 😭
You inspired me so much and I'm so happy to see you're still creating videos! Keep it up!!! :D
I appreciate your work keeping things tiny. I used to toggle a boot loader into a pdp 11/23 with 248k total mem - your ch32v003 work warms my heart.
It's got plenty of room here playing with microcontrollers, you may like it!
long live risc-v for their insane price 2 power ratio!
and yeah, saying "very cool" seems almost like an insult for containing THAT much functionality in such compact form, you're an artisan artist dude.
I LOVE RISC-V now! It's so simple, fast, solid, and easy to use.
nice, very well done 👌 I was almost rolling my eyes when I read bit banging LCD because you see so much crap everywhere that effectively destroys the LCD. But your solution is really well implemented and I would trust it the life of my LCDs 👏
That was awesome! Now, start playing around with the peripherals in the chip in ways they did not plan on.
If the DMA can be set up with any internal address (memory mapped peripheral register you know) as target you can do a lot of fun things. Toggling the LCD signals for example.
Writing to the screen buffer is simply transforming the data to the pattern required on the LCD pins and then letting the DMA repeat. If you find you can not "throttle" the DMA sped properly, use a loopback device in the chip together with the DMA so one DMA sends data via a peripheral (either in loopback mode internally, or via a external pin bridge) to itself and another DMA transfers the received data to the target register to update the pins pullup states. Once you start abusing peripherals like this it is hard to stop. It is so much fun!
Oh yeah! the DMA in the 003 is absolutely baller. And you can pipe it from memory to GPIO triggered on a timer.
@@CNLohr Oooh, DMA triggered by timer is a luxury item! Wow! Makes everything so easy.
Some of the modern Microchip PICs have a BUNCH of internal hardware "building blocks" that can be fairly arbitrarily chained up internally output to input (including outputting some of it simultaneously on any number of pins); it's quite fun to set up some elaborate Rube-Goldberg contraption, let it loose, then just sit back and watch the show happen without ever even executing a single instruction of code once the initial setup is done (or just flip a bit here or there in an occasional interrupt triggered by some part of your build). And sure you could achieve the exact same thing by bitbanging some code and whatnot, but I find it much more fun to sit back and let your code _direct_ the action instead of _generating_ it by brute force.
@@AttilaAsztalos Yup, but I still prefer STM as the hardware is smarter than on PIC/AVR. Result is less interrupts required to complete the action.
I've done DMA based SD-RAM access on a STM32F103 (Bluepill) for example. 8MB RAM for image processing!
@@1kreature Is the project up anywhere? I haven't heard of anyone doing SDRAM access on a 103, people usually go for SPI SRAMs or bigger devices with a FSMC.
Well gosh, this is crazy impressive
Thanks!
I am speechless, hats off to you. You are crazy. I think that you know that microcontroller more than the manufacturer himself !! 😂
I do try to do things with parts that the original designers would expect to be impossible.
as usual a masterpiece of engineering
Thanks!
"Press [F] to pay respect" 😂I see what you did there :D
It felt so satisfying to do that in the end!
I pressed F and all I got was a full screen video, mad respect all the same. Thanks for sharing!
woowww well done. This brings back memories. i really like your way of thinking for adding the touch screen option
Welcome back on youtube. I got your video recommended, i did not even realize it was you till 3 or 4 mins into the video
Men will see this and think "Hell yeah!"
Big banging is always fire and I'm genuinely surprised how well your connectors worked.
Btw your font choice is absolutely on point.
Which font?
About a week or two ago, I was wondering if you had made any new projects, and I was thinking, oh, that stupid UA-cam algorithm probably dropped you into oblivion. And so I looked at your page and realized, you havent made anything. And then you dropped this gem. Brilliant.
Wow, i learned something new, the touch sensor from a b/w LCD segment display is mind-blowing.
Charles back at it again with the obscure and amazing uses for cheap microprocessors
Every time I see a video from you Charles you always amaze me with your ingenuity.
Thank you.
Awesome! Your projects are always inspiring!
Thanks!
Several very clever bits of inventiveness there!
I love it... Also, I didn't think about ITO glass like you did until now, lol
It's funny how those things work.
5:37 Aaaand is gives the board a nice red touch! 😁
Very cool project though!
I admire your perseverance and skills!
My recent projects have involved the nRF52 and nRF54 dev kits for their BT functionality. I ordered some ch32s 2 weeks ago that i am still waiting on, but im blown away by what you have accomplished here. Makes me excited to dive into the risc-v world!
Very impressive stuff. First video ive seen and i hit the subscribe button!
I'll be happy to have you join!
Ooh, very cool! We need to start building usb-c into all our boards this way!
You can connect two gpios together and enable pull-up on one and pull-down on another and get 1/2 VCC.
From one nerd to another (I’m a different flavor of nerd), I really enjoyed the video.
You trully are a wizzard. I can't even fathom tackling such a amazing project. You trully inspire me. Have a great day.
Go go go! Learn and do some fun things yourself!
I hope you do something very cool! Go go go! Don't let the difficulties of doing cool things stop you.
this dude is smart on another level, and I love it. truly inspiring man, keep it up!!
Just hoping to get other people to do cool things too!
For people that want to learn how to do this stuff life streams with you drying to make the driver (and fail and try something else until its done) would be gold..
Mostly a bit over my head, but I think it's fantastic work and well presented.
I'm thinking that these could be pretty cool if you got 9 or 12 of those screens laid them out in a grid, put an addressable RGB LED behind each screen, replaced the solid coloured backing with frosted translucent film, then programming it all to work like a stream deck type input device with abbreviated button labels. I guess it would all be down to how responsive and reliable the touch recognition could be made. 🤔
A few people have recommended trying with an RGB LED. I admittedly did not think of it. But, now I am curious! I put an LED behind the display and it glows, so it may be worth giving it a shot.
This is cool, but as soon as you brought up the code lines, I knew I was in over my head.
I try to explain what I am doing without needing to understand the code diectly.
wtf have you done? that's insanely amazing. I couldnt follow with my knowledge after 5th minute
Aww. I really try to make my content something you can watch a few times to get all of. Or maybe after getting an 003 and playing with the project and code yourself!
@CNLohr yep I have a ch32v003 with a custom board. But I couldn't upload my code. I have a 10uf capacitor but maybe the solution is having a 100nf capacitor. You have a lot of experience, do you know is it really obligatory to have a 100nf capacitor. My wchlinke can communicate but cannot configure mcu. I even used the link RV mode but no clue :(
that is some kind of wonderful! I don't believe I've ever seen anything more economical and it never ever occurred to me that you could get touch feedback from a display… Now I'm wondering where else I can get feedback from… LCD displays like my monitor!?Thanks again… I am subscribing… And continued success!
A man after my own heart, cool video and project, thanks 👍
Always good when you post a video :)
I know! It feels so good to get it over with.
I love your USB bitbang projects!
Thanks! It's a lot of fun to go back and use things created in the past.
Great to see you succeeding on another project again! :) Last time we were chatting about some esp8266 (was it? I can't remember correctly anymore) and compiler issues. Loong time ago.
Thanks for sharing this awesome project. Fantastic job!
Thanks. Yeah! I share a ton of stuff on my github, but it's just hard to get myself to make yt vids.
God level! Really inspiring tbh
This is amazing, will make great projects. Thanks for sharing buddy, legend. Press F in the end loooool
Thanks!
Very nice USB thing!
I mean do you have a better word for it?
I mean I still haven't found a better name for it.
LCB or LCD-C, even if it's not super accurate it still sounds cool and it's a tiny name
i did the USB thing on a board a couple years back and just went with standard HASL. It's worked for at least a thousand insertion cycles. The only problem is having to order the PCB so thin. The board i am soon to replace it with has a standard USB C connector on it now because of this.
That's encouraging. I feel like the tabs in USB C are more fragile than in USB A, but it would make sense for it to be able to survive it. It just makes me really anxious. And also, I worry about oxides forming or flux hanging out on the HASL.
@CNLohr fr4 is surprisingly strong. I imagine a 3d printed case with support around the periphery of the USBC tab would make it even more resilient. I have been following you for years and your "misuse" of microcontrollers and their peripherals has been a big inspiration. Keep it up!
Nifty gadget! Perhaps the new Digispark for open arch RISC-V?
Was not aware of this USB bootloader for the ch32v003. Sounds like they made a thing like Micronucleus (tiny85). WCH makes many USB bridge chips in the CH32 line, am a little surprised you picked one w/o the interface for this project.
Ah yes, (looked it up), there is a CH32x035 with USB-2 in a 20-pin package. Probably more expensive.
I remember when you asked in the discord server where to find the video of the f to pay respects 3/4 weeks ago and knew something was going on behind the scenes
Bro, you're a wizard
Hi, can you please tell me, what font do you use in your code editor in 7:05 ? I like it a lot :) It kind of reminds me font which was used in Turbo/Borland Pascal editors in 90's...
Would be funny to make a keybord out of them
Very cool project! Thanks for sharing.
Thanks!
amazing video and project!!!
Thanks!
This is VERY IMPRESSIVE!
Thanks!
It's pretty cool getting this cheap chip to talk USB. Though it's software-driven, for many projects, this could be quite adequate. It would be interesting to know the bandwidth of the USB being driven by software in this way.
Very very cool getting the LCD to be a touch sensor.
Perhaps the next step is to get the CH32* to run an LLM 🙂?
It depends on how you're setting it up, but typically I get about 40-70kBytes/sec.
It is quite adequate! It is between 40 and 60 kB/sec depending on how you use it.
this is sheer crazy stuff!
Thanks.
Why don't you short two gpios and pull up one and down the other to get vcc/2 ? Does the lcd have enough capacity to smooth out your pwm? 7:02
Awesome man! New subscriber ✌🏻
Glad to have you.
7:10 bro is speaking facts
Well, thank you, I was just feeling good about my embedded knowledge/skills...
Nice! Now mount a minecraft server on top of the LCD glass :)
Very inspiring, thanks!
Maybe someday I'll run Minecraft on an 003. But that day is not today.
I thought about using lcd as touch sensor one day, but didn't have this knowledge to achieve it as you did, you did great job here and can you make it sense touch on each segment or even on each part of the segment or it only the whole lcd act as single touch sensor?
Looks like you reinvented the touch lamp without the lamp.
This is so cool that it is akin to magic.
Perhaps it could be used as a type of one arm bandit game for kids to learn coding or used to prompt for a key code that is displayed on the screen and then you have to touch when you see the 1000's complement on the display as a type of human test.
How small can you make it with a battery? You realize this is prime fidget material, right? In the realm of tamagotchi
Would love to hear the power consumption too
oh that's a good point. yeah, you could totally do it with a battery kinda thing.
Admittedly the 003 doesn't have super great battery life. It uses around 400uA in low power mode, and about 11uA in sleep mode with timer on.
I can imagine a Number Invaders game, like on those early 80's calculator watches.
Very cool. Have you played with one of those cheap USB C cables which displays voltage and wattage? I would be interested in a teardown and see how they are driving the LED, all for about $3.
Oh yeah. I love those things. But sadly, I dunno, teardowns aren't really my thing here.
@@CNLohr I found a teardown in case you want to see what's inside. ua-cam.com/video/kt1L1EUq86w/v-deo.html
Pretty neat! Whats the quality of thats Microcontrollers ADC? Im most familier with the STM32 family due to my job but open for cool alternatives. Are the ADC as noisy as the Esp-32? Could believe how bad they were on the recommend devboard
Did you consider panelization as a manufacturing option? This may allow for huge per-piece cost reduction. Many manufacturers offer free panelization, so you even don't have to do it yourself.
For larger runs, absolutely worth it! For tiny runs, I just let it roll. The cost is with the human factors in doing assembly.
now we can have old LCD vintage touch smartwatch
I kind of like these LCD's although the non multiplexed variants (better contrast) as they use so little power, great for battery and solar powered devices. It's just a pity no suppliers make them up as modules like the LED and OLED modules commonly available for Arduino projects.
The question I have is how did you get the thickness the right size to fit in the usb connector? A lot have tried and failed.
0.6mm FR4 PCB, with ENIG. that's it.
@ oh thank you for that. I have a few projects that I want to make with usb pcb.
To describe this video with just one emoji: 🤯
Have you thought about turning it into a touch sensitive programmable keyboard- maybe you’d require a host microcontroller to register all the keystrokes and controls for the lcd- what do you think?
This HAS to learn to talk (SPI, I2C something) and become a module for us the smoother brained mortals out here.
This was a great hack - thanks!
Thanks for watching.
Excellent! Thanks for sharing~ Best
Thanks!
Thanks!
Brilliant !
Thanks!
3:06 Hold on, genuine question: Why didn't you panelize the PCB? You could've got way more for your money.
Yes LCD''s don't care about polarity, but what they do care about is DC bias. The average voltage on an LCD between 2 opposing sides (Seg/Com) needs to be always as close to zero as possible lest the liquid crystal gets charged through ionic migration.
*Creating a USB-Enabled 3-Digit, 7-Segment LCD with Touch Capabilities for Under $1*
* *0:03** Introduction:* The video demonstrates creating a USB-enabled device with a 7-segment LCD and touch sensor using a cheap RISC-V microcontroller (ch32v003).
* *0:31** Cheap LCDs:* The project utilizes incredibly affordable 7-segment LCDs sourced from AliExpress, costing around 21 cents each in bulk.
* *0:58** The CH32V003 Microcontroller:* The core of the project is the ch32v003, a ~10 cent RISC-V microcontroller, chosen for its low cost and versatility.
* *1:03** Bit-Banged USB Stack:* The ch32v003 lacks native USB, so a custom bit-banged USB stack was implemented to enable communication with a PC.
* *1:21** Custom Bootloader:* A compact bootloader (1920 bytes) was developed, allowing firmware updates directly through USB without a dedicated programmer.
* *1:37** Connectorless USB-C Design:* The project features a unique connectorless USB-C design, where the PCB itself acts as the male connector, held in place by the LCD.
* *2:24** PCB Fabrication:* The PCBs were ordered from JLCPCB with a 0.6mm thickness and ENIG finish for reliable USB connections, costing $79.39 for 25 boards.
* *3:24** LCD Packaging Issues:* The LCDs arrived with damaged pins due to poor packaging, though none were found to be faulty.
* *3:36** Initial Firmware and Bootloader:* Basic firmware was written to drive the LCD, and the custom USB bootloader was successfully tested.
* *4:56** USB-Induced LCD Interference:* Inserting the USB connector initially caused LCD segments to malfunction due to shorting. This was resolved using UV gel nail polish as an insulator.
* *5:44** Driving the LCD:* The LCD is driven by manipulating the COM and SEG lines with specific voltage levels (1/2 VCC) to illuminate segments.
* *6:49** Driving at 1/2 VCC:* A custom assembly loop was created to generate the required 1/2 VCC (1.6V) for driving the LCD, as the microcontroller couldn't do this natively.
* *7:41** Touch Sensing Implementation:* The LCD is repurposed as a touch sensor by driving all segments low, applying a pull-up resistor, and measuring the voltage rise time with the ADC.
* *8:45** ADC Sampling and Oversampling:* The ADC samples the voltage for 375ns to detect the presence of a finger, with oversampling used to improve accuracy.
* *9:45** Hysteresis for Touch Detection:* Hysteresis is added to the touch detection
Error: unsupported operand type(s) for +: 'NoneType' and 'str' Conclusion:* The project successfully demonstrates a functional, low-cost USB device with an LCD and touch sensor, highlighting the versatility of the ch32v003 microcontroller.
* *11:19** Addendums:* UV glue is recommended for insulation, and one LCD output pin is used as the RESET pin, requiring option byte reprogramming.
I used gemini-1.5-pro-exp-0827 on rocketrecap dot com to summarize the transcript.
Cost (if I didn't use the free tier): $0.02
Input tokens: 15522
Output tokens: 777
Hey, amazing video as always. What do you think about the Padauk MCU's? The PMS150G is about 3 cent.
I really wanted to use them, but it was just too hard. Needing multiple voltage rails, no good on-chip debugger. Not RISC-V. The 003's just got it all!
I would love to try using ch32v chips but is there a way to program them without that WCH link programmer?
Wish I understood anything in this video, it seems super interesting
I hope it makes you at least a little curious to learn more. Even it's not all in one go. I try to make my projects something that anyone given some time and effort can reproduce and exceed.
@@CNLohr Oh absolutely!
I can dig it
:)
Didn't learn anything. I have adhd and skipped around. But you did get a like.
Did you need to use the V-cuts? They definitely add to the manufacturing costs. I think JLC also offer programming of chips so you might be able to get your boards made with bootloader included. Not that I like bootloaders. I’ve got myself a selection of CH32V chips recently, I should really get to installing the software stack.
I do prefer v-cuts, but I had another manufacturer do it in a slightly different way that was much more cost effective. I may do a video on that.
And I've done my best to make the ch32v003fun software stack approachable.
I don't neeeed v-cuts but they make the edges so nice. One other thing a different manufacturer did was panelize the design in a really convenient way, I may be making a video about that project some time soon.
@@CNLohr
Yes your CH32V003fun stack is definitely what I want to use. Personally I’ll be needing the advanced features of the higher-end CH32V chips for my projects (especially CAN on the V307), but if I recall there’s experimental support for the others too, so it’s probably worth going for that instead of some bloated manufacturer-made Eclipse skin + HAL.
I guess the V-cut edge makes for a nice edge to the type-C connector. The extra cost of panelisation made me just combine multiple boards and cut them apart via hacksaw.
2:54. Nice!
Love it.❤
Thanks!
But does it output anything (like touch events) to the USB port?
Yes! I show it in the video, either as a USB keyboard or the "amount" of touch.
You are my hero
That's quite a lot to put on me! But, I appreciate it. I hope it spurs you to go on and do some fun things yourself.
Funny, I was just thinking about making similar PCB's that plug directly into my computers USB port. I'll be using it for wireless recievers for various projects, as well as some measurement front end interfaces. Maybe I can make some other funny stuff
I was sleeping on UV resin for far longer than I'd like to admit.
Very interesting !
Thanks
Are you using TopoR für the routing or is there another nice router out there?
No, all hand routed. I haven't used TopoR in over 10 years. Though I would love it if someone would make an open source TopoR-like autorouter.
Wait, you DO exist, it wasn't just my imagination!
And I've got a lot of videos.