Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Passive Components
  4. ›Crystals and Oscillators

Component guide · Intermediate · 3 min read

Crystals and Oscillators

How Microcontrollers Keep Time

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerCrystal, resonator or oscillator?Choosing load capacitorsWiring and layout tipsWhy accuracy mattersTry itCommon mistakesFAQsParts and next steps
Short answer

A quartz crystal vibrates at a precise frequency and, with the microcontroller's built-in oscillator circuit and two small load capacitors, sets its clock. A 16 MHz crystal with two 22 pF capacitors runs an ATmega328P, and a 32.768 kHz watch crystal keeps real-time clocks accurate. Ceramic resonators are cheaper but less accurate; oscillator modules contain the whole circuit and output a ready clock signal.

Key specs at a glance

Common values
8, 12, 16, 20, 25 MHz; 32.768 kHz for clocks
Accuracy
Crystal ±10 to 50 ppm; ceramic resonator about ±0.5%
Load capacitance
Specified per crystal, often 12 to 20 pF
Load capacitors
About 2 x (CL - stray), typically 18 to 22 pF for 16 MHz
Packages
HC-49 (through hole), SMD 3225/2520, cylinder (32.768 kHz)
Oscillator module
4 pins: VCC, GND, OUT, enable
01

Crystal, resonator or oscillator?

PartPinsAccuracyNeedsUse
Quartz crystal2±10 to 50 ppmTwo load capacitors + chip's oscillatorMost microcontroller clocks, USB
Ceramic resonator3 (built-in caps) or 2About ±0.5%Nothing else (3-pin types)Cheap Arduino clones, non-critical timing
Oscillator module (XO)4±25 to 100 ppmPowerFPGAs, clock for several chips
TCXO4±0.5 to 2 ppmPowerGPS, RF, precision timekeeping (DS3231 has one built in)
Quartz crystal
Pins:
2
Accuracy:
±10 to 50 ppm
Needs:
Two load capacitors + chip's oscillator
Use:
Most microcontroller clocks, USB
Ceramic resonator
Pins:
3 (built-in caps) or 2
Accuracy:
About ±0.5%
Needs:
Nothing else (3-pin types)
Use:
Cheap Arduino clones, non-critical timing
Oscillator module (XO)
Pins:
4
Accuracy:
±25 to 100 ppm
Needs:
Power
Use:
FPGAs, clock for several chips
TCXO
Pins:
4
Accuracy:
±0.5 to 2 ppm
Needs:
Power
Use:
GPS, RF, precision timekeeping (DS3231 has one built in)
02

Choosing load capacitors

The crystal datasheet gives its load capacitance (CL). The two capacitors in series, plus stray board capacitance (about 2 to 5 pF), must equal it: C1 = C2 ≈ 2 x (CL - Cstray). For a 16 MHz crystal with CL = 18 pF and 4 pF stray, that is 2 x 14 = 28 pF; designs often use 22 pF, which runs slightly fast but well within tolerance for most uses. Wrong values shift frequency slightly or, if far off, stop the oscillator starting.

03

Wiring and layout tips

  • ✓Place the crystal and capacitors as close to the chip's XTAL pins as possible, with short traces.
  • ✓Connect the capacitors' ground ends to a solid ground right next to the chip.
  • ✓Keep fast digital signals and switching regulators away from the crystal.
  • ✓On a breadboard, a bare ATmega328P with a 16 MHz crystal and 22 pF capacitors usually works, but the extra capacitance can make high-frequency crystals unreliable; keep leads short.
  • ✓32.768 kHz crystals are delicate and low power: never probe them with a normal oscilloscope probe, which stops or shifts the oscillation.
04

Why accuracy matters

Serial communication tolerates about ±2% clock error, so a ceramic resonator is fine for UART. USB needs ±0.25% or better, so USB chips need crystals. Real-time clocks need parts-per-million accuracy: 20 ppm is about 52 seconds a month, which is why the DS3231, with a temperature-compensated oscillator, keeps much better time than a DS1307 with a plain crystal. Wi-Fi and Bluetooth chips also depend on accurate crystals.

