AVR DDS signal generator V1.0 using ATmega8

Summary of AVR DDS signal generator V1.0 using ATmega8


AVR DDS signal generator is a simple DIY signal generator based on an Atmel ATmega8 microcontroller. It produces various waveforms (sine, square, triangle, sawtooth) from 1 to 65535 Hz with 1 Hz steps, uses an R-2R DAC, a 2×16 LCD via a 74HC164 shift register, seven control buttons, PWM and pulse outputs, and is powered from a 9V battery regulated to 5V by a 7805. The project includes a metal case and firmware for the microcontroller.

Parts used in the AVR DDS signal generator:

  • Atmel ATmega8 microcontroller
  • 9V battery
  • 7805 voltage regulator
  • 2×16 standard LCD
  • 74HC164 shift register
  • 7 push buttons (Start, Stop/Reset, IP, DOWN, Mode1, Mode2, Freq)
  • R-2R resistor ladder (R = 10 kΩ resistors, 8-bit)
  • Wiring and PCB or perfboard
  • Metal case
  • Connectors for three outputs (OUT, PWM, SQ)
  • Microcontroller firmware (program)

Sometimes when tuning various electronic hardware we need simple signal generator with various waveform and frequency. One of the options is to by a professional with variable gain professional coating and many additional functions. But if you are an amateur you might want to build one. This small project is dedicated for building one of those signal generators.
DDS signal generator

Specification

AVR DDS signal generator consists of following parts:

  • Atmel Atmega8 8 bit microcontroller;
  • Supply source and voltage regulator;
  • 2×16 standard LCD and shift register 74HC164;
  • 7 buttons;
  • R-2R resistor leader for DAC;
  • Three outputs: universal(OUT) from DAC, PWM and pulses;
  • Metal case;
  • and microcontroller firmware.

Atmega8 microcontroller is a simplest of atmega series. There is 8kb of FLASH program memory, maximum frequency is 16MHz, which is used to reach DDS generators maximum resolution at maximum frequency. For know frequency is limited from 1 to 65535Hz with minimal step of 1Hz.
DDS AVR generator is powered with 9V battery. Voltage is reduces to 5V and stabilized by 7805 voltage regulator.

LCD is controlled using three wires through shift register 74HC164. So this register is used as serial to parallel converter in order to save microcontroller pins. LCD is controlled in 8 bit mode.

AVR DDS Generator uses 7 control buttons:

    • Start;
    • Stop, which is a reset also;
    • IP- increasing value;
    • DOWN- decreasing value;
    • Mode1 – signal selection button;
    • Mode2 – signal properties;
    • Freq – signal frequency multiplier selection.

Buttons on the box
AVR DDS signal generator uses R-2R digital to analog (DAC) converter This is a simplest solution where resistors are connected in a ladder:

In this schematic R=10kohm. By using 8 bits and 5V step value is about 18.5mV. This is enough for getting average quality signals.

Generator has three outputs:

  • Universal DAC output through R-2R ladder;
  • PWM;
  • Impulse (SQ);

Universal output (OUT) is a signal output from DAC. This output is to form various signals like sawtooth, sine, square, triangle.
PWM channel is used to form for PWM signal output – directly from timer.
SQ channel is additional channel to form square pulses or second PWM signal. Will be implemented in future.
 
For more detail: AVR DDS signal generator V1.0 using ATmega8

Quick Solutions to Questions related to AVR DDS signal generator:

  • What microcontroller does the project use?
    The project uses an Atmel ATmega8 8-bit microcontroller.
  • What power source and regulator are used?
    The generator is powered by a 9V battery and regulated to 5V using a 7805 voltage regulator.
  • How is the LCD controlled to save microcontroller pins?
    The 2×16 LCD is controlled via a 74HC164 shift register as a serial-to-parallel converter using three wires.
  • What outputs does the generator provide?
    It provides three outputs: universal DAC output (OUT), PWM output, and an impulse SQ output.
  • What DAC method is used for analog output?
    An R-2R resistor ladder DAC using R = 10 kΩ and 8 bits is used for the universal output.
  • What frequency range and resolution does the generator offer?
    The frequency range is from 1 to 65535 Hz with a minimal step of 1 Hz.
  • How many control buttons are on the device and what are they?
    There are seven buttons: Start, Stop (reset), IP (increase), DOWN (decrease), Mode1 (signal selection), Mode2 (signal properties), and Freq (frequency multiplier).
  • What waveforms can the universal output form?
    The universal DAC output can form sawtooth, sine, square, and triangle waveforms.
  • How is the PWM channel generated?
    The PWM channel is formed directly from a timer in the microcontroller.

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