Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update leds.h #597

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 61 additions & 5 deletions blades/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,76 @@ struct CreeXPLTemplate {

using CreeXPL = CreeXPLTemplate<>;

// This is a "superbright 3mm blue led" that I found on ebay.
// I used this to build an LED string with ~150 LEDs.
// Since I don't have a proper datasheet, I measured these values.
// Useful for 3mm and 5mm accent leds:

struct Blue3mmLED {
static constexpr float MaxAmps = 0.03 * 150;
static constexpr float MaxAmps = 0.02;
static constexpr float MaxVolts = 3.4;
static constexpr float P2Amps = 0.016 * 150;
static constexpr float P2Amps = 0.01;
static constexpr float P2Volts = 3.2;
static constexpr float R = 0.05; // assumed wire resistance
static const int Red = 0;
static const int Green = 0;
static const int Blue = 255;
};

struct Red3mmLED {
static constexpr float MaxAmps = 0.02;
static constexpr float MaxVolts = 1.8;
static constexpr float P2Amps = 0.01;
static constexpr float P2Volts = 1.7;
static constexpr float R = 0.05; // assumed wire resistance
static const int Red = 255;
static const int Green = 0;
static const int Blue = 0;
};

struct Green3mmLED {
static constexpr float MaxAmps = 0.02;
static constexpr float MaxVolts = 3.2;
static constexpr float P2Amps = 0.01;
static constexpr float P2Volts = 3.0;
static constexpr float R = 0.05; // assumed wire resistance
static const int Red = 0;
static const int Green = 255;
static const int Blue = 0;
};

struct Yellow3mmLED {
static constexpr float MaxAmps = 0.02;
static constexpr float MaxVolts = 2.0;
static constexpr float P2Amps = 0.01;
static constexpr float P2Volts = 1.8;
static constexpr float R = 0.05; // assumed wire resistance
static const int Red = 255;
static const int Green = 255;
static const int Blue = 0;
};

struct White3mmLED {
static constexpr float MaxAmps = 0.02;
static constexpr float MaxVolts = 3.1;
static constexpr float P2Amps = 0.01;
static constexpr float P2Volts = 3.0;
static constexpr float R = 0.05; // assumed wire resistance
static const int Red = 255;
static const int Green = 255;
static const int Blue = 255;
};

// Useful for Bluetooth module:

struct BTmodule {
static constexpr float MaxAmps = 0.1;
static constexpr float MaxVolts = 4.2;
static constexpr float P2Amps = 0.09;
static constexpr float P2Volts = 4.1;
static constexpr float R = 0; // assumed wire resistance
static const int Red = 0;
static const int Green = 0;
static const int Blue = 255;
};

// This blade has 100 x 0.5W red 8mm straw-hat LEDs.
// Since I don't have a proper datasheet, I measured these values.
struct Red8mmLED100 {
Expand Down