05

Try it: Capacitor code calculator

Change the values and the diagram and results update as you type.

06

Common mistakes to avoid

  • !Leaving out the load capacitors.
  • !Using capacitors far from the crystal's specified load.
  • !Long breadboard leads on a 16 MHz or faster crystal.
  • !Probing a 32.768 kHz crystal and stopping it.
  • !Expecting a resonator-clocked board to keep accurate time.
07

Frequently asked questions

Why does Arduino use a 16 MHz crystal?

The ATmega328P is rated up to 20 MHz at 5 V, and 16 MHz gives exact timing for common baud rates and Arduino's timing functions. Many clones use a cheaper 16 MHz ceramic resonator instead.

What capacitors go with a 16 MHz crystal?

Usually two 22 pF ceramic capacitors from each crystal pin to ground. Check the crystal's load capacitance for the exact value.

What is a 32.768 kHz crystal used for?

Timekeeping. 32,768 is 2 to the 15th power, so a simple counter divides it to exactly one pulse per second.

What is the difference between a crystal and an oscillator?

A crystal is a passive resonator that needs an oscillator circuit (usually inside the microcontroller). An oscillator module contains the crystal and circuit and outputs a clock signal.

Can I run an ATmega328P without a crystal?

Yes, on its internal 8 MHz oscillator, which is less accurate (about ±1 to 10%) but fine for many tasks. Set the fuses and use a matching board definition.

Parts for this guide

  • Crystal Oscillator HC-49 (Pack of 5)
    ₹36View
  • Ceramic Disc Capacitor
    ₹17View
  • DS3231 Precision RTC Module with EEPROM
    ₹269View
Shop Crystals & Oscillators

Calculators

Capacitor code calculatorLC resonance calculator

Terms in this guide

FrequencyHow many times per second a signal repeats, measured in hertz (Hz). 1 kHz is 1000 cycles per second.ppmParts per million. Used for gas concentration (outdoor CO2 is about 420 ppm) and for frequency accuracy: a 20 ppm crystal can drift about 1.7 seconds a day.CapacitanceA capacitor's ability to store charge, measured in farads (F); hobby parts are usually in pF, nF or µF.MicrocontrollerA single chip with a processor, memory and input/output pins that runs one program, such as the ATmega328P or ESP32.UARTUniversal asynchronous receiver-transmitter: two-wire serial (TX and RX) used by GPS, Bluetooth modules and debug output.

Projects that use it

Put this into practice: 1 step-by-step build in our project library uses parts from this guide.

Intermediate · 2 hoursProgram a bare AVR microcontroller on a breadboard with Arduino as ISPView project
Browse all 1 project

Keep learning

ComparisonBeginnerDS3231 vs DS1307 Real-Time Clock ModulesA real-time clock module keeps the date and time running from a coin cell while your project is off.3 min read · Semiconductors & ICsComponent guideBeginnerCapacitors ExplainedA capacitor stores electric charge and releases it quickly, which lets it smooth power supplies, filter noise and set timing.3 min read · Passive ComponentsComponent guideBeginnerArduino UnoThe Arduino Uno is a beginner-friendly microcontroller board that reads sensors and controls LEDs, motors and relays using simple C++ programs called sketches.5 min read · Boards & MicrocontrollersComponent guideIntermediateInductors ExplainedAn inductor is a coil of wire that stores energy in a magnetic field and resists changes in current.3 min read · Passive Components

Sources

  • Microchip ATmega328P datasheet, clock sources chapter
  • Crystal manufacturer application notes on load capacitance (Abracon, ECS)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerCrystal, resonator or oscillator?Choosing load capacitorsWiring and layout tipsWhy accuracy mattersTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide3 items · ₹322

Crystal Oscillator HC-49 (Pack of 5) · Ceramic Disc Capacitor · DS3231 Precision RTC Module with EEPROM

Ask the Community

Ask a question