Wednesday 15 January 2014

Configure Arduino UNO r3 whit ATMEGA8A-PU

What is Arduino

Today Arduino is probably the most popular controller board for hobbyist persons. You can run RGB led strips, servos, sensors and whatever you can think about for your home automation or just for fun. Opportunities are endless.

This clone boards from ebays are selling less then $10 and are very attractive to start whit if you are not sure if this type of engineering will work for you.


Chinese clone problem

After couple of days i finally have successfully run this clone whit old atmega8 chip. The problem whit this clone is that it will come whit preinstalled cheap atmega8 chip, and the arduino ide cannot see the board. The solution is to create custom board driver for this articular chip.


Add new the board driver

  • Download the Arduino environment
  • Connect the board
  • Install drivers for UNO, you can find more info on google or arduino web site 
    • linux ubuntu: 12.10+
sudo apt-get update && sudo apt-get install arduino arduino-core
    • windows: arduino web site
  • Open file /boards.txt
    • windows
C:/Program Files/arduino/hardware/arduino/boards.txt
    • linux (open protected file)
gksudo nautilus usr/share/arduino/hardware/arduino/boards.txt

or

gksudo gedit usr/share/arduino/hardware/arduino/boards.txt

  • Insert the code below AT THE END of the /boards.txt file and save it
##############################################################
# Custom board "Arduino Optiboot8"
# Arduino uno r3 ATMEGA8A-PU

opti8.name = Arduino Optiboot8

opti8.upload.protocol = Arduino
opti8.upload.maximum_size = 7680
opti8.upload.speed = 115200

opti8.bootloader.low_fuses = 0xBF
opti8.bootloader.high_fuses = 0xcc
opti8.bootloader.path = optiboot
opti8.bootloader.file = optiboot_atmega8.hex
opti8.bootloader.unlock_bits = 0x3F
opti8.bootloader.lock_bits = 0x0F

opti8.build.mcu = atmega8
opti8.build.f_cpu = 16000000L
opti8.build.core = arduino
opti8.build.variant = standard
  • Launch the Arduino ide
  • Select your board "Arduino Optiboot8"
Tools > Board > Arduino Optiboot8
  • Select your serial port. If there is no USB option on serial port or serial port is not available, you have problem whit your board driver
Tools > Serial Port > USB
  • Upload the test program

Conclusion

Whit some modification this clone board can run and do the job. If you need something more reliable i suggest you to buy genuine Arduino board, also this way you will support the creators of this amazing project.

Tested on Ubuntu 13.10 and Windows 7.

24 comments:

  1. Thank you so much for this!!! I have wasted so much time on this board but finaly it is working with your help.

    Graham.

    ReplyDelete
  2. Thanx also!

    ReplyDelete
  3. Also you need USB-RS232 driver if is a CH340 on board!
    http://www.winchiphead.com/download/CH341/CH341SER.ZIP

    ReplyDelete
  4. hello,
    win7 / 64bit does not go the uno r3 board with Optiboot8
    error configuration parameter "upload.tool"
    sorry I can not speak English

    ReplyDelete
    Replies
    1. Extra parameter needed for arduino-1.5.5

      opti8.upload.tool=avrdude

      Delete
  5. Thank you so much for posting this - huge help in getting this knock-off Funduino board working!

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Yep, I bought one of these ... the NG board selection seems to work as well ... then decided to grab a ATMEGA328p-pu from amazon (with UNO bootloader already on it < $6.00 US)... put it on ... now it thinks it's an UNO and most things work great ... only problem is that the ICSP connection is literally rotated 180 degrees so a standard Arduino shield that connects to the ICSP pins won't work (Ethernet, etc). BUT, if you do a little searching you'll find that if you connect the shield ICSP to other standard ports on the arduino it should work (and I've found it does with this board as well ... only problem is that there's not really enough room ... so some additional temporary headers on top of the arduino headers (so the shield sits higher) and it will work (was thinking maybe a prototype shield might help instead not sure there would be enough room though)

      Basically the connections are:

      ICSP Arduino (UNO Clone)
      1 D12
      2 5V
      3 D13
      4 D11
      5 D10 or RESET
      6 GND

      or, of course, you should be able to just connect to the correct pins on the ICSP on the clone too.

      Delete
    2. On Fedora for the "Arduino NG or older w/ ATmega8" to work I had to edit /etc/arduino/boards.txt and change baudrate from 19200 to 115200.
      BTW although I added the code mentioned above at the end of boards.txt there was no new boards in IDE menu.

      Delete
  7. THANKS!!! You save my board!

    ReplyDelete
  8. I LOVE YOU!!!
    This works great!

    ReplyDelete
  9. Hi,

    many thanks for reply, but I have not tried yet. i try this method next week (I will tell you if it works). At this moment i try to connect two arduino clone (dofly.net)with nrf24l01+ wireless transceiver, but it no works. Pin on clone (D8, D9, D10, etc) are the same on arduino made in Italy?

    thanks
    Giovanni

    ReplyDelete
  10. Awesome, so glad I could get it working. Thank you for passing this info along

    ReplyDelete
  11. thank you very much....its workkk !!!!!!

    ReplyDelete
  12. Thanks for the write up.

    ReplyDelete
  13. Thank you very much dude. You saved my life couse i bought 5 of them :)

    ReplyDelete
  14. thank you, thank you !!!
    Wonderful that you saved me few hours...

    ReplyDelete
  15. it not work for me! how can I do more?

    ReplyDelete
  16. Any idea how USBASP connector i wired, how does KEY_L i KEY_H work?

    ReplyDelete
    Replies
    1. KEY_L and _H : There are 2 Pins in the middle of the board, The buttons close short circuit betwwen thise pins and the GND pin.

      Delete
  17. thanks a lot guys, finally I could run my board. I had a big problem with drivers, I could find it on http://www.winchiphead.com/download/CH341/CH341SER.ZIP

    ReplyDelete
  18. You my good man are a legend! Thanks for your help

    ReplyDelete
  19. Happy to help guys, I wish this chinese replica was more easy to use

    ReplyDelete