fiduciary

Author Topic: Teensy RGB LED driver - one at a time?  (Read 1922 times)

0 Members and 1 Guest are viewing this topic.

Offline Lolwel21

  • No Force
  • *
  • Posts: 10
  • Bridging mechanical and organic
Teensy RGB LED driver - one at a time?
« on: February 22, 2017, 04:49:40 PM »
I'm making a Teensy-powered lightsaber, and I'm currently trying to figure out how to drive the LEDs.

Is there a way to power an RGB (Luxeon rebel, but you don't need to know that) led assembly ONE (or two) AT A TIME?
I've looked all over for an answer (especially because lightsabers need to be pulsed FAST!), but haven't found a solution.
I need this because my power source maxes at 5V 2A, meaning that if I want to save some power for anything other than the LEDs (ex: the prop shield and the Teensy), I can't 'pulse' all 3 LEDs at once. In fact, one-at-a-time is optimal.

I remember reading somewhere (can't find it now) that because the lightsabers move so fast, I'll want to drive the LEDs at somewhere over 15kHz. If so, then the clock for each individual LED should be at least 45 kHz.

1) Is the pulse frequency advice true (if not, then how fast do I need to pulse it?)
2) How do I pulse the LEDs that fast without overlap?

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Teensy RGB LED driver - one at a time?
« Reply #1 on: February 22, 2017, 07:25:53 PM »
What is your power source? What are you trying to accomplish?

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Teensy RGB LED driver - one at a time?
« Reply #2 on: February 23, 2017, 01:15:59 AM »
Don't drive your LEDs from 5 volts, just hook them up to the battery with get for control and a resistor for current limiting.

Offline Lolwel21

  • No Force
  • *
  • Posts: 10
  • Bridging mechanical and organic
Re: Teensy RGB LED driver - one at a time?
« Reply #3 on: February 23, 2017, 04:41:50 PM »
I'd like to remind you that I am driving an RGB LED setup, meaning that I need to drive each color (red, green, rblue) separately.

My power sourse is a USB power bank(5v2A, 5000mah), because it gives me twice the battery life of any other option I've seen, and at only $11.

As for supplying power to the LEDs, I've already found a 3.4v 800ma power limiter and some transistors. I just need to pulse them fast enough for the bands to blend together during a swing.

I'm already using a Teensy 3.5 for sound, so preferrably using that.
« Last Edit: February 23, 2017, 04:43:45 PM by Lolwel21 »

Offline profezzorn

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: Teensy RGB LED driver - one at a time?
« Reply #4 on: February 23, 2017, 05:31:23 PM »
This is how I drive RGB leds (and other things): Teensy Saber Electronics
5kHz is probably enough for what you want, anything higher than that is going to start heating up your FETs I think.
By default, teensy PWM is synchronized, so you would need to do some FTM module hacking to do what you want.
At the end of the day, I don't recommend doing it this way because you loose a lot of brightness this way.

Offline jbkuma

  • Mining Colony Members
  • Master Force User
  • *
  • Posts: 980
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Teensy RGB LED driver - one at a time?
« Reply #5 on: February 23, 2017, 07:04:50 PM »
It's highly unlikely you are getting 5000 mah 5v 2a for $11. The bank has 3.7v cells in it and they are being converted by a circuit that limits the current to 2amps, and is at the cost of further capacity. If you are really getting that capacity, the bare cells from that pack will last longer and give you more current.

Offline Lolwel21

  • No Force
  • *
  • Posts: 10
  • Bridging mechanical and organic
Re: Teensy RGB LED driver - one at a time?
« Reply #6 on: February 24, 2017, 09:03:14 AM »
That *might* provide a cheap solution to the current overlap problem, provided I can get between the cells and the limiter. I'll still need the 5v output, but now only for the amplifier / teensy, which will use significantly less than 2A.

I'll see what I can figure out on the programming end... some advice there would be a big help (it's what I was going for in the first place.)

 

retrousse