Cheap USB Host Microcontroller [CH559, ESP32, HID]

  Переглядів 215,053

bitluni

bitluni

4 роки тому

This video shows an affordable way to add USB support to maker projects.
$2 for 10 PCBs (Any Color): jlcpcb.com (sponsor)
The CH559 is a 8051 architecture based microcontroller that has built in dual USB Hosts. This allows to interface generic Keyboards, Mice, MIDI devices and in my case gamepads. I added this chip as an add on to my ESP32 based game console to replace the SNES controllers by cheap generic ones. The communications is handled over UART which can be done by both ends in hardware. There still is some work to do but you can try it out already. Have fun!
CH559 firmware sources & compiler:
github.com/atc1441/CH559sdccU...
Aarons video:
• Usb mouse and keyboard...
Links to my game using the USB:
github.com/bitluni/GameWing2USB
CH559:
link.bitluni.net/ch559
Links to the parts (affiliate links):
USB SNES Gamepad ($2.70 shipped):
USB Fake PS3 Controller ($3.30 shipped):
aliexpress.bitluni.net/usbPs3
aliexpress.bitluni.net/usbSnes
Set of Tweezers ($3):
aliexpress.bitluni.net/tweezers
Flux ($3 for two):
aliexpress.bitluni.net/flux
Ultrasonic Cleaner(~$50):
aliexpress.bitluni.net/cleaner
Soldering Mat ($9):
aliexpress.bitluni.net/mat
My camera and lens (4k 60fps):
amazon.bitluni.net/gh5
plz share :-)
Check out my Tindie store to get some of my creations:
www.tindie.com/stores/bitluni
Consider supporting my lab for some extras and frequent updates:
github.com/sponsors/bitluni
/ bitluni
paypal.me/bitluni
Twitter: @bitluni
reddit: u/bitluni
#electronics #diy #maker

