Ohm's Law with Arduino

Hey guys,,,
I'm starting a new project to prove Ohm's Law with simple Arduino circuit.... So actually the plans is still in my mind and now I'm finding a way to construct it.... First I will say about it in brief...

My plan is something like this....


So now I need to measure Voltage (V) and the Current (I) to prove the Ohm's Law, V/I = K....
To measure Voltage, I have made a simple DC Voltmeter which you can find here Here...

But to use this I have to use 2 Arduino boards... so in my major code I have to include all the codes relevant to Voltmeter and Current Meter together....

Now I have these problems...

  • How do I measure the Current Flow (I) of the circuit?
  • How can I change the Current Flow of the circuit? (How to change the current flow rapidly)
  • How to get the output in this form.. (V = 2 and I = 1) "2/1 = 2"

Guys,,, If u can please help me>>>>

Good Question.

Ohm's Law states that V = I x R => I= V/R => R= V/I

Since your circuit contains a Led, the first thing you should do is read the datasheet for the led.
(yes they even have datasheets for leds).

Let's assume for the sake of discussion that it is a generic 5 mm red led

Let's assume the led has a forward voltage drop of 2.3V

VResistor = (3V-2.3V)/0.020 A = 35 ohms. You can round that down to 33 or up to 39 ohms.

Now I have these problems...
How do I measure the Current Flow (I) of the circuit?

Measure the voltage drop across the resistor with an analog read. (look up "arduino analogRead")
You have to write the code.

How can I change the Current Flow of the circuit? (How to change the current flow rapidly)

Change the resistance. You can use a digital pot or switch discrete resistors in parallel with the current limiting resistor using analog switches.
Analog Switch

How to get the output in this form.. (V = 2 and I = 1) "2/1 = 2"

I have no idea what that is supposed to mean. Rephrase the question.
What is "2" ?
What is "1" ?
What kind of question is that ?

BTW,

YOUR SCHEMATIC IS WRONG !

THE ARDUINO GROUND MUST CONNECT TO THE BATTERY GROUND !

CHANGE IT.

Now I have these problems...
How do I measure the Current Flow (I) of the circuit?

Put the meter across the resistor instead of the led.

How can I change the Current Flow of the circuit?

Change the resistance in the circuit.

(How to change the current flow rapidly)

Change the resistance rapidly. (Use a pwm output to drive the led)

hum.... there are several things I don't understand :

  • you want to prove Ohm's law, and for that you'll measure the current and the voltage across a..... LED !!?? A LED doesn't follow Ohm's law !
  • what law is this one : " V/I=K.... " ?

why don't you use a true voltmeter, which will allow you to measure across resistors larger than 100k (yours needs that the resistor across which you'll measure is far lower than that ) ?

I'm afraid I just don't get what you really want to do

I don't think the OP knows the difference between resistors and semiconductors and wants to use the led
as a load and prove ohm' law by varying the resistance of the current limiting resistor showing the led getting brighter or dimmer. I don't think there is any point in bringing up Non-linear current to voltage curves with this OP. Let's just skip that detail and discuss something he can understand, ie resistance.

to prove the Ohm's Law

:frowning: Any solution using the Arduino will run you in circles...

With the Arduino, you measure current by measuring voltage across a known resistance and applying Ohm's Law. I don't now how Mr. Georg Ohm did it, but I assume you can look that up.

I'm not sure this would qualify as scientific proof, but you could get a [u]mechanical ammeter[/u] to measure current and demonstrate Ohm's Law. A mechanical meter works because meter deflection is proportional to magnetic field and the the magnetic field is proportional to current.

There is a voltage drop across the mechanical meter but the current reading is not "derived" from the voltage. In fact, a mechanical meter works by deriving the voltage from the measured current! (The opposite of a digital voltmeter.)

1.How do I measure the Current Flow (I) of the circuit?

You temporarily "break the circuit" and insert the ammeter (or multimeter) in series with the existing components. Multimeters don't have a common ground with the circuit being measured, and that's important (most are battery operated). Digital multimeters measure the voltage across a known (small) resistor and they apply Ohm's Law internally to calculate and display the current.

Or, you measure voltage across the existing resistor and apply Ohm's Law. :smiley:

2.How can I change the Current Flow of the circuit? (How to change the current flow rapidly)

You can change the voltage rapidly by using a digital-to-analog converter, or an AC voltage is "rapidly changing". Or, you could use a digital potentiometer to change the resistance rapidly. Or, you could build a digitally-controlled current-source (a bit tricky but not impossible).

3.How to get the output in this form.. (V = 2 and I = 1) "2/1 = 2"

I don't understand your question, but microcontrollers (including the Arduino) are really good at math. You can send the output to your computer via the serial monitor and display whatever you want, or you can add an LCD to your Arduino circuit.

I don't understand your question,

That makes two of us.
You can vary the source or vary the load to vary the current. My solution was vary the load ,Doug's was vary the source. Six of one , half a dozen of the other...

"Proving" - or indeed, demonstrating - Ohm's law is rather tricky, because all of the common devices we use depend upon it. A "mechanical" Voltmeter functions by using a microammeter in series with a resistor, while a digital ammeter consists of a digital voltmeter (and that itself depending entirely on the actions of resistors) measuring the voltage across a resistor.

