Connect with us

Basic beginner questions (voltage reading/resistors)

Discussion in 'General Electronics Discussion' started by Les, Sep 23, 2014.

Scroll to continue with content
  1. Les

    Les

    4
    0
    Sep 23, 2014
    Hello:
    I am new to this forum and a beginner with electronics. I have a project I am working on and have many questions.
    I am powering this laser: https://www.sparkfun.com/datasheets/Components/Laser-Card.pdf
    Input Power Source: DC3.1V±10%
    Consumption Current: typical: 35mA, Max: 40mA
    I am using an Arduino uno as the power source. This is a 5v power source.
    On http://www.overclockers.com/forums/showthread.php/175036-Basic-Electronics I read that the formula for powering an LED is E/I=R, where E=volts, I=amps, and R=resistance needed(ohms). The poster takes the power supply and subtracts the power consumption to come up with E.
    I assume this is the same for powering my laser. Two questions:

    1. So 5v - 3.5v = 1.5v and 1.5/.035 = resistor size. 42.857142857ohm. I need to use a 43ohm resistor to power a laser.
    Is this correct?

    2. Playing around with a digital multimeter. I read the voltage coming from arduino uno at 4.56v. I then add a 120ohm resistor (brown red brown gold) on the gnd side and read the voltage again. It reads the same.Shouldn't it change the voltage? Isn't that what I use a resistor for? I need to bring the voltage down to the 3.5v range for the laser don't I?
     
  2. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    When you measure the voltage with a resistor like you just did, the result is measuring an 'open circuit'. There is path for the electricity to flow so all of the available voltage shows up at the end which is what you measured. (There is a little untruth in this... more later) To more accurately measure that, you should add another resistor as a 'pretend' laser and then measure again. This way there is a full current path and it can actually flow properly and give you a better reading.
    The math above is correct... but relies on a couple important facts:
    1- The laser diode MUST drop 3.5V, if that changes then the voltage remaining across the resistor will increase, which means more current will go through.
    2- The power source must not change... again, read number 1.

    What that calculation essentially is:
    Power supply voltage - LED voltage drop = left over voltage for the resistor.
    The resistor is a 'current' limiting resistor, but it is a 'dumb' current limiter. So using you can rearrange E=IR to determine what resistor you need, or how much current will be allowed through if you have some resistors on hand.
    In order to limit your circuit to providing 35mA, you end up with your 43Ω, but remember if anything else changes in your circuit more or less than 35mA may go through your Laser Diode.


    *About measuring open circuits..
    Hopefully I don't confuse you, but if you go into the bathroom and turn the tap on full blast. That is your 5V..
    Now if you turn the tap down to a small drizel, and plug the tap with your thumb what happens? It takes a second or two, but the water pressure end up shooting water out. There is not path for the water any longer, so all of the potential is pushing against the block. That's what you measure with your meter. Once the water actually starts moving though the pressure goes back down to what you have the tap set at. This will be how your circuit behaves. If there is no Laser diode in place, the end of the resistor will have almost 5V at the end until you provide some path for it to take.
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,716
    Nov 17, 2011
    For more information about driving LEDs read this ressource. The laser module you linked to is obviously based on a Laser diode which is a special kind of LED. What we cannot see from the description os whether there is a laser controller or at least a current limiting resistor built into this module.

    On the product page there is a discussion whre the use of this module with an arduino is specifically mentioned. One poster notes that the arduino is not suitable for driving the 35mA you want to supply (arduino's pins being limited to 20mA). It is also not very clear if the 5V+resistor method is realy suitable for this module. One poster recommends using a 3.3V pin...
    In light of this you may be better off using a separate driver transistor and a 3.3V power supply to control this module from the arduino. You may not need a constant curent source (as proposed in the LED ressource). A simple on-off driver and a 3.3V power supply may suffice. The 3.3V can be drived from the 5V by a low-drop voltage regulator, e.g. this one.
     
  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Hi Les and welcome to Electronics Point :)

    Your calculations in point 1 are good. You have calculated the voltage that must be dropped by the resistor, and divided that by the current in amps, to come up with a value of 43 ohms for the resistor.

    But the data sheet says that the forward voltage VF is 3.1V ±10%. So I'm not sure where you got the 3.5V from. I think you need to re-calculate the resistor value based on the nominal laser forward voltage of 3.1V. In that case the calculation is:

    R = V / I
    = (5V - 3.1V) / 0.035A
    = 1.9 / 0.035
    = 54.2857Ω
    Closest preferred value is 56Ω.

    Using a 56Ω resistor gives a nominal current (assuming VF = 3.1V) of 34 mA. Slightly less than the recommended 35 mA.

    As Gryd3 explained above, using a simple resistor as a current limiter is not a very exact way to get the current you want. And with LEDs (and I'm assuming this laser module contains a type of LED internally), the current is the important factor - it determines the brightness, and it must be kept below the specfied maximum, which is 40 mA in this case, to prevent damage.

    Using a resistor, the actual current flow is determined by the resistor value (which will be pretty accurate if you use a resistor with 1% tolerance - don't use 5% resistors for this), and the voltage that is dropped across the resistor. This voltage depends on two factors: the forward voltage of the laser, VF, which is specified as 3.1V ±10% which is quite a wide range: 2.79~3.41V, and the power supply voltage, which you've already said is only 4.56V!

    Just taking into account the VF range of 2.79~3.41V and assuming a perfect 5V supply and no error in the resistor value, the voltage remaining across the resistor could be anywhere from (5V - 3.41V) to (5V - 2.79V) which is a range of 1.59~2.21V. Using Ohm's Law, I = V / R, this corresponds to a current range of 28.4~39.5 mA, which is about ±18% compared to the expected current of 34 mA we calculated for a 56Ω resistor. That's quite a large range! Remember that brightness is roughly proportional to current.

    Since your "5V" power supply rail is only 4.56V (this sounds wrong to me, but I'll use it anyway), the lowest possible LED current is even less than 28.4 mA. It's actually (4.56V - 3.41V) / 56Ω which is 20.5 mA. That's about half the maximum current I calculated for a supply voltage of 5V and the minimum VF earlier. So you would have a brightness range of almost 2:1 depending on the supply voltage and VF. That's probably not acceptable.


    The proper way to drive an LED when the current is critical is to use a cicuit called a current regulator or constant current source (or sink). This circuit replaces the resistor with an active component such as a transistor (or two transistors, depending on the circuit) that regulates the current directly, so that the current is almost completely independent of the supply voltage and VF - at least, as long as they're within the design range of the circuit.

    A current regulator is very valuable when the operating current (35 mA) is close to the maximum allowable current (40 mA) because it means you can reliably pass the desired current through the LED without being in danger of exceeding the maximum rated current and risking damage to the LED. Three paragraphs ago I calculated the current range using a 5V supply and a 56Ω limiting resistor as 28.4~39.5 mA. That upper limit is very close to the maximum rated current of that laser LED.

    A current regulator also provides a simple way to turn the LED ON and OFF using a logic-level output from a microcontroller or other circuit. These outputs usually can't directly supply the 35 mA required by the LED.

    There are various ways of building a current regulator. Here's one of the simpler circuits (captured from http://e-project4u.blogspot.co.nz/p/101-200-transistor-circuits.html):

    LED simple current sink.png

    The control signal at the left enables the circuit when high, and disables it when low. The resistor labelled R sets the LED current; the formula for the relationship is shown in the diagram. Two LEDs are shown in the collector circuit but you can use any number, as long as there's enough voltage left across the transistor for the circuit to operate. It needs at least 1.0V but more is better for best accuracy. 1.5V is good.

    In your case with a 4.56V supply and a worst case VF of 3.41V, only 1.15V is left across the current regulator. This is probably workable with the design above. I would reduce the 10k resistor to something like 2k2, and use a high gain transistor in the right hand position (e.g. BC548C or BC337-40).
     
    Last edited: Sep 25, 2014
    Harald Kapp likes this.
  5. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    P.S. The formula for current vs. R for that current regulator is not exact; the 0.7V is just a nominal voltage. Using that formula, R = 0.7 / I, gives a result of 20 ohms. I recommend you use a 15Ω resistor in series with a 10Ω preset potentiometer ("trimpot") in that position. Initially, set the trimpot to maximum resistance (this gives minimum LED current) and connect a milliammeter in series with the LED. Power up, enable the current regulator, and adjust the trimpot for the desired current. Then power down and remove the milliammeter.

    The current will be somewhat dependent on temperature as well.
     
  6. Les

    Les

    4
    0
    Sep 23, 2014
    Hello:
    Thanks everyone for the help. There is a lot of info you have given me that I have to try to understand.
    I would like to give you all more info on what I am doing. This project is inherited from someone who has no time for it now. It is purely fun and not commercial or even important in any way. I decided to continue it because I want to learn.
    The end project will see two of the lasers lined up horizontally at a known distance from each other.
    Across from each laser, on the target end (red dot) of each laser will be a light sensing diode. I have to do some digging to get the specs of the sensor for you.
    A ball rolls and 'breaks the beam' of the first laser and continues on to break the beam of the second laser.sensor pair.
    The time of the first break subtracted from the time of the second break and used along with the known distance between beams to calculate the speed of the ball.
    The fellow that I inherited this project had it working on a breadboard, to the point of returning seemingly accurate speeds. I am backtracking and starting from scratch in order to understand what he did.
    The first thing I noticed was his use of resistors that did not match up with what I would have expected. So the my first instinct was to power 1 laser.
     
  7. Les

    Les

    4
    0
    Sep 23, 2014
    The water analogy is interesting. And yes it is a little confusing. The valve is the resistor, but what is the finger that is creating back pressure? Doesn't the circuit close when you add the multimeter to it?
    Also KrisBlueNZ pointed out that I read the spec sheet wrong. It is 3.1v.not 3.5v.
    When calculating for resistor size, did I also use the wrong amp.? Should I have used the Arduino supplied power amperage not the lasers required amps?
     
  8. Les

    Les

    4
    0
    Sep 23, 2014
    Upon reading your posts, and Gryd3's, Harald Kapp's, I have decided to go your recommended route. Thanks very much.
    When you say you don't think my 4.56v reading is accurate, what could cause this misread? I am powering the A
    rduino via the usb cable. Is this a factor?
    The reading is a 'dead stop' in that it is not fluctuating at all.
     
    Last edited: Sep 24, 2014
  9. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,716
    Nov 17, 2011
    There is possibly some voltage drop along the USB cable from the PC. Also, the USB's 5V from the PC interface may not be 5V but slightly less to begin with.
    Anyway, you can accomodate for the difference by adjusting the current limiting resistor - or by using the 3.3V regulator plus switch transistor - which in my view is the preferred method due to the limited current capability of an arduino's outputs.
     
  10. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    In hindsight it's a poor example I used, and meters are a little trickier than most people think.
    The valve is a resistor yes, because it is restricting flow. When a meter is used, it is actually added to the circuit just like a resistor. Usually higher than 1MegΩ which is much much larger than the resistor you were using.
    Just like the water trick, you thumb is the meter, and because it is sooo much more restrictive then the valve when you attempt to block the flow, your thumb sees almost all of the pressure.
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    Which resistor are you talking about?
    Yes, as Harald said, that is probably the reason. The USB supply voltage range is 4.5~5.5V. This is cutting it pretty fine when the laser LED's forward voltage could be as high as 3.41V. That leaves only 1.09V for the current regulator.

    If it's important to keep the thing USB powered, the current regulator could be changed to use a MOSFET in the right hand transistor position, which would reduce its voltage drop to less than 1V. Most suitable MOSFETs are only available in SMT, but here's a TO-92 one: http://www.digikey.com/product-detail/en/VN3205N3-G/VN3205N3-G-ND/4902407. It would be wise to put an SMT outline on the board too, because that THT one may not be available for too long. SC-70 and SOT-323 seem to be common packages for this type of component. An excellent SMT option is the AO7400: http://www.digikey.com/product-detail/en/AO7400/785-1084-1-ND/1856027
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-