Home > Projects > Clock – Timer Projects > Arduino on Internal Oscillator Crystal as Clock Source

Arduino on Internal Oscillator Crystal as Clock Source

Summary of Arduino on Internal Oscillator Crystal as Clock Source


Summary: This article explains how to build a minimal Arduino using an ATmega328P on a breadboard configured to run on its internal 8 MHz oscillator to save space and power. It covers installing breadboard hardware support in the Arduino IDE, burning the bootloader (or using a pre-bootloaded chip), and three programming methods: using an Arduino as ISP, using another Arduino via serial, or using an FTDI USB-to-serial adapter. It notes this setup is best for low-frequency, low-power projects.

Parts used in the Minimal Arduino on Breadboard:

  • ATmega328P microcontroller
  • Breadboard
  • FTDI USB-to-serial adapter (e.g., FT232RL breakout)
  • Male header pins (for FTDI board)
  • Wires/jumpers
  • Power source (USB 5V or battery)
  • Arduino board used as programmer (for ArduinoISP method)
  • AVR/Arduino IDE with breadboard hardware package (breadboard-1-x hardware folder)

Story

I have been working out ways to make a minimal Arduino to fit in the smallest space possible, and limit the power consumption of the microcontroller. (You can go through this project for more info about reducing power consumption at: Reducing Arduino Power Consumption). You can assume this one is an extended version of that project.

An Arduino consists of many components like linear regulator, USB to Serial microcontroller, debug LED, power LED, reset button, RX & TX LED, crystal oscillator, etc. But, a minimal circuit can have just the brain of the Arduino UNO that is, an ATmega328p microcontroller.

Making a Minimal Arduino UNO on Breadboard

Most people are successful in making Arduino with minimal circuitry, but use the 16 MHz crystal. We can remove that too, along with 22 pF capacitors. You can configure the ATmega328 to use its internal 8 MHz RC oscillator as a clock source.

Install Support for Hardware Configuration

  • Create a “hardware” sub-folder in your Arduino sketchbook folder (whose location you can find in the Arduino preferences dialog). If you’ve previously installed support for additional hardware configuration, you may already have a “hardware” folder in your sketchbook.
  • Move the breadboard folder from the zip archive to the “hardware” folder of your Arduino sketchbook.
  • Restart the Arduino software.
  • You should see “ATmega328 on a breadboard (8 MHz internal clock)” in the Tools > Board menu.

Once you’ve done this, you can burn the bootloader and upload programs onto your ATmega328.

Putting Stuff on Breadboard

Get all the stuff listed above in the list. Moreover, get a pin-mapping of the ATmega328P handy while making the circuit.

Using ATmega Without UNO Bootloader

First of all we need to burn the bootloader to the ATmega chip if you bought a blank microcontroller having no bootloader, so that it can be a programmable entity.

  • Refer to the schematics and place the ATmega chip in the breadboard.
  • Open the ArduinoISP firmware (in Examples) to your Arduino board.
  • Select the items in the Tools > Board and Serial Port menus that correspond to the board you are using as the programmer (not the board being programmed).
  • Upload the ArduinoISP sketch.
  • Select the item in the Tools > Board menu and be sure to select “ATmega328 on a breadboard (8 MHz internal clock)” when burning the bootloader.
  • Select the Arduino as ISP in the Tools>Programmer menu.
  • Use the Burn Boot-loader command in Tools menu.

Skip step 2 if you have done step 1.

2. Using ATmega with UNO boot-loader

If the ATmega is already boot-loaded, then, just put it in the breadboard and we can proceed for programming the ATmega328p microcontroller.

3. Programming the ATmega chip (using other Arduino)

  • Remove the microcontroller of the Arduino you are using as the programmer.
  • Refer to the schematics and pin mapping and connect the RX and TX of programmer Arduino to TX and RX of the breadboard Arduino respectively.
  • Connect RESET of programmer Arduino to RESET of breadboard Arduino.
  • Connect GND and VCC of breadboard Arduino to GND and VCC on programmer Arduino.
  • Select the item in the Tools > Board menu and be sure to select “ATmega328 on a breadboard (8 MHz internal clock)”.
  • Check the port and click on “upload”.

Plug out the the connections and now you can power it with a battery for months depending on your project kind.

4. Programming the ATmega chip (using FTDI USB to Serial adapter)

Curious what all the pin outs are for the FT232RL breakout board, just simply flip it over! In this situation I’ll be using VCC (to supply 5V from the USB port to your board), GND, TXD, and RXD. [Refer schematics]Schematic Arduino on Internal Oscillator Crystal as Clock Source

  • This board comes without the headers when bought from market. So, solder the male header and plug it in the breadboard.
  • Connect RX of ATmega chip to TX of board and TX of ATmega chip to RX of the board.
  • Connect VCC and GND to the power rails on the breadboard.
  • Plug the USB mini type – B and connect it with your computer and upload the sketch using the Arduino IDE but always remember to select “ATmega328 on a breadboard (8 MHz internal clock)”. It will take power from the USB but after disconnecting the USB, you can plug the battery terminals to the power rails of breadboard.

And the Arduino is ready.

Disclaimer: I would recommend you to make Arduino with internal 8 MHz clock only if your project doesn’t require many command lines to be executed in a very small interval of time. You can use them for projects which are small amount of work after some time repeatedly like water irrigation, solar tracker, etc.

For more detail: Arduino on Internal Oscillator Crystal as Clock Source

Quick Solutions to Questions related to Minimal Arduino on Breadboard:

  • How do I enable the 8 MHz internal clock board option in the Arduino IDE?
    Download the appropriate breadboard-1-x.zip, place the breadboard folder into the hardware subfolder of your sketchbook, and restart the Arduino IDE; the board option appears under Tools > Board.
  • Do I need a 16 MHz crystal to build this minimal Arduino?
    No, the ATmega328P can be configured to use its internal 8 MHz RC oscillator so the 16 MHz crystal and capacitors are not required.
  • How can I burn the bootloader to a blank ATmega328P?
    Upload the ArduinoISP sketch to an Arduino, select ATmega328 on a breadboard (8 MHz internal clock) in Tools > Board, choose Arduino as ISP in Tools > Programmer, then use Burn Bootloader.
  • Can I program the ATmega328P using another Arduino without a bootloader?
    Yes; remove the programmer Arduino's MCU, connect RX/TX, RESET, VCC, and GND between programmer and breadboard ATmega, select the breadboard 8 MHz board, and upload the sketch.
  • How do I program the ATmega328P using an FTDI USB-to-serial adapter?
    Solder header to the FTDI breakout, connect FTDI TX to ATmega RX and FTDI RX to ATmega TX, connect VCC and GND to power rails, plug USB and upload with the ATmega328 on a breadboard (8 MHz internal clock) board selected.
  • What power sources can be used for the minimal Arduino?
    It can be powered from USB (via FTDI) or from a battery connected to the breadboard power rails.
  • When should I use the internal 8 MHz clock instead of 16 MHz?
    Use the 8 MHz internal clock for projects that do not require high command execution speed and where low power and small size are priorities.
  • Is any additional circuitry required for RX/TX LEDs, reset button, or power LED?
    No, a truly minimal build omits the USB-to-serial MCU, LEDs, reset button, and linear regulator; only essential connections for the ATmega328P are used.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top