Author Topic: Problem with CH340 cheap Arduinos in Windows 10  (Read 28987 times)

0 Members and 1 Guest are viewing this topic.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Problem with CH340 cheap Arduinos in Windows 10
« on: March 09, 2018, 04:50:14 pm »
Dears,

To make this short for you, I have the drivers and my windows recognizes CH340 when I plug my Arduino Nano v3 but Arduino IDE says unknown board. However, when I plug the FTDI programmer connected to Arduino pro mini, it only displays port number in devices manager (without any "CH340" in the name)... Same result in IDE.

It is worth mentioning that I tried programming the nano v3 using my Uno as ArduinoISP and it worked, so the problem is with CH340 chip. I looked and saw people blaming the cable sometimes for being "power only", my cable is the one that came with PICKit3 programmer since I didn't get cables with these arduinos. So is it the case here?


Looking forward to your help.

Best regards

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #1 on: March 09, 2018, 06:28:05 pm »
I was looking into this very thing last night.  There is a specific driver for the CH340

http://www.arduined.eu/ch340-windows-8-driver-download/

I was thinking about the Nano v3 simply because they are cheap at Amazon but after searching the Internet, I found that a number of folks have a problem with the CH340 driver.

https://www.amazon.com/Arduino-Elegoo-ATmega328P-without-compatible/dp/B0713XK923

There is a comment below the description re: downloading the proper driver.

All in, I don't need the frustration just to save a couple of bucks.  The REAL Nano uses the FTDI chip

https://www.arduino.cc/en/uploads/Main/Arduino_Nano-Rev3.2-SCH.pdf
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #2 on: March 09, 2018, 06:44:07 pm »
As rstofer stated, you need a suitable driver for the WinChip serial chip to work.
http://www.wch.cn/download/CH341SER_EXE.html
This is the manufacturers official driver.

I tend to have less problems with WCH equipped Arduino clones then with FTDI (lots of counterfeit chips and FTDI drivers are painful).

Be aware that Windows 10 can be a real pain in regard to driver support. I rolled everything back to Windows 7 for my micro controller needs - but maybe things have changed meanwhile...

Because of not wanting to deal with driver issues on different machines I now use Atmega32u4 based boards for smaller projects (Leonardo, Pro Micro,...). It supports native USB and you do not have to f* around with driver issues.
Besides that I can highly suggest getting an ISP or using a working Arduino as ISP.

Kind regards,
Frederik
He’s like a trained ape. Without the training.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #3 on: March 09, 2018, 06:48:39 pm »
I was looking into this very thing last night.  There is a specific driver for the CH340

http://www.arduined.eu/ch340-windows-8-driver-download/

I was thinking about the Nano v3 simply because they are cheap at Amazon but after searching the Internet, I found that a number of folks have a problem with the CH340 driver.

https://www.amazon.com/Arduino-Elegoo-ATmega328P-without-compatible/dp/B0713XK923

There is a comment below the description re: downloading the proper driver.

All in, I don't need the frustration just to save a couple of bucks.  The REAL Nano uses the FTDI chip

https://www.arduino.cc/en/uploads/Main/Arduino_Nano-Rev3.2-SCH.pdf

So did you solve the problem?

I told you I have the driver from manufacturer but still no board are known to IDE.

I am in Jordan and cannot buy like you, shipping costs makes it expensive so my only choice is China. I got those from Banggood.

Anyway, do you think that PICkit 3 USB cable is not suitable? is it "power only"?

I need a solution to using these, since there should be one assuming thousands of people using it.



Quote
As rstofer stated, you need a suitable driver for the WinChip serial chip to work.
http://www.wch.cn/download/CH341SER_EXE.html
This is the manufacturers official driver.

I tend to have less problems with WCH equipped Arduino clones then with FTDI (lots of counterfeit chips and FTDI drivers are painful).

Be aware that Windows 10 can be a real pain in regard to driver support. I rolled everything back to Windows 7 for my micro controller needs - but maybe things have changed meanwhile...

Because of not wanting to deal with driver issues on different machines I now use Atmega32u4 based boards for smaller projects (Leonardo, Pro Micro,...). It supports native USB and you do not have to f* around with driver issues.
Besides that I can highly suggest getting an ISP or using a working Arduino as ISP.

Kind regards,
Frederik

That is the driver I am using, and it is installed but still the IDE does not recognize anything.

I am using the Uno as ISP for now but definitely need a solution.

How about the pickit3 usb cable? this is the one i use and don;t have another one...can it be the case?

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #4 on: March 09, 2018, 07:02:55 pm »
That is the driver I am using, and it is installed but still the IDE does not recognize anything.

Did you check that Windows is actually using that driver instead of whatever Windows thinks should be the right driver?
He’s like a trained ape. Without the training.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #5 on: March 09, 2018, 07:15:49 pm »

