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?
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 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 :)
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:
A Darlington pair can provide HUGE amounts of current gain,
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:
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 Limiterwill limit the current through the LED to a value consistent with its specifications (100 mA ?)
R-basewill control the amount of current from the GPIO pin into the Base junction of the Darlington
Here's other things to consider:
- 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.
- 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.
- 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.
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.
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.