I've built discrete DAC's for fun before. More practically, I tend to build ad-hoc DAC's using a few free uC GPIO pins. I can say with certainty, give discrete R-2R DACs a try! The advantage of a discrete R-2R resistor ladder network DAC is that you can bulk buy resistors and use a good measurement method to "bin" the resisters to better than the precision/tolerance on the tin. That is, you can buy 1,000 units of 1% or better resistors, and build a 12~24 bit DAC with cherry picked / matched resistors. Furthermore, you can buy resistors with 10x higher resistance as parallel "trim resistors," or resistors with 10x lower resistance as serial trim resistors. You can also go completely nuts and stack trim resistors, thus trimming the trim resistors. Every order-of-magnitude trim resistor you provision for will give you a corresponding order of magnitude increase in precision. It's simple why; a 1% precision on a resistor that has 1/10th the affect on the output behaves like a 0.1% resistor that has full authority over the output. Finally, to be totally ludicrous, you can get resistors with matching/balanced temperature coefficient so that it has better thermal stability. You *CAN* build a work of art grade DAC using discreet components... but, to be fair, a great DAC IC is only a few bucks too... so.... :/
@dinistor1254Ай бұрын
also there's a plenty chineese 0.1% resistors on sites like aliexpress. They go higher in price but those 20pcs that i bought really fitted into 0.1% tolerance (measured with HP34401A whose last calibration was done in 1996, so take this information with a grain of salt). They also promise 25ppm/c TCR but i did not measure it, because i have no proper thermal chamber
@sc0orАй бұрын
Instead of buying boxes with resistors, you can use some Python script and draw wire resistors just on a PCB. With having the smallest resistor as 0.2mm by 10cm 1oz (if I'm not mistaken, its resistance is 22 Ohms), you can place an entire weighted 16-bits DAC on a 30x10cm of 8 layers PCB (make sure you select a same oz for outer and inner layers). I think this is the cheapest 0.0000...1% resistor in the world (as cheap as 15 euros for one weighted string). Then you have to feed it with a current source, add 16 more same PCBs as a summing network, and 16 precise commutators (like a cmos on/off with a an OpAmp for a full compensation) PS You can use yet more 0.2x10x1oz wire on the same PCB in the current source to compensate a temperature while the wires become hotter
@dinistor1254Ай бұрын
@@sc0or Did you know why copper is a bad resistor material? It got huge TCR. And your copper traces will get temperature gradient, so "equal TCR will create equal offsets" argument is not applicable here. For 8+ bits DAC it's better to just buy IC, or use some old R2R resistor matrix (like soviet 312NR6, 10bit R2R resistor matrix), if you're able to find one. They got difference in TCR at ppm's range.
@victorman2227Ай бұрын
@@sc0or Even ignoring the copper TCR problem, PCB manufacturing processes aren't perfectly uniform, somewhere there will be over-etching, in other places it will be under-eteched a bit. And 0.2 mm 100mm 1oz trace will be about 0.38 Ohm.
@ArneChristianRosenfeldtАй бұрын
@@dinistor1254what if I buy special wire and wind it around a (ceramic) frame? Like a piano forte . I could even adjust the taps. Why do we care about temperature in a R2R ladder? How low is the noise of a power supply? How low is the resistance of the mosfets in front of the Rs of the ladder? 1mV relative to 5V ! So this is not even good enough for CD audio (invented 1981).
@hardwarefulАй бұрын
ultrasonic bath trick: fill with water, put IPA in a Ziploc bag PCB goes in the bag
@SineLabАй бұрын
Thanks, I'll keep that in mind for next time
@hardwarefulАй бұрын
@@SineLab Enjoy! On that note though, I've had the Ziploc bags come apart after leaving the solvent in them for a few weeks - so it's not really suitable for prolonged storage between uses.
@grozaadrian4134Ай бұрын
@@hardwareful ideea sounds good .. to not waste IPA but i have a question, did you had plastic depositions on PCBA ? also great work done by @SineLab
@FrainFreezeАй бұрын
glass jar is good too.
@johanness6545Ай бұрын
@@hardwareful You can use a glass jar as well, it transfers the ultrasound even better than the plastic
@Gengh13Ай бұрын
Making discrete versions of ICs is an excellent way to learn. Great job.
@borissinagaАй бұрын
This is amazing. I can't start to imagine the amount of effort you put into this video.
@SineLabАй бұрын
It took a while to finish this project. :)
@WarkWarblyАй бұрын
Just so you know, this video was more awesome than you think. Really insightful. It also seems like you upgraded the camera and audio a few times over. I say keep at it and before you know it there'll be more comments than you can read in a single lifetime.
@SineLabАй бұрын
Thanks, this video took quite a while to make. I'm glad you enjoyed it!
@FriendlyIntentionsАй бұрын
You really should not be using "Earth" and "Gnd" interchangeably in circuits. Earth is usually mean to signify Protective Earth from a AC source. So using "Earth" as "Ground" although technically correct is not the right way to do it since. "Gnd" in a PCB refers to the V0 reference plane and NOT "protective earth" since the GND plane can be floating in a isolated AC to DC converter (which most AC to DC converters are and should be)
@SineLabАй бұрын
I'll make sure to better distinguish earth from ground in future projects.
@sqeekykleen49Ай бұрын
😂 earth and god... oh gnd
@Mr.LeeroyАй бұрын
Everything following the first sentence is incorrect or really bad wording either.
@kiyoponnnАй бұрын
what's the difference between virtual ground and gnd?
@mateijordache195227 күн бұрын
@@kiyoponnna point on the circuit not attached to ground, but has a feedback loop driving to ground, so they are “virtually” the same.
@NNNILabsАй бұрын
Loved the video! Building discrete ADCs and DACs is something I really like, and testing linearity using a Python script and a Keithley bench DMM is very reminiscent of the sort of stuff I do. By the way, the K2010's input impedance in the 0.1V, 1V and 10V ranges is supposed to be greater than 10GΩ, so I don't think it was loading the DAC significantly.
@georgewaller7080Ай бұрын
Mate, with soldering skills like that, just get the PCBs assembled at JLCPCB!
@mikemironov7551Ай бұрын
I've made 1pin DAC once. It consisted of single capacitor and was driven by PWM:)
@opinairАй бұрын
if u dont need speed ..yes ..that what i do all the time 😊
@opinairАй бұрын
higt frequency pwm give faster abd beter result😊
@opinairАй бұрын
i discribe a beter aproche using resistors in comment. take a look.
@destiny_02Ай бұрын
i made the same thing, but it was noisy even with 300khz pwm
@opinairАй бұрын
@@destiny_02 with 300kh abd 5v pwm use 3.3kohm and 0.47 uf
@harrylenon9594Ай бұрын
in modern silicon processes, transistors are so small they are essentially free. Resistors on the other hand, can take up lots of space so replacing a resistor stage with a diff pair stage is very worth while. matching is also easier to accomplish with inter-digitated fets
@mikeselectricstuffАй бұрын
Tweezers are such a slow and painful way to hand-place large numbers of parts - get foot-operated vacuum pickup tool & pick from tape - not only is it way faster, the orientation is always right.
@SineLabАй бұрын
I'll take a look into getting one
@silverXnoiseАй бұрын
Would it be feasible to use resistor arrays in this design? @mikeselectricstuff Your lighting and display installations are the thing of legend, I have learned a *ton* from your videos, thanks for sharing your knowledge and experience!
@dinistor1254Ай бұрын
100LSB INL error makes this no better than 8bit R2R DAC build from 0.1% resistors, unfortunatly... But you can make software correction for INL graph by calculating error function of output voltage (excel can do best fit polynomial). As mentioned in other comments, you should try R2R DACs, they give good results with resistors like 0.1% if you measure them and find best fit for nominal value. Of course, this is up to a certain point - when TCR difference of resistors, difference in switch resistance and many other effects will become noticable. There's reason, why in DAC8831 first 12 bits are done R2R, and last 4 are done with 15 separate resistors (Fig.44 at TI datasheet). I think this is for laser trimming. Also, your circuit reminded me of Kelvin-Varley Divider at first - maybe check it out. Anyway, this is good video demonstration! subbed:)
@totally_not_a_robot1342Ай бұрын
Cool stuff, I just finished up a project at work using VISA commands.
@jenyjek5055Ай бұрын
awesome work! only one major thing yu done wrong - dont use Isopropanol directly in the ultrasonic cleaner, some chinese cleaners may be incrorrectly grounded and having an open solvent is a huge fire hazard - especially if there is 3/4 Litres. i recommend having a plastic container with a lid where you put your isopropanol and stuff, and put this container into water in the ultrasonic cleaner. This has two advantages - mainly uou use less isopropanol and have it insulated
@SineLabАй бұрын
Thanks, it does seem much safer that way
@hendriagustian7082Ай бұрын
Multiplexer/demultiplexer plus opamp, can be base 2 or 10 (ten).
@victorman2227Ай бұрын
Cool! The idea of cascaded string DACs looks similar to a Kelvin-Varley divider.
@benjaminhanke79Ай бұрын
I misread the title and thought it's an discrete ADC. I would love to see that because I can't imagine how these things work. I've no problem understanding a DAC I've seen a simple resistor ladder DAC.
@antonf.9278Ай бұрын
From tha datasheet of a MC I used a while back: input -> buffer -v DAC -> comparator -v ^- control circuit
@benjaminhanke79Ай бұрын
@antonf.9278 I'm not that deep into microelectronics but as I understand this would require a lot of switches (transistors) to put the right voltage in the comparator and has to be much faster than the sampling rate you want to achieve.
@SineLabАй бұрын
I may make an ADC at some point.
@thephantompsychicАй бұрын
Would appreciate it if you did! High precision and speed ADCs are something currently reserved for high price ICs (for good reason) but I'd greatly appreciate watching you get down to the basics on that!
@ArneChristianRosenfeldtАй бұрын
@@thephantompsychicADCs are made of OpAmps. OpAmps seem to contain two magic parts. In both cases two transistors are monolithically integrated. On part (or circuit) is the long-tailed differential amplifier, which is a little immune to supply voltage bias and noise. The other one is the current mirror. Now I do wonder if a microcontroller could manage these circuits and some MOSfet transfer gates. Throw in capacitors and inductivities. I imaginen that capacitor and inductivity form a damped oscillator. We calibrate for zero crossing and get the precise result whereas otherwise we would need to wait forever. A flash ADC has a string of these amplifiers supplied by voltage from a string of resistors. I like the analog nature of a single stage amplifier. Maybe we can mix their output to get better linearity?
@sebastian19745Ай бұрын
There are transistors pairs in the same case that are well matched and also multiple transistors arrays that are very well paired and with nearly identical parameters. I know that those are more expensive, but for your specific case, you may try them. Also, can reduce component count.
@AnotherBrokenToasterАй бұрын
It's funny how simple a string DAC seems vs what a nightmare it is to actually make hahaha. Great video BTW.
@SineLabАй бұрын
String DACs can be deceptively complex.
@ophelloАй бұрын
What’s wrong with a ladder DAC though? If the resistors are accurate enough, it seems like the simplest and most elegant solution.
@andytrooАй бұрын
could you have a couple of micro adjustable resistors on the inner string - you'd only need 4 perhaps even 2 to tweak the values there to bring them into linearity
@opinairАй бұрын
to create a digital-to-analog (DA) converter. For example, consider a 3-bit setup where each bit is connected to a resistor. The first resistor has a value of, say, 1 kiloohm. The second resistor is double the value of the first, meaning 2 kiloohms, and the third is also double the previous one, thus 4 kiloohms. All output points are then connected to a single point, which serves as the output....easy😊isnt
@jarvisxiiiАй бұрын
Wow, Very cool! DACs rule!
@yellow_noise3Ай бұрын
Well, amazing effort, but how it sound?
@ModelLightsАй бұрын
While you're at it, note something does work that you will just about never see. Take a look at the DAC R-2R, and note that just a 374 latch or similar would drive it for 8 bits. So 8 bit digital pattern, directly driving and converted into an analog output value. You can do the opposite. Long ago looking at that, it hit me to do the reverse, analog in value directly to a digital output pattern. Comparator for first bit, high low set at the middle point. Next bit is set for 3/4, but if the high bit is low, that same low output pulls another resistor low that cuts the reference to the 1/4 level. So the second bit can determine either the high second bit or low second bit transition, with the first bit selecting which one. And work on down the line. Easy enough to do 4 bits and have fun testing it, gets hairy of course if you go further. Of course there are race and hysteresis type issues, but it is a fun idea. Even back then there was some small amount of prior art, but it's only barely used for 2 or 3 bits. You're better off using more comparators or going to a real ADC.
@ArneChristianRosenfeldtАй бұрын
Atari ST and Jaguar connect a R2R network to CMOS output pins of the purely digital GPU to create RGB analog video out.
@supul32Ай бұрын
You can use JFETs instead of back to back MOSFETs.
@ivololАй бұрын
Unfortunately they are way more expensive currently
@SineLabАй бұрын
I would have if the JFETs were as cheap as MOSFETs
@supul32Ай бұрын
@@SineLab You can find many MPNs for cheaper prices at LCSC, I often get JFETs from them. :) There is a JFET sub category under the Transistors/Thyristors. for an example You can get J109 for around 20 cents. they also have hundreds of SMD MPNs as well. All in stock. Also, most of them available at JLC assembly library as well.
@supul32Ай бұрын
@@SineLab BTW, great video!
@stephenkioko4205Ай бұрын
Another descret components circuit,thanks bro
@marcinelektronikАй бұрын
Ultrasonic + heat + 99% IPA = FIRE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@roms_jr6 күн бұрын
🤥
@bubbasplants189Ай бұрын
Nice video lol I'm working on something similar, but made a 4 bit r2r ladder dac. It's so awesome to use math to generate analog signals!
@QsdertoАй бұрын
It’s better to try assembling a microwave ADC using discrete elements. Because they are actually almost unavailable for purchase. I would like to build a homemade oscilloscope.
@KangJangkrikАй бұрын
Precision resistors would fix that inaccuracy problem
@Baba_KushАй бұрын
I am fine with my 1-Bit DAC outputs :D
@paulstubbs7678Ай бұрын
Interesting, I was watching to see you get a signal (I assumed audio, as when I saw DAC in the title I assumed...) from a PC to your DAC, but you didn't go there. I have this ancient HP 'DAC' that I thought would be interesting to try and feed some audio into it to see what happens (it was intended to drive chart recorders). However getting a PC to route audio out a serial port where an Arduino etc can grab that data and feed it into my DAC is a problem.
@KludgesFromKevinsCave25 күн бұрын
Hmm... For Q7-Q10, Q14 and maybe Q11-Q12, I'd have probably used a 74xx4066 rather than all those 2N7002's. One SOIC-14 is an easier soldering job than eight SOT-26's, and those transistors are all right next to one another in the circuit. (Didn't go through the schematic in detail to look for other things like that.) Did it really simplify your layout that much to use all those 74LVC1G04 rather than six-packs? If you have only a few components on the back side of the board, you can use paste with a lower melting point and reflow with hot air. Easier than hand soldering, at least with my shaky hands. I've built a few mirrors recently with DMMT5401 matched pairs. They seem to work pretty well, but I don't have your measurement tools. The biggest single takeaway from this video is that analog IC's (and ADC's and DAC's) are amazing things that you are never going to replicate properly with discrete components. But it's fun to try - and important to learn what's going on inside those prepackaged miracles.
@isoslowАй бұрын
Shoud've done R2R honestly. R2R is superior AND simpler than your contraption at the same time.
@odissey2Ай бұрын
The string DAC has superior INL. With 8-bit R2R, the INL>1 is common
@atoomnetАй бұрын
At <a href="#" class="seekto" data-time="790">13:10</a> please be careful with your combustible cloud generator.😲
@atoomnetАй бұрын
Wait, I changed my mind: do NOT use any combustible liquid in an ultrasonic clear.
@olegpetrukhin3572Ай бұрын
In one device I saw the following signal conversion chain: photodiode -> amplifier -> ADC -> DAC -> ADC. Why do you think the developer chose this scheme?
@GermanMythbusterАй бұрын
😖😖<a href="#" class="seekto" data-time="757">12:37</a> - Please get your self some flux, will make your life a lot easier :) <a href="#" class="seekto" data-time="800">13:20</a> - Also you don't have to fill your whole Ultrasonic cleaner, just fill it with water, take a smaller container (plastic bags work too) where your item barley fits in and fill that with as much solvent/cleaner as you need to cover it, then put the smaller container in the Ultrasonic cleaner with water. Saves you a lot of money and you contaminate less solvent, at some point the whole board would just get a little sticky. IDK what you pay for solvents but I bought a cheap glas still and every one or two years I distill my dirty solvents. Even with the first run I broke even.
@xenoxaos1Ай бұрын
Could you use the internal RDSon of the mosfets to make a dac?
@SineLabАй бұрын
It would be very difficult to match RDSon for each MOSFET, but I guess it might be techincally possible.
@mspeirАй бұрын
Where do you get the hot plate?
@YoutubeBorkedMyOldHandle_whyАй бұрын
I bought one like this on amazon. They're cheap, only around $60. However, I'm not happy with putting PCBs directly on the plate. I put mine on a thick piece of aluminum for more even heating. First I suspend this about an inch above the hot plate to pre-heat the plate and PCB for a few minutes, then I move it onto the hotplate to finish the job. Another guy I know uses a square fry pan in the same way.
@mspeirАй бұрын
@@KZbinBorkedMyOldHandle_why Hmmm... Maybe I'll go the DIY reflow oven route. Thank you! I appreciate the response.
@SineLabАй бұрын
I also got my hot plate on amazon.
@MrshutterАй бұрын
Dude, use a R-2R resistor ladder network to create your DAC. I'm so confused
@AlexanderBukhАй бұрын
No comparison of off the shelf and diy on same screen? Sad. 😢
@chrisharper2658Ай бұрын
If one LSB is 175uV then wouldn't 3 LSB be 2^3 * 175uV or 1.4mV?
@ivololАй бұрын
Depends if you are counting by the bit/code, or the value
@SineLabАй бұрын
In this case, an LSB refers to the amount of voltage in just the first bit. 3 LSBs here means that increasing the code by 1 caused the code to increase by 3x what was expected.
@chrisharper2658Ай бұрын
@@SineLab That would be 2 LSBs since the B stands for bits not counts.
@smartups1Ай бұрын
G.O.A.T
@smartups1Ай бұрын
Class D next part ?
@snozkingАй бұрын
<a href="#" class="seekto" data-time="74">1:14</a> im sigma
@YoutubeBorkedMyOldHandle_whyАй бұрын
I've never understood why DACs always seem to be so damned expensive. Now ... I think I know.
@unknownhuman1000Ай бұрын
That was more complicated than necessary
@geekrulz1Ай бұрын
please learn how to pronounce scpi (The Standard Commands for Programmable Instruments (SCPI; often pronounced "skippy") )