Generate an arbitrary function by DAC
Posted: Sat Jul 22, 2023 12:09 pm
Hello,
I would like to make a small project (a function generator) in wich the final goal is to generate an arbitrary function regulated form some setting. My aims is to imitate as much as possible the functions generated from this software below WHITHOUT GUI
My aim is to have tha following features (without GUI)
QUESTIONS 1
Is this project feasable? I mean can i realize a device that generate a function at enought high frequency? My goal is to reach the wave frequency of 5000hz. Is it possible to implement it with ESP32?
QUESTIONS 2
How can I acheive my aim (for example) to generate a 5000hz with AM of 2hz wave?
QUESTIONS 3
I've tried this example that outputs from the DAC a value of -1.7v (0) and a value of 1.7v (255) and I found that the maximum frequency that i can go is around 27khz (see below). If is is like that do i have some chance to generate a 5000hz with AM of 2hz wave and let the microcontroller do other tasks for others (for example to talk via computer by serial)?
THANKS
I would like to make a small project (a function generator) in wich the final goal is to generate an arbitrary function regulated form some setting. My aims is to imitate as much as possible the functions generated from this software below WHITHOUT GUI
My aim is to have tha following features (without GUI)
- Two channels Left and Right
- Generation of Sine, Square and Sawtooth wave
- Modulation AM and FM at low rate (minimum 0.01hz - maximum 100hz)
- SWEEP in frequency and apmlitude
QUESTIONS 1
Is this project feasable? I mean can i realize a device that generate a function at enought high frequency? My goal is to reach the wave frequency of 5000hz. Is it possible to implement it with ESP32?
QUESTIONS 2
How can I acheive my aim (for example) to generate a 5000hz with AM of 2hz wave?
QUESTIONS 3
I've tried this example that outputs from the DAC a value of -1.7v (0) and a value of 1.7v (255) and I found that the maximum frequency that i can go is around 27khz (see below). If is is like that do i have some chance to generate a 5000hz with AM of 2hz wave and let the microcontroller do other tasks for others (for example to talk via computer by serial)?
Code: Select all
#define DAC_CH1 25
void setup() {
}
void loop() {
while(1){
dacWrite(DAC_CH1, 0);
dacWrite(DAC_CH1, 255);
}
}
THANKS