Introduction: Breadboard Arduino 3.3v
I wanted to use bare Atmega 328p chip at 3.3 volts with an internal clock at 8MHz for small and compact projects. After some research on the net, I was able to retrieve all the informations to make it work.
Here are the steps to follow.
-First, hack the IDE with a new Bootloader option.
-Second, upload an ISP sketch in the programming Arduino.
-Third, wire everything together.
-Finally, load the new bootloader and sketch in the bare chip.
What you need:
-Arduino Uno or any other type of board will do (pro mini, Due, ect...)
-Atmega 328p chip ( available on ebay)
-Breadboard
-Dupont wire.
That's it !
Step 1: Hack Your IDE With a New Bootloader.
What's a bootloader??
It's a small program included in all micro-controller (Arduino chip) to set it's basic working parameter. Example: communication speed, accessible memory, minimum working voltage.
This code will allow us to use the Atmega 328p chip at 3.3volt without external clock to set it's speed.
First we need to find the file board.txt in the Arduino folder. (the one in program file/Arduino/hardware/ for windows or usr/share/arduino/hardware for Ubuntu). Depending on the software version, this file can be in different folder. Once you find it, do a backup of this folder in case thing goes wrong.
Step 2: Bootloader File
Next, open the file to see all the Arduino boards with weird settings. Just go to the last line of the file and copy/paste this script:
For Arduino IDE Version 1.6.0
########################################################### uno3-3v.name=Arduino/3.3volt 8MHz internal uno3-3v.vid.0=0x2341 uno3-3v.vid.0=0x0043 uno3-3v.vid.0=0x2341 uno3-3v.vid.0=0x0001 uno3-3v.upload.tool=avrdude uno3-3v.upload.protocol=arduino uno3-3v.upload.maximum_size=32256 uno3-3v.upload.maximum_data_size=2048 uno3-3v.upload.speed=115200 uno3-3v.bootloader.tool=avrdude uno3-3v.bootloader.low_fuses=0xE2 uno3-3v.bootloader.high_fuses=0xDE uno3-3v.bootloader.extended_fuses=0x06 uno3-3v.bootloader.unlock_bits=0x3F uno3-3v.bootloader.lock_bits=0x0F uno3-3v.bootloader.file=optiboot/optiboot_atmega328.hex uno3-3v.build.mcu=atmega328p uno3-3v.build.f_cpu=8000000L uno3-3v.build.board=AVR_UNO uno3-3v.build.core=arduino uno3-3v.build.variant=standard
Now save and your done.
Step 3: Transform Your Arduino Into an ISP Programmer
To communicate with the Atmega328p chip, you need a programmer. You can use any Arduino Uno board to do that with this sketch:
https://github.com/adafruit/ArduinoISP
Download it and save it as ArduinoISPII.ino in your sketchbook.
You will see that there's already one ArduinoISP.ino in the example menu of your IDE. The one I gave you up here works better in my opinion!
Don’t forget to upload the sketch in your Arduino Uno board.
Step 4: Wiring the Board and Chip Together
Clip the Atmega328p chip on a breadboard and using dupont wire, connect the following pin together:
Arduino Board----------------------------Atmega328p
5volt----------------------------------------Pin 7 (vcc) and Pin 20 (Avcc)
GND---------------------------------------Pin 8 (gnd) and Pin 22 (gnd)
D10----------------------------------------Pin 1 (RST)
D11----------------------------------------Pin 17 (MOSI)
D12----------------------------------------Pin 18 (MISO)
D13----------------------------------------Pin 19 (SCK)
Be careful to connect the good Pins together. A mistake could damage the chip or your board Permanently. :-(
Step 5: Bootloading the Atmega328p Chip.
The ISP program is in your Arduino and the chip is connected, you are now ready to program it!
First you need to set the IDE with special settings:
In the Tools menu, go in Board and select -- Arduino/3.3volt 8MHz internal
******** the option you added in step 2 ********
In the Tools menu, go in Programmer and select -- Arduino as ISP
Now the IDE is set .
In the Tools menu again, click on Burn Bootloader
This step take a few minutes. When it's done you will see this message:
Done burning bootloader
Success, you've done it..
Step 6: Uploading Your Sketch in the Atmega328p Chip.
Leave the IDE with the same configuration
( Programmer -- Arduino as ISP / Board --Arduino/3.3volt 8MHz internal)
Open a sketch: Blink for example.
To use the board as a programmer, you need to press SHIFT on the keyboard as you click on Upload to send the sketch to the chip. Otherwise it will not work ( you'll see Upload Using Programmer near the Save button)
This setup is useful to use with display like the Nokia 3310/5110 or a TFT display who work on 3.3 volt.
Hope this post will be useful to some of you. By the way I'm French Canadian so excuse me if I made some mistake!!!