Using Chinese controllers (WCH etc.) in production volumes? - Page 1
Forum section: electronics / general

author: sgnka
author_rank: Contributor
timestamp: July 27, 2023, 12:29:53 pm
content: We use the new series of tiny-AVRs to make our products, in a few-100k quantity range. Nothing too fancy required from the chip itself, we just use the ADC, a few timers, USART etc, but the product stays on 24x7 continuously. We've been using Microchip for probably 15 years now and while their parts are good and reliable, they're pretty expensive for what they are.I've been looking closely at all the new Chinese microcontrollers, especially the RISC-V ones from WCH (CH32 line). They seem pretty solid and feature-rich for a good price, and I've been considering these for using in our products. What does worry me is reliability. While we don't require any sort of medical/automotive grade specs, we do need our microcontrollers to not conk out on a whim. I know WCH isn't a no-name brand and they sell a lot of chips (CH340 comes to mind), but I would like get some outside opinions on this. And yes, buying the $0.5 part from Microchip instead of the $0.2 WCH part won't bankrupt us, but an extra $50k isn't nothing for a company of our size.What are your thoughts - would/do you guys use these parts in actual products and not just hobby projects?Also, what would be a good way to try and test these out for reliability failures?

author: coppice
author_rank: Super Contributor
timestamp: July 27, 2023, 12:37:21 pm
content: An important consideration if you want reliable longer term supply is the target market for the part. If its made primarily for consumer applications it will only be available for as long as its selling well. This is pretty much the case for all vendors. If its an industrially oriented part, from a vendor known in that market, they will generally do their best to serve customers at EOL. e.g. arranging lifetime buys before cancellation, producing infrequent batches, etc.

author: sgnka
author_rank: Contributor
timestamp: July 27, 2023, 12:57:25 pm
content: Agreed, and I've asked WCH about a longevity guarantee - waiting for a reply.However, given that the code isn't super complicated and that we're fairly nimble with development and moving to production, this isn't thebiggestconcern for me right now. We also stock up on microcontrollers typically for a year or so in advance. Saved my butt during the great chip shortage of 2021 - we made it through with mere days' worth of ICs left, down to our last reel when we got our IC orders after a ~50 week delay.

author: brucehoult
author_rank: Super Contributor
timestamp: July 27, 2023, 01:52:36 pm
content: Quote from: sgnka on July 27, 2023, 12:57:25 pmAssuming you're buying at least 3000 chips at a time (that's how many fit on one wafer for typical microcontrollers), WCH can have the fab pull out the existing masks and run one (or more) wafers at any time. The masks are never thrown out.Assuming they're not doing a run regularly anyway.

author: coppice
author_rank: Super Contributor
timestamp: July 27, 2023, 01:55:51 pm
content: Quote from: brucehoult on July 27, 2023, 01:52:36 pmThe costs are way higher for a single wafer, and trying to get an A&T house to process such a small batch of dies can be a big problem.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: July 27, 2023, 02:24:15 pm
content: Do they have a viable production programming solution, or a service to supply chips pre-programmed?

author: wek
author_rank: Frequent Contributor
timestamp: July 27, 2023, 04:37:14 pm
content: Quote from: coppice on July 27, 2023, 01:55:51 pmBack more decades than I'm willing to admit, I attended a conference, where a researcher from an unnamed semi giant unemotionally explained to a crowd of drooling scientists that they always process a whole batch of wafers, typically 25, at once, as that's how the furnaces are designed; although for research they use the "cheap" 4" wafers instead of the production 6" (that gives away the decade). He explained that there's no way you use the furnaces with less wafers as that would spoil the painstakingly adjusted temperature&gas-flow profiles. So, they do the process with 25 wafers, then take the middle one, chip off 1 square centimeter of it to make the tests, and throw the rest away.In our (admittedly cheap) lab we were using 2" wafers (not Si but GaAs, that's difference too) for the important experiments, and we still had some stock of 1.5" wafers to use for some less important stuff...JWPS. Masksets don't get thrown away but processes for those masksets do get phased out.

author: coppice
author_rank: Super Contributor
timestamp: July 27, 2023, 06:37:47 pm
content: Quote from: wek on July 27, 2023, 04:37:14 pmYou are confusing wafers in a production batch with what those wafers contain. Its normal practice for each step of the process to have a mix of wafer types. Obviously they have to be wafers being subjected to the exact same processing, but every wafer might contain a different design. Mixing one or more niche wafers into a large run of another is perfectly normal practice. Its usually for test wafers - either testing a new design, or experimenting with techniques - but it can be for niche production requirements. The problem is not really making a niche wafer. Its doing small scale assembly and test. Most of the test wafers don't need to go through a normal assembly and test house. They are handled as specialist items.Masks don't phase out, but processes do. Most masks are only suitable for making devices in one or two specific fabs, running the right process with the right equipment. If that process is shut down at all fabs, your masks are useless.

