2

I want to power an 1.5V LED fully and control it using pi. I can only use 16mA per pin and i need 100mA. Can you give me suggestions? I can turn it on with 5V and 35 ohm resistor but not control it. Do you know any boards available for this purpose on pi platform?

Sci00213
  • 49
  • 1
  • 4
  • 2
    Quite related if not dupe: https://raspberrypi.stackexchange.com/a/75558/19949 – Ghanima Mar 18 '19 at 20:54
  • 1
    Welcome to Raspberry PI Stack Exchange. Your question is almost a good one, but it strikes me that you may be asking for a purchasing recommendation which is considered to be "off topic". Off topic questions are at risk of being closed. Suggestion: Do a bit of research, then edit your question so that it's further away from being off-topic. In general, as @joan states, what you need is either a relay, or a transistor. Both are available as discrete (stand-alone) parts, or integrated with other components on a board. – Seamus Mar 19 '19 at 13:27

3 Answers3

4

OP asked, "... any boards available for this purpose?"

This seems more of a "shopping question" than a technical question, but I'll try to answer it to provide some ideas on what you may want to look for while you shop for a product.

As @joan states in this answer, transistors and relays are typical solutions. Here's a little more information to consider:

Relays:

Relays are electro-mechanical devices: you energize a coil, which moves a solenoid piston, which in turn opens or closes a set of mechanical contacts. They're available in "board form", and may be integrated with other components to simplify their use. Google for "Raspberry Pi relay board", and shop 'til you drop :)

Transistors:

I am biased (no pun intended) against relays for a number of reasons that have nothing to do with their suitability for your project. I prefer solid state solutions. Transistors work under an entirely different set of principles than relays, yet achieve much the same result. Transistors have no moving parts; they are typically 3 terminal devices in which one terminal controls the conductivity (resistance) through the other two terminals. I won't elaborate, but there are excellent sources online that go into much more detail. They're not difficult to understand at the circuit level, but they probably require more mental effort than relays.

Insofar as current switching applications for a Raspberry Pi, it's also my opinion that a device called the Darlington pair, aka Darlington transistor is almost ideal for this application. My opinion relies largely on two objective facts:

  1. A Darlington pair can provide HUGE amounts of current gain,

  2. As a current-driven device (BJT), they are substantially easier to "drive" from the RPI's GPIO pins than MOSFET devices.

Qualitatively, they are inexpensive, easy to use, resistant to ESD damage and readily available. Following is a generic schematic to give you some ideas:

schematic

simulate this circuit – Schematic created using CircuitLab

In a nutshell, here's how this would work:

  • The GPIO pin will go "HIGH" to turn the Darlington on (make it conduct)
  • When the Darlington conducts, current will flow from V Supply, and cause the LED to illuminate
  • R-Current Limiter will limit the current through the LED to a value consistent with its specifications (100 mA ?)
  • R-base will control the amount of current from the GPIO pin into the Base junction of the Darlington

Here's other things to consider:

  1. DC current gain for a 2N6038 (Darlington) is given in the spec sheet as a parametric (specified over a range) value ranging from 500 to 15,000. This means that to control a 100 mA current will require from 0.2 mA to 6.7 uA drive current. That's well within the specs for the RPi's GPIO.
  2. Calculations will be required to size the Resistors. This will be based on the Supply voltage you use (R-Current Limiter), and the specific Darlington device you use.
  3. This was intended to provide ideas only - not to claim that this is the "best" way to accomplish your objectives (whatever those may be).

And that's it... good luck & let us know if you have further specific (non-shopping :) questions.

Seamus
  • 21,900
  • 3
  • 33
  • 70
2

This is the purpose of a transistor. You can switch a transistor on and off using a small amount of current from a GPIO to the base of the transistor. A large current at a higher voltage can then flow between the transistor collector and emitter.

An on-line search for transistor switching circuit will get hits.

An alternative is to use a relay module. It again can be switched on and off with a Pi GPIO which allows/stops current flowing between its contacts.

joan
  • 71,024
  • 5
  • 73
  • 106
1

You can use relay or transitor to turn led on/ off. Connect direct led which using more than 20ma isn’t recommened. It can fired your PI.

Pi guide
  • 21
  • 2
  • 1
    A transistor has already been suggested, and a relay is overkill for 1,5V/100mA. – RalfFriedl Mar 19 '19 at 10:01
  • 1
    You can use relay module. It’s easy to use and safe. – Pi guide Mar 19 '19 at 15:28
  • 2
    While you can use a relay for this purpose, and granted we do not have enough info from OP to determine the best solution, given what we do know, a relay is most probably not the best solution. What if OP wants to control brightness through PWM? A relay won't work for that. Nothing in the given specs drives us to use a relay, so best to spec a transistor. – Glen Yates Mar 19 '19 at 18:21