Tuesday, October 14, 2014

Ebay Arduino Pro Mini boards that are not...


 While purchasing the pressure sender in my last post i picked up two " Arduino Pro Mini compatible" boards for a few dollars each.
 When they turned up i did the usual print out a copy of a schematic and pin out i found on line... Hmmm... the pin out of the programming header on the end of the board is NOT the same as the standard Arduino Pro Mini. Its more like that of the Mini. So be careful. they are swapped end for end.
OK , power it up.. Yes ! , the led blinks like a bootloader loaded Arduino should.. Buttt.. it was blinking at 4 times per second and not once a second! Someone got the fuses or timer pre-scaler wrong.  Bugger.
( I have since found out that some people have been able to talk to the bootloader in this mode by changing the serial baud rate of the programmer.)

After a few hours i managed to get my SparkFun AVR Pocket Programmer to talk to the board using the below command lines.

avrdude -b 19200 -c usbtiny -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m

avrdude -b19200 -c usbtiny -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m

(ArduinoIDE 1.0.6 insists on trying to talk to the usbtiny via a com port when the new driver is pure usb. each time i want to use this programmer i have to edit the 'preferences.txt' file that in C:\Users\\AppData\Roaming\Arduino. Remove the 5 or so lines that start with "serial." and save the file.)
( I like others can only upload by selecting 'Upload using programmer' from in the file TAB, the Upload button (>) generates an error at the end of the upload script.)

I connected the programmer to the Pro Mini with jumper leads and pushed out a new bootloader for a 5v, 16meg M328P. All was good again. One second duty cycle on the LED Blink.

Next was to talk to the board with a cheapy CP2102 USB-2-Serial(TTL) board. I did the usual reading up other peoples past experience and got it working by adding a 1 uF cap from the DTR pin on the USB-2-serial board to the reset line on the Ebay Pro Mini.
After a few days i wanted to clean up the 5 mini jumper wires that everyone uses nowadays and make a 5 to 5 or 6 to 6 plug set. While considering how to get the reset trace of the Pro Mini to one of the pins along the end of the board i noticed the end pin on the Pro Mini is labeled "DTR" and not RST. Tracing the board with a meter found a 0.1 uF cap already on the PCB connected to the reset pin of the CPU !!! I think there are a lot of people out there using old info and spending wasted time getting the auto reset working on the newer Pro Mini boards.

Yellow arrow is DTR pin from the CP2102 board extended out inline with the other pins.
The green arrow shows the "DTR" text that indicated the capacitor is already on the board.
The red circle is a reminder that my Pro Mini goes TX, RX, VCC, Gnd from this view.

So, i now have a 5 to 5 header cable that runs between the two tiny boards. The DTR auto reset asserted by the avrdude software and within Arduino IDE works every time now.

Arduino IDE settings when using the CP2102 board:
  •        Board= "Arduino Pro or Pro mini"
  •        Serial Port =" Com 11"   ( your setting maybe different ) 
  •        Programmer= "AVRISP MKII"


Ebay MPXV7002 fault

Last week I purchased a MPXV7002DP air pressure sender from ebay for $14.
It did not work... It always showed 4.99 volts output and not ratio-metric centered at 2.5 volts. Someone has forgotten to ground pin 3 of the MPX.
Close inspection of the Ebay pictures of this and other sites shows a small plate through on the bottom of the PCB. The one i have does not even have a trace from pin 3.

The above photo is of what i think are the newer boards that should have pin 3 grounded via the plate through seen in the yellow area..

The easy fix for my unit is to scrape a little paint from the ground plane next to pin 3 and bridge it with solder. Red arrow below.
Location of my solder bridge to ground.


It works perfectly now.
I have notified the seller. Lets see what they say.


Welcome to my random ramblings and ideas blog.

I do some random things and find out stuff that others should find interesting.
Seeing that i go to the internet for help i think i should offer help that way as well.

There should be stuff in Electronics, camping, cooking, kids, cars..