Electronic Basics #10: Digital to Analog Converter (DAC)

Sdílet
Vložit
  • čas přidán 4. 12. 2014
  • Twitter: / greatscottlab
    Facebook: / greatscottlab
    Previous video: • HACKED!: Looping Louie...
    In this video I will show you how a Digital to Analog converter works and how to use one. I will mainly talk about an 8bit R-2R DAC. But also a bit about voltage followers and I2C devices which can also do the job.
  • Věda a technologie

Komentáře • 186

  • @Junon15
    @Junon15 Před 6 lety +12

    I love these videos. I'll literally hunt around the entire internet on a topic only to come back and find that my topic is completely covered precisely and concisely by +GreatScott!. This channel is amazing! Keep up the great work!

    • @MrBenG3
      @MrBenG3 Před rokem

      Keeps happening for me even 5 years later lol

  • @Mosfet510
    @Mosfet510 Před 9 lety +11

    I love the sound of the 200Hz-3Khz sweep, reminds me of Missile Command, and other 80's retro games. Cool video!

  • @allexandruprroca6713
    @allexandruprroca6713 Před 6 lety +2

    best youtuber on electronics tutorials . love that man .

  • @gcm4312
    @gcm4312 Před 3 lety +3

    1:50 starting at the setting of PORTD, the video gets very confusing... I had a lot of questions until I googled what PORTD meant in the Arduino context, and then things made sense. This is definitely a crucial piece of information missing in the video. :) Maybe this content deserves a remake at some point. Great channel, btw. Been following for ages and just dropped into this oldie :)

  • @agstechnicalsupport
    @agstechnicalsupport Před rokem

    Instructive video. I enjoyed watching it. Thank you for sharing !

  • @TheHonchoofAllSpearheads
    @TheHonchoofAllSpearheads Před 9 lety +58

    Judging by the fact of your attractive accent, profound engineering faculty and that one odd number '1', you are 100% a German. Go Deutschland!

    • @JjMn1000
      @JjMn1000 Před 3 lety +2

      Yeah boi

    • @iadtag1853
      @iadtag1853 Před 2 lety

      I was prepared of reading something like "You're the best and most unique Electronics CZcamsr out there!"

  • @PhilWaud
    @PhilWaud Před 8 lety +1

    Thanks Scott, Ive watched a few of your videos now, I like your instruction style!

  • @jeronimomurruni
    @jeronimomurruni Před 9 lety +1

    Thanks for the tutorial, I understand everything, but I don't program on arduino, so that make me the things a little bit difficult, but the R2R tutorial was really clear

  • @liukingbird
    @liukingbird Před 8 lety

    Thank you. I m going to buy a dac for my head phone. Good to understand more first.

  • @RohitGandas
    @RohitGandas Před 9 lety

    Great video for people interested in doing practical.

  • @kayvendelatado8
    @kayvendelatado8 Před 5 lety

    super nice video. I'm excited about your digital filter video soon master;^^

  • @bartekch7898
    @bartekch7898 Před 8 lety +1

    Thanks, you helped me a lot :)

  • @KaienSander10Official
    @KaienSander10Official Před 9 lety +10

    3:37 Greatscott dubstep dj ;)

  • @theengineer9910
    @theengineer9910 Před 5 lety

    Bro u saved my life

  • @KiR_3d
    @KiR_3d Před 7 lety +1

    Hello, Scott!
    Is this method suitable to build a good MIDI DAC? I'm in process of making of an analog synth. but still not sure what to use to control it.

  • @cemf4330
    @cemf4330 Před 4 lety

    Estás bien cañon !
    Eres un master
    Saludos de México

  • @kurtttttttt
    @kurtttttttt Před 7 lety

    Excellent video

  • @Rattlus
    @Rattlus Před 7 lety +1

    Hi! Great video, great project, lots of useful information! But... I've got a question for You. I have got a YF-S201 Wassermengenzähler Water Flow Sensor. It measures flow of water between 1 to 30 litres per second presented in PWM signal with frequency calculation of F=7.5*Q(L/Min). Of course I could use an Arduino and LCD to display the measurement... But I was wondering if You could help me (and everyone) convert a 0-30V analog voltmeter to display the flow rate in analog form from PWM singal. Thanks in advance!

  • @daz41262010
    @daz41262010 Před rokem

    great informational video :)

  • @KillerMc58
    @KillerMc58 Před 9 lety

    Scott man you are amazing! What did/are you studiying at the moment or what is your job?

  • @abdulkerimhejazi6116
    @abdulkerimhejazi6116 Před 7 lety

    Thank you very much for this information
    You can build sin wave inverter 12vDC to 220vAC👍

  • @eduugr
    @eduugr Před rokem

    Hi, many thanks for
    the video! Would I get better audio quality from the MCP4725? I'm figureing out how to start an audio player hobby project, this helped a lot!

  • @jmadluck
    @jmadluck Před 7 lety +1

    Is there a way to program for Arduino using assembly language? It looks like you're programming in C. I learned the basics of microcontrollers using the ATMEGA16A and assembly language last semester in college. Cool stuff

  • @nathanas64
    @nathanas64 Před 3 lety +1

    Wow you should author a book on circuits. I’d stand in line to buy it.

  • @josadc13
    @josadc13 Před 9 lety +2

    Hi! How did you create the sine waveform? Could you please post a link with the code? Awesome video, congratulations!!

  • @ahmadtheaviationlover1937

    This is sick!

  • @iam29cunaq84
    @iam29cunaq84 Před 7 lety

    Hi, love your channel
    What is the value of the coil for the filter?

  • @stm32user
    @stm32user Před 5 lety

    Super explanation. 🙏🙏🙏😘😘😘😘😙😙😙

  • @484MyTube
    @484MyTube Před 9 lety

    nice share!!!
    thank you!

  • @someoneyoudontknow106
    @someoneyoudontknow106 Před 8 lety +1

    verry helpful video ! AWESOME

  • @claraj6521
    @claraj6521 Před 9 lety +2

    Hey GreatScott,
    Digital and analog signal is classified by their BIAS, based upon their positive current and negative current (Id- diode current). Not in their shape that straight line or sinusoidal, triangular. Its only based upon their REFERENCE LINE. Digital signal can have sinusoidal.

  • @krishna34674
    @krishna34674 Před 9 lety

    been watching Collins lab have we ?

  • @thang387
    @thang387 Před 7 lety +4

    could you make a tutorial for how to make an audio Dac with arduino?

  • @Cyber_One
    @Cyber_One Před 5 lety +1

    What‘s the highest frequency you can make with such DACs? I wanna make a UHF transmitter (800-870MHz)!

  • @golski4878
    @golski4878 Před 4 lety +1

    This is awesome you can make a digital piano card with this

  • @matteovicentini169
    @matteovicentini169 Před rokem

    Sorry for the stupid question, but, in order to control the output signal do you have to program the processor to "tell" him which binary outputs matches the pins of the DAC?

  • @jeffe.198
    @jeffe.198 Před 9 lety

    That was great, Scott. Excuse me but what language is that being used to program that waveform generator? Send me a note if you ever want to try some local beer here in Merrimac, Massuchusetts, USA.

  • @TonoNamnum
    @TonoNamnum Před 4 lety

    Scott on an existing microphone connected to Alexa could you send it analog voltages to wake her up? In other words if I have a recording on my phone that plays "Alexa how is the weather". If I connect an audio cable from my phone to that microphone will it work?

  • @wayne02058
    @wayne02058 Před 4 lety +1

    What dac do you recommend from China I'm on a budget thanks

  • @melplishka5978
    @melplishka5978 Před 3 lety

    Awesome.

  • @jakubedzior
    @jakubedzior Před 2 lety

    3:33 When I heard that sound, I was sure it was the beginning of Never Gonna Give You Up and I was about to get rickrolled

  • @KJ7JHN
    @KJ7JHN Před 4 lety

    Could you make a video creating a small speech synthesizer? Included are a 512 eeprom (24lc512), ATMega328P, and or possibly a SD card. Yah know, basic things like 8bit pwm "your dryer is finished", "your toast is now golden". Thanks.

  • @hippowpowtamos8848
    @hippowpowtamos8848 Před 7 lety

    please make a review about MT3608... cuz i saw a lot of video here in youtube that it burns when they put 10 volts on its input... but on datasheet it tells 2v-24v input... thank you.

  • @dragos7puri
    @dragos7puri Před 9 lety +146

    Not enough explanations. You could give a few formulas about how the voltage divider works, what the portd command does etc.

    • @greatscottlab
      @greatscottlab  Před 9 lety +44

      PORTD:www.arduino.cc/en/Reference/PortManipulation. But I get your point and I agree that it is a bit hard to understand.

    • @lanchanoinguyen2914
      @lanchanoinguyen2914 Před 6 lety

      GreatScott! hello,can you explain that why the DAC chip of iphone can decode a standard mp3 files,android device and arduino also have their particular type of DAC so how do they work compatible?please answer thanks.

    • @incxxxx
      @incxxxx Před 4 lety +2

      You are absolutly right. It is only for advanced.

  • @ahmedalkhulaidi9426
    @ahmedalkhulaidi9426 Před 8 lety

    You are good

  • @anonymoushrey
    @anonymoushrey Před 7 lety

    can you make video on generating gate pulse using a 741 comparator circuit(pwm)

  • @ridazakar8533
    @ridazakar8533 Před 8 lety

    hello, can you tell me more about the coding? i would also like to know about the part names of the last simple circuit

  • @tredioinc.7225
    @tredioinc.7225 Před 7 lety +2

    COOL

  • @ToTheEntropy
    @ToTheEntropy Před 4 lety

    Hm.. Not sure if this will get an answer since your video have already 6 years, but I will try!
    Thanks to your video now I understand how a DAC work and how they can be created, or for what component to search if I want to have an equivalent of a PWM port!
    If I want to create a VGA signal out of a pair of 65C22 or equivalent, is it the way to go? Something like the data pushed to the 65C22 then to the DAC then going into the R/G/B output (+ the rest of the signal)? Or is something missing for that idea?
    I'm still fairly new to electronics, so sorry if it is badly asked :/
    My current goal is to display something on a VGA display out of a 6502 or 65816. I got at least the theory on how the microprocessor work, how it interact with the ROM and the RAM, I can write asm, and understand how a VGA signal is outputed to a display. But I miss somes parts in the middle to be able to connect everything together... Mostly was not sure about how to generate an analog signal from only numeric. I guess I could go for just pushing all or nothing to go for something monochrome at first, but since I do not have received any part yet, I have some time to work on the theory before playing on the breadboard. Thanks for this great video! It was really a good help to understand how DAC work!

  • @no-defun-allowed
    @no-defun-allowed Před 7 lety +81

    Was the 5:55 time intentional?

  • @jesset2550
    @jesset2550 Před 9 lety

    Can you make a video on mutyplexing with shift registers

  • @davidegarau6572
    @davidegarau6572 Před 5 lety

    is it possible to convert the digital signal from a mouse to an analog signal? (like the analogic of the controller)

  • @ddcddc_
    @ddcddc_ Před 9 lety

    How can i increase or decrease the frequency? Have i to change the delayMicrosecond to a smaller/bigger value?

  • @jhon7785
    @jhon7785 Před 9 lety +1

    Hey, quick question. From where did u learned to make this dac, or will we learn how to make n program a dac in computer science?

    • @greatscottlab
      @greatscottlab  Před 9 lety +5

      Atyub Khan No, computer science will not cover this topic. Study electrical engineering and you will learn it

    • @jhon7785
      @jhon7785 Před 9 lety

      :( too bad I'm more into computer science but anyways thx and yeah nice video

    • @MitchAltimus
      @MitchAltimus Před 9 lety +6

      Atyub Khan If you are interested in projects like this, you should research Computer Engineering. Computer engineering is a nice mix of computer science and electrical engineering.

  • @mwyson4095
    @mwyson4095 Před 9 měsíci

    I wish I knew more about electronics.

  • @davepowless7227
    @davepowless7227 Před 9 lety +2

    Hey Great Scott, I think it would be very useful to put together video that contains components and their functions. For example you mention a mosfat, the average noob does not know how they work. Thanks, and keep using the work bullshit to describe lazy ways around problem builds. :)

  • @BrianPletcher1
    @BrianPletcher1 Před 5 lety +1

    Is it a mistake that 1000000 was supposed to be binary but wasn't written as B10000000? And 200 is in decimal? I was a bit confused by that part.

    • @louroboros
      @louroboros Před rokem +1

      Yes, definitely should be 0b10000000

  • @chrismesogitis9310
    @chrismesogitis9310 Před 6 lety

    How do you generate the sine wave with the resistor ladder?

  • @dinesh0743
    @dinesh0743 Před 6 lety

    What resources you used to learn electronics ...?

  • @a.bax.5992
    @a.bax.5992 Před 6 lety

    Does the DAC account for DC bias adjustment?

  • @yongkoam
    @yongkoam Před 9 lety +1

    Hi Scott,
    Can you make a project for kids? thanks in advance

  • @hanau73
    @hanau73 Před 8 lety

    What is the job of a A/D converter in a Audio/Video Receiver....mine says it will handle 24/96khz?

  • @sagnik489
    @sagnik489 Před 7 lety

    which oscilloscope to buy ? what should be the specifications ?

  • @haralambie01
    @haralambie01 Před 8 lety +6

    I wish you told us what values you used for the LC filter.
    thanks
    Nice video, but you go way to fast.

    • @tunahankaratay1523
      @tunahankaratay1523 Před 6 lety

      Mitch Anderson The formula for the cut off formula is F=1/2*(pi)*L*C You can choose 2 of the 3 (frequency, inductance, capacitance) and use the formula to calculate the third.( try to use a high frequency to keep the coil and the capacitor small.)

  • @merveozdas1193
    @merveozdas1193 Před rokem

    When you put the signal in a loop between 0 to 256, the voltage does not chnge. Why? Because at the beginning of the video the votage level is changing by the bit, for example; if 7th bit is active, it is 2.32, if it is close to 256 its voltage is 3.72.

  • @MrJef06
    @MrJef06 Před rokem

    Interesting video but the fact that anti-aliasing filters are not mentioned (in the context of audio at least) contributes to the common misunderstanding that digital audio signals inherently contain "steps" as shown at 2:53.

  • @victorienpetitclerc4062

    Hey ! how do you code the sinewave signal ?

  • @EsserPeter
    @EsserPeter Před 7 lety

    Hey man! thank you for this great video
    around 3:50 you show a DAC 0800LCN. This is the same as I bought but I'm quite confused, how to connect it to the arduino... Could you help me with this task? would be great ^^
    Anyway: Keep up the good work!

    • @snnwstt
      @snnwstt Před 6 lety

      If you are still looking for it, check the datasheet at www.ti.com/lit/ds/symlink/dac0800.pdf. For the Arduino, you have to connect B1 to B8 (already binary, or logical bits, if you prefer) and ground. You may want to use an external power source for the chip voltages which are not related to the binary digital inputs.

  • @arrshithrg5359
    @arrshithrg5359 Před 7 lety

    yo man can we vary output voltage (peak to peak ) digitally without using any external voltage divider

  • @yellowledbutter
    @yellowledbutter Před 7 lety

    Hi, wonder if you could help.. I want to integrate two existing circuit boards that both deal with digital audio. Can't write a full explanation here, just want to know where I could get help with this? I know virtually nothing about electronics so I'd happily pay someone with the skills to write me some instructions. Any suggestions for where to go online for this kind of help? thanks guys

  • @yigityildirim8974
    @yigityildirim8974 Před 3 lety

    5:55. Nice

  • @IlhamDefraN
    @IlhamDefraN Před 9 lety

    digital can also representate as + and -, 1 and 0

  • @mnelson10000
    @mnelson10000 Před 9 lety +2

    Not sure I'm getting it... I'm trying to get an analog 0-10v from Arduino's PWM.... is this what I need?

    • @greatscottlab
      @greatscottlab  Před 9 lety +1

      Like I said it is a bit difficult to get true analog values from the PWM pins. Better try the PCF8591 and an OpAmp to get to the max 10V.

    • @mnelson10000
      @mnelson10000 Před 9 lety

      A video idea, maybe? ;)

  • @karenma7704
    @karenma7704 Před rokem +1

    At 1:45, your circuit's 2R resistor and ground is connected on the wrong side of the R ladder.

  • @World_Theory
    @World_Theory Před 7 lety +7

    There is a plugin for The GIMP, called wavelet decompose. It losslessly separates the the detail levels of an image, into layers that you can edit, and then put back together. As I understand it, wavelets are just a feature (or something) of signals. So I was wondering if this concept could be applied to audio.
    Perhaps it could be used to make an equalizer, or to split an audio signal into parts best suited to specific speakers, which have more favorable frequency responses.

    • @dishonoled9685
      @dishonoled9685 Před 7 lety

      World Theory basically Fourier transformation, allows you to transform a signal from time to Frequency , just like an Equalizer

  • @libsingburg
    @libsingburg Před 8 lety

    what code are you using for the sine waveform? thanks ahead!

  • @hariwantstoplaygame5093

    im trying to work with AD5791 DAC , if you have any knowledge regrading it pls share

  • @mubasheer5584
    @mubasheer5584 Před 4 lety

    Hi. How to convert analog read value to binary and print it on the serial monitor. Can you please suggest me a basic code

  • @igorfagundes3785
    @igorfagundes3785 Před 5 lety

    What are the names of devices in 4:58? I can't hear in english very well

  • @arthursgarage6550
    @arthursgarage6550 Před 4 lety

    Could you make a video on the dac 0800

  • @benjyboba
    @benjyboba Před rokem +1

    I am wondering about D/a converters because when I were a youngster, I heard a cd player and amp that had no names on it, were simple and straight forward but the quality were insane compared to any production system I have ever heard since. It must have been a dedicated Dac to do the job properly as intended. I were told it were 24 bit and it were the most perfect sound I have ever heard. Nothing comes close. The system produced 3d sound including height, width and depth from two speakers and sounded like I were in heaven. I very much doubt it but I wondered if anyone would know what Dac were used. I suspect the way they are put together on the market is wrong. I know how important the dac can be for the sound quality so that it can be balanced and related with the correct frequency's. It looks like I have a very hard journey and I wish to recreate for my personal use a proper sound system. I have tried to rebalance all my equipment sounds using an eq and it's impossible to relate the frequency's correctly. When I try and balance certain frequencys it unbalances others. I want a fully balanced linear sounding experience that just produces the magic. I need help on this journey for sure. I don't know if modified amps, cd's etc is the way to go. I need to discover the truth so I can enjoy my music how it were intended to sound. Surely there must be a few people out there that know the truths and could help me on my real sound quality I seek. I will say it were my best experience I ever had in my life. Where do I begin. ? I have idea's but need to have a good start of the sound source or the rest is sure to be doomed. I need it engineered for the job as fed up with things they sell in shops not doing anything near the intended sound. Proper linear sounding.

  • @arthursgarage6550
    @arthursgarage6550 Před 4 lety

    Can the 0800 chip work off of five volts?

  • @ahmedansari6827
    @ahmedansari6827 Před 2 lety

    Can we make a workable function generator using Arduino? U0 to what frequency?

  • @ivangil-silva2044
    @ivangil-silva2044 Před 3 měsíci

    What does it sonically mean if you hit 255 and not 256 which is a pair number?

  • @chandinihanusha9435
    @chandinihanusha9435 Před 3 lety

    What is the DAC's role in construction of A to D converters?Pls can anyone answer this question

  • @HiHi-vr3nd
    @HiHi-vr3nd Před 2 lety

    What software language do u use ?

  • @willfowler811
    @willfowler811 Před 2 lety

    Was not expecting to see the band Weed here.

  • @simonfox_8559
    @simonfox_8559 Před 6 lety +6

    The video length is 555. LOL

  • @janinapalmer8368
    @janinapalmer8368 Před 7 měsíci

    Clear as mud 😂...!

  • @anthonyhampton3561
    @anthonyhampton3561 Před 7 lety

    Guten tag, I have a situation and I need your expertise. I'm trying to output constant dc voltage to a relay to keep it open at 2volts from the 9 pin on my Arduino to control my washing machine using PWM and analog write. The problem is that I hear the relay clicking super fast. Do I just need to set up an LC low pass filter?

    • @telefon72
      @telefon72 Před 6 lety +1

      Anthony Hampton why 2 volts?

    • @laszu7137
      @laszu7137 Před 5 lety +1

      You created a mechanical oscillator, lol.

  • @sabeenak5829
    @sabeenak5829 Před 3 lety +1

    How can I convert serial data to analog data? Please help!

  • @adekanmbioloyede4727
    @adekanmbioloyede4727 Před 2 měsíci

    Great scott. Nice job but why didn't you show us the Arduino codes that generated the sine waves. You only showed for ramp and triangular which are easier to comprehend. I would want to see the boys incremental for sine wave since it isn't as proportionally stepwise as ramp and triangular. Thanks

    • @adekanmbioloyede4727
      @adekanmbioloyede4727 Před 2 měsíci

      Bits incremental I mean. Also how can you manipulate the frequency of the functions in the Arduino codes

  • @bzqp2
    @bzqp2 Před 4 lety +3

    5:00 why is there a photoresistor and an IR diode soldered there?? xd

    • @davidrubio8673
      @davidrubio8673 Před 3 lety +1

      it is not a ir diode, its an NTC and they are used for testing. The PCF8591 also offers 4 adc inputs so you can read the analog values of those components.

  • @atharvaabhyankar9516
    @atharvaabhyankar9516 Před 6 lety

    U r GOD

  • @dedygunawan1607
    @dedygunawan1607 Před 6 lety +1

    Make frequency to analog conventer arduino

  • @bobzdar9442
    @bobzdar9442 Před 8 lety +12

    goes too fast

  • @likithkulal5573
    @likithkulal5573 Před 8 měsíci

    Do i get 0-5 volt output in dac?

  • @arrshithrg5359
    @arrshithrg5359 Před 7 lety

    can we control the output voltage of a dac , form millivolts range to 10 volts

  • @incxxxx
    @incxxxx Před 4 lety

    Why it does not work properly for PORTC (A0, ..., A7) as for PORTD (2:43) ???

  • @RC-ij4je
    @RC-ij4je Před 7 lety

    Hello, i`m building a laser projector with brushless motors. I realized that controlling it with PWM signals makes the motors go crazy and draw weird things, so i`m planning to use one DAC per motor. I`m using an arduino MEGA, with many pins. And pins 0 to 7 are busy connected to the LCD and control switches. How can I setup different pins for the DACs and how can I connect multiple DACs?
    Thanks

    • @Loundre3
      @Loundre3 Před 7 lety

      I recommend using serial DACs, and if possible it containing multiple DACs in one package.

    • @RC-ij4je
      @RC-ij4je Před 7 lety

      Thanks! I found a double DAC module that works through I2C interface at my local shop. Maybe I'll post a video on my project!

    • @Loundre3
      @Loundre3 Před 7 lety

      Glad to have been of help.