SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
I'm trying to control the 4.5V LED ribbon ( with a micro:bit but I'm not sure how. The micro:bit takes 3V, so isn't that what it will output to the LED ribbon? Do I need to supply separate power to the LED ribbon? Can I supply 5V to the micro:bit without blowing it up? I need the LEDs to be as bright as they can be, so having dim LEDs isn't a great solution. Thanks for any help or guidance!
It is questionably if the 3.3 volt regulator on the micro-bit can supply the 250mA per meter. In any case if it lights them up it will be very dim. Seemingly turned off.

Since the micro:bit is supplied through a micro-USB cable socket there should be 5 volt on it somewhere. However I am too unfamiliar with the micro:bit to help locate it. If you can connect to it, USB by default would only deliver 100mA. A cell-phone charger, wall-wart or something like it usually doesn't limit itself to that though. Connecting it to a computer or hub may also limit it's brightness. Those usually adhere to the 100mA limit.

As for switching it, that is best done through a transistor. The micro:bit pins will not be able to light up all the leds in the ribbon.It needs more current which you can easily switch with a (NPN) transistor circuit. But it can easily drive the base of a transistor to make it conduct 100s of miliAmps. Which transistor would depend on how much current and how long the ribbon is.
Thank you for your response! Would it be possible to hook the LED ribbon up to its own battery instead of trying to power it through the microbit? So the microbit would have its own power supply and I could use two coin cell batteries in series (6V/250mA) to power the LED ribbon?
Dedicated battery is fine. However coin cells usually do not have that much capacity. They will be drained quickly. Also rather high internal resistance resulting at lower than 3 volt per cell when it has to deliver such current. Your mileage may vary. 4x AAA should work though. Also to power the Micro:bit.

When using 2 seperate batteries make sure the grounds are connected. Otherwise controlling the transistor won't work.
Okay, I looked over everything you said and I think I figured out a lot. It seems like I should power the micro:bit with its 2xAAA battery pack and use a transistor to increase the current to the LEDs. I was trying to sidestep using a transistor because I've never used one and I didn't know which one to use, but I'm doing this project to stretch my knowledge, so I sucked it up and I looked into it and I think I need to use this one?

Here's my understanding so far - plug the 2xAAA battery into the microbit. Connect one of the digital out pins on the microbit to the collector of the transistor. Connect the base of the transistor to ground and the emitter to the LED ribbon. Connect the other wire of the LED ribbon to ground. Does that seem close to right?

Also, I think that transistor outputs 6V and the LED requires 4.5V. If my understanding of Ohm's law is correct, in order to reduce the voltage by 1.5 with a 200mA current I would need a 7.5 ohm resistor. Is a resistor even necessary? Or should I play it safe with a 100ohm resistor? If I need one should I put it between the emitter of the transistor and the LED strip?

Am I missing anything or does that sound about right? Thank you for your help!
Your suggested transistor seems a bit on the weak side (for a full meter of ribbon) with 200 mA absolute maximum collector current. (Beyond that it may be destroyed) Instead I'd opt for the 4 times stronger BC337:
Make sure you check the emitter, base and collector pin out. There is no standard order.

I don't understand why you think the transistor outputs 6 volt. What made you think that? A transistor does not output anything by itself. It depends on the voltage applied across it. If you mean to use the 6 volt through 2 3 volt coincells then yes. But ... (the following)

I think you need to learn a bit more how to use transistors.
What you described as how you would connect it is called common base configuration
That does not work as a switch. Instead you want to use the common emitter configuration. Base is connected to the micro:bit pin (through a current limiting resistor, 1000 Ohm should do) used to activate the ribbon. Emitter is connected to both (+ 4.5v) battery minus and ground of the micro:bit. Collector is connected to the minus of the led-ribbon. The plus of the led ribbon is connected to your +4.5 battery positive lead, making a full circuit. This circuit is described in Sparkfun's Transistor tutorial under the "Application 1" section.

You make a good point about a current limiting resistors for the led ribbon. I can't figure from the datasheet if the ribbon already contains them. Each led probably has one because that is just safe standard practice. And for even white/blue ledsabout 4 volts should be sufficient. The remaining 0.5 volt is probably dropped across a dedicated resistor at each led. But I would want to visually confirm it instead of assume. Your calculation is correct for 200mA. But that depends on the actual length of the ribbon.
Thanks! And you’re right, I need to learn more about transistors. I’ll study that link and see if I can figure this all out after that. I think I only need about a foot of the LED ribbon, not sure if that changes which transistor I need. Thank you so much for your help!
To follow up - I got it to work! I studied everything I could find on transistors and now I'm pretty sure I have them down. I can now power the whole meter of LED ribbon off one microbit pin with a transistor and extra coin cell battery. Thanks again for your help!
Here's a link to a simple drawing: ... ematic.jpg The base of the transistor is attached to a pin on the microbit to trigger the LED. Then there's a circuit from positive on battery, to positive on LED ribbon, then negative on LED ribbon to collector on transistor, then out the emitter of transistor to BOTH ground on microbit and ground on battery. The whole meter of LED ribbon needs about as much current as the transistor provides, so there isn't a resistor there, but when I cut the ribbon down I'll add a resistor. A couple caveats: I think I was supposed to add a resistor between microbit pin and base of transistor but I don't know why and I didn't add one and it works. Also, I think I was supposed to add a resister between the base of the transistor and the emitter, but again, I don't know why and I didn't add one.