This is a new implementation of an AVR DDS signal generator V2.0, which has been published on scienceprog.com. Obviously, full credit to its original creators is due for the original schematic and firmware. Presented here is a different PCB, compact and single-sided with through-hole components for easy construction. The function generator has two BNC outputs: one for high speed [1 to 8 MHz] squared signal (BNC1) and another for DDS signal (BNC2). Offset and amplitude can be adjusted with two potentiometers: offset in the range of +5 V to -5 V (POT1) and amplitude in the range of 0 to 10 V (POT2). The up and down arrow buttons are used to change the type of function (sine, trig, etc.), while the left and right arrow buttons are used to change the frequency value. There is also a separate menu for changing the frequency step. When the middle button is pressed, the signal generation starts. Schematic
EAGLE schematic (only one status LED and on/off switch on the shelf)
PCB
EAGLE PCB (silk screen and bottom layer)
Parts List
power supply
For powering the function generator, a PC ATX power supply was used, with all voltages listed (+12 V, -12 V, +5 V). The wiring is shown in the image below taken from scienceprog.com.
Factory-made printed circuit boards and components
PCB production
Photo of assembled PCB
ATMEGA16 programmer programming with usbtiny
Since the orientation of the LCD characters is currently different from the original implementation (180 degrees), the following modifications were made in main.c: The left and right buttons were swapped:
#define LEFT 3 // PORTD
#define RIGHT1 // PORTD
The buttons TOP and BOTTOM are interchanged:
#define FALL 4 // PORTD
#define MAX 0 //PORTD
For recent versions of the AVR-GCC compiler, the following changes should be made (according to Jeff's comment at scienceprog.com):
Structure signal {
volatile uint8_t mode; //signal
unstable uint8_t FR1 //frequency [0..7]
volatile uint8_t FR2; //frequency [8..15]
volatile uint8_t FR3; //frequency [16..31]
volatile uint32_t frequency; //frequency value
oscillate uint8_t flag; //if 0 the generator is off, 1 is on
Volatile uint32_t ACC //Accumulator
volatile uint8_t ON;
volatile uint8_t HSfreq //High speed frequency [1 ... 4Mhz]
Volatile uint32_t deltafreq; //Frequency step value
} SG;
The ATMEGA16 fuses should be:
High = 0 × 59
LOW = 0xCF
This is interpreted as the following options being selected (all others being unchecked):
OCDEN
SPIEN
BOOTSZ1
BOOTSZ2
SUT1
SUT0
Photo equipment
[page]
Final lab setup
Previous article:Experimental Loading Closed-Loop Control System Based on AVR Microcontroller
Next article:Application of AVR single chip microcomputer in wireless automatic target reporting system
Recommended ReadingLatest update time:2024-11-16 23:32
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- As shown in the figure, the netlist is transferred to the PCB, and these four networks form GND_SIGNAL_20640, which is not connected to GND_SIGNAL.
- DM6437 Boot Mode Introduction
- Collection of popular MCU data downloads
- DC Motor Control Circuit Collection
- [Me and Yatli] + First acquaintance
- TI's new automotive linear LED driver TPS92613-Q1 with enhanced heat dissipation
- Do you need to persist?
- What are the common reasons for LED errors?
- Need help choosing safer lithium batteries?
- STM32H743IIT6 core board schematic diagram