So did you solve the problem?


Sure!  I didn't buy the boards.  I was only looking at them as they came up in an advertisement and they seemed like something I should have laying around.  I don't really need them.

If I decide to use the Nano form factor, I will buy legitimate boards and leave the clones with the CH340 chip to those who have the patience to deal with them.
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2251
  • Country: 00
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #6 on: March 09, 2018, 08:11:43 pm »
I have one that is not recognized on a single USB port but works on others. Haven't been able to fix it.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #7 on: March 09, 2018, 08:17:45 pm »
That is the driver I am using, and it is installed but still the IDE does not recognize anything.

Did you check that Windows is actually using that driver instead of whatever Windows thinks should be the right driver?

How?

I put the device in, then it shows that there is a driver. Then I uninstall that one. After that, I unplug it then  install the driver from manufacturer... after that I put the ftdi programmer\nano board again but the same problem happens.

Quote
I have one that is not recognized on a single USB port but works on others. Haven't been able to fix it.

I tried 2 ports but same thing, with nano and ftdi programmer for pro mini.

Quote
Sure!  I didn't buy the boards.

You solved the problem by never using them?   :scared: :scared:

I need to know if you solved the problem with CH340 chip and how you did it. I tried different stuff but never worked. what about the usb cable?

I asked here a lot about it but no one answered. Some guys online said some USB cables are for power only but not for data... maybe this is the case with PICKit3 cable? it is the one I use since I got no cables with these.

I hope to see if there are Chinese clones with working interfaces... if you know some.

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #8 on: March 09, 2018, 08:20:14 pm »
Under Windows 10 I think you need to disable driver signature enforcement. Otherwise you might be SOL.
Here are some pointers: Install unsigned drivers.

Same crap is going on on OS X since 10.11 by the way |O
He’s like a trained ape. Without the training.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #9 on: March 09, 2018, 08:27:12 pm »

You solved the problem by never using them?   :scared: :scared:

I need to know if you solved the problem with CH340 chip and how you did it. I tried different stuff but never worked. what about the usb cable?

I didn't buy the boards because I saw this same issue all over the Internet.  Why buy non-conforming clones when I can buy the real deal?

Quote

I asked here a lot about it but no one answered. Some guys online said some USB cables are for power only but not for data... maybe this is the case with PICKit3 cable? it is the one I use since I got no cables with these.

There are USB cables that provide power only, they are used for cell phone chargers.  I would think you would have some way to prove that your data cable passes data even if it is to another device.  Aren't you programming something else?  Does it use the same cable?  Mini vs micro...
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #10 on: March 09, 2018, 08:39:18 pm »
I hope to see if there are Chinese clones with working interfaces... if you know some.

If the Nano clones suffice for your needs, go for Pro Micro clones. As stated above, AtMega32u4 has native USB support and these just work instead of giving you headaches from driver issues. Should be about the same price! Highly recommended!
He’s like a trained ape. Without the training.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #11 on: March 09, 2018, 08:40:11 pm »
Under Windows 10 I think you need to disable driver signature enforcement. Otherwise you might be SOL.
Here are some pointers: Install unsigned drivers.

Same crap is going on on OS X since 10.11 by the way |O

I told you the drivers are installed, but I tried this way before I write the topic... nothing changed.

Quote
There are USB cables that provide power only, they are used for cell phone chargers.  I would think you would have some way to prove that your data cable passes data even if it is to another device.  Aren't you programming something else?  Does it use the same cable?  Mini vs micro...

This cable is for PICKit3 programmer and yes it works for it. My Uno has another cable which is not like this one (i guess type b or something). Now I am stuck, I need another 2 weeks before I could go to the market and find other cables.

This will be bad for me since I rely on Chinese clones for being so cheap. I bought around 5 of each one.

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #12 on: March 09, 2018, 08:53:20 pm »
Do you need USB / serial functionality for your project? Otherwise, programming via the working Arduino as ISP is a good option.
I can not tell you why the clones are not recognized, there is to much crap going on with Windows 10 that I never felt like adapting but just went back to Windows 7 - so I can just give you more general hints :/

Do you have a software firewall running? This might also cause issues.

Please also check the Device Manager when the Arduino is plugged in. It should at least show up, most likely with an exclamation mark stating "can not start device" or similar. If that is the case, uninstall driver from Device Manager, unplug the device, restart and plug the device back in.

Do you have anything connected to the Arduino pins? This might also interfere and you should disconnect sensors etc. for programming.
He’s like a trained ape. Without the training.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #13 on: March 09, 2018, 09:39:01 pm »
Do you need USB / serial functionality for your project? Otherwise, programming via the working Arduino as ISP is a good option.
I can not tell you why the clones are not recognized, there is to much crap going on with Windows 10 that I never felt like adapting but just went back to Windows 7 - so I can just give you more general hints :/