author: wek
author_rank: Frequent Contributor
timestamp: July 27, 2023, 06:53:22 pm
content: > Its normal practice for each step of the process to have a mix of wafer types.I believe you, especially these days when production is highly automated. Back then, things were more manual and tracking a mixed batch might've been more laborious.Besides, the unnamed chip giant tended to churn out a small number of designs in huge volumes anyway...Nonetheless, I can imagine that costs for small volume add up at all points. Also, IIRC, OP mentioned cutting cents and a tiny chip...JW

author: gnuarm
author_rank: Super Contributor
timestamp: July 27, 2023, 07:49:24 pm
content: Quote from: sgnka on July 27, 2023, 12:29:53 pmThe CH340 is exactly the reason why I will not include any of their parts in a design I build. I started using USB/serial port cables with the CH340 chip exclusively in our test fixtures. But the guys running the test sets complained they had to reboot the computers periodically, around once per hour or so. The problem was traced to the CH340. We switched to a much more expensive name brand cable and the crashes stopped. Seems they are crap at designing drivers for their chips. I can't say if the chips were a problem or not, but others reported the drivers as a problem.Why would I want to use any of their chips in a product I'm going to put my name on?

author: zilp
author_rank: Frequent Contributor
timestamp: July 27, 2023, 08:03:32 pm
content: Quote from: gnuarm on July 27, 2023, 07:49:24 pmI mean, no idea what you were doing with them, but I have a bunch of stuff running on ch340s 24/7, with years of non-stop uptime, and never had them crash (or cause any other noticeable problems, for that matter), so my guess would be that it's a driver problem (this is on Linux, so not affected by their driver quality).

author: magic
author_rank: Super Contributor
timestamp: July 27, 2023, 08:12:59 pm
content: Okay, but if you need to use Windows for any reason then there are (probably) no 3rd party drivers and you are at the mercy of the vendor.If you put the chip in a product, some of your customers may want to use Windows too and have the same problems.Regarding CH341 and Linux, I observed a different oddity: in a loopback test, characters were being buffered somewhere and appeared on the screen in groups. I don't know if it's the driver or the chip, the receiving or transmitting side, and if it can be disabled. It simply took me by surprise, I have never seen anything like that with other chips, I had a work to do at that time so I picked a UART cable with different chip.

author: gnuarm
author_rank: Super Contributor
timestamp: July 27, 2023, 08:39:22 pm
content: Quote from: zilp on July 27, 2023, 08:03:32 pmThen who writes the driver for the CH340 under Linux?

author: zilp
author_rank: Frequent Contributor
timestamp: July 27, 2023, 09:14:17 pm
content: Quote from: gnuarm on July 27, 2023, 08:39:22 pmhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/usb/serial/ch341.cSomeone wanted to use the chip or a device containing the chip or something, so they wrote the driver, presumably.

author: brucehoult
author_rank: Super Contributor
timestamp: July 27, 2023, 11:01:05 pm
content: Quote from: coppice on July 27, 2023, 06:37:47 pmSure, but processes are used for a long time.A year ago, TSMC asked customers to do new designs on 28nm or smaller, as they didn't intend to increase capacity of their 40nm or 65nm lines.But they're not shutting them down!It's no problem to do 180nm still, and that's from 1998 -- 25 years and counting.I believe other fabs still have and even specialise in even larger nodes.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 12:08:41 am
content: Quote from: zilp on July 27, 2023, 09:14:17 pmIt would be a neat trick, since the data sheet doesn't have adequate info. Maybe they got factory support?

author: sgnka
author_rank: Contributor
timestamp: July 28, 2023, 04:51:30 am
content: *looks on helplessly as discussion goes off topic...*

