0
jackandjohn

Beginner asks: How to power small LEDs from the OPi Zero

Recommended Posts

I've gotten the board up and running and on Wifi, but this is supposed to be a dim wifi 'lamp'.

 

Just to start out:

  • how do I connect the +- to the board
  • How do I tell the board to power on the leds

 

And for more advanced:

  • Is it possibly to do voltage-limiting dimming as opposed to PWM
  • If no: what's the best way to do PWM? (I'm perfectly fine with creating a c program that simply turns it on and off at a specified hz, but there may be a more elegant tool I'm not aware of)

 

 

Thanks

Share this post


Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Since LEDs are current devices,  they cannot be easily controlled in the voltage domain. So if you do not want to do pwm control, then you need to do current control.  PWM control is a lot easier!

You need to use a driver circuit to control your LEDs.  That can be as simple as a uln2803 chip, or a complicated current limiting discrete circuit.

First figure out what the voltage is you need to control, and the total amount of current. Then we might be able to help.

Share this post


Link to post
Share on other sites

Forgot to mention; easy way to generate pwm is to use a pca9685 chip connected to i2c. Adafruit sells a board with it, and it even has the right resistors installed so you can hook up a led directly...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0