Do you have a software firewall running? This might also cause issues.

Please also check the Device Manager when the Arduino is plugged in. It should at least show up, most likely with an exclamation mark stating "can not start device" or similar. If that is the case, uninstall driver from Device Manager, unplug the device, restart and plug the device back in.

Do you have anything connected to the Arduino pins? This might also interfere and you should disconnect sensors etc. for programming.
So in Windows 7 does these CH340 stuff work fine?

The driver looks normal, it shows something like "CH340/com6" so it is not with ! or undefined. This is for the Nano, but for the FTDI programmer (connected to pro mini) it shows nothing but "com6" or something.

What about using some USBASP? I have used them before but not with windows 10 or arduino ide which is the way I want them now.

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #14 on: March 09, 2018, 09:45:05 pm »
I was just going to post that I've used Nano clones (CH340G) for a couple of years without any problems when I found that I couldn't program the one I'm using now!
(I'm running Windows 10 and using the WCH driver http://www.wch.cn/download/CH341SER_EXE.html as others have mentioned.)
I knew the serial port is working as the board had a serial comms program previously burnt on it.

After a bit of digging I found that the newer Arduino IDEs 1.8.4 &1.8.5 expect the AT328P in the Nano to have an updated Bootloader.
Selecting AT328P (Old Bootloader) under 'Processor' enabled uploading without problems and restored my sanity.
See https://forum.digikey.com/t/january-2018-arduino-nano-bootloader-update/1194 or https://www.arduino.cc/en/Guide/ArduinoNanofor details.

Jim
« Last Edit: March 09, 2018, 09:55:53 pm by jimmc »
 

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #15 on: March 09, 2018, 09:58:34 pm »
Well, that is strange. If the device manager shows a com port associated, it should work fine in the Arduino IDE. Sometimes you need to restart the IDE to make everything show up.

Regarding ISP / USBASP - this should work fine out of the box, but you never know with Chinese clones and I have reservations concerning Windows 10 as you can tell :) However, there are no real benefits I can see in comparison to the Arduino as ISP apart from convenience maybe.
I have been using the USBtinyISP from Adafruit for quite some time, but since it can not program the bigger Atmel chips such as Atmega2560, I bought a Diamex Prog-S2 and am very happy with it.

If you would like to have it, I can send you the USBtiny that is no longer in service.

