Electronics notes/frequency generation

From Helpful
Jump to navigation Jump to search

⚠ This is for beginners and very much by a beginner / hobbyist

It's intended to get an intuitive overview for hobbyist needs. It may get you started, but to be able to do anything remotely clever, follow a proper course or read a good book.

Some basics and reference: Volts, amps, energy, power · batteries · resistors · transistors · fuses · diodes · capacitors · inductors and transformers · ground

Slightly less basic: amplifier notes · varistors · changing voltage · baluns · frequency generation · Transmission lines · skin effect

And some more applied stuff:

IO: Input and output pins · wired local IO · wired local-ish IO · ·  Various wireless · 802.11 (WiFi) · cell phone

Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Noise stuff: Stray signals and noise · sound-related noise names · electronic non-coupled noise names · electronic coupled noise · ground loop · strategies to avoid coupled noise · Sampling, reproduction, and transmission distortions

Audio notes: See avnotes

Platform specific

Arduino and AVR notes · (Ethernet)
Microcontroller and computer platforms ··· ESP series notes · STM32 series notes

Less sorted: Ground · device voltage and impedance (+ audio-specific) · electricity and humans · power supply considerations · Common terms, useful basics, soldering · landline phones · pulse modulation · signal reflection · Project boxes · resource metering · SDR · PLL · vacuum tubes · Multimeter notes Unsorted stuff

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer ·

See also Category:Electronics.

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Frequency generation, loosely:

  • harmonic/linear, oscillator (waveform like a sine wave) [1]
  • relaxation oscillator (waveform like a sawtooth) [2]

  • Low-Frequency Oscillator (LFO) - designs that generates a waveform below ~20 Hz. Used in synthesizers and such.
  • Surface acoustic wave (SAW) oscillators - quartz crystals that achieve higher frequencies though a standing-wave construction. More expensive, but necessary for devices that
    • frequency tolerance: on the order of 0.0001

Clock signals

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Clock signals refer to relatively hard, squarewave flip-flopping, particularly around digital circuits.

Simpler things that go tick can be anything that intentionally resonates - oscillators, crystals, ceramic resonators, flip-flop constructions, a 555, or whatnot.

Applications include:

  • clock source (for digital calculation and communication)
  • signal generation
  • reference clock
  • timekeeping
often based on crystals, because those can be made with smaller error.

In electronics you see a bunch of ceramic resonators (cheap, can be used when the rate is more imporant that it is for long-term precision, simpler quartz crystal oscillators (more accuracy than resonators), and corrected quartz crystal oscillators (more accuracy than basic quartz, necessary for some applications).

Frequency tolerance refers to how close the real frequency will be to the spec.

This is about production quality, what a specific crystal ends up doing exactly, and some specific effects like that of temperature on quartz.

Any given crystal is likely to be relatively consistent.

A crystal that is specced ±50ppm means manufacture should put it somewhere in that range somewhere. It will probably not be +30 one day and -40 the next (though will probably show a pattern relating to temperature).

This means that (assuming that you can measure it with something more precise) you can often calibrate away the 'average' error for a specific crystal and have noticeably smaller error left.

Frequency tolerance of ±250ppm or more is considered relatively relaxed, ±20 ppm is pretty good, lower than that is fairly strict - and more expensive.

You can spend ten bucks on a TCXO that is 2ppm (approx. 1 second per ~5 days, approx. 1 minute per year).

For regularity this is good stuff.


...but for accurate timekeeping it's still only so-so. Digital watches typically have quartz crystals with few-dozen ppm accuracy. And yes, that means they're often off by a few minutes per year. Fancy digital watches are typically radio synchronized - it's easier and cheaper for long term accuracy.

...because at some point, it's a lot more practical to receive one of several wireless time signals, because now the crystal drift only matters on the scale of time between corrections.

One option is GPS (because it requires accurate time to even work), and a lot of the world has radio-wave synchronization which is the cheaper option unless your device had GPS anyway.


  • ceramic resonators are less accurate than crystals, but good enough whenever timing need not be that accurate
    • frequency tolerance: on the order of 0.5% (5000ppm) (7.2min/day)
  • crystal oscillators - piezoelectric quartz.
    • frequency tolerance: on the order order of ~0.001% (~10ppm) (~0.86sec per day),
    • Tunable within a small range of frequencies
    • Fairly cheap
    • not accurate enough for certain some applications (such as some radio transmission, long-term timekeeping, stability under varying temperatures)

  • TCXO (temperature-compensated crystal oscillator)
    • less than 5 PPM, usually 2 or 3(verify), down to 0.1 PPM is theoretically possible. A little more complex than basic crystals, and still fairly affordable

  • MCXO (microcontroller-compensated crystal oscillator)
    • refers to designs that are more stable and avoid more noise and drift (useful when supporting less predictable things like uCs) (verify)
    • Down to 0.1PPM

See also: