t r o n i x s t u f f

fun and learning with electronics

Education – Dividing voltage with resistors

[update - 31st May 2010 - new, improved article about resistors is here, please read after this post :) ]

Today I found myself needing to interface an external voltage with an analogue to digital pin of a PICAXE microcontroller. The plan was to use the PICAXE as a voltage meter, just for fun. However it can only accept signals up to the chip supply voltage which was 5V. So the maximum input voltage of 20v needed to be reduced proportionally to a maximum input voltage of 5V. This can be easily done with two resistors, using a voltage-division circuit. It is very easy, using the example below:

Now the fun part – mathematics! First – the formula:

So first, we know Vout is 5, Vin is 20, just need to find values for R1 and R2. Note that the sum of the voltages potentials across R1 and R2 need to equal Vin, and I want to reduce the voltage by around 75% (that is, from 20 to 5). Plus, I wanted to be able to calibrate Vout precisely, so will use a 500 ohm trimpot as R2. So now I need to calculate R1. Which leaves us with 5=20(500/(R1+500)). I am going to assume you can do the algebra, so we have R1 = 1500, or 1.5k ohms.

If you have made it this far, I’m going to give you the solutions for each variable, so you have a ready-reckoner for future use:

So there you have it – voltage division can be easy and fun. But like most things electronic, reading about it and doing it are two different things. So let’s have a look at a real-life example:

[no audio in clip] First R1 and R2 are measured, then Vin, and the voltage drops over the two resistors.

I hope you learned something today, and would like your feedback. Don’t forget to subscribe (top right) for more updates!

March 27, 2010 - Posted by | education, learning electronics | , , , , , , , , , ,

7 Comments »

  1. Hey man, this is great! Thank you and keep it up!

    Comment by Alex | August 18, 2010 | Reply

    • Hello
      You’re welcome Alex, thank you for your comments. I hope you find other articles of interest
      cheers
      john

      Comment by John Boxall | August 18, 2010 | Reply

  2. Great series of tutorials! These are what I’ve been looking for.
    You should really write a book I’d buy it!

    Comment by Robert | February 3, 2011 | Reply

    • Thank you for your feedback, I really appreciate it.
      Yes, a book is in the works… however it is taking a lot longer than expected.
      cheers
      John

      Comment by John Boxall | February 3, 2011 | Reply

  3. Hello John,

    gratulation, after 10 years surfing and learning electronics in the net, this site is the best of the best. Thanks for your work.
    Keep on.

    Jurgen

    Comment by Jurgen Reller | May 4, 2011 | Reply

    • Hello Jurgen
      Thank you very much for your comment, I really appreciate it.
      Have fun
      John

      Comment by John Boxall | May 4, 2011 | Reply

  4. Nice job! Well explained and easy to understand! Thanks !!

    Comment by Paulo Guth | April 11, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 3,835 other followers

%d bloggers like this: