Editing Minimig Video d/a resistor ladder
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | Model:<br> | |
[[Image:Minimig_dac_resistor_ladder_model.png|thumb| none |150px|D/A resistor ladder electrical model]]<br><!-- http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax --> | [[Image:Minimig_dac_resistor_ladder_model.png|thumb| none |150px|D/A resistor ladder electrical model]]<br><!-- http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax --> | ||
− | + | Equations:<br> | |
:Defining constants: | :Defining constants: | ||
::U_vga = 0.7 V | ::U_vga = 0.7 V | ||
Line 10: | Line 10: | ||
::Total resistance = 1/(1/4000+1/2000+1/1000+1/560)+75 = 357.8282.. Ω | ::Total resistance = 1/(1/4000+1/2000+1/1000+1/560)+75 = 357.8282.. Ω | ||
::Common current through resistor ladder plus vga impedance (75Ω) = 3.3V / 357.8282.. = 0.009222 A | ::Common current through resistor ladder plus vga impedance (75Ω) = 3.3V / 357.8282.. = 0.009222 A | ||
− | ::Current * [[Video Graphics Array|VGA]] impedance = 0. | + | ::Current * [[Video Graphics Array|VGA]] impedance = 0.6917V (specification says 0.7 p-p) |
− | ::Output voltage = 75 * (3.3/(1/(1/4000+1/2000+1/1000+1/560)+75)) = 0. | + | ::Output voltage = 75 * (3.3/(1/(1/4000+1/2000+1/1000+1/560)+75)) = 0.6917V |
:Simplification: | :Simplification: | ||
Line 17: | Line 17: | ||
:Base resistor value = (1/8+1/4+1/2+1/1)/(1/((R_vga*U_vcc)/U_vga-R_vga)) = 522.3214Ω | :Base resistor value = (1/8+1/4+1/2+1/1)/(1/((R_vga*U_vcc)/U_vga-R_vga)) = 522.3214Ω | ||
− | + | ||
:Deviation summary: | :Deviation summary: | ||
::0523/523 = 1.0000 | ::0523/523 = 1.0000 | ||
Line 27: | Line 27: | ||
:Maximum output voltage if VGA impedance is 75Ω is: (75*3.3)/(1/(1/4220+1/2100+1/1050+1/523)+75) = 0.6981 V | :Maximum output voltage if VGA impedance is 75Ω is: (75*3.3)/(1/(1/4220+1/2100+1/1050+1/523)+75) = 0.6981 V | ||
− | + | Useful links:<br> | |
:[http://en.wikipedia.org/wiki/Resistor Wikipedia: Resistor] | :[http://en.wikipedia.org/wiki/Resistor Wikipedia: Resistor] | ||
:[http://en.wikipedia.org/wiki/Preferred_number#Capacitors_and_resistors Wikipedia: Preferred number] | :[http://en.wikipedia.org/wiki/Preferred_number#Capacitors_and_resistors Wikipedia: Preferred number] | ||
:[http://www.digikey.com/scripts/DkSearch/dksus.dll?Cat=65538;keywords=resistor Digikey: Resistors] | :[http://www.digikey.com/scripts/DkSearch/dksus.dll?Cat=65538;keywords=resistor Digikey: Resistors] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [[Image:Minimig_v1.0_video_dac_resistor_ladder_simulation_original.png|thumb| right |250px|Value vs output signal originaly]]<br> | |
− | [[Image:Minimig_v1.0_video_dac_resistor_ladder_simulation_original.png|thumb| right |250px|Value vs output | + | The original 4000Ω 2000Ω 1000Ω 560Ω resistors, Gives this curve for desired vs actual signal:<br> |
− | The original 4000Ω 2000Ω 1000Ω 560Ω resistors, Gives this curve for | ||
Note the dent in the middle of the curve!<br> | Note the dent in the middle of the curve!<br> | ||
− | < | + | <pre> |
− | + | 0 0.000002 | |
− | + | 1 0.060736 | |
− | + | 2 0.119277 | |
− | + | 3 0.175740 | |
− | + | 4 0.230233 | |
− | + | 5 0.282857 | |
− | + | 6 0.333708 | |
− | + | 7 0.382873 | |
− | + | 8 0.389764 | |
− | + | 9 0.437103 | |
− | + | 10 0.482927 | |
− | + | 11 0.527307 | |
− | + | 12 0.570310 | |
− | + | 13 0.612000 | |
− | + | 14 0.652436 | |
− | + | 15 0.691673 | |
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [[Image:Minimig_v1.0_video_dac_resistor_ladder_simulation_modified.png|thumb| right |250px|Value vs output signal modified]]<br> | |
− | [[Image:Minimig_v1.0_video_dac_resistor_ladder_simulation_modified.png|thumb| right |250px|Value vs output | + | The modification with 4220Ω 2100Ω 1050Ω 523Ω resistors, Gives this curve for desired vs actual signal:<br> |
− | The modification with 4220Ω 2100Ω 1050Ω 523Ω resistors, Gives this curve for | + | <pre> |
− | + | 0 0.000002 | |
− | + | 1 0.057625 | |
− | + | 2 0.113793 | |
− | + | 3 0.167545 | |
− | + | 4 0.220000 | |
− | + | 5 0.270256 | |
− | + | 6 0.319355 | |
− | + | 7 0.366446 | |
− | + | 8 0.413880 | |
− | + | 9 0.458053 | |
− | + | 10 0.501297 | |
− | + | 11 0.542855 | |
− | + | 12 0.583575 | |
− | + | 13 0.622742 | |
− | + | 14 0.661153 | |
− | + | 15 0.698131 | |
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Simulation program (perl):<br> | Simulation program (perl):<br> | ||
<pre> | <pre> | ||
Line 182: | Line 121: | ||
#----------------------------------------------------------------------------- | #----------------------------------------------------------------------------- | ||
</pre> | </pre> | ||
+ | |||
+ | Gnuplot command: gnuplot> plot "dac_sim.txt" using ($1):($2) smooth csplines |