Mailbag: CH341A, LED Driver, DIY USB Keyboard IC | From LCSC


When parcel like this arrives, it’s like Christmas
morning. This is another free order from LCSC.com. Like usually, I’ve selected items that are
super cheap, something I’ve never seen before, parts that previously were only seen on cheap
modules from eBay and Aliexpress or otherwise interesting to me. There are many different components in this
box, I will group them and share what they are. Links can be found in the description. First item is an IC often found in cheap LED-driver
modules. SD42522, a switching constant current LED
driver. It comes in SO8 -package and needs just handful
of external components. I’ve seen this IC in many cheap DC to DC LED
driver modules, like in this one. Originally I thought this module is cheaper
than the components in it, but I might have been wrong. Datasheet has example schematic with components
values. Components that I’ll need are couple of 10uF
capacitors. This inductor is for noise reduction in power
input line. Small-value shunt resistor, for setting the
constant current value. The power inductor. And a schottky diode. I believe cost came to be about 50 cents per
driver. In quantity of 20 pieces. That doesn’t include the price of PCB. I’ve been happy with the modules based on
this IC. Efficient and apparently very cheap driver. Next component belongs to the category of
unheard-of -components. CH9328. I was browsing and searching, stumbling and
wandering through both LCSC’s and Asian IC manufacturer’s websites and I found this. The label already revealed that this has something
to do with USB. This 16-pin IC has UART and USB. If I’ve understood correctly, this will show
up as a keyboard when connected to the computer. Then letters send to this thought serial port
will be sent to the computer as key strokes. I haven’t tried these yet and all the documentation
is in Chinese, so I don’t know all the details, but that should be the basic functionality
of these ICs. 24MHz crystal resonator with load capacitors
is only required extra component. In one of my previous videos I got 12MHz and
8MHz crystal oscillators to go with some microcontrollers. That was a mistake. I don’t know what kind of brain fart I had,
but I didn’t mean to get oscillators. The correct parts are crystal resonators. Oscillator is active circuit that outputs
desired clock signal, resonator is part of the oscillator circuit, rest of the parts
are inside the microcontroller. These resonators are what the “crystals” near
the microcontrollers are, not those crystal oscillators that I got in the previous video. I just wanted to fix that mistake by getting
these, and to share the fact that I’ve made a mistake. Next part is also from WCH, the CH341A is
often used in serial FLASH programmers. When I googled CH341A, most of the search
results were pointing to one specific module, which is based on this IC. That is probably the most common use case
for these chips, but definitely not the only one. Based on the datasheet, this converts USB
into I2C, UART, SPI and some other interfaces. Like I said, these are often used for programming
serial flash chips, like these W25Q128. The 128 in the name indicates these are 128
megabit, or 16MB chips. These are popular choice for upgrading flash
in some routers after installing OpenWrt. I got few CH341As, so I can use one for dedicated
FLASH programmer and still have couple of them to play with. Then I think I found another, cheaper STM32
clone. Specs are very similar, but I wasn’t able
to program these using ST-Link Utility nor with System Workbench For STM32, using ST-Link
programmer. So these MM32 microcontrollers from Mindmotion
might be great chips, but they are not fully compatible with STM32 variants. I won’t go into these any further, this is
all the information about these microcontrollers that I need. That was the content of this parcel. All the links are in the description. If you have any ideas about these components,
please share them in the comment section. You have a right to like this video and subscribe
if you want to do so. Thanks! Bye!

3 thoughts on “Mailbag: CH341A, LED Driver, DIY USB Keyboard IC | From LCSC

  1. 4 what is the power resistor connected 2 d fan in this video https://www.youtube.com/watch?v=xyeHKKe2z0Q ..???

  2. What kinds of projects do you think you'll use the CH9328 for? I think I would just use an ATmega32U4 for anything USB+HID so I'm curious what this might else this CH9328 could be used for?
    Thanks for the upload.
    -Jake

Leave a Reply

Your email address will not be published. Required fields are marked *