Jeremy Smith shared his RGB LED Driver project with us, a means of powering an RGB LED strip using a Pi, one of our 16-channel 12-bit PWM/Servo Drivers, and some mosfets:
The code lets you fade between colors or walk randomly between max and min values for some nice environmental effects.
This software can be used to drive an analog RGB LED strip using a raspberry pi and adafruit’s 16-channel 12-bit PWM/Servo Driver – PCA9685: http://www.adafruit.com/products/815
Here’s the basic idea:
- Hook up the pi to the PCA9685 breakout board using the I2C connections.
- Connect the pi’s 3.3V output to VCC on the PCA9685 breakout board. Leave V+ floating.
- Follow this tutorial for the RGB LED strips: http://learn.adafruit.com/rgb-led-strips/usage
- I used the N-channel MOSFETs – three of them, one for each channel
- Connect the +12V from the LED strip to an external power supply (do NOT use your pi for this!)
- Connect the ground side of the power supply to the pi ground
- Instead of using the PWM outputs from the arduino, we’ll use the PWM outputs from the PCA9685.
- Connect up the PWM output 0 to the MOSFET with the red wire from the LED strip.
Output 1 goes to green, output 2 goes to blue.
Featured Adafruit Products
Adafruit 16-Channel 12-bit PWM/Servo Driver – I2C interface – PCA9685: You want to make a cool robot, maybe a hexapod walker, or maybe just a piece of art with a lot of moving parts. Or maybe you want to drive a lot of LEDs with precise PWM output. Then you realize that your microcontroller has a limited number of PWM outputs! What now? You could give up OR you could just get this handy PWM and Servo driver breakout. When we saw this chip, we quickly realized what an excellent add-on this would be. Using only two pins, control 16 free-running PWM outputs! You can even chain up 62 breakouts to control up to 992 PWM outputs (which we would really like to see since it would be glorious). (read more)
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — How Authority and Decision-Making Differ Across Cultures
Wearables — Perform operation
Electronics — Soldering Pointer!
Biohacking — Stretchable EEG Temporary Tattoos
No comments yet.
Sorry, the comment form is closed at this time.