author: peter-h
author_rank: Super Contributor
timestamp: July 28, 2023, 09:11:45 am
content: The short answer to the OP is: consider the political riskHowever, from herehttps://www.eevblog.com/forum/chat/china-ban-on-germanium-and-gallium/it looks like nobody is using LEDsI've been doing business with china for 20-30 years (even used to get whole products made there) and nowadays it is largely a fly-by-night gangster culture. Many firms there don't give a sh*t about anything, are happy to shaft you over, go bust every few years (and then somebody contacts you offering to sell you your property which they stole from the closed factory), they steal your tooling, if they can't steal it they will smash it up, etc.Before somebody posts the usual comment ("same as the West then") it is actually nothing like the West. People here are not a whole lot more honest but they have a far more limited scope for criminal behaviour without repercussions. If something blows up here, you can go there. If something blows up in china, yeah you get a flight there, get off the plane, meet up with an interpreter, go to some totally obscure address, floor 1234, suite 5678, and there you find... an empty room. You ask around and are told there was never any company there, just one guy who was buying the stuff from ... nobody knows, another building, floor 3455, suite 9876, and they don't know nuffink because they were never told who the customer (you) was.I buy cables and PCBs from there. On about the 5th PCB company in 10 years. The others did various totally crazy things like destroying €400 tooling after it was not used for 1 year, the one person in 500 who could speak English leaving (people leave every 6-12 months)...I buy enough cables for 2 years, and consider it good luck if the company is still there for the next batchIf you buy a few hundred k a year, that is quite a lot. You must be making lots of $$$. If they are dirt cheap, buy enough for a few years. I am sitting on a 5-10 year stock of a Hitachi H8; essential for a key product. And out of production for > 10 years.

author: zilp
author_rank: Frequent Contributor
timestamp: July 28, 2023, 09:16:42 am
content: Quote from: magic on July 27, 2023, 08:12:59 pmYeah, all I'm saying is that it's maybe not saying much about the design quality of their chips.Quote from: magic on July 27, 2023, 08:12:59 pmThat sounds a bit like df7b16d1c00e, maybe? Though I don't think that got into a release?!I have looped back CH340s before and haven't seen anything weird, so I'd guess that was either some driver regression like the above (which is a bit of a smell WRT the chip, though ...), or possibly a chip revision that wasn't supported by the driver yet?

author: zilp
author_rank: Frequent Contributor
timestamp: July 28, 2023, 09:28:17 am
content: Quote from: gnuarm on July 28, 2023, 12:08:41 amMore likely, they sniffed the USB traffic of the Windows driver to reverse engineer the protocol. I mean, it's possible that WCH helped them out with info, but more often than not, manufacturers aren't interested and reverse engineering is the way to go.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 09:33:29 am
content: Quote from: zilp on July 28, 2023, 09:16:42 amYou can wave your arms as much as you like, but if it doesn't work, it doesn't work. I don't give a damn what the root cause is. The problem is with the CH340/341 and I fixed it by changing to a different brand... a brand with a reputation.

author: zilp
author_rank: Frequent Contributor
timestamp: July 28, 2023, 10:05:03 am
content: Quote from: gnuarm on July 28, 2023, 09:33:29 amSo, next time the Linux driver for your currently preferred chip has a bug you throw away those chips, too? Yeah, that makes sense!

author: brucehoult
author_rank: Super Contributor
timestamp: July 28, 2023, 10:37:13 am
content: Quote from: peter-h on July 28, 2023, 09:11:45 amYou can find Arthur & Del Boy outfits in every country. There are also serious companies in China, doing their best to serve their customers well and earn an honest buck in the process.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 10:38:50 am
content: Quote from: zilp on July 28, 2023, 10:05:03 amIf the driver can't be fixed, or is going to be a problem because the defective driver is dominant in the wild, then yes. I need devices that work.If there is an easy path to upgrade, then fine, that's workable. With the CH340/341, I had the latest driver from WCN and it was nearly impossible to get anyone to talk to me about the problem. It's not a company well known for its support.Is this not obvious to you? What part of this is hard to understand?

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 10:39:46 am
content: Quote from: brucehoult on July 28, 2023, 10:37:13 amPlease let us know which two these are.

author: brucehoult
author_rank: Super Contributor
timestamp: July 28, 2023, 10:46:58 am
content: Quote from: gnuarm on July 28, 2023, 10:38:50 amNot my experience.I, essentially a hobbyist in that field, bought one $4.90 dev board from WCH (on Aliexpress). Some time later I tweeted a suggestion at them, a trivial hardware (CPU) change to make it easier to use standard compilers to write interrupt handlers using their "fast interrupt" mode. A couple of days later their CTO and several engineers were on a zoom call with me, discussing the idea. And they offered to send me samples of any chips or dev boards I wanted, free. (I declined, saying at their prices I can afford to buy them)

