Getting Started with Arduino Pro Mini

Reviewed by Editor: Jack Allison

HW Components:

Arduino/Funduino Pro Mini (ebay). It comes without programming related HW on it (as at other Arduino products), but pre-programmed with boot-loader. The boot-loader allows to upload new code to Arduino Pro mini without the use of an external smart hardware programmers, but just using different TTL RS232 to USB converters and Arduino IDE (which uses ATmel STK500 protocol).

PL-2303HXD USB to Serial Bridge Controller (ebay) is USB to RS232 auto-converter module (PL-2303HXD spec). Also (according to this video) devices like FTDI FT232RL (ebay) and USB to TTL UART Silicon Labs CP2102 (ebay) are useful for same purpose.

– USB extension cable (to make PC USB port closer to you on your table)

SW Components:

– IDE – Arduino IDE

– Blink Arduino example sketch. At Arduino IDE, use File\Examples1.Basic\Blink menu to open the sketch at the IDE

Step-by-step:

– connect the PL-2303HX converter to your Arduino as following

* Arduino TX -> PL’s RX

* Arduino TR -> PL’s TX

* Arduino GND (one of the two) -> PL’s  GND

* Arduino GND (another one) -> GND from 5V power supply (usually black)

* Arduino VCC (of Funduino VBUS) -> 5V power supply wire (usually red)

Note: You may have your Arduino working from the  PL-2303HX power pins, but this is not enough for your device programming. To program your sketch into your Arduino you have to have it connected to stable external DC power source. So, when programming/uploading, leave the 5V and 3V pins at PL-2303HX not connected to the Arduino power rails

Note: No additional load (except of that necessary fro programming) shall be applied on Arduino power rails during programming. So, you should separate the programming and the product activation stages: first program your Arduino and then test it in the final circuit with all the necessary connections to sensors, relays and so on.

IMG_20150508_062225

– Stup Arduino IDE with appropriate parameters:

* chose appropriate board by menu Tools\Board\Arduino Pro or Pro mini

* check Tools\Processor shows ATmega328 (5V, 16, MHz)

* using menu Tools\Port chose the Serial port (UART) on which programming will be performed. Once you connect  your PL-2303HX to your windows PC appropriate driver (from Prolific) should be found by Windows (no additional work should be needed).

* use default programmer: Tools\Programmer\AVRISP mkII

– For your own LED’s blinking rate… At the Arduino IDE, change the delays in the default Blink sketch (File\Examples1.Basic\Blink) to appropriate values in milliseconds

// the loop function runs over and over again forever

void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

– Use ‘Verify’ button to check the sketch still be compiling

– To Upload your sketch to your Arduino do the following:

* Click the Upload button and follow notifications at the IDE’s notification area

* You will see “Compiling sketch…” notification

* Wait ‘Uploading…’ notification appeared

* Shortly press and release (toggle) the ‘Reset’ HW button on your Arduino Pro Mini: the only available button. This should initiate the actual uploading.

* After few seconds you should see  ‘Done uploading’ notification. If process is going to fail you will wait for about minute or two and then you will get some failure notifications in alarming colors.

– If all  went well you will see the red LED blinking at the rate you have specified at the Sketch

– if NOT try to recover and to repeat the uploading.

Recovery: 

As to my understanding, with such a constellation as described at this page there may be problems with boot-loader or with Prolific driver.

For me the following recovery process always worked:

– Disconnect  Arduino from power and let its LEDs turn off

– disconnect the  PL-2303HX from the USB port so that it is also powered off

– Then, FIRST connect the Arduino back to power, let its led to blink few seconds and only after that connect the PL-2303HX back to the USB port.

– Usually after this process the upload suceeded.

I suspect, that  periodic failures may relate also to the length of the USB extension cable. So that if you still having things not working, try to use shorter cable or to manage without such a cable at all.

Related links:

Uploading Sketch to Arduino Pro mini using PL2303

Arduino Pro Mini – Uploading Skatches

Arduino Pro Mini – Description

 

One Comment:

  1. Pingback: Arduino: Self-switching corridor lamp | My Hobby of 'Making'

Comments are closed