Join us on Discord: discord.gg/jmf6M3z7XS Support the channel on Patreon: www.patreon.com/JamesSharman I did realize during editing that I got the gradient range wrong, the bars only go up to 224/255 but the test is just as valid. Should have made it 4 bars with an offset of 58 each line to cover the full range with a bigger overlap.
Fascinating build, excellently, presented! I'm decidedly *NOT* an EE, but the first thing that came to mind regarding the 127->128 jump was to dump regular binary and use Grey code, instead, as that will *guarantee* that only a single bit changes between steps. Displaying regular images would require a simple program to convert between the two image formats, but that would be pretty trivial. Does that make sense or am I missing something important? (...which is highly likely, to be honest. :sigh: )
I'm paranoid enough to animate the bar test (i.e. start from 0~255, then 1~, 2~, etc) and check if the values of the end of a bar and the start of the next are smooth as well.
I also felt the R2R approach would be fine since the spread within a single batch of resistors is often small. You just have to keep an eye on the time constants if the pixel rate is high enough. That stencil was just about the funniest thing I've seen on any of your videos, James. You had me roaring with laughter. But I was also shouting at the TV - "You need more signal grounds!" Of course, it worked out OK, but with eight data bits at pixel speeds, a pixel clock and another control signal, I was surprised that the two grounds that you had were sufficient. When you put three DACs onto a single board that won't be such an issue depending on how it's all connected together. A filtered supply to each of the DAC driver latches might help clean things up a bit too by blocking some of the general system noise on the supply. Great progress, and looking forward to the next step
Yeah, I've been thinking about ways to isolate the supply a little. VGA actually gives you signal return for each color (i.e. local GND) which I could tie into an isolated supply.
Jaguar has a resistor network on the lower edge of the Tom chip. Can’t we buy these off the shelf? I like how the cat neatly separated semiconductors and coke, soot or whatever is in a resistor. Pretty surely Jaguar was price optimized. R2R needs termination. It is straight forward to come up with a resistor network to reduce voltage. Ain’t video signals only 1 V p2p ? Now I have to look for an amplifier on the Jaguar board. It is weird that this “from scratch” build uses highly integrated circuits. Jaguar had to switch to an off the shelf audio DAC because standard equipment is just so good. PSX uses an off the shelf video DAC. So we are from scratch like a PSX?
Genuinely amazed that I had no idea your channel existed until yesterday. Your videos have a great flow and the right balance between information and demonstration.
This knd of proof of concept demo is very helpful to understand the details, very insteresing! And I appreciate the eye candy of seeing it working on the monitor at the end :). Great content as always, and it is still getting better, thanks!
Hi James. Another awesome video. :) Regarding your R2R ladder and resistor values, note that resistors come in Preferred Value series. The preferred values are a percentage relationship to each other. e.g. The E96 series has each value +/-1% of it’s neighbouring value (E48 is +/-2%, E24 is +/-5% etc.). The manufacturer then just assigns an individual resistor’s marked value by dropping it in the Preferred Value bucket that it fits (hence the percentage relationship between Preferred Values in each range). This means two things: 1). The error in an individual resistor’s value doesn’t fit a bell curve. It is simply a random value within the +/-% tolerance Preferred Value range. 2). If you want specific matched values it’s common to just test & select some closely matching value resistors from your parts drawer. Obviously, choosing resistors in the E96 (or even E128) series makes finding matching resistors, within a fine tolerance, much easier. Obviously, in use, there is also individual value variance due to temperature drift etc. But for a simple R2R ladder the relative effect should be negligible. In summary, you simply need to measure and select appropriate matching value resistors to use in your R2R ladder. Hopefully this information is of some help?
@@weirdboyjim Hi James. I’m not sure I’ve understood your reference to a bell curve but with a gap "cut" out of the middle? Although, with further thought, I do agree that there would still be a bell curve, relative to modern manufacturing tolerances. But given the design intention of the Preferred Value resistor ranges, I’d think it questionable whether manufacturers are that concerned with manufacturing for specifically accurate individual resistor values. But, I’m not really up with modern resistor manufacturing practices, I’m just recalling from my own experiences back in the day. 🤓
Watching you solder with the stencil and hotplate has spurred me on to use my hotplate for my next PCB. Up until now, I've been soldering all my SMDs by hand or hot air gun.
@@m1geo Me too. I was going to leave the hot plate for some upcoming BGA work, but having seen this video I see no reason to keep relying on the hot air gun anymore. 👍
I laughed hard when I saw the size of the stencil. I didn't knew you made jokes unintentionally. That's a big pan. At least that doesn't require painful debugging. Loving this series.
Excellent video as usual James. Your videos are always very well edited and your presentation of your work is both enjoyable and refreshing when compared to so many other channels..
I found your videos not to long ago and I am so glad I did. I've always loved the idea of building a computer at a low level and you do a great job at being informative. Thank you for the great content.
I feel this one video is exceptionally excellent and useful standalone. Your CPU and VGA and UART and audio work may be great, but they're all large projects. This is a worthy project on its own, yet fits within a single video and doesn't significantly depend on any of the others. It demonstrates much of the technique and knowhow underpinning a good chunk of your circuit work. I will be recommending it to friends and family.
Very kind words Andy! Glad it's been useful, it was quite a nice little sub project. The nature of my main projects it's rare I get to call anything done.
Lovely to see that done in detail like that, thanks. Over the years i've worked with r2r and DAC ICs, I've not noticed huge issues with either but i've never tried to use r2r with more than 8 bits for the reasons you outline. I've found even 5% is fine as long as all bits pass via a single pack at a time, otherwise all bets are off as that cross over notch becomes real. I have seen issues with boards where temperature is uneven, not sure if that is all a resistor issue or if the boards I used had a buffer amplifier of some sort... That is going back many years so boards tended to be much larger, and hotter!
Absolutely excellent results. And I think this proves why IBM chose to go with the same R2R ladder design for their first VGA designs. Can't wait to see the parrot in 24-bits. Thanks for an excellent video.
Amazing video as always ! I wish I understood electronics that well, but seeing you doing what you do is just incredibly satisfying seeing this entire setup being built just - because ! (this will probably never see any kind of real world application, so it is basically - art !)
Thanks Ivan! Those are kind words. To me a hobby project like is really showing me what I do and don't understand. It's very easy to convince yourself you know things but actually putting it into practice forces you to really know it.
@@weirdboyjimMore than the achievement it is the thought process that you describe that I find fascinating - and why I watch your videos on end.. How you get from one step to another.. stumble, then describe how you figured what went wrong, found the clue that got you back on track - then figure out there was a better way ! It is the journey that counts - and you describing it. Describing failures and how they can be fixed is more important than showing success (although that works too - sometimes you get it right on the first try !)
Another consideration is that the human eye does not have a linear response to the primary color sources in its primary sensor, the retinal cone cell. Hence the gamma correction function comon to color display output controllers. So either the analog voltage of source prior to the dac or the resistor values themselves can encapsulate the gamma function for each primary colors before the output will center the response in the human color space. If I remember correctly the red curve had a .58 adjustment while the green had .39 and blue had .16. That means that the blue would need an effective amplifier gain of 1/.16 to center, or 6.25.
What? Gamma factor is implemented by the electron gun in the CRT. Artists create their artwork on a similar CRT as the player. Raytracing and path tracing create intensity. Even on my 386 I used a floating point library for this. So you can invest in the correct gamma when you write the the frame buffer. We really need 220px true color.
That was inspiring. I'm not a fan of analog devices (or converting to analog), but I really enjoyed the simplicity of this design. It makes me feel like going back to electronics as a hobby... :)
It's a good thing the old 8-bit micros aren't sentient, because if they were they would be *seething* with jealousy. Oh, look at Mr. Fancy Parts with his 8 bits *per channel*. What does he think he is, a 386 with VGA?! Eagerly looking forward to the design for the other parts of the VGA subsystem.
I'm looking forward to see if you use a RAMDAC look-up table and how it is implemented. Regarding tolerance, I'm sure your choice of resistor packs will be absolutely fine. I would be inclined to use higher value resistors to reduce current consumption, but its all just a personal choice. You might notice a slight (lack of) gamma correction issues, but it isn't as if you are doing any Photoshop work on it! Definitely add some appropriate power supply capacitors to the chip driving the R2R ladder etc, and some bulk electrolytic to any output drive amplifiers. Don't forget the output may need a 75R impedance matching resistor to stop any 'ringing' or echoes in the video cable.
The criticisms of using r2r ladders using discrete resistors are both completely valid and way off base. The 5% (or 1%) variability, is a max value, with today's manufacturing techniques you are getting way better than the stated amount. A nice lite diversion none-the-less.
Part of tolerance range is that you can't make a resistor that doesn't fit in any value. So they don't have to be too tight on manufacturing. Ageing and temperature coefficients just add to the fun. So much fun can be had testing a D2A over temperature, many a month spent doing that.
Great analysis to get to a good enough solution. This is what engineering is all about, to be fair you could check the resistor arrays before you start to make sure there aren't any outliers. Other than that for a home made video DAC this is a pretty good design. The only thing I would add would be the ability to add some bias voltage to each channel so you can tweak colour balance.
@@weirdboyjim Just an opamp and a trimmer pot on each channel would be enough to even out any differences between the converters. It may not be necessary though. You could always build another prototype and see what kind of variance you get between them. I think as long as you test and match the resistors you should be ok.
It's not my field of expertise, but I'm sure I heard that actually the human eye isn't all that good at discerning shades of colour. Plus it's only going to show up if adjacent pixels are a single colour on the 127 128 transition, which is probably only applicable in artificial scenarios.
With two 470 ohm resisters up from the ground rail, that's 2x the 1% error. I presume that's accounted for in your spreadsheet. I only mention it here because it's the sort of thing I'd forget, not that you would. (Edit: loved that DAC performance and layout, the enormous stencil, and once again very clean resistor array soldering)
Yeah, if they are both of by 1% "the same way" the result is 1% error. On the other hand if the errors really do follow a bell curve the clustering towards the center will be increased with the pair.
Bourns makes r2r ladders. You could use colour lut with 256 indexes at 8bits per colour - this would possibly be the best option with your 8 bit per transfer limitation.
@@weirdboyjim that is even better than original VGA spec ;-) Bourns 10k R-2R ladders are reasonably cheap, but you would need to buffer their outputs with either video class opamps or with transistor emitter followers with some simple tricks (using a diode at input to compensate Vbe).
Love that crisp slope coming out the DAC :D Ya love to see it! The acid test is gonna be plotting a colour gradient on the screen and seeing if there's any banding :) As for mixing the colours to get monochrome, you need to mix the RGB channels in these proportions respectfully: 29.9%, 58.7%, and 11.4% (I *think*. Don't quote me, play with the numbers and the orders :D) I think you can use opamps to weight the channels and mix them in the correct proportions. Can't wait to see more! :D Edit to add: It might be the case that the weighting and colour mixing is done inside the monitor, and you can just send the full signal to each channel. I guess make the parrot text card image monochrome in Photoshop or similar, and see if it looks the same xD
During the early design phase I was thinking you could use a meter to rank the resistors by deviation from the average and then use the most deviant ones as LSB, but with chips and PCBs that's a bit onerous. Incidentally, doing a project like this is my dream, but I haven't got anywhere near the time or money, or privacy to do such delicate work. I shall enjoy it vicariously through you, sir!
Thanks for the reference to the TLC5602CDW. Although I also use a R-2R ladder for my stuff I've been looking for a more self contained packaged DAC solution.
@@weirdboyjim I exclusively use through hole, and I do really like how the R-2R ladders look. But the large size on the board plus the opportunity for EMI issues has made me strongly consider something like a "MX7224KN+". Keeping it to my through hole way of doing stuff.
If you're going to design and build a new board for the final output as an absolute minimum I'd recommend adding those op-amp output buffers to minimise the loading effect of the cable and monitor on the digital chips.
@@weirdboyjim it's not just about the volts/amps that the chip can provide, but its impedance. VGA is designed to operate with a source/load (and cable) impedance of 75ohms. A mismatch can cause reflections in the cable which is a major source of ghosting. While that may not be an issue now using an LCD screen due to its ADC front end, if at some point you wanted to play around with making a "duck hunt" style gallery game using a lightgun and hitscanning you'll need a CRT monitor, and they're a lot more sensitive to impedance mismatches due to their near fully analogue design. So the TLDR is, not really necessary now with the current setup, but could save you some headaches later if things change.
You are going to get some error from the driver chip output drivers not all being the same. Also I'd try 0-100-0-100% checkerboard pixel test to see if you can slew fast enough.
I do agree. I went on a similar route once (74ACxx, though) and found that error from chip's output voltage was significantly higher than the 1% from resistor ladder. After all, they are meant as digital logic , not laser-trimmed analog ones. Specially when load varies from "bit to bit"..... But, as always, if it works, don't touch it! Great work, James!!!!
@@santiagoguildomenech1864with CMOS logic wouldn’t the output reach the rails with very low deviation? High resistance in the resistors, powerful drivers for the pins.
Buy more than you need and measure them all out to get matching sets. That's what I used to do on audio circuits to guarantee the left and right channels are matched.
If you want to improve smoothness of sawtooth, you can order more resistors than needed and manually select ones, which fits better together. I'm not sure how to do measurements for such tiny devices, but it is possible for sure.
@@weirdboyjim build a Wheatstone bridge and plug them in one at a time, then bin them based on tolerance. Build your ladder out of whichever tolerance bin has enough parts in it. 0.1% probably possible if you buy a reel of 1% 470R 😀
Can a saw tooth signal be used to find the most offending resistor and replace it? Also if the circuit would sawtooth in horizontal retrace, it could update a look up table ( a palette) to reorder a 10 bit DAC .
A great video but I feel the outcome was very much to be expected. Resistor ladders are very common in video output circuity. If they really had such big problems that would have never happened, everybody would use DACs or the would have specialized resistor ladder packages.
I agree, but remember that every bit doubles the accuracy requirement. I could have still produced pretty good results with 565 rather than 888 so I was mainly checking the extra effort was worth it.
Very nice. I don't know how you have the patience to wait for the PCB's. I'd be figuring out a way to manufacture those things before the sun goes down 🤣
Not sure if it's true for resistors but for capacitors the error is rarely close to zero (i.e. the bell curve has a hole in the middle) because the parts with good tolerance get binned out and sold for more money... So a +/- 20% capacitor will probably have an error of between - 20 and - 10 or + 10 and + 20. If it's below +/- 10% then it will get sold as a 10% part.
Interesting. That hadn't occurred to me. From a little testing it does look like all the resistors in a package to fall very close together though, so wiring it as I did gives a low chance of issues.
@@weirdboyjim Also, as you've demonstrated, 1% is definitely good enough and it seems very unlikely that you'll get a wild swing from 1% to - 1% within a resistor 4 pack
I look forward to seeing how you reconcile the 24 bits of pixel data with the 8-bit processor. Perhaps something similar to what you did with the registers on the audio circuit? Alternatively, perhaps you could drive something from the 16 bit registers and still get lots of colors. I think the 16-bit RGB "standard" is 5 bits red, 6 bits green, and 5 bits blue, in that MSB-LSB order. Depending on your target screen resolution, that might be a fine... don't want too many more colors than pixels. 😁Then again, maybe that opens up palette opportunities? 🤷♂👍
I think I've dropped enough hints on this. I'll be using a 256 entry palette lookup to translate to 24bits color. This actually gives some great opportunities for changing the colors on the fly like I did with the scroll registers in the beam racing demos.
I would say, at least 6 bits per color component is what I like, gives that retro feel for a VGA display! I am working with (non-palette) 15 bit color (5 bits per channel RGB) frame buffer, and I don't get that retro feel.
instead of putting two registers in series at the latch output, you could have also put two resistors in parallel for the connections between bits. I think that would have made the wiring diagram and routing a bit easier when using the resistor arrays, since you wouldn't have crossing connections.
You can go either way of course, double R or half 2R. In this case there high precision resistor networks available to me didn't have a very good approximation for 2R.
You can also increase precision by putting resistors in parallel, 10 4700ohm 1% resistors in parallel will act as 1 470ohm 0.1% resistor, (this naturally depends on the normal distribution of the resistors you use ofc so beware of that, Dave from EEVBlog has a nice video on it)
@@weirdboyjim that's what I meant with the normal distribution, if it's centered on the desired value you're good, and that seems to be the case (at least from EEVBlogs tests (if you get good ones instead of the cheap chinesium ones that is)), but yes, if the center of the distribution is offset your final parallel pack will include that deviation, I don't remember the math involved though so I don't know to what degree it influences
I really like this little 4 resistor arrays. Not sure how long it would take me to sort and then place 0402's or if I could pack them as tight on the pcb.
Couple of questions. Is it worth using higher value resistors to minimise the current you are sourcing/sinking from/to the HCT? Then use an opamp to buffer the output and of course you can then put the series termination resistor in to impedance match the VGA cable? Note that the more current you pull from the latch, the more vcc noise you will have and that will couple through to all logic 1 bits. Given your user of 2 layer PCBs, that noise might actually trigger some ringing in the 100khz-10Mhz range. That ringing unlikely to break your logic level stuff but might well be visible on your display as waves that ripple across the page or down the page depending on the frequency. P.s. opamp slew rate might be limiting factor, but I am sure you can buffer the voltage somehow.
You maybe right, but I was careful to make sure the current source/sink would stay well within range. All the vga boards are 4 layer, I wasn't fool enough to try these frequencies without power planes!
@@weirdboyjim aha ... I haven't been following carefully enough clearly. I was more thinking that no two channels of the latch will have quite the same Rds-on in their high side FETs and of course you'll be pulling different currents from different pins. The lower the current, the lower the error. You can of course make it all work on two layers, you just need to be very careful about the return paths for every signal. 4 layers easier but no guarantee ... You still need to watch those return paths 😜. Anyway I will go watch the other 9 episodes... Great channel, really enjoying it 👍
I didn't try it, but maybe with a good sturdy paper cutter it might be possible to (cleanly) cut the stencil to size and the material is quite nice for shields and such.
If it was a problem, when doing one-offs, characterising the resistors and putting the worst at the least significant end should be fine. I like PWM in these cases, but that has its own problems... and some fun dithering tricks
Excellent video. I'm looking to build a 4-bit version (for 12-bit RGB) myself. I'm a bit confused though, how did you convert the output from the R2R to be 0 to 0.7V and not 0 to 5V? Was that the work of the MOSFET? I've been seeing people use Opamps as well, so I am not sure what is the best approach. I prefer a simple approach. :)
If you use an op-amp you can use any value for R that's reasonable and then tune the output voltage using the r2r ladder. When you use the r2r ladder directly you need to worry about the internal termination of 75 Ohm. For 4 steps at 5v I think you need roughly R=425, 2R=850 but with only 4 bits you can have slightly more wiggle room (I suspect with only 4 bits you can use 390/820 and save some space without having to double R yourself like I did). Try using a calculator like this one www.aaabbb.de/JDAC/DAC_R2R_network_calculation_en.php
@@weirdboyjim Great utility, thanks! Setting the values to 390/820 like you suggested and setting RL to the internal resistor of the monitor seems to give a signal of 0 to slightly over 0.7 V. I am not sure how strict the upper level is but it's worth a try. Simple enough to wire up on a breadboard and measure! Edit: my supplier seems to have 1% metallic resistors in odd values such as 422 and 825 ohm which seems to give even more linearity. Might try those.
The FET circuit at 12:33 doesn't make any sense to me! You don't need a gate resistor (it just slows the FET down since you're making an RC delay with the R and the C of the FET gate). And resistance in the source doesn't make much sense in this digital application. However; looks like it works, so it's good enough :)
@@weirdboyjim I mean, resistors as a potential divider to protect against the inputs greater than the maximum V_{GS} is useful. Anywho! It works, that's all you need!
What about an interface that converts the values into a data stream that can feed a HDMI input on a modern TV together with the SPDIF audio stream for the audio meant to emanate from the speakers of the TV.
HDMI would be a tricky protocol to do with discrete components, it would end up being a sizeable module on it's own. There are LCD panels that will take a vga like input but with raw digital rgb though that might be worth a look.
Regarding your slide at 8:03, that's not strictly true. While the distribution of manufactured parts is a bell curve, the higher accuracy parts are removed from the centre of the curve about the mean, leaving you with a bell curve missing the centre most part (since that's sold at the more expensive rate for the higher tolerance parts). It has a fancy statistical name (which I've forgotten). But in essence, you're very unlikely to get parts
It would be funny if each board had a capacitor and a common mode choke on the power rails. Then the signal on the cable will become a little balanced. Ah, common mode choke on that side also. Is it twisted pair? Thing is that VGA monitors more expect coax input. With enough choking, each board will just balance how the cable likes it ( and the monitor ).
re: R2R ladder - you could have used 0.1% resistors for the 2-4 most significant bits and 0.5%-1% for the rest - you can spend 10$ on 100+ 0.1% resistors and bin them with a 10k+ count multimeter and use the ones closest together. Standalone resistors aren't that expensive, Digikey has 0.1% 0603 resistors at 11 cents each if you buy 100. 0.5% resistors are 4 cents each if you buy 100.
Sounds like you are talking about single resistors. That was an option but I'd rather stay the arrays for compactness. Pretty confident this will work fine now.
Would it be worth to bake the resistors in a oven for say 24-48 hours and then measure the resulting resistance? Then you can pick the most accurate resistors for the top 3 bits in each ladder.
Might have missed it but shouldn't the unselected bits of the '574 be tristate (which you can't do for individual pins) or you're sinking current back through the R2R DAC and skewing the output? Simple as a signal diode per output perhaps?
An R2R DAC requires the inputs to be sourcing or sinking current. There are DAC architectures that are just fed by current sources where turning off the drivers might be required, but they are much harder to manage in discrete hardware for more than a very few bits
It's worth noting that the minimum resistance between two neighboring pins is 1410 Ohms. If we use ohms law at 5v that gives us 5/1410 = 3.5 mili amps. The line driver outputs of the 74ACT574 can source/sink 24ma according to the datasheet. In the worst case scenario with a line in the middle one way and all it's neighbors pulling the other-way it would source/sink more but than 3.5 but obviously much less than the max.
Not really, the results I'm getting are good enough for my needs. A voltage reference would help nail the overall range but the results I'm looking for are more sensitive to the relative changes.
The tunable MSB with a micro pot could be a quick (and almost elegant) way to make sure the DAC works well for years. Reminds me of the CD reader of a Gamecube. When you thought it was finally over for the damn thing after so many years... Some beloved engineer exposed a resistor value to change the voltage to the laser.
Electrically it might not make any difference but it keeps us "right way round" nazis happy. ;) I'd have bought an off-the-shelf DAC - spent more money, got the same results and not learned as much. :(
Join us on Discord: discord.gg/jmf6M3z7XS
Support the channel on Patreon: www.patreon.com/JamesSharman
I did realize during editing that I got the gradient range wrong, the bars only go up to 224/255 but the test is just as valid. Should have made it 4 bars with an offset of 58 each line to cover the full range with a bigger overlap.
Fascinating build, excellently, presented!
I'm decidedly *NOT* an EE, but the first thing that came to mind regarding the 127->128 jump was to dump regular binary and use Grey code, instead, as that will *guarantee* that only a single bit changes between steps. Displaying regular images would require a simple program to convert between the two image formats, but that would be pretty trivial.
Does that make sense or am I missing something important? (...which is highly likely, to be honest. :sigh: )
I'm paranoid enough to animate the bar test (i.e. start from 0~255, then 1~, 2~, etc) and check if the values of the end of a bar and the start of the next are smooth as well.
Hi, sorry to be a pest, but would you please share the make and model of your microscope camera? a link to a purchase site would be even better :-)
I absolutely love your videos! Thanks for making them! I also really enjoy the fact that you're open to feedback, consider options and experiment.
The open secret is that this channel and the viewers are saving my local friends from having to feign interest in my crazy projects ;-)
@@weirdboyjim That feigned interest is the boat that most of us are passengers on!
I also felt the R2R approach would be fine since the spread within a single batch of resistors is often small. You just have to keep an eye on the time constants if the pixel rate is high enough. That stencil was just about the funniest thing I've seen on any of your videos, James. You had me roaring with laughter. But I was also shouting at the TV - "You need more signal grounds!" Of course, it worked out OK, but with eight data bits at pixel speeds, a pixel clock and another control signal, I was surprised that the two grounds that you had were sufficient. When you put three DACs onto a single board that won't be such an issue depending on how it's all connected together. A filtered supply to each of the DAC driver latches might help clean things up a bit too by blocking some of the general system noise on the supply.
Great progress, and looking forward to the next step
Yeah, I've been thinking about ways to isolate the supply a little. VGA actually gives you signal return for each color (i.e. local GND) which I could tie into an isolated supply.
Jaguar has a resistor network on the lower edge of the Tom chip. Can’t we buy these off the shelf? I like how the cat neatly separated semiconductors and coke, soot or whatever is in a resistor. Pretty surely Jaguar was price optimized. R2R needs termination. It is straight forward to come up with a resistor network to reduce voltage. Ain’t video signals only 1 V p2p ? Now I have to look for an amplifier on the Jaguar board.
It is weird that this “from scratch” build uses highly integrated circuits. Jaguar had to switch to an off the shelf audio DAC because standard equipment is just so good. PSX uses an off the shelf video DAC. So we are from scratch like a PSX?
Every single time I get a notification that you've posted a new video I get all kinds of giddy. Thank you so much for these!
You are so welcome! Good to hear you are finding them interesting!
Genuinely amazed that I had no idea your channel existed until yesterday. Your videos have a great flow and the right balance between information and demonstration.
Glad you like it! Hope I live up to expectations!
Always a pleasure to see your videos in my feed. Thank you James!
You are very welcome! Glad you are enjoying!
This knd of proof of concept demo is very helpful to understand the details, very insteresing!
And I appreciate the eye candy of seeing it working on the monitor at the end :).
Great content as always, and it is still getting better, thanks!
Thanks! Glad you found it interesting!
Hi James. Another awesome video. :)
Regarding your R2R ladder and resistor values, note that resistors come in Preferred Value series. The preferred values are a percentage relationship to each other.
e.g. The E96 series has each value +/-1% of it’s neighbouring value (E48 is +/-2%, E24 is +/-5% etc.).
The manufacturer then just assigns an individual resistor’s marked value by dropping it in the Preferred Value bucket that it fits (hence the percentage relationship between Preferred Values in each range).
This means two things:
1). The error in an individual resistor’s value doesn’t fit a bell curve. It is simply a random value within the +/-% tolerance Preferred Value range.
2). If you want specific matched values it’s common to just test & select some closely matching value resistors from your parts drawer. Obviously, choosing resistors in the E96 (or even E128) series makes finding matching resistors, within a fine tolerance, much easier.
Obviously, in use, there is also individual value variance due to temperature drift etc. But for a simple R2R ladder the relative effect should be negligible.
In summary, you simply need to measure and select appropriate matching value resistors to use in your R2R ladder.
Hopefully this information is of some help?
Interesting, With that selection logic it would create a bell curve but with a gap "cut" out of the middle.
@@weirdboyjim Hi James. I’m not sure I’ve understood your reference to a bell curve but with a gap "cut" out of the middle?
Although, with further thought, I do agree that there would still be a bell curve, relative to modern manufacturing tolerances.
But given the design intention of the Preferred Value resistor ranges, I’d think it questionable whether manufacturers are that concerned with manufacturing for specifically accurate individual resistor values. But, I’m not really up with modern resistor manufacturing practices, I’m just recalling from my own experiences back in the day. 🤓
Though I didn't think the R2R ladder would cause you any real world issues, I didn't expect it to be quite that good and linear. Nicely proven out!
Thanks Seon! Very easy to start doubting yourself when people comment that it won’t work.
Watching you solder with the stencil and hotplate has spurred me on to use my hotplate for my next PCB. Up until now, I've been soldering all my SMDs by hand or hot air gun.
Go for it! The hot plate is a big help, make it easy for me to video the reflow as well!
@@weirdboyjim We told you, James! ;) You were soo attached to the hot-air gun! :)
@@m1geo Me too. I was going to leave the hot plate for some upcoming BGA work, but having seen this video I see no reason to keep relying on the hot air gun anymore. 👍
@@weirdboyjim You might want to get some sort of desktop fan to cool a board below melting temperature before you pull it off the plate.
@@m1geo Reflow oven is even better, especially if you need to use double-sided placement.
I laughed hard when I saw the size of the stencil. I didn't knew you made jokes unintentionally.
That's a big pan.
At least that doesn't require painful debugging.
Loving this series.
You say the debugging wasn't painful, but I could have cut myself on the sharp edge! 😎
Excellent video as usual James. Your videos are always very well edited and your presentation of your work is both enjoyable and refreshing when compared to so many other channels..
Thanks John, that's good to hear.
I found your videos not to long ago and I am so glad I did. I've always loved the idea of building a computer at a low level and you do a great job at being informative. Thank you for the great content.
Thanks! Glad you are finding it all interesting!
I feel this one video is exceptionally excellent and useful standalone. Your CPU and VGA and UART and audio work may be great, but they're all large projects. This is a worthy project on its own, yet fits within a single video and doesn't significantly depend on any of the others. It demonstrates much of the technique and knowhow underpinning a good chunk of your circuit work. I will be recommending it to friends and family.
Very kind words Andy! Glad it's been useful, it was quite a nice little sub project. The nature of my main projects it's rare I get to call anything done.
Lovely to see that done in detail like that, thanks. Over the years i've worked with r2r and DAC ICs, I've not noticed huge issues with either but i've never tried to use r2r with more than 8 bits for the reasons you outline. I've found even 5% is fine as long as all bits pass via a single pack at a time, otherwise all bets are off as that cross over notch becomes real. I have seen issues with boards where temperature is uneven, not sure if that is all a resistor issue or if the boards I used had a buffer amplifier of some sort... That is going back many years so boards tended to be much larger, and hotter!
Interesting to hear about your experience there.
Awesome! Glad to see it worked out so well! I'm excited to see your full-color output soon
So am I! Won't have all 24 bits until I have the final board though.
Absolutely excellent results. And I think this proves why IBM chose to go with the same R2R ladder design for their first VGA designs. Can't wait to see the parrot in 24-bits. Thanks for an excellent video.
You are welcome! I'm very interested to get the pallet going as well, there are some interesting things you can do with it.
Amazing video as always ! I wish I understood electronics that well, but seeing you doing what you do is just incredibly satisfying seeing this entire setup being built just - because ! (this will probably never see any kind of real world application, so it is basically - art !)
The real world application is to teach James and us how this works and it amazes people. 😁
@@CeDoMain That's what I said : Art !
Thanks Ivan! Those are kind words. To me a hobby project like is really showing me what I do and don't understand. It's very easy to convince yourself you know things but actually putting it into practice forces you to really know it.
@@weirdboyjimMore than the achievement it is the thought process that you describe that I find fascinating - and why I watch your videos on end.. How you get from one step to another.. stumble, then describe how you figured what went wrong, found the clue that got you back on track - then figure out there was a better way ! It is the journey that counts - and you describing it.
Describing failures and how they can be fixed is more important than showing success (although that works too - sometimes you get it right on the first try !)
Another consideration is that the human eye does not have a linear response to the primary color sources in its primary sensor, the retinal cone cell. Hence the gamma correction function comon to color display output controllers. So either the analog voltage of source prior to the dac or the resistor values themselves can encapsulate the gamma function for each primary colors before the output will center the response in the human color space. If I remember correctly the red curve had a .58 adjustment while the green had .39 and blue had .16. That means that the blue would need an effective amplifier gain of 1/.16 to center, or 6.25.
Indeed, the non linearity is something we have to deal with in rendering all the time.
What? Gamma factor is implemented by the electron gun in the CRT. Artists create their artwork on a similar CRT as the player.
Raytracing and path tracing create intensity. Even on my 386 I used a floating point library for this. So you can invest in the correct gamma when you write the the frame buffer. We really need 220px true color.
That was inspiring. I'm not a fan of analog devices (or converting to analog), but I really enjoyed the simplicity of this design. It makes me feel like going back to electronics as a hobby... :)
Thanks! Analog is something I try to avoid but needs must...
It's a good thing the old 8-bit micros aren't sentient, because if they were they would be *seething* with jealousy. Oh, look at Mr. Fancy Parts with his 8 bits *per channel*. What does he think he is, a 386 with VGA?!
Eagerly looking forward to the design for the other parts of the VGA subsystem.
I can't wait for you to see the demo I'm currently working on :-)
I'm looking forward to see if you use a RAMDAC look-up table and how it is implemented. Regarding tolerance, I'm sure your choice of resistor packs will be absolutely fine. I would be inclined to use higher value resistors to reduce current consumption, but its all just a personal choice. You might notice a slight (lack of) gamma correction issues, but it isn't as if you are doing any Photoshop work on it! Definitely add some appropriate power supply capacitors to the chip driving the R2R ladder etc, and some bulk electrolytic to any output drive amplifiers. Don't forget the output may need a 75R impedance matching resistor to stop any 'ringing' or echoes in the video cable.
Yeah I'll have a pallets of 256x24bit should be able to do some fun things modifying the colours as well.
The criticisms of using r2r ladders using discrete resistors are both completely valid and way off base. The 5% (or 1%) variability, is a max value, with today's manufacturing techniques you are getting way better than the stated amount. A nice lite diversion none-the-less.
Pretty much my conclusion, I don't regret taking the time to explore it though.
@@weirdboyjim The video and examination was well worth the time.
Part of tolerance range is that you can't make a resistor that doesn't fit in any value. So they don't have to be too tight on manufacturing. Ageing and temperature coefficients just add to the fun. So much fun can be had testing a D2A over temperature, many a month spent doing that.
Great analysis to get to a good enough solution. This is what engineering is all about, to be fair you could check the resistor arrays before you start to make sure there aren't any outliers. Other than that for a home made video DAC this is a pretty good design. The only thing I would add would be the ability to add some bias voltage to each channel so you can tweak colour balance.
Overall bias is an interesting suggestion. I'm feeling tight on space though so I'm cautious about adding anything that will be trippled.
@@weirdboyjim Just an opamp and a trimmer pot on each channel would be enough to even out any differences between the converters. It may not be necessary though. You could always build another prototype and see what kind of variance you get between them. I think as long as you test and match the resistors you should be ok.
The likely hood of the error being even terribly noticeable is minimal. I think this is more than a reasonable circuit to do 24 bits with.
Now all I need is to do something interesting with those 24 bits!
@@weirdboyjim One step at a time.
It's not my field of expertise, but I'm sure I heard that actually the human eye isn't all that good at discerning shades of colour. Plus it's only going to show up if adjacent pixels are a single colour on the 127 128 transition, which is probably only applicable in artificial scenarios.
With two 470 ohm resisters up from the ground rail, that's 2x the 1% error. I presume that's accounted for in your spreadsheet. I only mention it here because it's the sort of thing I'd forget, not that you would. (Edit: loved that DAC performance and layout, the enormous stencil, and once again very clean resistor array soldering)
Not really. If both resistors are +1% it's still only a 1% error on 940 Ohms.
@@GodmanchesterGoblin Woops. Roger that.
Yeah, if they are both of by 1% "the same way" the result is 1% error. On the other hand if the errors really do follow a bell curve the clustering towards the center will be increased with the pair.
That stencil! Oh dear...
At least it was usable.
My first stencil was a bit one like this as well. More than anything a pain to store.
Bourns makes r2r ladders.
You could use colour lut with 256 indexes at 8bits per colour - this would possibly be the best option with your 8 bit per transfer limitation.
That is exactly the plan!
Almost every vintage computer did it that way so that seems like a plan.
@@weirdboyjim that is even better than original VGA spec ;-)
Bourns 10k R-2R ladders are reasonably cheap, but you would need to buffer their outputs with either video class opamps or with transistor emitter followers with some simple tricks (using a diode at input to compensate Vbe).
Love that crisp slope coming out the DAC :D Ya love to see it! The acid test is gonna be plotting a colour gradient on the screen and seeing if there's any banding :)
As for mixing the colours to get monochrome, you need to mix the RGB channels in these proportions respectfully: 29.9%, 58.7%, and 11.4% (I *think*. Don't quote me, play with the numbers and the orders :D) I think you can use opamps to weight the channels and mix them in the correct proportions.
Can't wait to see more! :D
Edit to add: It might be the case that the weighting and colour mixing is done inside the monitor, and you can just send the full signal to each channel. I guess make the parrot text card image monochrome in Photoshop or similar, and see if it looks the same xD
The gradient I put in the screen gives me a pretty solid idea, once I have the pallete in and 3 of these I'll be able to play some more though.
That is the colour mix for composite video. VGA is pure 3 channel RGB.
During the early design phase I was thinking you could use a meter to rank the resistors by deviation from the average and then use the most deviant ones as LSB, but with chips and PCBs that's a bit onerous.
Incidentally, doing a project like this is my dream, but I haven't got anywhere near the time or money, or privacy to do such delicate work. I shall enjoy it vicariously through you, sir!
Glad you are enjoying it. I wonder how tough it would be to build a jig for mass testing resistors.
Thanks for the reference to the TLC5602CDW. Although I also use a R-2R ladder for my stuff I've been looking for a more self contained packaged DAC solution.
Glad it was useful. I'm likely to use an off the self chip in future builds after this project, I feel like I've "earned" it.
@@weirdboyjim I exclusively use through hole, and I do really like how the R-2R ladders look. But the large size on the board plus the opportunity for EMI issues has made me strongly consider something like a "MX7224KN+". Keeping it to my through hole way of doing stuff.
I’m building a VGA output for an FPGA and this video gave me some good things to think about… thanks!
Glad it was helpful!
If you're going to design and build a new board for the final output as an absolute minimum I'd recommend adding those op-amp output buffers to minimise the loading effect of the cable and monitor on the digital chips.
Why do you suggest that? Even with cable there is quite a bit of headroom on the line driver outputs.
@@weirdboyjim it's not just about the volts/amps that the chip can provide, but its impedance. VGA is designed to operate with a source/load (and cable) impedance of 75ohms. A mismatch can cause reflections in the cable which is a major source of ghosting. While that may not be an issue now using an LCD screen due to its ADC front end, if at some point you wanted to play around with making a "duck hunt" style gallery game using a lightgun and hitscanning you'll need a CRT monitor, and they're a lot more sensitive to impedance mismatches due to their near fully analogue design.
So the TLDR is, not really necessary now with the current setup, but could save you some headaches later if things change.
Always great to see a well thought out test plan & execution.
Thanks Bob, always good to hear from you!
This is fascinating. Thank you very much for sharing your progress on this.
Glad you enjoyed it!
You are going to get some error from the driver chip output drivers not all being the same.
Also I'd try 0-100-0-100% checkerboard pixel test to see if you can slew fast enough.
Indeed, but I'll need the tiledata circuit in place before I can do alternating pixels at full clock rate.
I do agree. I went on a similar route once (74ACxx, though) and found that error from chip's output voltage was significantly higher than the 1% from resistor ladder. After all, they are meant as digital logic , not laser-trimmed analog ones. Specially when load varies from "bit to bit".....
But, as always, if it works, don't touch it!
Great work, James!!!!
@@santiagoguildomenech1864with CMOS logic wouldn’t the output reach the rails with very low deviation? High resistance in the resistors, powerful drivers for the pins.
Such cutie of a PCB
I know right!
Buy more than you need and measure them all out to get matching sets. That's what I used to do on audio circuits to guarantee the left and right channels are matched.
Yeah, although that would work better using single resisters rather than the arrays.
If you want to improve smoothness of sawtooth, you can order more resistors than needed and manually select ones, which fits better together. I'm not sure how to do measurements for such tiny devices, but it is possible for sure.
Not sure if the tools I have are sensitive enough to spot the difference on a loan resistor.
@@weirdboyjim build a Wheatstone bridge and plug them in one at a time, then bin them based on tolerance. Build your ladder out of whichever tolerance bin has enough parts in it. 0.1% probably possible if you buy a reel of 1% 470R 😀
Can a saw tooth signal be used to find the most offending resistor and replace it? Also if the circuit would sawtooth in horizontal retrace, it could update a look up table ( a palette) to reorder a 10 bit DAC .
Enjoying this journey. :-)
Glad to hear it!
A great video but I feel the outcome was very much to be expected. Resistor ladders are very common in video output circuity. If they really had such big problems that would have never happened, everybody would use DACs or the would have specialized resistor ladder packages.
I agree, but remember that every bit doubles the accuracy requirement. I could have still produced pretty good results with 565 rather than 888 so I was mainly checking the extra effort was worth it.
that stencil is amazing
Indeed! Most annoying thing on this big ones is just trying to line it up with the tiny pcb!
Omg that stencil size xD
I know right!
Very nice. I don't know how you have the patience to wait for the PCB's. I'd be figuring out a way to manufacture those things before the sun goes down 🤣
Lol, I may do some experiments at some point!
Not sure if it's true for resistors but for capacitors the error is rarely close to zero (i.e. the bell curve has a hole in the middle) because the parts with good tolerance get binned out and sold for more money... So a +/- 20% capacitor will probably have an error of between - 20 and - 10 or + 10 and + 20. If it's below +/- 10% then it will get sold as a 10% part.
It's possible that resistors don't work the same way and they manufacture to the tolerance rather than binning them
@@cskilbeck Yes - resistors like these are generally laser trimmed during the manufacturing process.
Interesting. That hadn't occurred to me. From a little testing it does look like all the resistors in a package to fall very close together though, so wiring it as I did gives a low chance of issues.
@@weirdboyjim Also, as you've demonstrated, 1% is definitely good enough and it seems very unlikely that you'll get a wild swing from 1% to - 1% within a resistor 4 pack
I look forward to seeing how you reconcile the 24 bits of pixel data with the 8-bit processor. Perhaps something similar to what you did with the registers on the audio circuit? Alternatively, perhaps you could drive something from the 16 bit registers and still get lots of colors. I think the 16-bit RGB "standard" is 5 bits red, 6 bits green, and 5 bits blue, in that MSB-LSB order. Depending on your target screen resolution, that might be a fine... don't want too many more colors than pixels. 😁Then again, maybe that opens up palette opportunities? 🤷♂👍
I think I've dropped enough hints on this. I'll be using a 256 entry palette lookup to translate to 24bits color. This actually gives some great opportunities for changing the colors on the fly like I did with the scroll registers in the beam racing demos.
@@weirdboyjim Perfect! Looking forward to it.
It would be interesting to see how a regular 8 bit dac compares to your home brew. Great work
I fully expect the off the shelf ones are better but I like to custom build things at least the first time!
I would say, at least 6 bits per color component is what I like, gives that retro feel for a VGA display! I am working with (non-palette) 15 bit color (5 bits per channel RGB) frame buffer, and I don't get that retro feel.
I did think about doing a 16 bit (RGB 565) palette for a while but the 888 is easier to program for.
Atari ST and genesis are 16 bit and only have RGB 333 . We are totally over the top of 8 bits.
You could also measure the resistors and hand select them.
That's also something that could work. But using 4 resistor arrays you could get all kinds of complicated permutations.
instead of putting two registers in series at the latch output, you could have also put two resistors in parallel for the connections between bits.
I think that would have made the wiring diagram and routing a bit easier when using the resistor arrays, since you wouldn't have crossing connections.
You can go either way of course, double R or half 2R. In this case there high precision resistor networks available to me didn't have a very good approximation for 2R.
You can also increase precision by putting resistors in parallel, 10 4700ohm 1% resistors in parallel will act as 1 470ohm 0.1% resistor, (this naturally depends on the normal distribution of the resistors you use ofc so beware of that, Dave from EEVBlog has a nice video on it)
Interesting, but it does just bias the probability, it's still possible to be 1% out.
@@weirdboyjim that's what I meant with the normal distribution, if it's centered on the desired value you're good, and that seems to be the case (at least from EEVBlogs tests (if you get good ones instead of the cheap chinesium ones that is)), but yes, if the center of the distribution is offset your final parallel pack will include that deviation, I don't remember the math involved though so I don't know to what degree it influences
Metal film resistors might have a nice tight tolerance to negate the problem.
I'd be curious to know how much difference the packages make.
An option that trades time for very low cost: get 5% (or even 10%) standard resistors, buy a box of 1000 (
I really like this little 4 resistor arrays. Not sure how long it would take me to sort and then place 0402's or if I could pack them as tight on the pcb.
Couple of questions.
Is it worth using higher value resistors to minimise the current you are sourcing/sinking from/to the HCT?
Then use an opamp to buffer the output and of course you can then put the series termination resistor in to impedance match the VGA cable?
Note that the more current you pull from the latch, the more vcc noise you will have and that will couple through to all logic 1 bits.
Given your user of 2 layer PCBs, that noise might actually trigger some ringing in the 100khz-10Mhz range. That ringing unlikely to break your logic level stuff but might well be visible on your display as waves that ripple across the page or down the page depending on the frequency.
P.s. opamp slew rate might be limiting factor, but I am sure you can buffer the voltage somehow.
You maybe right, but I was careful to make sure the current source/sink would stay well within range. All the vga boards are 4 layer, I wasn't fool enough to try these frequencies without power planes!
@@weirdboyjim aha ... I haven't been following carefully enough clearly. I was more thinking that no two channels of the latch will have quite the same Rds-on in their high side FETs and of course you'll be pulling different currents from different pins. The lower the current, the lower the error.
You can of course make it all work on two layers, you just need to be very careful about the return paths for every signal. 4 layers easier but no guarantee ... You still need to watch those return paths 😜.
Anyway I will go watch the other 9 episodes...
Great channel, really enjoying it 👍
I didn't try it, but maybe with a good sturdy paper cutter it might be possible to (cleanly) cut the stencil to size and the material is quite nice for shields and such.
Cutting it isn't a problem, not introducing a bend was a concern.
If it was a problem, when doing one-offs, characterising the resistors and putting the worst at the least significant end should be fine. I like PWM in these cases, but that has its own problems... and some fun dithering tricks
I think it will be ok to just use as is, but I will test the final channels like this
Excellent video. I'm looking to build a 4-bit version (for 12-bit RGB) myself. I'm a bit confused though, how did you convert the output from the R2R to be 0 to 0.7V and not 0 to 5V? Was that the work of the MOSFET? I've been seeing people use Opamps as well, so I am not sure what is the best approach. I prefer a simple approach. :)
If you use an op-amp you can use any value for R that's reasonable and then tune the output voltage using the r2r ladder. When you use the r2r ladder directly you need to worry about the internal termination of 75 Ohm. For 4 steps at 5v I think you need roughly R=425, 2R=850 but with only 4 bits you can have slightly more wiggle room (I suspect with only 4 bits you can use 390/820 and save some space without having to double R yourself like I did). Try using a calculator like this one www.aaabbb.de/JDAC/DAC_R2R_network_calculation_en.php
@@weirdboyjim Great utility, thanks! Setting the values to 390/820 like you suggested and setting RL to the internal resistor of the monitor seems to give a signal of 0 to slightly over 0.7 V. I am not sure how strict the upper level is but it's worth a try. Simple enough to wire up on a breadboard and measure!
Edit: my supplier seems to have 1% metallic resistors in odd values such as 422 and 825 ohm which seems to give even more linearity. Might try those.
Always impressed. Carry on the good work.
Thanks! Glad you are enjoying!
The FET circuit at 12:33 doesn't make any sense to me! You don't need a gate resistor (it just slows the FET down since you're making an RC delay with the R and the C of the FET gate). And resistance in the source doesn't make much sense in this digital application. However; looks like it works, so it's good enough :)
So that other guy who posts that I'm wrong every time I drive a fet gate without a resistor....
@@weirdboyjim I mean, resistors as a potential divider to protect against the inputs greater than the maximum V_{GS} is useful. Anywho! It works, that's all you need!
As always, fascinating, thank you :)
Glad you enjoyed it!
Marvellous and I understood it !....cheers.
Thanks Andymouse!
What about an interface that converts the values into a data stream that can feed a HDMI input on a modern TV together with the SPDIF audio stream for the audio meant to emanate from the speakers of the TV.
HDMI would be a tricky protocol to do with discrete components, it would end up being a sizeable module on it's own. There are LCD panels that will take a vga like input but with raw digital rgb though that might be worth a look.
Regarding your slide at 8:03, that's not strictly true. While the distribution of manufactured parts is a bell curve, the higher accuracy parts are removed from the centre of the curve about the mean, leaving you with a bell curve missing the centre most part (since that's sold at the more expensive rate for the higher tolerance parts). It has a fancy statistical name (which I've forgotten). But in essence, you're very unlikely to get parts
Some other people have suggested the same thing. The next tolerance band I see is 0.1% so the 1% parts have a decent chance of being reasonable.
One suggested change. Make three boards. One RED, one GREEN and one BLUE!!
Ha! Interesting idea but it may not be very practical. Did you notice that the breadboard version uses red, green and blue wires?
It would be funny if each board had a capacitor and a common mode choke on the power rails. Then the signal on the cable will become a little balanced. Ah, common mode choke on that side also. Is it twisted pair? Thing is that VGA monitors more expect coax input. With enough choking, each board will just balance how the cable likes it ( and the monitor ).
re: R2R ladder - you could have used 0.1% resistors for the 2-4 most significant bits and 0.5%-1% for the rest - you can spend 10$ on 100+ 0.1% resistors and bin them with a 10k+ count multimeter and use the ones closest together. Standalone resistors aren't that expensive, Digikey has 0.1% 0603 resistors at 11 cents each if you buy 100. 0.5% resistors are 4 cents each if you buy 100.
Sounds like you are talking about single resistors. That was an option but I'd rather stay the arrays for compactness. Pretty confident this will work fine now.
Would it be worth to bake the resistors in a oven for say 24-48 hours and then measure the resulting resistance? Then you can pick the most accurate resistors for the top 3 bits in each ladder.
Very interesting idea, not sure if my measurement tools are accurate enough for this to make a difference.
Excited! 👌👌👌
Thanks George!
yeah excellent. loving the preheater. very smooth result. *cough* 24 bit audio? *cough* hehehe
Weep. time to go watch something I missed.... must be something...
I love it! 24bit's on a channel is a very different thing than 3x 8-bit channels
Might have missed it but shouldn't the unselected bits of the '574 be tristate (which you can't do for individual pins) or you're sinking current back through the R2R DAC and skewing the output?
Simple as a signal diode per output perhaps?
An R2R DAC requires the inputs to be sourcing or sinking current. There are DAC architectures that are just fed by current sources where turning off the drivers might be required, but they are much harder to manage in discrete hardware for more than a very few bits
@@GodmanchesterGoblin Yeah, that did occur to me as a possibility while I was driving home and I was going to add it to my comment :)
It's worth noting that the minimum resistance between two neighboring pins is 1410 Ohms. If we use ohms law at 5v that gives us 5/1410 = 3.5 mili amps. The line driver outputs of the 74ACT574 can source/sink 24ma according to the datasheet. In the worst case scenario with a line in the middle one way and all it's neighbors pulling the other-way it would source/sink more but than 3.5 but obviously much less than the max.
have you thought of using a proper voltage reference in your DAC?
Not really, the results I'm getting are good enough for my needs. A voltage reference would help nail the overall range but the results I'm looking for are more sensitive to the relative changes.
James... I hope everyone says they found this interesting... I know I certainly did
That's good to hear Theodore!
Great vid James :)
Thanks Gaz! Glad you are still finding it interesting.
Yaay!
Thanks!
Creative video, thanks :)
Glad you found it interesting!
Nice sir
Thanks Orso!
16:17 - kitchen scissors will cut the steel sheet, no problem.
It will cut it easily enough but I was worried about introducing a bend.
The MiSter IO board uses a R2R ladder. I've built a few and I can't see any difference between 5% and 1%.
Be interesting to get some really accurate test gear and test out some resistors.
I would now have built the 8bit DAC 3 times and then plugged it into another board.
I’m tempted, I have all the parts apart from 1 mosfet
I hoped you will test 25 MHz clock
The dacs worked fine at 25mhz, that's mostly just about picking a part for the d-type that was fast enough and making sure it's decoupling was good.
The tunable MSB with a micro pot could be a quick (and almost elegant) way to make sure the DAC works well for years.
Reminds me of the CD reader of a Gamecube. When you thought it was finally over for the damn thing after so many years... Some beloved engineer exposed a resistor value to change the voltage to the laser.
Interesting idea, I'll think on it but I'm feeling quite tight for space.
At least you won't have to buy any stainless shim stock for a while
I'm worried what will happen if I try to cut it.
@@weirdboyjim could be messy. A very sharp chisel and a freshly turned brass anvil would be the best way
Electrically it might not make any difference but it keeps us "right way round" nazis happy. ;)
I'd have bought an off-the-shelf DAC - spent more money, got the same results and not learned as much. :(
How bad would it be if I got just one wrong?
@@weirdboyjim 😀 😀 😀
From scratch?
The sum of the errors is always accumulative.
You have to be really careful with the wording with these things, I may not always get it right.
@@weirdboyjim Not sure what you mean by your comment, but made me realise I wasn't paying attention when I posted.
OMG... what a huge stencil. Sorry 😊😁
It had to be the smallest PCB I made that mistake on!