You have to start with a closed circuit, so that there can flow current. Do you have the resistor connected between the +
and the -
of the power supply? Then the voltage difference is 3.3 V. And you use Ohm to calculate the current.
The LED. Did you place that in series with the resistor? Which is how a LED circuit is built: the resistor makes sure that there's not too much current through the LED. Always use one.
If the LED's voltage would be 3 V then the difference between your supply voltage and the LED's voltage would be across the resistor. Kirchhoff is to blame for that. Kirchhoff's Voltage Law (KVL) says that the total of the voltages in a closed loop is zero. So we'll have 1.1 mA through LED and resistor. The 3 V was specified at 20 mA, so we're an end below that. It's normal for a LED to have a lower voltage at low currents.
But note that the 1.1 mA was true for 3 V LED voltage. We're apparently at 2.4 V, so the difference is now 0.9 V, and the current 3.3 mA. If you decrease the resistor value so that the current increases, you'll notice that the LED's voltage will increase as well.
How do you calculate the value? (Here we go again)
\$ R = \dfrac{\Delta V}{I} = \dfrac{3.3 V - 3 V}{20 mA} = 15 \Omega \$
edit re your update of the question
Welcome to the real, imperfect world. What you have at hand is measurement error. This is an important issue in engineering, and handling it properly can be a painstaking process.
You're giving your numbers in three significant digits, that's probably what the multimeter gives you. A multimeter's precision is most of the time expressed as a percentage (relative error) + a "count" (absolute error). A hobby quality meter may for instance have 2 % precision +/- 1 count. The 2 % should be clear: a 100 V reading may actually represent anything between 98 V and 102 V. The 1 count is an error in the last digit. A 5 may actually be a 4 or 6. That's an absolute error and doesn't depend on the value the meter gives you. If you measure 100 V then 1 count represents 1 %, if you read 900 V (same number of digits!) then 1 count is 0.11 %.
Let's presume you have a decent multimeter with 1 % +/- 1 digit precision. Then worst case your values may become
3.28 V - 1 count = 3.27 V, - 1 % = 3.237 V
267 Ω + 1 count = 268 Ω, + 1 % = 270.7 Ω
11.7 mA + 1 count = 11.8 mA, +1 % = 11.92 mA.
3.237 V / 270.7 Ω = 11.96 mA, which agrees well with the 11.92 mA we calculated for worst case. If your multimeter has a 1.5 % precision the calculated current will fall perfectly within the measured value's error range.
All LEDs can be modelled as zener diodes with a colour/substrate specific forward voltage Vf and a series resistive Rs, where they combine both to give the Vf at rated current.
Rs tends to be small so you can neglect it for approximations of adding current limiting series resistors. (see below)
Therefore the current is non-linear and proportional to the voltage difference between the supply and the Vf drop at desired current.
Batteries with low voltage variation are ideal such as Lithium primary cells. Most White flashlights using 3V per LED use these without series resistors as the Li cell is also 3V. However they may be specify a sorted bin of LED's to achieve this.
My Rule of Thumb is to string arrays of LED's such that the voltage difference is ~1V for the current limiting Resistor for a fixed regulator. If the supply range has a wide range, e.g. 10 ~15V then a constant current sink circuit is best.
Additional Info
For more accuracy over a wider range of currents, you can determine the Rs value from the specsheets for a given temperature. The Vf forward voltage also is a function of temperature which affects the results slightly. THe Rs of LED's is much lower than the dynamic Rs of Zeners using silicon junctions.
- 20mA HB devices are <20 ohms.
- 300mA HB devices are < 2 ohms.
- 1Amp power modules are ~ 0.3 ohm.
- Rs for LED arrays , add in series, and divide in parallel.
- Old technology LEDs were much higher Rs values.
- Rs will reduce as the current increases but you can approximate it at the 10% of rated current value and extrapolate if the device stays at constant temp.
- Because of the Shockley effect with voltage variationmyou can actually calculate the junction temperature from the voltage drop of a calibrated LED.
Best Answer
simulate this circuit – Schematic created using CircuitLab
Figure 1. A typical pull-up resistor application.
In that case you use a potential divider.
simulate this circuit
Figure 2. A potential divider used to bias the non-inverting input to half-supply.
Here again the op-amp's input resistance will be very high. A pair of relatively low resistors is used to divide the supply voltage in two (or any other ratio you choose). The op-amp's input draws (or sources) such a small current that the divider voltage is not affected.
It depends what you are trying to do. If the input pin is always high then you can connect it to 3.3 V (note capital V).
simulate this circuit
Figure 3. Various configurations. Some are bad.