DAC using R-2R resistor ladder

  Рет қаралды 112,640

bitluni

bitluni

Күн бұрын

Пікірлер: 108
@gswright99
@gswright99 11 жыл бұрын
Awesome video. The effort you put into time lapse filming as well as etching your own circuit boards has produced a very high quality instructional lesson. This is exactly what I was looking for! Thank you!
@alvarochaim1643
@alvarochaim1643 3 жыл бұрын
instablaster
@DirkIronside
@DirkIronside 7 жыл бұрын
I'm happy you put the timelapse of you manually connecting the resistors that did not show the desired result. It's very true to the scientific method.
@rickkrieger
@rickkrieger 8 жыл бұрын
The time lapse showing the voltage points getting plotted as you set each bit was VERY cool (and educational)!
@jeffbeck6501
@jeffbeck6501 11 жыл бұрын
This guy has a good education and knows what he is doing at the lowest levels, from the chip up. Thanks for the education.
@jeffbeck6501
@jeffbeck6501 11 жыл бұрын
This is a great video, with a great explanation, and a cool accent to boot.
@eloycalatrava153
@eloycalatrava153 2 жыл бұрын
Good explanation and very good video. Let me please add some comments related to the signals you can get by using that configuration Arduino + R2R ladder, in special to the conclusion you mention as "Super fast". The 300ns or 3.3MHz you have got are the maximum speed at which the microcontroller can make an operation when clock is 16MHz. If clock is at 16MHz you can get one operation each 62.5ns ( = 1 / 16MHz), the 300ns are 4 times that period ( 300ns = 4 x 62.5ns). Additionally, if you read the microcontroller specs, you can find that, quoted, "The interrupt execution response for all the enabled AVR interrupts is four clock cycles minimum". So, all in all means that you can do something each 4 clocks, that means 300ns, cannot go faster than that. Then, if you would like to create a sine wave with 100 samples in each period you will need to consume 100 times 300ns giving 30us per period that correspond to 33.3KHz. But that is the maximum theoretical frequency because you will need to perform more than one operation each time you would like to change the output value. By using internal timer I could not go beyond 2 to 3 KHz.
@noweare1
@noweare1 6 жыл бұрын
I've been wanting to do this for a while now. Thanks, subscribed
@stewartrv
@stewartrv 5 жыл бұрын
Why not use the op amp as an active low pass filter too won't it will remove the spikes from the switching?
@mrunhappy008
@mrunhappy008 10 жыл бұрын
Great explanation of the R-2R ladder, thank you!
@Zidpato
@Zidpato 9 жыл бұрын
Muy buen video, tuviste la paciencia de explicar y mostrar los resultados, muchas gracias, contribuyes al conocimiento de muchas personas
@Nikmannet
@Nikmannet 10 жыл бұрын
Very good video, that is much better then just PWM.
@cojad
@cojad 10 жыл бұрын
This series is so inspiring!! Thank you!!
@u0000-u2x
@u0000-u2x 3 жыл бұрын
great video! I like the Fallout 1 inspired soundtrack during the montages :D
@harishlakshmanapathi1078
@harishlakshmanapathi1078 5 жыл бұрын
you have gained a new subscriber amazing explanation man!!!
@Bertoos8
@Bertoos8 10 жыл бұрын
Very nice tutorial! I understood things that I coudn't in the University class! If you upload more videos would be great! Thank you very much!
@word2RG
@word2RG 9 жыл бұрын
Very well presented! Thanks for sharing and for the hard work.
@shyleshsrinivasan5092
@shyleshsrinivasan5092 4 жыл бұрын
Thanks a lot for this video ! Very instructive and enlightening !
@renatoortega6618
@renatoortega6618 6 жыл бұрын
Congratulations. Your video is exactly a good work!
@Rastapapulus
@Rastapapulus 3 жыл бұрын
6 years later I am watching this and hope to find the 16bit version in your channel. let's go search for it.
@hixidom2274
@hixidom2274 6 ай бұрын
Amazing how well that works. I wonder if using tiny resistors in your 8-bit design results in better bandwidth than using normal resistors.
@hixidom2274
@hixidom2274 6 ай бұрын
Haha I skipped all your equations but now that I'm making it I have to go back and watch that part to learn what the voltage ratio will be on the output (what resistance to use).
@RetroKafas
@RetroKafas 3 жыл бұрын
When the DAC connected to the arduino we can't talk about the output voltage going from 0V to 4.5V right? Resistors still driven by the TTL-LOW voltage of more than 0V so there would definitely be a dc offset in the output signal.
@OswaldChisala
@OswaldChisala 8 жыл бұрын
Wow, you're one of my favorite KZbinrs now. :)
@nielsdaemen
@nielsdaemen 6 жыл бұрын
If you hook up an sd card with a 8bit mono 44.1 Khz wav file and just read every byte from the file and write it to the port (you do have to make shure it is played back at 44.1khz), it sounds really good! Who would have tought an arduino can play high quality music without any extra chips?
@sam-zy2dn
@sam-zy2dn 4 жыл бұрын
Thank you so much! Could you please also explain how you made the circut board ? ( from the software, and the material that you used ) ! I am insipired by this channel and want to learn more. Thanks !
@4mb127
@4mb127 8 жыл бұрын
Great example on R2R ladder. Thanks! :)
@a.b.c.d.e...
@a.b.c.d.e... 2 жыл бұрын
„Lets go to the complete 8 bits“ *Starts performing litteral witchcraft*
@yourdiytechlife
@yourdiytechlife 5 жыл бұрын
This was a great video. it helped me to understand how digital to analogue really works. its surprisingly far simpler in function than I had imagined. The one question I still have is, with audio equipment how do they clean out all the spikes in voltage as the circuit switches. Is that all done with an analogue filter of some sort?
@teodorpetrut7784
@teodorpetrut7784 6 жыл бұрын
As far as I observed the 8-bit DAC showed like 100 kHz sample rate, not 3 MHz. Why?
@francoisdastardly4405
@francoisdastardly4405 6 жыл бұрын
Very clear and educative. Thanks !
@AkkaiNangi724
@AkkaiNangi724 Жыл бұрын
can i use this DAC to construct a function generator by using a raspberry pi
@MrElectrosock
@MrElectrosock 9 жыл бұрын
Why don't you connect a small capacitor to the output of the converter 2R-R or the input of the operational, this would eliminate the jump of bits and make the best sinusoidal signal, maybe about 47 nF is Ok.
@bitluni
@bitluni 8 жыл бұрын
+Angel Jimenez long time ago.. not sure, why I didn't. probably because if you have very steep waveforms like square you don't really like to have the smoothing. But you can du it for sure if it fits your needs :)
@XLCaudio
@XLCaudio 10 жыл бұрын
is there somewhere where I can find the code you use?
@yoramstein
@yoramstein 8 жыл бұрын
Great video- zehr grundlich. I have learned a lot of it.
@galihtanu
@galihtanu 3 жыл бұрын
How about use shift register? You can get 16 bit on mono or 8 bit on stereo
@THEELECTRICGUY
@THEELECTRICGUY 2 жыл бұрын
What is the maximum sine-wave frequency achieved using this??
@mustaphaalkhafaaf5512
@mustaphaalkhafaaf5512 8 жыл бұрын
please could you send the name of the liquid you used and the paper for the printed circuit ... every thing regarded the board from software to the end ,,, thanks
@caribary
@caribary 8 жыл бұрын
have him sent you?
@simonw.4587
@simonw.4587 7 жыл бұрын
How do this work with the paper and the liquid. I don't understand. Please make an extra video where you explain how does this work and please tell me what liquid and paper do you use.
@TheCarlos206
@TheCarlos206 7 жыл бұрын
Percloruro Férrico
@kirkkirk5797
@kirkkirk5797 4 жыл бұрын
Ptofessor why are you using an Arduino instead of simply an 8 bit binary counter and a square wave on its CLK?
@FakuSatu
@FakuSatu 9 жыл бұрын
i want to know wich value did you use to do the r2r circuit fir the 8ohms speaker
@yikuangchen8478
@yikuangchen8478 4 жыл бұрын
What is the frequency of the sine wave? Is it around 3M/256 = 11.7KHz?
@johnfaro9129
@johnfaro9129 8 жыл бұрын
excellent video!!! Thanks .
@jimadams2473
@jimadams2473 10 жыл бұрын
Nice instructional video. THANKS!!
@clackberry4388
@clackberry4388 6 жыл бұрын
The sin wave output from a R-2R DAC above still is a DC signal. How can I convert it to AC signal ? (Because I want to use it as input for amplifier).
@ozerik
@ozerik 6 жыл бұрын
A high-pass filter will block the DC bias. Okay..... use an op-amp like the NE5532, connect the output of the R2R array to one of the + inputs (pin 3), connect pins 1 and 2 together (connecting the - input to the output for a unity gain buffer) then connect a 470nF capacitor (mylar/poly/film is best) from 1 and 2 over to the other side of the chip to pin 5. Connect pin 5 to ground with a 100K resistor, connect pins 6 and 7 together, and that's your output!!! You can connect a resistor between 6 and 7, and then 6 to ground, to adjust the gain of your op amp. Keep these values below 20K to avoid adding noise, and above 2K to avoid loading the op amp too heavily. Identical resistors will double your output voltages (gain), higher resistance between pin 6 and 7 will increase the gain, higher resistance from 6 to ground will decrease the gain. Pin 4 goes to your negative voltage rail (-12V is a great choice) and pin 8 goes to positive voltage (+12V, for instance.) Oh, and put a 100nF capacitor between the power pins.
@clackberry4388
@clackberry4388 6 жыл бұрын
juanito moore : Very clearly. I will try it. Thank you very much :))
@enmohamedali96
@enmohamedali96 6 жыл бұрын
Thanks man, can i have arduino code for generating sin wave ?
@srosjose12
@srosjose12 8 жыл бұрын
holo tu pusiste 1024 valores en la matriz o cuantos valores colocaste?
@himeshkurera7476
@himeshkurera7476 10 жыл бұрын
Hi, I was wondering what kind of Op-Amp you used. I was looking for one as well.
@MultiCraftTube
@MultiCraftTube 6 жыл бұрын
You can use the widely spread LM358. It is cheap, DIP8 package (or other) and works in single supply from 3 to 32 volts.
@irongarden8415
@irongarden8415 5 жыл бұрын
using pins RX and TX how then to flash?
@jangeox
@jangeox 10 жыл бұрын
Thanks! This video is awesome.
@Frisky0563
@Frisky0563 6 жыл бұрын
Hi how do we change the frequency say 1200hz and 1800hz, which op-amp did you use?
@SG-mp2nl
@SG-mp2nl 10 жыл бұрын
A very informative and helpful video, however, two questions: 1) What voltage was used for the op-amp? 2) What is the best way to vary frequency? I presume the rate of i will control this?
@bitluni
@bitluni 10 жыл бұрын
1) voltage is also 5V.. that's why the output is a bit lower. but you can use a higher voltage as long your ground is connected. 2) what frequency do you mean? a waveform of a specific frequency or the sampling frequency?
@SG-mp2nl
@SG-mp2nl 10 жыл бұрын
bitluni's lab Sorry for the prolonged response: The waveform frequency. I imagine varying the rate of our sample, e.g. "i", will achieve this?
@robertparenton7470
@robertparenton7470 7 жыл бұрын
Very impressive!
@jeffbeck6501
@jeffbeck6501 10 жыл бұрын
I just now got the real point to this video. I think it should say "This video explains the R-2R resistor ladder and how it can be used to ...create an A/D, or D/A converter". This video taught me that an AD or DA converter is just a resistor ladder and a micro controller chip. Yes, of course, now that you think about it. Thanks for this incredible video. What type of "crazy audio projects" were you alluding to? Thanks.
@dutchsailor6620
@dutchsailor6620 5 жыл бұрын
Good luck trying to make an AD converter from this
@feuerlink66
@feuerlink66 10 жыл бұрын
Schönes Video! Aber ein Frage hab ich ja: Was genau machst du da ab 7:47. Mir ist klar, dass das ein DA-Wandler wird, aber wie genau machst du das? 0o
@FloGroX
@FloGroX 5 жыл бұрын
Na analog zu dem, was er auf dem Breadboard gezeigt und erklärt hat. Nur eben platzsparend im SMD Platinenformat.
@mustafamohammed3834
@mustafamohammed3834 9 жыл бұрын
can we use it to convert serial data to analog , a diy xbee module
@bitluni
@bitluni 8 жыл бұрын
+Mustafa Mohammed DAC means actually Digital to Analog Converter so it's exactlly whats happening here
@jorgegerardoaragonvillarre2973
@jorgegerardoaragonvillarre2973 8 жыл бұрын
Can this be used instead of PWM for driving motors ?
@bitluni
@bitluni 8 жыл бұрын
+Jorge Gerardo Aragón Villarreal yes if you connect an opamp in between since the resistor ladder will not provide enough current. but don't for get to connect a diode backwards across the motor, otherwise the inductivity peaks could kill your ICs
@Nikmannet
@Nikmannet 10 жыл бұрын
is it possible to make 16 bit with 2 ports, and generate sinewave ?
@bitluni
@bitluni 10 жыл бұрын
sure.. but you have to take in account that this will result in two write operations each 8 bits. means that one of the bytes takes longer to change. this might be noticeable if you need the MHz frequency. otherwise I would add a filter cap
@Nikmannet
@Nikmannet 10 жыл бұрын
Ok, so if i use 8 bit i got 255 steps, if i will use 16 bits i should got 65535 steps or am i wrong ?
@bitluni
@bitluni 10 жыл бұрын
Nikmannet you are right
@Nikmannet
@Nikmannet 10 жыл бұрын
bitluni's lab Thats should be a very accuracy voltage regulator, have you ever done this before ?
@ValerianKapeller
@ValerianKapeller 10 жыл бұрын
Sehr schönes Ding!! Hast du zufälligerweise einen Schaltplan für das R2R 8 bit Netzwerk? Am lbesten wärs ne Schaltung ohne dem Voltage follower, muss alles so klein wie möglich halten. Sorry für Sonderwünsche, Thanks! :)
@FondueBrothers
@FondueBrothers 6 жыл бұрын
A good instructional video.
@SultanAlrefaei
@SultanAlrefaei 8 жыл бұрын
What Program Do You Use To PCB , Give Me The Link
@tiagonet8794
@tiagonet8794 9 жыл бұрын
is possible make an inverter using the circuit?
@bitluni
@bitluni 8 жыл бұрын
+Tiago NET yes it is but it really depends what frequency you need. Usually PWM is better suited if you don't need high frequencies but high currents
@tiagonet8794
@tiagonet8794 8 жыл бұрын
60hz frequency and 1200W
@bitluni
@bitluni 8 жыл бұрын
+Tiago NET you should use PWM and drive some big chunky MOSFETS. Since you do not want the MOSFETS to burn excess current you need to operate them either fully open or fully closed. Therefore you need to stick with PWM. But I think there are some nice circuits around at the web.
@tiagonet8794
@tiagonet8794 8 жыл бұрын
good !!!! you're the man!! thanks for help
@hendriagustian7082
@hendriagustian7082 Жыл бұрын
Try using (some) multiplexer and opamp
@WatchCuriousCat
@WatchCuriousCat 8 жыл бұрын
Awesome man!
@OswaldChisala
@OswaldChisala 8 жыл бұрын
How did you successfully use pin's 0 and 1 (Rx, Tx)?
@amihartz
@amihartz 6 жыл бұрын
what kind of question is that
@yalcintufan3693
@yalcintufan3693 Жыл бұрын
good. Btw if you put a little bit capacitor to the input of opamp itll be smooter. steps will dissapear.
@adx90210
@adx90210 8 жыл бұрын
Hello! Great video :D How did you calculate the sine table values?
@MicEib
@MicEib 10 жыл бұрын
wie viel Bit sind denn maximal möglich ?
@bitluni
@bitluni 10 жыл бұрын
16 Bit geht bestimmt, nur braucht man dann präzise widerstände. selbst 1% ist dann viel abweichung und dann bekommt man sprünge rein
@marcosantonio-nv9kg
@marcosantonio-nv9kg 4 ай бұрын
Hola, buen video te felicito por tu gran aporte,recien estoy empesando con arduino y serias amable de enviar el ejemplo por favor?
@tiagonet8794
@tiagonet8794 9 жыл бұрын
how to generate sine table?
@bitluni
@bitluni 8 жыл бұрын
+Tiago NET code.bitluni.net/js if you just modify the lower code to force an update, it will generate one. you can play around with the code to generate other stuff :D
@reshailraza514
@reshailraza514 8 жыл бұрын
Can we make this without using arduino?
@dutchsailor6620
@dutchsailor6620 5 жыл бұрын
any binary counter will do
@arrshithrg5359
@arrshithrg5359 8 жыл бұрын
can we control the output voltage ??
@shubhishrotriya8415
@shubhishrotriya8415 6 жыл бұрын
Sir, is there any boundation on selecting the resistor values or we can choose any arbitrary values of the resistor keeping 1:2 ration in ckt. If no, then what are th specification to be needed to keep in mind before chosing values of it.
@rakka1dude184
@rakka1dude184 6 жыл бұрын
now thats a small circuit!!!
@kingcrimson234
@kingcrimson234 9 жыл бұрын
Did anybody else imagine Rainier Wolfcastle talking while watching this?
@Bell_Laboratories
@Bell_Laboratories 10 жыл бұрын
Grande!
@d.buchko4270
@d.buchko4270 3 жыл бұрын
I guess everyone one is impressed with the R2R ladder and didn't question why no one can see the complete line of code for unsigned char sinTab.....? Maybe I have to join to see the rest of that code??
@crocellian2972
@crocellian2972 7 жыл бұрын
My God no Arduino?
@workroom-che
@workroom-che 3 жыл бұрын
А на русском слабо этот ролик перезалить? Ты ж русский?
@FailCommando
@FailCommando 6 жыл бұрын
Ah DDRD = 255; My eyes are burning. I don't like this type of coding.
Arduino audio sampling tutorial (part 1)
26:33
bitluni
Рет қаралды 382 М.
Making a 12 bit DAC Using an Arduino - The Learning Circuit
7:51
element14 presents
Рет қаралды 47 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
I made a fake CRT TV with a LASER
16:05
bitluni
Рет қаралды 744 М.
#2038 R-2R Resistor Ladder D/A Conversion
12:44
IMSAI Guy
Рет қаралды 5 М.
12-bit DAC Arduino MCP4725 How To Use It - Stable Voltage Reffrence
11:21
Going Beyond Arduino # 10: PWM D-to-A vs R2R Ladder D-to-A
14:32
Craig Hollinger
Рет қаралды 20 М.
RTR ladder DACs
8:15
Paul McGowan, PS Audio
Рет қаралды 36 М.
I made a VGA card that blew my mind
15:44
bitluni
Рет қаралды 438 М.
Analog output from PWM and a low-pass filter
14:13
nLab
Рет қаралды 12 М.
Collin's Lab: Digital to Analog Converter
4:36
Make:
Рет қаралды 278 М.
Converting an Arduino PWM Output to a DAC Output
18:48
ForceTronics
Рет қаралды 112 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54