Showing posts with label Mini. Show all posts
Showing posts with label Mini. Show all posts

Tuesday, January 14, 2014

Programming the Arduino Pro Mini 16MHz 5V using a USB serial adaptor


Yesterday I soldered up my Arduino Pro Mini compatible board - http://winkleink.blogspot.co.uk/2014/01/soldering-up-pro-mini-arduino.html

Today I wanted to figure out how to program it.

As I have made some bare bones Arduino compatibles using the Shrimp details from Morecombe Makers http://shrimping.it/blog/shrimp/ I've done some programming using serial and I know the USB serial adaptor I have works for raw programming.It's uses on the CP2102 chip.

A really useful thing with the board I have is that it has the DTR pin which can used to reset the Arduino and put it into programming mode.

USB Serial - pin out the side is DTR (essential)

I also know the USB board I have being a very cheap board has the TX and RX labelled wrongly as the standard is to cross over the wires. TX-RX and RX-TX but my one is a direct connection TX-TX and RX-RX.

With great confidence and knowing to wire from USB to Arduino as TX to TX and RX to RX, GND to GND, 5V to VCC and DTR to RST (to do the reset needed)

In the IDE I selected Arduino Duemilanove w/ ATmega328 as per the Arduino site http://arduino.cc/en/Guide/ArduinoProMini

With everything correctly setup I uploaded a modified version of Blink so I can see the difference between the pre-programmed Blink.

It failed. No error message, it just didn't upload.

So, began the usual Google hunt and after looking at a bunch of pages detailing programming the boards using another Arduino I came across this YouTube video with the essential nugget of information that on the Arduino Pro Mini there is a pin on the right angle header labelled GRN in the corner next to the TX pin. I had no idea what it was so in the true hacker tradition I ignored it.  Ends up it's essential as this is where DTR needs to be connected as it is a Reset line but with the required capacitor to hold the reset long enough for the programmer to engage.  The video also gives extra details on different programmers and is well worth a watch..
Note: The video mentions that you could use the DTR or RST lines on the USB adaptor connected to GRN.  For me with my serial adaptor only DTR worked. RST on the USB adaptor did not work for putting the Arduino into programming mode.


Once the DTR line was connected to the GRN pin on the Arduino Pro Mini it programmed perfectly.

All wired up and working. The big breadboard is only
there to make it king of level

Now I have the board all soldered up I have to figure out something to do with it.maybe involving the capacitive touch pads I bought recently.




Soldering up Pro Mini Arduino compatible board bought from eBay

UPDATE: Link to blog post on programming the board using a CP2012 USB serial adaptor http://winkleink.blogspot.co.uk/2014/01/programming-arduino-pro-mini-16mhz-5v.html

I bought 2 Pro Mini Arduino Compatible boards from eBay (UK) at £2.15 each including shipping.

They are effectively functionally the same as an Arduino Uno but designed to be plugged into a breadboard. It came with male headers for both sides to go under the board to plug into the breadboard and a right angle connection for the serial connection at one end. If you look closely there are 2 pins (holes) at the bottom just above the main row for Analogue 4 & 5. Also, the near end has Analogue 6 and 7 as well as what I think are V++ and GND.
I decided that rather than leaving these pins disconnected  would add 3 x 2 pin female headers on the top of the board. So, I bought a bunch of headers from eBay for £1.84. It looks like they have gone up to about £2.64. Still for 10 x 40 male and female headers it’s still cheap.


Add a breadboard and some wires and you have a great prototyping setup.

These are nice little board with some strange design decisions like the 2 x 2 pin headers on the end and the 2 pins for A4 and A5. But by using the female headers it gets around these things. The alternative is to not include A4 and A5 if you don't need all 6 analogue inputs.

Here are some pictures from the build with comments.

Bits that came in the eBay order

Creating 2 pin female headers from 40 pin header

Snap off pins. 3rd will fall out. Clean up the edges to fit

3 x 2 pin female headers inserted in the top

3 x 2 pin headers from the bottom for soldering

3 x 2 pin headers soldered up and
right angle serial header in place for soldering

All soldered up and ready to be used

As a side note I also purchased a Leonardo Pro Micro ATmega32U4 Arduino for £3.30