Back in days, just for fun, I connected 8bit resistor divider directly to AVR pins and writed code in asm with different lookup tables to create signal generator with option to change frequency and signal form.. Maximum frequency was higher than for this chip.. All project was very cheap.. 😂😉
We can make a component tester using this DAC and the Arduino DAC. Now the Arduino can set a Vin to a circuit under test and measure it's Vout, and print those data to serial monitor or to a curve on an MIT android app. Also it can draw the VI curve of a component by sweeping the current through that component using a powerful op amp (TDA2030) as a Voltage to current converter and checking the voltage across it.
Informative video! As you demonstrated in your video, never connect and disconnect a capacitor on a DAC output while its running as it can significantly load the DAC because of its low output current capability causing it to fail.
But how do I connect an input signal via the SCL pins \ SDA on this module? Basically I need to convert a digital signal to analog for a sound level meter (since I am not satisfied with seeing the value in Db but want to be able to record it so I can keep it as evidence ....... ).
Great video but the addresses at 4:24 didn't work properly for me when using 2x MCP4725 on the same bus. When pulling to GND 0x60 was fine but when pulling to VCC 0x61 worked for me instead of 0x63. Default 0x62 worked fine in isolation.
I planned it to use in a digital supply with LM338, a year ago but didn't have time to do. To control the output of the LM338 (5A version of the LM317), you should apply a voltage to the ADJ which is 1.25V lower than the output. My plan was to use an op-amp to amplify the output of DAC.
merhaba ibrahim. ben LM317 ile 5 volt çıktı veren devre yaptım ve bununla DAC'yi beslemem gerek. ama beslediğim zaman DAC sabit 2.3 volt veriyor. normal arduino ile beslediğimde ise doğru bir şekilde çalışıyor. bu konuda yardımcı olabilir misin?
@@mahmutkelesoglu683 benim bahsettiğim DACyi LM317 ile beslemek değil, DAC ile ürettiğim referans voltajını kullanarak LM317yi kontrol etmek. DAC ile 0-5V arası bir gerilim elde ediyorum bunu op-amp ile 0-20V arası gerilimlere yükseltiyorum ardından LM317nin ADJ pinine bu voltajı veriyorum
@@isalihkilic Peki ben LM317nin ADJsine DACden aldığım voltajı bağlasam, LM317'nin çıkışını 0 ile 5 arasında değiştirebilir miyim? Böyle bir şey mümkün olur mu?
Thank you so much for this explanation. I am building a flight simulator using real airplane gauge. A lot of them use resolvers to measure knob turns, for example, turning the knob to adjust heading. From what I have learned, resolvers use one coil to induce electrical signal into two other coils to measure angular rotation. This DAC could be used for the exciter coil? How would you measure the voltage on the other two to figure out angles?
Well, most Arduinos have a limit of 400kbps in their I2C hardware. The data frame of the I2C protocol is 30-bit long. Since most Arduinos only allows bi-directional communication, that means 400k / 30 / 2 ~ 6.7ksps (max theoretical sample rate). Halve that by each additional device on the I2C bus. While easy to implement, for applications such as audio synth or laser galvo drive that is not enough. For high-speed applications, SPI for instance is a better choice. Keep that limit in mind when designing a solution.
What about using this DAC as the output of an SDR radio? What is the max sample rate we can do with I2C? Note that for voice quality audio, (max freq of about 3khz) we need a sample rate of at least 6khz (nyquist), but we probably want at least double that, so say 12khz. The output will be filtered by a LPF.
Nice video. I have a question. I want to connect the output of the mcp4725 to another arduino using analog read function. Is it possible? I tried it but when i connect the two arduino with a common ground. The output of the mcp4725 stops. Can you help me please? Thank you verymuch.
Hii could you help ?! I have analog signal input, how can i use the input signal to do something, for ex analog input is stable and then when signal input it drop to 0 and back to 100 again but each signal have it own drop time, how to identfy them
I am also trying to work on a similar project but with a 12 bit R2R ladder directly connected to Arduino UNO! But still I am getting only 18 Hz max sine wave. Can we achieve a greater frequencies with an FPGA? how much? Maybe a good project idea for you to try!? :)
It is hard to get more than 6-7 bits using R2R DAC. The rule of thumb: if you see noise on the DAC output on the scope, it is less than 8 bits. However, it is easy to get fast output >1MHz from the R2R DAC. For that you have to write to the port at about 100MHz rate, which requires FPGA
That depends on the I2C bus speed, which in most Arduinos is limited to 400kbps. With a single DAC on the I2C bus, I was able to generate (verified with an oscilloscope) a ~80Hz sine wave sampled at every 10 degrees (36 samples per cycle, which is a moderate resolution). 400kbps / 30 (I2C data frame length) / 2 (bi-directional mode) / 36 samples per second ~ 185Hz theoretical. In real life, Arduino does other stuff per `loop()` iteration, hence the 80Hz-or-so result I got. That can be good for a power supply, but if you want to synthesize audio signals, for example, I'd go for the SPI protocol, which requires more wires, but is 8Mbps for a 16MHz Atmega microcontroller.
The voltage readings you are getting are correct. Your maths are slightly wrong. 5 V / 4095 is 1.221 mv not 1.2 mV , the extra 0.021mV when multiplied by thousands makes all the difference. why, there are also common voltage references of 4.096V. So just about 1mv for every step.
ı have supplied this module with arduino, then it gives the voltage what ı want. but, when ı connect Vdd to my circuit output, which gives 5.09 volts, the module does not work properly. what is the problem? anyone help?
i need to use mcp4725 with 3 addresses. mine come with 0x60 address and already connected to ground, i already desolder and connected ADDR to VCC so i have 0x61 address. I have 0x60 and 0x61, i need to have 1 more address, can anyone please help me, thankyou
The output speed of the mcp4725 is very low, less than 7k samples/sec. At such low rate it is enough time to calculate sine for each point using the standard math library.
Get an ESP32: s.click.aliexpress.com/e/_AKsuGp
My Tools: bit.ly/3uv8bc3
Help me on Patreon: www.patreon.com/ELECTRONOOBS
Back in days, just for fun, I connected 8bit resistor divider directly to AVR pins and writed code in asm with different lookup tables to create signal generator with option to change frequency and signal form.. Maximum frequency was higher than for this chip.. All project was very cheap.. 😂😉
Another winner if a video from you. Thank you as always for all your hard work to share your knowledge with us in an easy to understand way.
We can make a component tester using this DAC and the Arduino DAC. Now the Arduino can set a Vin to a circuit under test and measure it's Vout, and print those data to serial monitor or to a curve on an MIT android app.
Also it can draw the VI curve of a component by sweeping the current through that component using a powerful op amp (TDA2030) as a Voltage to current converter and checking the voltage across it.
Informative video!
As you demonstrated in your video, never connect and disconnect a capacitor on a DAC output while its running as it can significantly load the DAC because of its low output current capability causing it to fail.
But how do I connect an input signal via the SCL pins \ SDA on this module? Basically I need to convert a digital signal to analog for a sound level meter (since I am not satisfied with seeing the value in Db but want to be able to record it so I can keep it as evidence ....... ).
Great video but the addresses at 4:24 didn't work properly for me when using 2x MCP4725 on the same bus. When pulling to GND 0x60 was fine but when pulling to VCC 0x61 worked for me instead of 0x63. Default 0x62 worked fine in isolation.
I planned it to use in a digital supply with LM338, a year ago but didn't have time to do. To control the output of the LM338 (5A version of the LM317), you should apply a voltage to the ADJ which is 1.25V lower than the output. My plan was to use an op-amp to amplify the output of DAC.
merhaba ibrahim. ben LM317 ile 5 volt çıktı veren devre yaptım ve bununla DAC'yi beslemem gerek. ama beslediğim zaman DAC sabit 2.3 volt veriyor. normal arduino ile beslediğimde ise doğru bir şekilde çalışıyor. bu konuda yardımcı olabilir misin?
"you should apply a voltage to the ADJ which is 1.25V lower than the output." şurada tam olarak ne demek istedin. yardımcı olursan çok sevinirim
@@mahmutkelesoglu683 benim bahsettiğim DACyi LM317 ile beslemek değil, DAC ile ürettiğim referans voltajını kullanarak LM317yi kontrol etmek. DAC ile 0-5V arası bir gerilim elde ediyorum bunu op-amp ile 0-20V arası gerilimlere yükseltiyorum ardından LM317nin ADJ pinine bu voltajı veriyorum
@@isalihkilic Peki ben LM317nin ADJsine DACden aldığım voltajı bağlasam, LM317'nin çıkışını 0 ile 5 arasında değiştirebilir miyim? Böyle bir şey mümkün olur mu?
@@mahmutkelesoglu683 ADJ pinine bağladığının 1.25V fazlasını verir. Yani 0-5V verirsen 1.25-6.25V arası kontrol eder
This is handy for making a transistor curve tracer.
Thank you so much for this explanation. I am building a flight simulator using real airplane gauge. A lot of them use resolvers to measure knob turns, for example, turning the knob to adjust heading. From what I have learned, resolvers use one coil to induce electrical signal into two other coils to measure angular rotation. This DAC could be used for the exciter coil? How would you measure the voltage on the other two to figure out angles?
Well, most Arduinos have a limit of 400kbps in their I2C hardware. The data frame of the I2C protocol is 30-bit long. Since most Arduinos only allows bi-directional communication, that means 400k / 30 / 2 ~ 6.7ksps (max theoretical sample rate). Halve that by each additional device on the I2C bus. While easy to implement, for applications such as audio synth or laser galvo drive that is not enough. For high-speed applications, SPI for instance is a better choice. Keep that limit in mind when designing a solution.
What about using this DAC as the output of an SDR radio? What is the max sample rate we can do with I2C? Note that for voice quality audio, (max freq of about 3khz) we need a sample rate of at least 6khz (nyquist), but we probably want at least double that, so say 12khz. The output will be filtered by a LPF.
Nice video.
I have a question.
I want to connect the output of the mcp4725 to another arduino using analog read function.
Is it possible?
I tried it but when i connect the two arduino with a common ground. The output of the mcp4725 stops.
Can you help me please?
Thank you verymuch.
great video , and as always keep them coming !
Nice work on the video quality as well as the content
Can't this module also control analog output based on input PWM, and not frequency? Or no?
Thank you very much, can you explain how to change the amplitude of signals in program
Hii could you help ?! I have analog signal input, how can i use the input signal to do something, for ex analog input is stable and then when signal input it drop to 0 and back to 100 again but each signal have it own drop time, how to identfy them
So this module only allows 2 of this gizmos on the IC2 bus? (limited to 061 and 063 addresses ?) What do I do if i want to use 4 or 5 of them?
so i can give AC on the MOSFET-s gate to controll this MOSFET ?
Underrated video.
wow, so great thanks for this!! liked! any module that has more steps and/or can output a bit more power??
yep the buck step up project seems neat
I was looking for a video for that topic, thanks a lot bro❤
I am also trying to work on a similar project but with a 12 bit R2R ladder directly connected to Arduino UNO! But still I am getting only 18 Hz max sine wave. Can we achieve a greater frequencies with an FPGA? how much?
Maybe a good project idea for you to try!? :)
It is hard to get more than 6-7 bits using R2R DAC. The rule of thumb: if you see noise on the DAC output on the scope, it is less than 8 bits.
However, it is easy to get fast output >1MHz from the R2R DAC. For that you have to write to the port at about 100MHz rate, which requires FPGA
What mouse are you using?
What is the highest sine frequency that can be generated?
That depends on the I2C bus speed, which in most Arduinos is limited to 400kbps. With a single DAC on the I2C bus, I was able to generate (verified with an oscilloscope) a ~80Hz sine wave sampled at every 10 degrees (36 samples per cycle, which is a moderate resolution). 400kbps / 30 (I2C data frame length) / 2 (bi-directional mode) / 36 samples per second ~ 185Hz theoretical. In real life, Arduino does other stuff per `loop()` iteration, hence the 80Hz-or-so result I got. That can be good for a power supply, but if you want to synthesize audio signals, for example, I'd go for the SPI protocol, which requires more wires, but is 8Mbps for a 16MHz Atmega microcontroller.
Super. But we can use digital pot
The voltage readings you are getting are correct. Your maths are slightly wrong. 5 V / 4095 is 1.221 mv not 1.2 mV , the extra 0.021mV when multiplied by thousands makes all the difference. why, there are also common voltage references of 4.096V. So just about 1mv for every step.
ı have supplied this module with arduino, then it gives the voltage what ı want. but, when ı connect Vdd to my circuit output, which gives 5.09 volts, the module does not work properly. what is the problem? anyone help?
Thanks. It's very useful for me.
i need to use mcp4725 with 3 addresses. mine come with 0x60 address and already connected to ground, i already desolder and connected ADDR to VCC so i have 0x61 address. I have 0x60 and 0x61, i need to have 1 more address, can anyone please help me, thankyou
Excelente video. Felicitaciones
THANK YOU BROTHER, VERY NİCE AND CLEAR EXPLANATİON
Very good project ❤ 💕
I have an Arduino UNO + Gyroscope piece 60 50 But I could not find a video explaining how I can download the code to make it fly control
Answer give
why would someone EVER use PCBWAY? I recently made a project and comparing JLCPCB vs PCBWAY it was like 1 to 5 price, really?
@0:16 That's not actually true, Arduino UNO doesn't have DAC but Arduino Due have two of them!
Cool video! Did you record the voiceover with a different microphone? Which one is it? It sounds great. Thank you!
Thae same as always. A T-bone microphone
a new one is probably in the making hopefully
please work on dac and boost converter 😢😢
Nice , make controll voltage buck regulator series xl4016 with modul dac and use push button as control
Maybe you can rebuild your VFD Inverter with this modules.
great video
Is any dac bidirectional?
You mean like an DAC and ADC in the same module? Idk...
Yes
www2.mouser.com/c/semiconductors/data-converter-ics/data-acquisition-adcs-dacs-specialized/?instock=y
Excellent explanation, this is great for digital potentiometers
Sir tell me 24s 300a ESC bldc motor controller coding and diagram
Measuring 12but DAC with 8bit Oscilloscope may result in wrong conclusions.
Nice
very cool ..now i want to try it, but that 9 bit sine table will eat my pic16877 memory alive 😂
The output speed of the mcp4725 is very low, less than 7k samples/sec. At such low rate it is enough time to calculate sine for each point using the standard math library.
Only 12-bit?
sir plz make a bluetooth headphone with a bluetooth mic plz sir for a gaming channel
Need content about micropython
👌🏻
Sir how to write code for dc current measurements using Arduino and 2line LCD, WCS 1800 sensor ?
lol wtf is this rule of 3 thing? You're just scaling 4095 by 3/5...
Good video!
www.smartick.com/blog/mathematics/rule-of-3/
🌟🌹🌟
24 bit stereo dac
buck boosty genius
Two minutes of advertising on a twelve minute video? f*. Time to dislike and unsubscribe.
If you can't take 50 seconds, bye bye :=)
can anyone assist me, i try the sine wave code but my Vpp is 500mV meanwhile my Vref is 5V, anyone know what is the problem here?. thankyou