author: sgnka
author_rank: Contributor
timestamp: July 28, 2023, 11:16:09 am
content: Quote from: peter-h on July 28, 2023, 09:11:45 amI've heard this from a few different places. My experience with China has been pretty good luckily, but we were mostly purchasing standard parts with our branding without letting them have any molds/tooling belonging to us. It helped that we worked with some of the larger/known companies and I visited the factories as well. I've always found China to be a pretty "you get what you pay for" kinda place - we made sure we were paying enough for the good stuff. That's not to say we didn't have problems at times, but the manufacturers supported us (including compensating us for a manufacturing error).Quote from: brucehoult on July 28, 2023, 10:46:58 amAgreed. They've been pretty responsive to me, and offered me free samples as well. Just a little worried whether their microcontrollers will be reliable in the long term in terms of almost continuously being powered up for days/months/years. Would also have liked to get an opinion from someone who's used their stuff for a while.Availability/politics etc. are considerations beyond the scope of this post.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 11:39:05 am
content: Quote from: brucehoult on July 28, 2023, 10:46:58 amAnd what part of this is similar to contacting them about a bug?

author: zilp
author_rank: Frequent Contributor
timestamp: July 28, 2023, 09:40:39 pm
content: Quote from: gnuarm on July 28, 2023, 11:39:05 amPresumably the part where fixing a bug makes their chips easier to use?

author: zilp
author_rank: Frequent Contributor
timestamp: July 28, 2023, 10:13:06 pm
content: Quote from: gnuarm on July 28, 2023, 10:38:50 amThe part that is hard to understand is why you seem to think that moving the goalpost somehow makes for a useful argument.All I was pointing out was that your experience was maybe not indicative of the design quality of their chips. That's it. And you are just going on about how the quality of their drivers is important to you, and how you don't care about the root cause, but also it's workable if there is an easy path to upgrade(?!), and then about your experience with their support ... while pretending that that somehow contradicts my statement that the problems that you experienced were probably driver problems.Exactly noone was saying that you should be using WCH chips, or that you should be using CH340 for your particular application, or anywhere, or that you shouldn't care about driver quality ... but chances are others reading here don't care about (Windows) driver quality, be it because they don't target Windows, or because they are using chips for which drivers are irrelevant anyway, and so for their application WCH chips might be fine despite their driver quality.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 10:35:22 pm
content: Quote from: zilp on July 28, 2023, 10:13:06 pmI'm pointing out that the chip does not stand alone, just as few things do.You seem to be going off the deep end on this issue. I found WCH to be a poor company to buy devices from, because they have a product that did not work reliably, and they had no support to help with the problem.I don't care what you are selling, support is an important part of what is provided. You are free to disagree, but that does not make my points invalid. You are free to enjoy using WCH chips as much as you like.

author: gnuarm
author_rank: Super Contributor
timestamp: July 28, 2023, 10:36:46 pm
content: Quote from: zilp on July 28, 2023, 09:40:39 pmFixing a bug, which is what they didnotdo. They didn't even respond to my attempts to contact them.I think it's time to give this a rest. You get the final reply.

author: zilp
author_rank: Frequent Contributor
timestamp: July 29, 2023, 12:06:50 am
content: Quote from: gnuarm on July 28, 2023, 10:36:46 pmWhich is irrelevant to the question of how contacting them about a bug is similar to contacting them about a possible interrupt controller improvement, which is what your question was.

author: IOsetting
author_rank: Regular Contributor
timestamp: July 31, 2023, 03:35:51 am
content: I prefer CH340 to other chips because they are cheap (USD 0.22$) and well tested in the market. This chip has been used massively in China market so in most cases, the problem I meet has been met (and possibly been solved) by others, except some special user cases.About one year ago I met a weird bug when using CH340c, and reported it in their forumhttps://www.wch.cn/bbs/thread-93271-2.htmlFinally it turns out that TLP(https://linrunner.de/tlp/index.html) keeps shutting it down and adding CH340 to blacklist solves it.WCH is mostly responsive, the questions in their forum usually get replied in 24 hours. But they are not quite helpful (in my case), it seems they put less efforts in software/driver. As I am only a hobbyist that bought tiny amount of chips I won't expect too much. If I am customer of KK level, there will be dedicated tech support to solve my problem.So it depends on how you look at it, CP2102 and FT232 could be a better choice if the cost difference can be ignored.

author: gnuarm
author_rank: Super Contributor
timestamp: July 31, 2023, 04:51:50 am
content: Quote from: IOsetting on July 31, 2023, 03:35:51 amTLP, Traffic Light Protocol?

author: ftg
author_rank: Frequent Contributor
timestamp: July 31, 2023, 07:49:23 am
content: I'll have to see if this solves an issue I keep having with one CH340 based project on Linux.Thanks for mentioning it.