КОМЕНТАРІ: 227
@killervirus57
@killervirus57 4 роки тому
How you soldered everything on that board by hand was great. I love tech and diy projects (even though I can't do 90% of them). You got a new sub.
@andrewkieran8942
@andrewkieran8942 4 роки тому
This was a brilliant hack, a fun project, had great editing, and was quite funny! Well done on all counts!
@SebastianScholle
@SebastianScholle 3 роки тому
Well done for breaking through the documentation for that IC! USB hosts are such a useful tool to advanced makers.
@Corgitronics
@Corgitronics 4 роки тому
Congratulations! That's going to be useful in so many projects.
@vojtadeges720
@vojtadeges720 4 роки тому
3:45 Plugging USB correctly for the first try is illegal!
@soejrd24978
@soejrd24978 4 роки тому
Insert with the open tabs up, 60% of the time it works every time.
@amyshaw893
@amyshaw893 4 роки тому
insert with the usb logo on top, works 90% of the time, every time
@hpekristiansen
@hpekristiansen 4 роки тому
As written by others, you have between 60%-90% chance of selecting the correct orientation the first time(dependent on how much time you are willing to spend). This means that you can insert it correctly the third time(fifth if unlucky). -not too bad.
@nyeleskettes
@nyeleskettes 4 роки тому
video was obviously edited.
@EgonSorensen
@EgonSorensen 4 роки тому
If you can SEE the NO-SEE, you got it right UP (or in front) the first time. What I mean is that there is an indentation in the center of the metallic end you insert into the socket, looking a bit like a nose on a LEGO figure head. The back is a cracked hairline :ø)
@therob39
@therob39 4 роки тому
It was very nice to watch the time laps part. btw props for those soldering skills 👍
@TheTinkerDad
@TheTinkerDad 4 роки тому
Awesome stuff as usual! This chip looks like an awesome find, opens up quite some possibilities.
@ChunkySteveo
@ChunkySteveo 4 роки тому
Brilliant video Bitluni, amazing work!!
@666aron
@666aron 4 роки тому
I'm always amazed by the hidden gems in the Chinese ICs.
@ovi_4
@ovi_4 4 роки тому
Is a fantastic project. It really is. You are a very likable guy and your work is done with such a joy and you can tell. Your jokes are also very nicely done. Two thumbs up and you just earned yourself a subscriber. Well done.
@burtratti9003
@burtratti9003 4 роки тому
bitluni, you the man, bro. Awsome update!
@Fifury161
@Fifury161 4 роки тому
Great work - thanks for sharing!
@IstvanNagy86
@IstvanNagy86 4 роки тому
Wish I have such friends who are so enthusiastic about electronics projects. :) Incredible again. Belated happy new year guys!
@Drxxx
@Drxxx 4 роки тому
Happy new year
@TheTinkerDad
@TheTinkerDad 4 роки тому
Who knows, you might meet someone @ Function '20 :-)
@EvenTheDogAgrees
@EvenTheDogAgrees 4 роки тому
Join a hackerspace?
@mandelbro777
@mandelbro777 4 роки тому
maximum effort chan great work
@Rtcmanga_YouTube_Channel
@Rtcmanga_YouTube_Channel 4 роки тому
Awesome what can be done with today's technology!! :)
@alainkovacs2007
@alainkovacs2007 4 роки тому
I don't press the "subscribe" button often or easily, however, I've been following you for a while and your channel is so amazing with such nice, interesting and cool content that I subscribed and I will also become a Patreon member!
@triplexSch
@triplexSch 4 роки тому
Just awesome! I wish I had your skills too :).
@dd0356
@dd0356 4 роки тому
Awesome video. happy new year :-)
@DarylIp
@DarylIp Рік тому
Exactly what I was looking for
@pastudan
@pastudan Рік тому
Me finding this 2 years later :p Now the Pico W was just released and has a USB host + another USB via PIO. I am going to try and use that for my project, but this is an incredible backup resource. Thanks!
@Davedarko
@Davedarko 4 роки тому
And there it is, the pre-stream video release to announce the makercast stream!
@DrakeTain
@DrakeTain 2 роки тому
Makers like you are the solid backbone of this community.
@augurelite
@augurelite 3 роки тому
i love this man so much. fantastic videos
@avejst
@avejst 4 роки тому
Great job you have done :-) Thanks for sharing this new way to communicate :-)
@eformance
@eformance 4 роки тому
FTDI makes a number of these types of chips, and they are better documented and supported. The FT120 looks like similar style, using a parallel interface instead of uart.
@z1ph0n3
@z1ph0n3 2 роки тому
nothing from ftdi costs $1 and it's funnier to get something like this to work than a ready-made meal.
@tonysfun
@tonysfun 4 роки тому
You are just one of the kind! I wish I know 10% of what you know! I can'r even come close to your ankles, but I do enjoy your videos!!! Thank you very much and keep up the good work! Wishing you, your family and friends a great happy and prosperous 2020! What do you put into your water to sonic-clean your boards? Thanks.
@graealex
@graealex 4 роки тому
One of the great shortcomings of the ESP32 is it not having a USB interface.
@graealex
@graealex 4 роки тому
@@BlackTigerHD I wasn't talking about a programming interface which is usually a only a cheap USB-to-UART chip, but about a real, native USB interface, like it's common with Atmel chips, like the 32U4 or SAM D21.
@graealex
@graealex 4 роки тому
@@yazdanvakili7057 Sadly, ESP32-S2 will sacrifice a lot of other functions, like no BLE, no Ethernet, no SDMMC.
@graealex
@graealex 4 роки тому
@Z80 None of them have the massive feature set of the ESP32, though. At least not at that price point.
@vasiliynkudryavtsev
@vasiliynkudryavtsev 4 роки тому
Let's wait for a ESP64 to rule them all. Amen.
@DoctorWhom
@DoctorWhom 4 роки тому
@Z80 I can name one STM32F411 project on youtube: betaflight ;)
@turutzi
@turutzi 4 роки тому
Every day whit a bitluni video is a good day.
@sevensolutions77
@sevensolutions77 4 роки тому
FTDI also have USB Host chips like these called "Vinculum". They also have a ready to use UART firmware. 😁
@devdylan6152
@devdylan6152 4 роки тому
oh this looks like a big promising update that could also(expanding on this) make usb to bluetooth DIY overall better.
@spielautomat9751
@spielautomat9751 4 роки тому
das ist mal sehr interessant :)
@SPAbyShorey
@SPAbyShorey 2 роки тому
great skills man !
@iceberg789
@iceberg789 4 роки тому
i like the cute little crt you have.
@uiopuiop3472
@uiopuiop3472 4 роки тому
This is really useful
@DD-jk3nf
@DD-jk3nf 4 роки тому
This is the first video on YT I've watched that hasn't made me shake my head when seeing someone using soldering tools :)) But why for the love of jeebus, would you want to replace the SNES pads? They are gamepad perfection! And for a crappy USB clone SNES pad. Are you crazy?! :P
@sheepleslayer586
@sheepleslayer586 4 роки тому
Great video and well done. Bet that was frustratingly fun 🥺😫😅🤔😁🤑
@khellafsamy
@khellafsamy 4 роки тому
Verry good work. Thank u
@363691amol
@363691amol 4 роки тому
This guy deserve a medal
@_PathOfExile
@_PathOfExile 2 роки тому
man, your soldering skills are beyond this realm. LOL .
@cccyberfamilydk
@cccyberfamilydk 4 роки тому
Great Video. Subscribed
@yashasranjan8497
@yashasranjan8497 4 роки тому
Awesome Video👍
@bassome3000ify
@bassome3000ify 4 роки тому
crazy good shit as usual
@peopledrivemecrazy
@peopledrivemecrazy 4 роки тому
Wow its just amazing... I like this project! Can you add insert coin for playing a game just like an arcade?
@jonesjjj100
@jonesjjj100 4 роки тому
Very nice. As usual, you videos are quite informative. Now a quick question. Can the device function as a USB host for MIDI? Can I plug my music keyboard with the modern USB midi and can I channel it to somewhere else(say a 5 pin midi) Also would these boards support USB hubs(powered/unpowered)? Thank you for building great content
@Marc_Wolfe
@Marc_Wolfe Рік тому
The SAMD21 is an ARM unit that supports USB host mode, according to it's datasheet.
@davidbradley3074
@davidbradley3074 4 роки тому
Great Job!
@Stabby666
@Stabby666 4 роки тому
I use the ATMega8U2 MCU as a USB host/client on projects. It's under £2, and has a lot of good documentation and examples for all types of usage. It would be good to find a chip that justs passes the USB peripheral data across to UART without needing to be programmed though - to save a step in manufacturing! A bit like the CH340 does for USBSerial
@szabolcsmate5254
@szabolcsmate5254 3 роки тому
1:44 - oh how many times I have seen that before! :D
@LittleRainGames
@LittleRainGames 4 роки тому
Avr maybe be expensive, but you get awesome documentation. Thats why i stick with pic or atmel.
@perli216
@perli216 4 роки тому
thank you
@youliantroyanov2941
@youliantroyanov2941 4 роки тому
Bitluni, could you work with lilygo and make a variant of this for their wildely popular t-display?
@TheTurmanDreams
@TheTurmanDreams 9 місяців тому
Incredible !!!
@CircsC
@CircsC 3 роки тому
Incredible work! I'm learning from 0 and have gotten a few sketches working. I'm a long ways off from writing drivers though! Is it possible to find these on breakouts? I'm biting off far too much in one go and making something very silly.
@youliantroyanov2941
@youliantroyanov2941 4 роки тому
Some serious soldering skills. I would never be able to do that...
@zvpunry1971
@zvpunry1971 4 роки тому
I'm sure that you would be able to do that! He used additional flux on pre-tinned pads, this makes it very easy. Most bad soldering experiences come from bad circuit boards with corroded pads and components with corroded leads and not enough flux to clean it up.
@whc2001
@whc2001 4 роки тому
Also if you don't need USB Host and a large program memory, you can try CH552/CH554 which only comes with USB Device mode. They are really cheap and I have already tried to make a small USB keyboard by modifying the provided example code on WCH's website.
@bitlunislab
@bitlunislab 4 роки тому
I had to go with the ch559 since I want to have keyboard and mouse in future and a usb hub ic costs more than using the 559 in the first place
@whc2001
@whc2001 4 роки тому
​@@bitlunislab Yeah, for any use cases that ultilizes USB Host mode and multiple ports, CH559 is a solid choice as it provides double port root hub, while still cost effective. Thanks for sharing!
@poweredbysergey
@poweredbysergey 4 роки тому
Useful!
@DDBAA24
@DDBAA24 3 роки тому
You should make one with vga so you can just stick it on the back on an old monitor , very small and tucked out of the way. This would allow for a smaller enclosure and it would be cool to see a esp based gaming platform on a dongle . Most CRT were VGA or DVI .. I like this tiny TV you show at the end of the video I have so many things I could use it for.
@orojasp
@orojasp 4 роки тому
Impressive!
@QUIX2468
@QUIX2468 4 роки тому
Verry nice!
@jurisembergs9245
@jurisembergs9245 4 роки тому
Perfect sound, what mic are you using?
@patriksretrotech
@patriksretrotech Рік тому
Aswome project!
@Synthetech
@Synthetech 4 роки тому
the case is cool. any pointers how to design a split case like that?
@TotallyHanzo
@TotallyHanzo 4 роки тому
Thats a great video, I think PIC18 or PIC24 have USB too but might be a bit more expensive they have better software though
@spotlight-kyd
@spotlight-kyd 4 роки тому
Please implement a USB-MIDI Host to serial driver! Pretty pleeeze!
@TheMusicalKnokcers
@TheMusicalKnokcers 4 роки тому
yesss i need that
@olafschermann1592
@olafschermann1592 2 роки тому
Awesome!
@glide360x
@glide360x 4 роки тому
This will be awesome if was portable version, maybe a PCB that can have even the controller on. The low power required by the ESP 32 to run and the low resolution that will be just fine for a screen with 800x480 resolution.
@Rtek-zv5lr
@Rtek-zv5lr 4 роки тому
Nice job! I noticed that unlike the MAX3421E, the CH376S has no built-in ESD protection. Does the CH559 have internal ESD protection?
@bitlunislab
@bitlunislab 4 роки тому
No clue.. maybe someone else can answer this. That's really built to the dollar so I can keep all the GOLD to myself 😂
@Rtek-zv5lr
@Rtek-zv5lr 4 роки тому
@@bitlunislab 🤣
@naasikhendricks1501
@naasikhendricks1501 4 роки тому
EDS protection is cheap. I would look at both a viable solutions. ESD protection must always be a major consideration when designing to protect against silly failures.
@nevyn38
@nevyn38 4 роки тому
Soooo close to what I'm looking for. I REALLY want to be able to build a USB Host bridge so that I can turn a keyboard into a wireless keyboard (without "stealing" the firmware from a more expensive USB Host). So I need a USB host and some sort of wireless communication to some other unit that can be a USB slave (teensy or arduino should do).
@geraldowcar
@geraldowcar Рік тому
u got my subs
@DieSonneSchicktKeineRechnug
@DieSonneSchicktKeineRechnug 4 роки тому
Klasse!!!
@MrZetor
@MrZetor 4 роки тому
Nice job. But is there a specific reason for not using a MAX3421E-based USB host shield? I think the 3.6/4.6USD price for a complete mini/full-size board (incl. shipping) is reasonable, especially as there are ready-made and tested Arduino libraries for this that support HID devices, ADK, CDC ACM, PL2303, FT232, BT HID, SPP, mass storage, and also PS3/PS4/PS Buzz/Wii/Xbox controllers, among other stuff.
@KuraIthys
@KuraIthys 4 роки тому
Huh. I've been trying to work out the logistics of adding USB host support to devices for a while now. I have about a half dozen projects that could really benefit from this... Many of which have to do with retro computers. (for instance - I wanted to add 3.5 inch floppy support to an 8 bit atari. There's many ways to go about this, but one of the most accessible that doesn't rely on obsolete parts, is to use a USB floppy drive... Which... Means being able to build a USB host controller and interface it to the IO connectors the atari has available.) Then there was a SNES cartridge designed for homebrew development work and software testing where it would be useful to be able to do remote debugging with a PC, but where it would also be useful to have a way of attaching a USB keyboard... (I'm also currently looking at something equivalent for SATA; mainly so I can interface a modern DVD drive to a very old computer. But my guess is that's even more complicated than a USB host...)
@nicolaedumitrache9246
@nicolaedumitrache9246 4 роки тому
Nice work. Anyway, instead CH559 a good choice would be the PIC32MM0256 (a little over 1Eur) which have USB OTG and an excellent and free software (MPLAB X) with plenty of samples.
@Wingnut353
@Wingnut353 2 роки тому
MPLABX isn't free if you want optimizations... you can compile with chipkit also but it doesn't have the linker scripts or bootloaders ready to go yet.
@marouaniAymen
@marouaniAymen 4 роки тому
Thanks for the video, but where did you get the mini CRT screen ?
@bitlunislab
@bitlunislab 4 роки тому
Ebay.. cheap mini color crts are harder to find
@danielwilson2086
@danielwilson2086 3 роки тому
Thanks for the video! really interesting... Do you have these USB wings for sale? I'm hoping to use the ESP32 to forward USB traffic to another host (wish me luck) this board would be a great starting point.
@mirkougolini
@mirkougolini 3 роки тому
Hi, Bitluni, great work. Any chance that it can be used as pure USART to USB bridge for control a 3d Printer ? Mirko
@AppliedCryogenics
@AppliedCryogenics Рік тому
Since even broken Amiga 2000 keyboards are going for $240+ on fleabay, this little chip might be just what the doctor ordered to adapt modern keyboards and mice to work on amigas!
@Telectronics
@Telectronics 2 роки тому
Hey great project bitluni ! Do you think an esp32 is good enough to connect a usb webcam through the CH559 and use a lcd screen to show a video from it ?
@Rick-ck8ei
@Rick-ck8ei 4 роки тому
Have you considered the ESP32-S2 chip? It is single core with usb otg (USB PHY 1.1) built-in. I would like to see you investigate it for using off-the-shelf usb hardware (webcam, game controller, keyboard, etc.) designed to work with generic drivers.
@PabloGarcia-uz3fk
@PabloGarcia-uz3fk 3 роки тому
Are there any chances you could share the schematics? It would be very helpful :)
@inxomnyaa
@inxomnyaa 4 роки тому
Using that razor blade on the 3D printer gave me a shock.
@VincentFischer
@VincentFischer 4 роки тому
Blender 2.79 is my favourite blender too. Only thing I miss from 2.8x is actually working boolean modifiers :/
@bitlunislab
@bitlunislab 4 роки тому
I built a new editing pc and installed the latest blender.. I completely lost.. had to step down to get finished in time
@VincentFischer
@VincentFischer 4 роки тому
@@bitlunislab I think it's not for us people who abuse it as poormans cad software ;) It's made for the CGI folks
@lucibus6990
@lucibus6990 4 роки тому
At minute 3.35 you used a ultrasonic cleaner. Please may you give me info about time, temperature and liquid type used for cleaning? many thanks
@bonafide9085
@bonafide9085 2 місяці тому
After 4 years, still, this is one good solution, because ESP32-S2 supports a single device only, so mouse and keyboard cannot be connected even using a USB hub.
@caio1998caio
@caio1998caio 3 роки тому
Really nice! I designed my own board based on your instructions, but when I hold the button to enter the programming mode and plug in the microcontroller, windows says it cannot recognize the device... I tried to install the CH340 driver, but still not works. Could you help me a bit? Best regards, Caio.
@NitinVarmaManthena
@NitinVarmaManthena 2 роки тому
Hi Bitluni, Would it be possible for you to share the circuit diagram for CH559 HID that you are using?
@fishemrock
@fishemrock 3 роки тому
I was wondering if i could build such a usb host to capture webcam images on a ESP32 board.
@4mb127
@4mb127 3 роки тому
You kick ass.
@mohammadyaskur9276
@mohammadyaskur9276 4 роки тому
mantap
@heinzalberto6732
@heinzalberto6732 2 роки тому
Do you think it would also be possible to build an PTP-driver so it's possible to communicate with (e.g.) DSLR-cameras?
@scottwilliams895
@scottwilliams895 4 роки тому
This is the first video of yours I've watched. Loved it! [ Subscribed ]
@MrYsupov
@MrYsupov 4 роки тому
Фантастика
@John_Ridley
@John_Ridley 4 роки тому
What flux do you use on the surface mount?
@zaidhussain5206
@zaidhussain5206 4 роки тому
does any one knows the name of music track when Bitluni solder the components on board ?
@lordhelmchen100
@lordhelmchen100 4 роки тому
oooh now i know why it’s called wchusbserial :D
@phamtanduong4426
@phamtanduong4426 4 роки тому
Good
@Kuba-0040
@Kuba-0040 4 роки тому
Whats the name of the music you used at 4:52?
@bitlunislab
@bitlunislab 4 роки тому
Jeremy Blake - Powerup
@MrFaaaaaaaaaaaaaaaaa
@MrFaaaaaaaaaaaaaaaaa 4 роки тому
Just a general piece of advice, take precautions when using software from foreign manufacturers
@Mtaalas
@Mtaalas 4 роки тому
When you threw those midi controllers on the table, my heart sank.... :D
@zoobab28
@zoobab28 3 роки тому
It might be possible to have USB HID with the new ESP32S?
How to Connect a PC Keyboard to an Arduino?
6:12
Doctor Volt
Переглядів 46 тис.
I made a VGA card that blew my mind
15:44
bitluni
Переглядів 413 тис.
NO NO NO YES! (40 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:27
PANDA BOI
Переглядів 82 млн
HEC-HMS Separate flow for multiple outflow structure
2:10
ESP USB: Espressif’s Wireless Communication Solution
6:01
Espressif Systems
Переглядів 95 тис.
Add USB To Your Electronics Projects! - The USB Protocol Explained
15:19
ESP32 WiFi Range Testing - 10km using Directional Antenna
5:42
Фейк SSD с AliExpress | Как распознать подделку
21:00
Мой Компьютер
Переглядів 378 тис.
Arduino vs Pico - Which is the Best Microcontroller For You?
20:38
Gary Explains
Переглядів 276 тис.
10 заповедей по пайке. Учимся паять
12:05
Turn your ESP8266 into a USB Keyboard and Mouse - Easy Tutorial
6:37
Maker's Fun Duck
Переглядів 21 тис.
NO NO NO YES! (40 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:27
PANDA BOI
Переглядів 82 млн