Bit Banging LCD + Touch + USB on the ch32v003

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 268

  • @mikeselectricstuff
    @mikeselectricstuff 18 годин тому +54

    Would have been much cheaper if you put multiple PCBs on a panel - JLC will panelise for you.

  • @makeit4less
    @makeit4less 22 години тому +94

    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
      @CNLohr  21 годину тому +12

      Aww, I'm hoping to help push people upwards to doing things themselves!

    • @leobardostephenlincolnstrangez
      @leobardostephenlincolnstrangez 21 годину тому +4

      ​@@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!

    • @markustopfer1605
      @markustopfer1605 17 годин тому

      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.

    • @makeit4less
      @makeit4less 10 годин тому

      @@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!

  • @youtubecom3474
    @youtubecom3474 2 дні тому +162

    Well done! Clearly the data sheet is only a recommendation for CNLohr.

    • @CNLohr
      @CNLohr  День тому +22

      And vague at that.

    • @yasirrakhurrafat1142
      @yasirrakhurrafat1142 День тому +1

      ​@@CNLohr what the-
      Why do they love you soo much?!
      Also what is bit banging mean?

    • @ThylineTheGay
      @ThylineTheGay День тому +5

      @@yasirrakhurrafat1142 iirc, doing in software a task that's usually done with hardware

    • @gillsejusbates6938
      @gillsejusbates6938 19 годин тому

      ​@@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

    • @lohikarhu734
      @lohikarhu734 17 годин тому +1

      If you don't know what bit banging is, you ain't got no idea about real electronics!

  • @mikeselectricstuff
    @mikeselectricstuff 18 годин тому +40

    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.

  • @geeko321
    @geeko321 День тому +30

    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.

    • @CNLohr
      @CNLohr  21 годину тому +8

      They're just suggestions, no one needs to ask permission to ignore the datasheet.

  • @notabagel
    @notabagel 21 годину тому +18

    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

    • @CNLohr
      @CNLohr  21 годину тому +12

      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.

    • @kidenscruton1923
      @kidenscruton1923 20 годин тому +1

      This resonates with me, great message

  • @pixlfactory
    @pixlfactory День тому +36

    I am truly speechless! Such a small task, yet it is a profound achievement! Kudos!!!

    • @CNLohr
      @CNLohr  День тому +2

      Yeah, some of the parts of this area are so pretty.

  • @justanormalperson
    @justanormalperson День тому +50

    i'm always impressed with what you do with these microcontrollers, keep up the good work

    • @CNLohr
      @CNLohr  День тому +9

      When you find a hammer you really like, everything becomes a nail.

  • @brouettebredouille8320
    @brouettebredouille8320 День тому +14

    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

    • @CNLohr
      @CNLohr  День тому

      Thank you for the encouragement. I do a lot of projects, it's just so hard to turn them into videos.

  • @jonnyphenomenon
    @jonnyphenomenon 16 годин тому +5

    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.

  • @alexdev404
    @alexdev404 21 годину тому +1

    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

  • @joehopfield
    @joehopfield 22 години тому +1

    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.

    • @CNLohr
      @CNLohr  21 годину тому

      It's got plenty of room here playing with microcontrollers, you may like it!

  • @lis6502
    @lis6502 День тому +5

    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.

    • @CNLohr
      @CNLohr  22 години тому +2

      I LOVE RISC-V now! It's so simple, fast, solid, and easy to use.

  • @punpck
    @punpck 19 годин тому +2

    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 👏

  • @1kreature
    @1kreature День тому +9

    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!

    • @CNLohr
      @CNLohr  21 годину тому +1

      Oh yeah! the DMA in the 003 is absolutely baller. And you can pipe it from memory to GPIO triggered on a timer.

    • @1kreature
      @1kreature 19 годин тому +1

      @@CNLohr Oooh, DMA triggered by timer is a luxury item! Wow! Makes everything so easy.

    • @AttilaAsztalos
      @AttilaAsztalos 9 годин тому

      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.

    • @1kreature
      @1kreature 5 годин тому

      @@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!

    • @paulie-g
      @paulie-g 2 години тому

      @@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.

  • @JoeyMoreland
    @JoeyMoreland День тому +5

    Well gosh, this is crazy impressive

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @OmarMekkawy
    @OmarMekkawy День тому +4

    I am speechless, hats off to you. You are crazy. I think that you know that microcontroller more than the manufacturer himself !! 😂

    • @CNLohr
      @CNLohr  22 години тому

      I do try to do things with parts that the original designers would expect to be impossible.

  • @maor1993
    @maor1993 День тому +5

    as usual a masterpiece of engineering

    • @CNLohr
      @CNLohr  22 години тому +1

      Thanks!

  • @Chriva
    @Chriva День тому +28

    "Press [F] to pay respect" 😂I see what you did there :D

    • @CNLohr
      @CNLohr  День тому +4

      It felt so satisfying to do that in the end!

    • @phrozenwun
      @phrozenwun День тому +3

      I pressed F and all I got was a full screen video, mad respect all the same. Thanks for sharing!

  • @stargazer279
    @stargazer279 13 годин тому

    woowww well done. This brings back memories. i really like your way of thinking for adding the touch screen option

  • @TheFinalRevelation2
    @TheFinalRevelation2 17 годин тому

    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

  • @noawe_
    @noawe_ 22 години тому +1

    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.

    • @CNLohr
      @CNLohr  21 годину тому

      Which font?

  • @cantileveredapotheosis
    @cantileveredapotheosis 13 годин тому

    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.

  • @neumanngregor
    @neumanngregor 8 годин тому

    Wow, i learned something new, the touch sensor from a b/w LCD segment display is mind-blowing.

  • @SplitScreamOFFICIAL
    @SplitScreamOFFICIAL 20 годин тому

    Charles back at it again with the obscure and amazing uses for cheap microprocessors

  • @thomasvnl
    @thomasvnl День тому +1

    Every time I see a video from you Charles you always amaze me with your ingenuity.

    • @CNLohr
      @CNLohr  21 годину тому

      Thank you.

  • @atltvhead2840
    @atltvhead2840 День тому +2

    Awesome! Your projects are always inspiring!

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks!

  • @Simon_Rafferty
    @Simon_Rafferty 17 годин тому

    Several very clever bits of inventiveness there!

  • @hardronix
    @hardronix День тому +2

    I love it... Also, I didn't think about ITO glass like you did until now, lol

    • @CNLohr
      @CNLohr  21 годину тому +1

      It's funny how those things work.

  • @Conservator.
    @Conservator. 18 годин тому

    5:37 Aaaand is gives the board a nice red touch! 😁
    Very cool project though!
    I admire your perseverance and skills!

  • @DESX312
    @DESX312 21 годину тому

    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!

    • @CNLohr
      @CNLohr  21 годину тому

      I'll be happy to have you join!

  • @gearyae
    @gearyae 8 годин тому

    Ooh, very cool! We need to start building usb-c into all our boards this way!

  • @cj.tranzistor
    @cj.tranzistor 15 годин тому +2

    You can connect two gpios together and enable pull-up on one and pull-down on another and get 1/2 VCC.

  • @nunyabidness9257
    @nunyabidness9257 3 години тому

    From one nerd to another (I’m a different flavor of nerd), I really enjoyed the video.

  • @Aerobiker1
    @Aerobiker1 День тому

    You trully are a wizzard. I can't even fathom tackling such a amazing project. You trully inspire me. Have a great day.

    • @CNLohr
      @CNLohr  22 години тому

      Go go go! Learn and do some fun things yourself!

    • @CNLohr
      @CNLohr  22 години тому

      I hope you do something very cool! Go go go! Don't let the difficulties of doing cool things stop you.

  • @jishk8980
    @jishk8980 22 години тому

    this dude is smart on another level, and I love it. truly inspiring man, keep it up!!

    • @CNLohr
      @CNLohr  21 годину тому

      Just hoping to get other people to do cool things too!

  • @billkillernic
    @billkillernic 20 годин тому

    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..

  • @SusanAmberBruce
    @SusanAmberBruce 17 годин тому

    Mostly a bit over my head, but I think it's fantastic work and well presented.

  • @Reman1975
    @Reman1975 23 години тому +1

    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. 🤔

    • @CNLohr
      @CNLohr  23 години тому +2

      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.

  • @LuneyToonz-lk2de
    @LuneyToonz-lk2de День тому +2

    This is cool, but as soon as you brought up the code lines, I knew I was in over my head.

    • @CNLohr
      @CNLohr  22 години тому +1

      I try to explain what I am doing without needing to understand the code diectly.

  • @saitamatechno
    @saitamatechno День тому +3

    wtf have you done? that's insanely amazing. I couldnt follow with my knowledge after 5th minute

    • @CNLohr
      @CNLohr  21 годину тому

      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!

    • @saitamatechno
      @saitamatechno 20 годин тому

      @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 :(

  • @drfrancintosh
    @drfrancintosh 4 години тому

    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!

  • @ForOurGood
    @ForOurGood 14 годин тому

    A man after my own heart, cool video and project, thanks 👍

  • @mikiex
    @mikiex День тому +1

    Always good when you post a video :)

    • @CNLohr
      @CNLohr  21 годину тому

      I know! It feels so good to get it over with.

  • @SinanAkkoyun
    @SinanAkkoyun 21 годину тому

    I love your USB bitbang projects!

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks! It's a lot of fun to go back and use things created in the past.

  • @mcflapper7591
    @mcflapper7591 12 годин тому

    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.

  • @BenM0
    @BenM0 21 годину тому

    Thanks for sharing this awesome project. Fantastic job!

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks. Yeah! I share a ton of stuff on my github, but it's just hard to get myself to make yt vids.

  • @TechwithHari
    @TechwithHari 20 годин тому +1

    God level! Really inspiring tbh

  • @akak5128
    @akak5128 День тому

    This is amazing, will make great projects. Thanks for sharing buddy, legend. Press F in the end loooool

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @TrentSterling
    @TrentSterling День тому +1

    Very nice USB thing!

    • @CNLohr
      @CNLohr  22 години тому

      I mean do you have a better word for it?

    • @CNLohr
      @CNLohr  22 години тому

      I mean I still haven't found a better name for it.

    • @SinanAkkoyun
      @SinanAkkoyun 21 годину тому

      LCB or LCD-C, even if it's not super accurate it still sounds cool and it's a tiny name

  • @dhj5
    @dhj5 23 години тому +1

    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.

    • @CNLohr
      @CNLohr  22 години тому +2

      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.

    • @dhj5
      @dhj5 11 годин тому

      @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!

  • @GnuReligion
    @GnuReligion 17 годин тому

    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.

  • @Lavadawg
    @Lavadawg 13 годин тому

    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

  • @seanocansey2956
    @seanocansey2956 17 годин тому

    Bro, you're a wizard

  • @amigator7789
    @amigator7789 16 годин тому

    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...

  • @kajatoth9151
    @kajatoth9151 17 годин тому +1

    Would be funny to make a keybord out of them

  • @dalewheat
    @dalewheat 23 години тому

    Very cool project! Thanks for sharing.

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @juanma4978
    @juanma4978 День тому +1

    amazing video and project!!!

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @andrew2004sydney
    @andrew2004sydney 21 годину тому

    This is VERY IMPRESSIVE!

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks!

  • @davecreelman
    @davecreelman День тому

    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 🙂?

    • @CNLohr
      @CNLohr  22 години тому +1

      It depends on how you're setting it up, but typically I get about 40-70kBytes/sec.

    • @CNLohr
      @CNLohr  22 години тому

      It is quite adequate! It is between 40 and 60 kB/sec depending on how you use it.

  • @ljuberzy
    @ljuberzy День тому +2

    this is sheer crazy stuff!

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks.

  • @MastroGippo
    @MastroGippo 4 години тому

    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

  • @JonMurray
    @JonMurray День тому

    Awesome man! New subscriber ✌🏻

    • @CNLohr
      @CNLohr  22 години тому

      Glad to have you.

  • @reold
    @reold 11 годин тому

    7:10 bro is speaking facts

  • @thorbenh
    @thorbenh 13 годин тому

    Well, thank you, I was just feeling good about my embedded knowledge/skills...

  • @ronnetgrazer362
    @ronnetgrazer362 День тому

    Nice! Now mount a minecraft server on top of the LCD glass :)
    Very inspiring, thanks!

    • @CNLohr
      @CNLohr  22 години тому +1

      Maybe someday I'll run Minecraft on an 003. But that day is not today.

  • @a6dulsalam511
    @a6dulsalam511 19 годин тому

    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?

  • @stopthephilosophicalzombie9017
    @stopthephilosophicalzombie9017 8 годин тому

    Looks like you reinvented the touch lamp without the lamp.

  • @KallePihlajasaari
    @KallePihlajasaari 9 годин тому

    This is so cool that it is akin to magic.

    • @KallePihlajasaari
      @KallePihlajasaari 9 годин тому

      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.

  • @Otakutaru
    @Otakutaru День тому +14

    How small can you make it with a battery? You realize this is prime fidget material, right? In the realm of tamagotchi

    • @mortenmoulder
      @mortenmoulder День тому +5

      Would love to hear the power consumption too

    • @CNLohr
      @CNLohr  21 годину тому +1

      oh that's a good point. yeah, you could totally do it with a battery kinda thing.

    • @CNLohr
      @CNLohr  21 годину тому +3

      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.

    • @GnuReligion
      @GnuReligion 17 годин тому +4

      I can imagine a Number Invaders game, like on those early 80's calculator watches.

  • @FilmFactry
    @FilmFactry День тому +1

    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.

    • @CNLohr
      @CNLohr  21 годину тому

      Oh yeah. I love those things. But sadly, I dunno, teardowns aren't really my thing here.

    • @FilmFactry
      @FilmFactry 20 годин тому +1

      @@CNLohr I found a teardown in case you want to see what's inside. ua-cam.com/video/kt1L1EUq86w/v-deo.html

  • @lynes2peters438
    @lynes2peters438 16 годин тому

    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

  • @SirEngelmann
    @SirEngelmann День тому +1

    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.

    • @CNLohr
      @CNLohr  День тому +2

      For larger runs, absolutely worth it! For tiny runs, I just let it roll. The cost is with the human factors in doing assembly.

  • @leosmi1
    @leosmi1 10 годин тому

    now we can have old LCD vintage touch smartwatch

  • @paulstubbs7678
    @paulstubbs7678 14 годин тому

    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.

  • @DiyintheGhetto
    @DiyintheGhetto День тому +1

    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.

    • @CNLohr
      @CNLohr  21 годину тому +2

      0.6mm FR4 PCB, with ENIG. that's it.

    • @DiyintheGhetto
      @DiyintheGhetto 20 годин тому

      @ oh thank you for that. I have a few projects that I want to make with usb pcb.

  • @abo1428
    @abo1428 6 годин тому

    To describe this video with just one emoji: 🤯

  • @kidenscruton1923
    @kidenscruton1923 20 годин тому

    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?

  • @juliusmakes
    @juliusmakes 17 годин тому

    This HAS to learn to talk (SPI, I2C something) and become a module for us the smoother brained mortals out here.

  • @Stabby666
    @Stabby666 День тому

    This was a great hack - thanks!

    • @CNLohr
      @CNLohr  День тому

      Thanks for watching.

  • @TT-it9gg
    @TT-it9gg День тому

    Excellent! Thanks for sharing~ Best

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @asmotaku
    @asmotaku 22 години тому

    Brilliant !

    • @CNLohr
      @CNLohr  21 годину тому

      Thanks!

  • @Atom224
    @Atom224 Годину тому

    3:06 Hold on, genuine question: Why didn't you panelize the PCB? You could've got way more for your money.

  • @etmax1
    @etmax1 13 годин тому

    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.

  • @wolpumba4099
    @wolpumba4099 21 годину тому +1

    *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

  • @TheMLover
    @TheMLover День тому

    Hey, amazing video as always. What do you think about the Padauk MCU's? The PMS150G is about 3 cent.

    • @CNLohr
      @CNLohr  22 години тому +1

      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!

  • @zeffofx
    @zeffofx 14 годин тому

    I would love to try using ch32v chips but is there a way to program them without that WCH link programmer?

  • @Ski4974
    @Ski4974 23 години тому

    Wish I understood anything in this video, it seems super interesting

    • @CNLohr
      @CNLohr  22 години тому +1

      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.

    • @Ski4974
      @Ski4974 5 годин тому

      @@CNLohr Oh absolutely!

  • @markrix
    @markrix 22 години тому +1

    I can dig it

  • @josephgoodwin3244
    @josephgoodwin3244 11 годин тому

    Didn't learn anything. I have adhd and skipped around. But you did get a like.

  • @Scrogan
    @Scrogan День тому

    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.

    • @CNLohr
      @CNLohr  22 години тому

      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.

    • @CNLohr
      @CNLohr  22 години тому

      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.

    • @Scrogan
      @Scrogan 22 години тому

      @@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.

  • @zaca211
    @zaca211 13 годин тому

    2:54. Nice!

  • @SKElectronics
    @SKElectronics День тому

    Love it.❤

    • @CNLohr
      @CNLohr  22 години тому

      Thanks!

  • @MoritzvonSchweinitz
    @MoritzvonSchweinitz День тому

    But does it output anything (like touch events) to the USB port?

    • @CNLohr
      @CNLohr  21 годину тому

      Yes! I show it in the video, either as a USB keyboard or the "amount" of touch.

  • @guatagel2454
    @guatagel2454 День тому +1

    You are my hero

    • @CNLohr
      @CNLohr  21 годину тому

      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.

  • @L2.Lagrange
    @L2.Lagrange 56 хвилин тому

    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

  • @curiouslycory
    @curiouslycory 10 годин тому

    I was sleeping on UV resin for far longer than I'd like to admit.

  • @Howei1337
    @Howei1337 День тому

    Very interesting !

    • @CNLohr
      @CNLohr  22 години тому

      Thanks

  • @flipschwipp6572
    @flipschwipp6572 День тому

    Are you using TopoR für the routing or is there another nice router out there?

    • @CNLohr
      @CNLohr  День тому +1

      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.

  • @DasIllu
    @DasIllu День тому

    Wait, you DO exist, it wasn't just my imagination!

    • @CNLohr
      @CNLohr  22 години тому

      And I've got a lot of videos.