Kind regards,
Frederik
He’s like a trained ape. Without the training.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #16 on: March 09, 2018, 10:20:44 pm »
I was just going to post that I've used Nano clones (CH340G) for a couple of years without any problems when I found that I couldn't program the one I'm using now!
(I'm running Windows 10 and using the WCH driver http://www.wch.cn/download/CH341SER_EXE.html as others have mentioned.)
I knew the serial port is working as the board had a serial comms program previously burnt on it.

After a bit of digging I found that the newer Arduino IDEs 1.8.4 &1.8.5 expect the AT328P in the Nano to have an updated Bootloader.
Selecting AT328P (Old Bootloader) under 'Processor' enabled uploading without problems and restored my sanity.
See https://forum.digikey.com/t/january-2018-arduino-nano-bootloader-update/1194 or https://www.arduino.cc/en/Guide/ArduinoNanofor details.

Jim

Thanks! this thing worked fine with Nano. However, we still have the Pro mini (and possibly the Uno clones, although they don't seem to have this)


Quote
Well, that is strange. If the device manager shows a com port associated, it should work fine in the Arduino IDE. Sometimes you need to restart the IDE to make everything show up.

Regarding ISP / USBASP - this should work fine out of the box, but you never know with Chinese clones and I have reservations concerning Windows 10 as you can tell :) However, there are no real benefits I can see in comparison to the Arduino as ISP apart from convenience maybe.
I have been using the USBtinyISP from Adafruit for quite some time, but since it can not program the bigger Atmel chips such as Atmega2560, I bought a Diamex Prog-S2 and am very happy with it.

If you would like to have it, I can send you the USBtiny that is no longer in service.

Kind regards,
Frederik
I have found a clone for the USBtinyISP:

https://www.banggood.com/USBtinyISP-AVR-ISP-Programmer-Bootloader-USB-Download-Interface-p-929287.html?rmmds=search&cur_warehouse=CN

I only need to program Arduinos not bare chips.. so I guess this will be enough?

Offline frozenfrogz

  • Frequent Contributor
  • **
  • Posts: 936
  • Country: de
  • Having fun with Arduino and Raspberry Pi
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #17 on: March 09, 2018, 10:29:11 pm »
I have found a clone for the USBtinyISP:

As I said, in case you want to give it a shot, I can send you the one I do not use anymore.
Just drop me a PN with your post address and I can mail it to you.
He’s like a trained ape. Without the training.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #18 on: March 09, 2018, 10:30:18 pm »
There is this one too but not so cheap: https://www.banggood.com/AT-AVRISP-AVR-ISP-mkII-In-System-Programmer-ATAVRISP2-AVRISPmkII-Compliant-p-1140507.html?rmmds=search&cur_warehouse=CN

Quote
As I said, in case you want to give it a shot, I can send you the one I do not use anymore.
Just drop me a PN with your post address and I can mail it to you.

That is so generous of you, really!

I will send you my info if you can send it.

Offline DLJ

  • Contributor
  • Posts: 24
  • Country: gb
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #19 on: March 09, 2018, 10:56:20 pm »
Just for Information.
I have a bunch of Nano's with the CH340 chip.
They work for me, with Arduino IDE and Win10 BUT I have had issues using ISP programmers with them. The pull up resister on the RST signal is a 1K resistor but This prevents my programmers from connecting to the ATMEGA. I changed the resistor to 10k and then the ISP programming was perfect.
My programmers are genuine ATMEL, a Dragon and an AVRISP markII.

In the ATMEL/microchip ISP programmer user guide they state "The Reset line should not have a pull-up stronger (i.e. smaller value) than 4.7k?. "
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42093-AVR-ISP-mkII_UserGuide.pdf

I hope you don't need this information, but now you know.:)

Have fun
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2251
  • Country: 00
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #20 on: March 09, 2018, 11:05:17 pm »
Cool!
 

Offline geekGee

  • Supporter
  • ****
  • Posts: 49
  • Country: bm
  • IT Veteran, EE Newbie
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #21 on: March 09, 2018, 11:33:39 pm »
I hit the issue with macOS 10.13 with a Nano and an Uno from Banggood.   I didn't like the status of the CH340 drivers for macOS so connected to it with Linux instead.  The driver was already in the kernel in Ubuntu 16.04.

If I recall, there was a free driver for up to 10.11 and a paid one for 10.13.  I never tried Windows.   

 
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3487
  • Country: us
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #22 on: March 09, 2018, 11:54:18 pm »
...
So in Windows 7 does these CH340 stuff work fine?
...

Yes.  From personal experience these CH340 NANOs works just fine under Windows 7 (64 bit) and Windows XP sp3 (32 bit).  I have at least 6 of those and so far I have no problem with any of them.  My Win7 is x64, it may work with 32bit Win 7, but I cannot attest to if x32 would work as well.

For both Win7/WinXP, the main issue I see with these CH340 is each instance is not unique in the windows registry, so the COM port number depends on which USB slot it is in and NOT which CH340 NANO actually plugged in.  Whereas, I can make my 3 UNOs unique and change the Windows Registry so UNO1 is always COM6 regardless of which USB slot is hosting it, UNO2 is always COM7, so on.  Can't do that with CH340.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12383
  • Country: au
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #23 on: March 10, 2018, 06:48:36 am »
...
So in Windows 7 does these CH340 stuff work fine?
...

Yes.  From personal experience these CH340 NANOs works just fine under Windows 7 (64 bit) and Windows XP sp3 (32 bit).  I have at least 6 of those and so far I have no problem with any of them.  My Win7 is x64, it may work with 32bit Win 7, but I cannot attest to if x32 would work as well.
I can attest to having the exact same experience.

Quote

For both Win7/WinXP, the main issue I see with these CH340 is each instance is not unique in the windows registry, so the COM port number depends on which USB slot it is in and NOT which CH340 NANO actually plugged in.
Again, my experience completely agrees.  Not only that, but there is consistency in assigning the same COM port to a particular USB port - even after reboots and through a USB hub.  So much so, that for a project I am working on, I labelled the USB hub I was using with the COM port number that would be assigned when I plugged in my NANOs with the CH340.  With that sorted, I was running 3 of my widgets into 3 instances of PuTTY at the same time, through the same USB hub, with no trouble whatsoever.

Quote
  Whereas, I can make my 3 UNOs unique and change the Windows Registry so UNO1 is always COM6 regardless of which USB slot is hosting it, UNO2 is always COM7, so on.  Can't do that with CH340.
Haven't tried that, so I can't comment.


In fact, having used Arduino compatible boards with the CH340, the only problem I had was at the very beginning when I had to work out that I needed to find a CH340 driver.  After that it was a breeze (if you exclude the occasional Arduino IDE hernia.)
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 2012
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: Problem with CH340 cheap Arduinos in Windows 10
« Reply #24 on: April 05, 2018, 11:25:42 pm »
Here is the video where I thank Fredrik for his help:


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf