SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By veggie2u
#186604
I am looking at using the 3 watt led https://www.sparkfun.com/products/13105.
I have read and think I understand the hookup guide for the femtobuck.
https://learn.sparkfun.com/tutorials/fe ... -guide-v12

What I am wondering is can the same thing be accomplished by a simple n channel mosfet? I saw a couple of other tutorials where the PWM from an Arduino is connected to the gate, and the other pins of the mosfet connected to ground and the led which is also connected to a higher external power source. Sometimes I see a 100ohm resister on the PWM pin. This seems electrically a lot simpler than the femtobuck. The femtobuck however provides a constant current, designed for the LED's, and I can't quite see how the mosfet will be able to control the current through it.

Anyone able to explain better how the mosfet would work in this example. (I did watch Pete's old tutorial) Is it better (what reason) to stick with the femtobuck?

Thanks,
Chris
By Valen
#186612
The mosfet is basically a switch. It allows current to flow through it or not. As you know, it does not regulate the current. Depending on the gate voltage it goes on fully, partially, or is off. It has a bit of resistance when it is conducting, but not enough to limit the current through the led to the maximum it can hold. You don't want to burn that amount of energy inside a current-limiting resistor, or the mosfet itself anyway. It would get very hot. That is why a little bit more complicated, yet much more efficient and smaller, circuit like the femtobuck is created. It (buck-converter) turns the surplus voltage that is fed into it into more current at a lower output voltage. And has additional circuitry to limit the led current so it does not burn out. There is a tiny resistor in series with the led to let the chip on the femtobuck know how much current is flowing through the led. The chip on the femtobuck measures this voltage drop across the sense resistor and compares this against the equivalent voltage of the PWM input. Then adjusts the switching duty cycle to limit the current.