element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Arduino: R-2R: "Resistance is..."?
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jc2048
  • Date Created: 24 Apr 2018 12:08 PM Date Created
  • Views 2107 views
  • Likes 9 likes
  • Comments 1 comment
  • passive_featured
  • r2r
Related
Recommended

Arduino: R-2R: "Resistance is..."?

jc2048
jc2048
24 Apr 2018

Another diversion - I'm going all round the houses here. Who would have thought that there could be so much to a few simple

resistors arranged in a network? This time I'm playing with the simulator.

 

When I did the hardware in a previous blog, I mentioned that the output of the resistor ladder needed to be buffered but

didn't actually say what the output resistance is. Given that we know the 'R' value - for my circuit I chose 4.7k - can we

say what the output resistance is analytically? Whilst you puzzle over that, as an alternative I'm going to do it the lazy

way by setting the simulator to measure it.

 

Here's the circuit again

 

 

image

 

I've placed a generator on the output, coupled to the output via a capacitor so that I can measure the ac voltage and

current with meters. The capacitor is large enough that, at the 10kHz I've got the generator set to, it looks like a short

circuit to ac, just helping me by removing whatever the DAC generated voltage is. The generator amplitude is set to 1mV, so

it's only a small perturbation. Once I've measured the voltage and current, I can then do some arithmetic to work out the

resistance that the generator is seeing as it back-drives the output (simple application of Ohm's Law).

 

To do this with TI-Tina I had to puzzle out the scripting. To do it, you select Post-processor from the Edit menu in the

waveform display window, tick Advanced Edit and enter the script. What wasn't obvious immediately was that this is Pascal

syntax, so I had to look for a reference on the web (the interpreter didn't like the divide by zero, so I need the IF

statement to avoid it, otherwise I could have just used the standard expression generator).

 

{This is a template}
{Don't modify the functionname}
Function F(t);
Begin
 {Your expressions here}
IF (AM1(t)=0) THEN F:=0 ELSE F:=abs(VM1(t))/abs(AM1(t))
End;

 

Here are the resulting waveforms for a DAC setting of 0x40. Ignoring the dip, when it's trying to divide by zero, it's

evident that the resistance is somewhere around 4.7k. What's interesting, though, is that however I arrange the DAC

switches I always see 4.7k.

 

image

 

Coming back to the analytical approach, that result makes sense. As far as ac is concerned, all the dc voltages can be

considered as having zero resistance between them [1], so we can consider all the switch connections to be going to ground

and solve for the resulting network. If we start at the bottom of the ladder and work up, we have 2R in parallel with 2R

giving R, that's in series with an R giving 2R, which is in parallel with a 2R giving R, and so on to the top where we

finally end up with a value of R, which matches what the simulator sees (phew!).

 

[1] That's from the point of view of simple theory. In this real circuit there are two things that take us away from the

ideal. Firstly, the switches are actually MOSFETs that have an rDS(on) of about 20R, which I should really be taking into

account. Secondly, the idea that the different voltage rails look like a short to ac depends on frequency and how the

decoupling behaves, but it's probably a plenty-good-enough approximation for what's happening in this case.

 

 

Part one: Arduino: R-2R Experiment

Part two: Arduino: R-2R: Sine On You Crazy Diamond

Part three: Arduino: R-2R: Buffer, Attenuate, and Filter

Part four: Arduino: R-2R: "We Interrupt This Programme..."

Part five: Arduino: R-2R: "Resistance is..."?

Part six: Arduino: R-2R: Setting the Output Frequency

Part seven: Arduino: R-2R; "A Sweep is as Lucky, as Lucky Can Be..."

Part eight: Arduino: R-2R: Setting the Signal Amplitude

  • Sign in to reply

Top Comments

  • genebren
    genebren over 7 years ago +2
    Nice simulation and analysis of your circuit. Keep up the good work! Gene
  • genebren
    genebren over 7 years ago

    Nice simulation and analysis of your circuit.

    Keep up the good work!

    Gene

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube