Hi everyone
I would like to create a variable resistor using just a short length of wire ~ 50cm.
When connect normal tinned copper to +5 volts and ground my arduino uno shorts or something and turns off.
I found a solution using high resistivity wire (nichrome). I'm writing this up for a personal project and would like some information as to why the arduino cuts off and if there is a minimum resistance that needs to be present for an output of 5 volts.
any help appreciated
thanks
When connect normal tinned copper to +5 volts and ground my arduino uno shorts
Are you really saying that you connected 5V to GND and wondered why the Uno stopped working ??
yes sir
Um...
What you did was a short circuit with tinned wire as there is little resistance, if there was electronics would be in trouble finding material good enough to conduct electrons.
Nichrome certainly, run a length of wire from the bottom of your room to the top, positive one end and gnd the other end, now take a 3rd wire (regular tinned wire)... insert tinned wire into a0 on your arduino, now simply connect the tinned wire to any point of the nichrome wire, run it up and down and you'll see a value between 0 - 1024 or 0 to 5v
Depending on how many ohms per meter you may need a few inches or a few feet.
Hillarious
You are lucky because most USB ports (at least mine does) disconnect when shot circuit is presented, saving the FTDI and the Arduino. This has helped me many times.
And nice Ohm info, didn't know that fact.
I found a solution using high resistivity wire (nichrome).
It's only "high resistance" when compared to copper. Depending on the gauge of wire 50cm is probably 1 or 2 Ohms. You can look-up the Ohms-per-centimeter for the wire you have. That's NOT generally considered high resistance... 1 Megohm or 10 Megohms is what most people consider high resistance.
[u]Ohm's Law[/u] says with 5V across 2 Ohms, you'll get 2.5 Amps. If your power supply can't supply the amperage, the voltage will drop and you may damage your power supply. That's what happened when you used copper wire. Power (related to heat) is calculated as Voltage X Current. Assuming my 2 Ohm guess is about right, that's about 12 Watts and the wire might be too hot to touch.
Typically, the lowest value resistor you'll see in an Arduino is 180 Ohms as a current-limiting resistor for an LED. Other than that, most Arduino circuits won't have anything lower than 5k or 10K. That's just a generalization and of course there are exceptions.
Lets imagine a really high current 5V supply, connect 50cm of, say 0.7mm copper
wire across the terminals of the supply:
resistance of 50cm of 0.7mm copper wire: 0.022 ohm
current through 0.022 ohm when 5V across it: 230A
power dissipated in wire: 1.15kW
time to melt wire: probably a few milliseconds.
Compare with some hypothetical resistance wire of 1 ohm/cm:
resistance of 50cm of wire: 50 ohms
current: 100mA
power: 0.5W
wire gets a little warm at most...
V = IR
P = VI
DVDdoug:
I found a solution using high resistivity wire (nichrome).
It's only "high resistance" when compared to copper. Depending on the gauge of wire 50cm is probably 1 or 2 Ohms. You can look-up the Ohms-per-centimeter for the wire you have. That's NOT generally considered high resistance... 1 Megohm or 10 Megohms is what most people consider high resistance.
[u]Ohm's Law[/u] says with 5V across 2 Ohms, you'll get 2.5 Amps. If your power supply can't supply the amperage, the voltage will drop and you may damage your power supply. That's what happened when you used copper wire. Power (related to heat) is calculated as Voltage X Current. Assuming my 2 Ohm guess is about right, that's about 12 Watts and the wire might be too hot to touch.
Typically, the lowest value resistor you'll see in an Arduino is 180 Ohms as a current-limiting resistor for an LED. Other than that, most Arduino circuits won't have anything lower than 5k or 10K. That's just a generalization and of course there are exceptions.
thanks, thats exactly the detailed answer i was looking for
But surely a lamp does not follow ohms law ?
Everything follows ohms law. The resistance might be a function of voltage or current or even vary as a function of time, but E always = I*R.
Boardburner2:
But surely a lamp does not follow ohms law ?
Yes it does, but the resistance changes as the filament heats up.
V= IR still holds true though.
positive temperature coefficient
negative temperature coefficient
and then there's the effect of being in a (near) vacuum
Ohm's "law" only holds true for linear resistance. At least in any meaningful fashion. It doesn't really tell you anything useful to "calculate" resistance of an LED at 20mA, because that number of ohms changes with current and voltage.
Perhaps you should just measure the resistance of the led and then do the tried and tested use of Ohm's LAW to pick a resistor to get your desired current. Ohm's LAW describes a fundamental relationship of electricity, not a suggestion or WAG.
Calculating an LED resistor value
LED resistor circuit An LED must have a resistor connected in series to limit the current through the LED, otherwise it will burn out almost instantly.The resistor value, R is given by:
R = (VS - VL) / I
VS = supply voltage
VL = LED voltage (usually 2V, but 4V for blue and white LEDs)
I = LED current (e.g. 10mA = 0.01A, or 20mA = 0.02A)
Make sure the LED current you choose is less than the maximum permitted and convert the current to amps (A) so the calculation will give the resistor value in ohms (ohm).
To convert mA to A divide the current in mA by 1000 because 1mA = 0.001A.If the calculated value is not available choose the nearest standard resistor value which is greater, so that the current will be a little less than you chose. In fact you may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright.
For example
If the supply voltage VS = 9V, and you have a red LED (VL = 2V), requiring a current I = 20mA = 0.020A,
R = (9V - 2V) / 0.02A = 350ohm, so choose 390ohm (the nearest standard value which is greater).Working out the LED resistor formula using Ohm's law
Ohm's law says that the resistance of the resistor, R = V/I, where:
V = voltage across the resistor (= VS - VL in this case)
I = the current through the resistorSo R = (VS - VL) / I
For more information on the calculations please see the Ohm's Law page.
Can you show these uses of Ohm's Law anywhere wrong?
No duh that if you use the law wrong that you will get wrong results. Same goes with math.
You said:
measure the resistance of the led
How do you propose to do that? And why?
The link and quote you gave does not calculate resistance of the LED, it assumes 2V drop and calculates the -current limiting- resistor.
polymorph:
You said:measure the resistance of the led
How do you propose to do that? And why?
The link and quote you gave does not calculate resistance of the LED, it assumes 2V drop and calculates the -current limiting- resistor.
I got the word words wrong, measure the voltage drop. Wire the circuit. Find the resistance from that.
Sorry but my math is too rusty to derive a voltage based circuit solution. I'm sure it's possible.
polymorph:
Ohm's "law" only holds true for linear resistance. At least in any meaningful fashion. It doesn't really tell you anything useful to "calculate" resistance of an LED at 20mA, because that number of ohms changes with current and voltage.
Yes, but no.
You are referring to the internal voltage drop or threshold. The resistance as such does not necessarily vary greatly with applied current and you can calculate it by feeding two different currents to the LED and dividing the voltage difference by the current difference. If you do this with three or more current levels, you can see just how linear the internal resistance is. Setting up your oscilloscope as a curve tracer in X-Y mode is a neat way of illustrating this also.
Just use a couple of different resistors, say 330 and 470 ohms to the 5V supply, measure the voltage across the resistor to calculate the current and the voltage across the LED.
The first approximation of an LED is a one way device that drops a certain voltage, around 2V, depending on the color and characteristics. The second approximation adds a small series resistance. That is what Paul__B is talking about measuring.
For the purpose of low to medium current LEDs, only the first approximation is necessary.
The internal resistance is fairly negligible compared to the resistance you need to limit the current.
Give me half a chance to finish up at work and I will run the experiment at home. Didn't bring my supply of resistors and LEDs.
{OK, it's a fairly quiet Friday afternoon.}