How do I program this Arduino Pro Mini with this CH340G USB?

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just got this Arduino Pro Mini clone for a low cost project, along with this CH340G USB TTL. But when it arrived, I was surprised to find there were no Reset/DTR pins. The CH340G comes with a jumper as well to select voltage for the arduino. (I have no idea how to connect the jumper)

 

How is programming going to work without the Reset and DTR pins? Could you please help me connect the two devices properly? Thank you!

This topic has a solution.

Last Edited: Fri. Dec 4, 2015 - 10:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like the vendor has incorrectly substituted an unsuitable CH340 device. I would ask for a replacement or refund.

 

Possibly if you press Reset at just the right time it might work, but a lot easier with the right adapter. They only cost a few dollars.

 

You might be able to find the DTR pin on the chip and solder a wire directly to it. Data sheet here https://www.olimex.com/Products/...

Bob. Engineer and trainee Rocket Scientist.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Life is much simpler with a $3 NANO.    The USB socket is part of the board.

Yes,  the cheapo NANOs use a CH340G chip for the USB->UART comms.   It works just fine.   i.e. it has its own DTR capacitor to start the Bootloader.

 

Since you have got the separate Pro-Mini and USB adapter,   you will have to press the Reset button on the Pro-Mini by hand.

You can power the Pro-Mini via the USB adapter.   i.e. connect 5V, GND, RXD, TXD.

 

IMHO,   you are better off with an ISP programmer for a Pro-Mini.    After all,   there is no onboard UART-USB comms.

 

David.

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The DTR pin is the one in the corner marked BLK.  The reset capacitor is above the pin marked RAW.  Unless they are reversed and the hole that is actually closer to the tiny capacitor is the DTR.  Sometimes these Arduino clones have the header pattern of holes reversed, sometimes the silkscreen is reversed, and sometimes they're all correct.  Check the connections with a voltmeter's continuity_checker/beeper.

 

The USB - serial converter does not appear to have brought out the DTR pin from the CH340G  (verify that it actually is a CH340G).

'Chinese documentation' is one of those oxymorons like 'military intelligence', 'jumbo shrimp', or  'Kennedy School of Government'.  There may be a different USB-serial IC on the other side of the USB board. 

 

To use this USB, you need to make a jump between the tiny pin on the CH340G and the via hole for DTR on the Pro Mini.  Use AWG30 gauge (wire-wrap) sized wire and a fine-tip iron.   Google for the pin out of the 16-pin version of the CH340G (which is used on almost all the USB devices and isn't covered in the datasheet.  ChnDoc again.

Last Edited: Sun. Oct 4, 2015 - 12:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This looks like the same device https://www.google.co.uk/url?sa=...

 

Pinout for 16 pin device : http://hackaday.com/2014/12/02/f...

 

While there are many CH340 variants that do bring out DTR, I have seen several without while also claiming "compatible with Arduino mini", when it clearly isn't. There is one vendor who even when told it is incompatible says "the buyers are wrong!".

Bob. Engineer and trainee Rocket Scientist.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very few USB->UART adapters provide a DTR signal.
It has become an "Arduino" selling point. I chose an adapter purely on this capability.

Ebay vendors learned some years ago to add the magic "Arduino" word to every advert. Sometimes it is true. Often it is complete rubbish.

In this case, you just have to press the Reset button by hand when you want to use the bootloader. i.e. much the same as any other bootloader in the world, you need to set a special condition. It was the introduction of the DTR capacitor to the Arduino design that made the upload operation human-friendly.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you very much! Pressing and holding the Reset button while compiling worked like a charm! It's a bit awkward, pressing and releasing at the right times, but it does the job. smiley

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

remember that for arduino reset you can use DTR but also RTS, so the adapter that have RTS pin is also good for the job

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Very few USB->UART adapters provide a DTR signal.
The CH340T has DTR but the Olimex CH340T break-out does not have DTR on the connector.

A search on Aliexpress for CH340T might result in joy.

https://www.olimex.com/Products/Breadboarding/BB-CH340T/open-source-hardware

Oops!  donotdespisethesnake beat me to CH340T.

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Nov 5, 2015 - 02:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had the same problem before and I thought it would be useful to explain the solution step by step for beginners:

 

1- I did not use the jumper. Remove it.

2- Connect the pins in the "USB2TTL" and "Arduino" as follows:

     usb2ttl              arduino

     GND <--------> GND

     RXD <--------> TXD

     TXD <---------> RXD

     3.3V <-------- > VCC

 My arduino was designed to use 3.3 V. That is why I have connected 3.3V pin to VCC. It is worth mentioning that in some designs of usb2ttl, you need to connect RXD to RXD and TXD to TXD (See

http://electronics.stackexchange...

for more details).

 

3-In Ubuntu 14.04 you do not need any driver for the usb2ttl. However, if you try to upload your code to the arduino, you will face to an error about permission. You can fix it by adding you user to the dialout group. See:

https://www.youtube.com/watch?v=...

 

4- Once you have done this, just upload your code. Remember to press the Reset button on Arduino when you are uploading your code.

 

Done!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
Very few USB->UART adapters provide a DTR signal.
Seeed has two CH340 products both of which have the DTR signal :

  • CH340T chip
  • CH340G module

Mouser and Digi-Key are distributors though neither has the CH340G module currently in-stock; neither stock the CH340T chip.

Mouser does have the mega328P plus CH340 combination in-stock (Seeed Studio Seeeduino Lotus).

The Seeed product wiki describes how to connect the CH340G module to the Seed mega328 plus WIZnet 5100 (Ethernet) board with instructions for Linux, OS X, and Windows.


Seeed

Search Results for "ch340"

http://www.seeedstudio.com/depot/s/ch340.html?search_in_description=0

http://www.mouser.com/search/ProductDetail.aspx?R=0virtualkey0virtualkey317990026 

http://www.digikey.com/product-search/en?keywords=317990026

http://www.mouser.com/new/seeedstudio/seeed-studio-seeeduino-lotus/

Seeed

Wiki

USB To Uart ...

http://www.seeedstudio.com/wiki/USB_To_Uart_5V/3V3

http://www.seeedstudio.com/wiki/USB_To_Uart_5V

http://www.seeedstudio.com/wiki/USB_To_Uart_3V3

(Note : What's on the wiki does not match what's sold.)

 Edit : wiki mis-match.

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Dec 11, 2015 - 05:33 AM