Arduino Nanos, Chinese Clones and WCH CH340 Drivers
One of the things I’ve learned during my recent electronics tinkery, is that China produces very cheap components. Intellectually I knew this to be the case, but after a few searches on Amazon I discovered in a much more practical way quite how cheap they are. So, I now have a big ‘bits’ box full of sensors and displays, which I’ve been playing with. However, one recent foray didn’t work quite as well as expected until this morning – Arduino Nano clones.
The Nano is, as you may expect from the name, a tiny Arduino. It is, as with all Arduinos, open source and designers Gravitech have published the schematics. This, inevitably, led to boards being produced in China and sold around the world for stupidly small amounts of money. For example, in the UK a bare Nano (no soldered headers) will set you back about £27 from Farnell, however, the pair I picked up from eBay (with headers) set me back £2.79 each, including shipping and a USB cable. However, things are never that simple…
The original Gravitech schematic had an error in it. The USB controller on the original Nano has a TEST pin, that should be pulled low when you’re using the chip. However, the reference design had it floating, which leads to entirely random USB operation and a not particularly reliable piece of kit. The Gravtech produced Nanos were patched early on, but many of the clone boards used the original design, complete with error.
Fortunately, it’s a known issue and there’s a known solution: solder the reset pin (26) to the analogue ground pin (25) – there are a few guides to the fix online. So, when my Chinese Nanos didn’t work, I assumed it was that issue, and started looking for really really fine soldering iron tips.
However, when checking out my boards this morning to see what I’d actually need to solder (and having seen pictures now, it’s something I’d not even try – my hands are way too shaky), I found out that I don’t have the same USB controller. The problem also didn’t present itself in quite the same way – the USB just didn’t connect rather than spitting out a pile of errors. It seems that some of the Chinese producers have switched over to using a WCH CH340 chip instead of the FTDI chip that’s in the spec – the current theory is that licensing the chip is too expensive. Fortunately, while my Nanos were still not working, the fix was much easier and doesn’t involve me burning myself.
Simply put, you need a driver for the CH340 chip installed on your computer. WCH have drivers from the end of 2013 on their (remarkably slow) website – download them, install them, reboot (as necessary), play with your cheap Nano. There’s an extra step on a Mac running Yosemite (and probably later), as the driver isn’t signed. You can find details here, but it’s just running a command to disable checks for signed kernel extensions. That’s potentially a dangerous thing to do, but I’ve not heard of anyone having their Mac destroyed by a malicious kernel extension yet…
And now that I have an even smaller microcontroller, it’s time to start actually thinking of things to do with it. So far I’ve managed to plug it into a breadboard. Well done me.
Posted: January 10th, 2015 under blog.