Wednesday, March 9, 2016

Arduino Pro Mini Clones Part 2

Continuing my investigation of cheap Chinese knock offs of Sparkfun's Arduino Pro Mini design...

As mentioned in Part 1, I purchased one of each of what I called the Common, Two Row and Big Oscillator PCB designs.  Since Part 1 I went ahead and bought the other two common designs as well, the old and new Sparkfun designs.

Of course the first difficulty a novice will find when graduating to using pro mini clones is overcoming the lack of USB port.  Anticipating this I ordered the Two Row board as a package deal that came with three different kinds of USB to Serial converters: PL2303, CH340 and CP2102.

All three converters required drivers, found at the following sites (I was using a Mac, for other OSs you may have search around):

PL2303 - http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41
CH340 - http://www.wch.cn/downloads.php?name=pro&proid=5
CP2102 - https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

The wiring between any converter and board should be as follows:
5V to VCC
Ground to Ground
TX to RX
RX to TX

After loading up drivers and figuring out the correct wiring, the next problem I ran into was that all three of these USB converters have no support for automated resetting of the board during programming.  This results in an error while programming almost every time (I can't say why, but on the first try the program went through perfectly without any messing with reset, but later attempts almost always failed).

I started searching for the reason and was pretty disappointed by the level of detail in the answers (basically, answers were along the line of "reset before/during upload").  One suggestion was to turn on verbose output,
which I found helpful at slowing down the upload process, but I still couldn't figure out exactly when to press reset, whether to hold it for a little while or release immediately and so forth.  After a bit of trial and error I did get the timing figured out and I will post a video of the process so that it is perfectly clear how to get a good load.  Hopefully a video can save any intrepid readers that same trial and error, as pushing and releasing the reset button has a certain rhythm to it that works for me.

Once the timing was sorted out, the converters all work fine, and now that the drivers are loaded on my computer I could grab one indiscriminately when I want to load a sketch.

Ultimately, it should be noted that this is a super scrimp-and-save approach that led to extra headaches which an FTDI USB to serial converter would avoid for just a little more money spent, as the FTDI converters support automated resetting during sketch uploading.  After having so much fun figuring out how to use the others I went ahead and purchased an FT232RL FTDI USB to serial converter.  I intend to use it as my go-to programmer, allowing upload without this rhythmic button pushing nonsense.  It didn't need any drivers, though I use a Mac and I think I heard mention of needing drivers for windows.  Good luck finding them.

Finally, I did see some suggestions to solder headers to the 6 pins of the pro mini used in uploading, and while I agree that it is good engineering practice, I don't tend to have the patience for it.  I usually can still get a good load if I hold the header with the wires to the converter in contact with the board just so.  Your mileage may vary; break out the soldering iron if you think you need it.