@Suvink,
Change your ground connection . (see comment at bottom of Reply#1)

In most commonly available materials Ohm's law holds very well if the temperature
is kept fixed (ie you keep the current small to avoid self-heating.

Ohm's law is an emergent property of charge flow through uniform liquids and solids, and at
normal current densities holds very well - you'd have to go to extremely high current
densities to see non-linear behaviour in metals I believe.

raschemmel:
Good Question.

Ohm's Law states that V = I x R => I= V/R => R= V/I

Since your circuit contains a Led, the first thing you should do is read the datasheet for the led.
(yes they even have datasheets for leds).

Let's assume for the sake of discussion that it is a generic 5 mm red led

Let's assume the led has a forward voltage drop of 2.3V

VResistor = (3V-2.3V)/0.020 A = 35 ohms. You can round that down to 33 or up to 39 ohms.

I have no idea what that is supposed to mean. Rephrase the question.
What is "2" ?
What is "1" ?
What kind of question is that ?

BTW,

YOUR SCHEMATIC IS WRONG !

THE ARDUINO GROUND MUST CONNECT TO THE BATTERY GROUND !

CHANGE IT.

2 and 1 are the example i took....
and the scematic, I connect the +5 probe of the voltmeter to a one side of the LED and gnd probe will connect to the other side.... so The voltmeter, I just got it from a tutorial....

alnath:
hum.... there are several things I don't understand :

  • you want to prove Ohm's law, and for that you'll measure the current and the voltage across a..... LED !!?? A LED doesn't follow Ohm's law !
  • what law is this one : " V/I=K.... " ?

why don't you use a true voltmeter, which will allow you to measure across resistors larger than 100k (yours needs that the resistor across which you'll measure is far lower than that ) ?

I'm afraid I just don't get what you really want to do

Okay I just need a computer graph....... so i cant use a true voltmeter.... and dude im not very good in arduino as u guys... v/i=k means if u divide voltage by current, u will get a value... next u can change the voltage and then again divide voltage by current.... the ratio is same.... (I dont know u got me or not...)

Guys,,, I'm sorry I just cant type what i want to do.... But I just want to do this thing..... can u guys help me with that?? I mean in an easy way.... and thanks everyone for the help....
http://www.scienceandsums.com/2013/03/02/using-arduino-uno-to-verify-ohms-law/

suvink:
http://www.scienceandsums.com/2013/03/02/using-arduino-uno-to-verify-ohms-law/

I'm confused: if you have a solution as explained in that link (I didn't read it fully, but let's assume it works), why are you asking for help? Or rather, what exactly are you asking? Or are you trying to come up with a different, yet still Arduino-based, solution?

If you're going to do electronics math, you have to show the UNITS !

THIS:

How to get the output in this form.. (V = 2 and I = 1) "2/1 = 2"

IS WRONG.

It should be :
Let V=2,
I= 1
then,
V/I= 2 V/1 A = 2 ohms.

If you put THIS

"2/1 = 2"

On a homework or test paper you would get points deducted for failure to show units.

I connect the +5 probe of the voltmeter to a one side of the LED and gnd probe will connect to the other side.... so The voltmeter, I just got it from a tutorial...

You need to do some basic electronics study.

1- A VOLTMETER DOESN'T HAVE +5V (HELLO ! It's a VOLTMETER ! NOT A POWER SUPPLY !)
2- A VOLTMETER DOESN'T HAVE A GND LEAD (IT IS CALLED THE "NEGATIVE" LEAD)
3- There is no point in measuring the voltage drop across the lead because it has absolutely NOTHING
to do with your post title about proving OHM'S LAW because a led is NON-LINEAR !

So far you have not only NOT correctly started your post, now you are in the hole because nothing you
have said is even vaguely relevant to proving ohm's law.

v/i=k means if u divide voltage by current, u will get a value... next u can change the voltage and then again divide voltage by current.... the ratio is same.

yes that is because the resistance is the same.

Can YOU stop using u as it is a very ignorant thing to do. We do not charge by the letter.

I think more people here should use "Grumpy" as a prefix to their name. :stuck_out_tongue:

Including me... is drawing schematics a lost art? I can't blame the OP for posting the schematic he did, when I look at the examples on the page he linked to.

And that is a teacher's website! Sad.

Please check my signature for some links on better ways to draw schematics.

is drawing schematics a lost art?

You mean hand drawn or CAD ? (I do all my by hand because I don't have ORCAD anymore.
People tell me I should use PC EXPRESS.

expresspcb is easy to use, quick way to document a design.
free version of eagle is also good, can get a lot on a 1-page schematic.

Watch this video about LEDs and Ohm's Law

raschemmel:
You mean hand drawn or CAD ?

I mean the clearness and style of the schematic. Everyone is posting pictorials from Fritzing, or badly drawn hard to understand schematics.

http://forum.arduino.cc/index.php?topic=291170.msg2057511#msg2057511

Use the ground symbol so you don't have a mishmash of wires running everywhere. You can do the same with a small circle labeled "5V" to indicate the 5V supply line. Signal flow should go from left to right as much as possible. Power should go + supply on top, ground on the bottom, or - on the bottom if there is a negative supply. These are often called "global connections".

I really hate what Fritzing and Make magazine are doing to schematics, but I cannot blame it all on them.

http://opencircuitdesign.com/xcircuit/goodschem/goodschem.html

http://www.k-state.edu/ksuedl/publications/Technote%208%20-%20Guidelines%20for%20Drawing%20Schematics.pdf

Remember that the point behind using schematics rather than a pictorial is to make it more clear what the circuit is doing and how it is wired up.