Tuesday, September 29, 2015

Under $3 Chinese Arduino UNO compatible board

With UNO compatible boards selling for under $3 on AliExpress, I decided to order one.  Some people might think you're only going to get cheap crap for that price, but in some ways it is even better than the original Arduino UNO R3.

Some boards can be found with a microUSB connector, but I prefer the full-size connector since it is much more robust, and I have half a drawer full of the old cables with no more use for them.   One thing that could be better on the board is the choice of USB-ttl chip.  It uses the CH340G chip, which, depending on your OS, can be problematic when it comes to drivers.  Prolific and FTDI have both done some nasty things with their drivers to deal with clone chips, so I wouldn't recommend either of them.  The Silicon Labs CP2102 would probably be my first choice.

The board arrived with the female headers and ICSP header already soldered on.  The vendor could have done a better job with the packing, as the ICSP header pins were bent (though easily straightened out).  The red power LED, like many other boards I've seen, is a little bright for my liking.  It uses a 1K SMD current limiting resistor, which I may replace if it gets too annoying.

There's a part by the ICSP header that I haven't been able to identify, that looks like some kind of diode.  It is in parallel with the adjacent 10K reset pullup resistor.  If anyone knows what it is, drop a line in the comments.  The board uses a 16Mhz SMD resonator to clock the ATmega328p, and strangely also has a couple of (22pf?) loading capacitors.  While crystal oscillators usually require loading capacitors, ceramic resonators do not.  A quick frequency check by toggling a pin at 2Hz confirmed it is clocked slow.  With the frequency counter on my multimeter I measured 1.984Hz, or 0.8% slow.

To make a more exact frequency measurement, I used my Rigol 1054z to probe the oscillator pins, and measured 15.8537, or 0.9% slow.  I then decided to remove the caps.  I have a hot air gun, but was concerned the heat could damage the SMD oscillator.  Instead I used the 2 soldering-iron technique to heat both ends of the SMD capacitors and remove them.  With the caps removed, the frequency measured 15.9410Mhz, or 0.4% slow, within the +- 0.5% typical rating of ceramic resonators.

I think the board is well worth 268c price, for someone starting out with AVR MCUs I think one of the Nano clones is a better idea.  For less than $2 you get a board that is simpler to use with a breadboard than a full-size UNO.

11 comments:

  1. The diode connected from reset to Vcc is to clamp any voltage greater then Vcc which can happen with the Arduino auto-reset pulse. This can lead to some very strange output pin behavior. The chip can be placed into high voltage programming mode but not fully. It's a wierd bug that most never see but the diode (added in Uno rev3) prevents the root cause.

    ReplyDelete
    Replies
    1. Thanks. It's an odd looking SMD diode; not like other ones I've seen. Not sure how a 5V transition on DTR would induce more than 5V across the auto-reset cap, but transients can be a tricky thing.

      Delete
    2. Thought about this some more, and if the DTR line is initially low, there will be 5V on the Rst side of the cap and 0V on the DTR side. When DTR is brought high, there will be a 5V pulse imposed on the 5V on the Rst side, bringing the voltage temporarily up to 10V. While the datasheet says 11.5-12.5V on the RST line will put the chip into HV programming mode, it doesn't say that 10 or 10.5V won't. If the typical threshold is around 10.4V, people with a USB voltage of 5.2V would see the problem, but those with 5.1V would not. Although the USB spec permits up to 5.25V, I've never measured a desktop computer or laptop USB port that put out more than 5.1V.
      None of the Pro Minis I've looked at have the reset clamping diode, so this would be yet another reason to use my zero-wire auto-reset circuit.
      http://nerdralph.blogspot.ca/2014/02/zero-wire-serial-auto-reset-for-arduino.html

      Delete
  2. I don't have anything intelligent to add, but I would like to say thanks for your blog, and especially your recent interesting reviews of dirt cheap electronics parts!

    ReplyDelete
    Replies
    1. Thanks for the feedback. I'm working on a review of a $2 esp8266 4MB module that I hope to finish later today...

      Delete
  3. Hi Ralph, I have been following your blog for quite some time now, enjoying your in-depth analysis of Arduino related electronics.

    I have a couple of these 3$ Uno R3 replacements and assumed they can be used like the original ones (of which I also own a bunch of). Unluckily I have problems using them with NRF24 modules. They just don't work as fine, usually they can't receive anything. With my limited knowledge and equipment I found out that the MISO line transmits much longer compared to on an original Arduino, in case it works at all. Mostly it doesn't.

    ReplyDelete
    Replies
    1. Current-limiting resistors on any of the SPI lines could attenuate high speed signals enough to cause problems. I pulled out my board again and measured 0 ohms between the ATmega328 pin and the SPI lines on the ICSP header. Another possibility is the red LED on PB5/SCK (pin 13). The voltage drop across the red LED is around 1.8V and with just a 1K series resistor, the rise time on the SCK line will be slower than boards that use a blue LED (Vf of 2.5-3V) or those that use a larger series resistor.

      Delete
  4. CH340G: the linux driver still lacks support for multiple baud rates (a patch is floating around, cnx-software.com had an article on it), and the OSX driver is a pain to install, requiring some reboot in unsigned mode.

    ReplyDelete
    Replies
    1. Do you mean the Linux driver doesn't support custom baud rates? Although I haven't tested it myself, I've seen posts from people that seem to show the 340g working at 9600, 57,600 and 115,200bps. I also seem to recall someone testing it with android/linux using USB OTG.

      Delete
  5. Hi, Ralph, I have the Same board. It's not working currently, So I was looking to flash my ATmega16u2 chip onboard. Can you show me where are the ICSP header pins located on the board?
    It is urgent. Pls reply as soon as you can .
    Thanks, in advance.

    ReplyDelete
    Replies
    1. The ICSP header has the letters "ICSP" in white silkscreen beside it.

      Delete