Skip to content
/ bfg Public

Basic Function Generator - a simple function generator for embedded electronics

Notifications You must be signed in to change notification settings

AaronC81/bfg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The BFG - Basic Function Generator

The BFG is a small, minimalistic function generator based around the AD9833, controlled by an ATmega328P with a lovely little OLED display and rotary encoder.

An assembled BFG, with an OLED display, rotary encoder, three generation ICs, and an ATmega328P microcontroller.

The BFG's display, showing frequency, wave type, power switch, and amplitude.

The oscilloscope output from the BFG, with the BFG and scope showing the same frequency to 3dp.

  • Sine, square and triangle waves
  • Powered over Micro USB
  • Output range of 0 to 5 volts
  • Theoretical maximum output frequency of 12.5MHz

At high frequencies (>2MHz) the range of voltages begins to narrow; for example, a sine wave at 5MHz set to an amplitude of 5V only actually oscillates between about 1.5V and 4V. These frequencies are a tad much for my poor USB oscilloscope to handle, so I can't accurately measure the practical limits.

I built this for two main reasons:

  • To have a basic function generator for embedded projects
  • To learn simple surface-mount soldering

How it Works

As the rather lovely silkscreen on the board suggests, functions are generated by three steps:

  1. Generate: The AD9833 generates a low-voltage signal, about 0.65V
  2. Amplify: The AD8052 op-amp amplifies the signal to 5V
  3. Scale: The MCP4131 digital potentiometer divides the signal down to the desired amplitude

Repo

cad contains KiCad files for the PCB.

firmware contains a platform.io project for the ATmega328P's firmware.

About

Basic Function Generator - a simple function generator for embedded electronics

Resources

Stars

Watchers

Forks

Languages