help needed to take my first project to the lext level? Better power and LED's

Hello all you fantastic Arduino / electronic guru’s…
I could do with some help and/or guidance on the back of my first ever project with Arduino and electronics in general.
So far I have managed to get a basic version of my project up and running and working to my requirements (details will be below), although if anyone can see any improvements I could/should make to the code, feel free to chip in :slight_smile: BUT… What I have in place is basically an early/initial version of my plan, and I need help for the next phase which basically involves me moving away from basic components and trying to use more powerful ones.

Quick version of the project and requirement:

I have the project set up on an Arduino Uno (I plan to move to an Arduino Mini when all is working) and a breadboard (I plan to create a PCB when all is working), with your basic kit supplied LED’s, active buzzer, momentary press buttons etc, all running off of the standard 5v pics, with the power source being from a 9v battery or USB connection.
I can try and confirm the specs for what I got in the kit if needed but my guess is it’s not that important and most of the details can be seen from the pictures I have provided (i hope).

I now want to upgrade this so that I get bigger lights and sound (as this will be used outside), and can run it from a 12v battery… And this is where I have managed to get quite lost, as I don’t have the first clue about MOSFETS, buck/boost converters or regulators other than seeing they are needed in some way to achieve what I want.

The longer version (if you’re interested):

I am due to get married in June 2021, if the world calms down in time, and we are having an outdoor wedding so plan to make it fun with a bunch of both purchased and homemade outdoor games.
One that I came up with is to make a rather large steady hand game. But ever the one for a challenge, I did not want something basic, I wanted to introduce elements to make it more interactive and enjoyable.
v1 - was learning the ropes so that I could just get the basic buzzer to go off when you touch the wire (represented as a button in the project for now), and to set off one of 3 LEDs each time you do (indicating your ‘lives’) then reset
v2 - was moved to adding a green LED to indicate ‘start’, and 5 red LED’s for your ‘lives’ that reduce each time you touch the wire, then a flashing sequence for GAME OVER, and a reset
v3 - Added a ‘level select’ option where harder levels set fewer lives and set a shorter delay in the wire touch detection.
v4 is basically due to be as per the short version above. I plan to use a 12v battery to power this, so I know there is the element of needing a drawdown to the required power, and control over the constant current supply element to ensure that I don’t blow the components and so that the current adjusts as the temperature adjusts, but I am getting really confused about what I need in place to manage this.

I know these LED’s are consuming less than the 5v supplied, but given they are 3W I believe they require a higher output right? What’s the calculation on that to know what is actually needed to get the full output?

Do I need some form of controller ‘per’ LED? Or should I be using other/better methods to group them and control them logically via code instead of one LED per pin?

Upgraded components:

I plan to upgrade the active buzzer with a Mini Piezo Siren
Operation Voltage - 8->16VDC
Consumption Current - <200mA

And I don’t think this is too complicated as I would just move the buzzer to have power supplied directly from the battery instead of via the Arduino, but I would obviously need to add in a resister to ensure the power feed don’t fry the board, so any advice on what I should use and where would be greatly appreciated. Or better still, how I should calculate this myself to understand ‘why’.
As for the LED’s, I have purchased some nice 3w LED’s on heatsink chips/boards:

number to be used Colour nm Forward voltage forward current output lumens
x 1 Bright Blue 470 3.5 700 50
x 1 Pure Green 525 3.7 750 120
x 1 Orange 600 2.9 800 90
x 5 Bright Red 630 2.7 800 85

And I don’t have the first clue what I need in place to power them to the correct current, get the right output, not fry everything, and manage them via Arduino in an ‘efficient’ way.
Note: ignore the blue LED for now, that’s another element I will add to trigger a 'WINNER sequence later.
Where do I start? I have been looking but so many people do it so many different ways and it’s hard to know how and why when you know as little about the power consumption side of electronics as I do.
Any help or advice will be highly appreciated.

//Main input (button/wand) and speaker / buzzer output
const int buttonPin=2;
const int speakerOut=3;

//LED pins
const int ledY=13; // yellow LED for waiting for level select
const int ledG=12;
const int ledB=6;
const int ledR1=7,ledR2=8,ledR3=9,ledR4=10,ledR5=11;
const byte ledR[] = {11, 10, 9, 8, 7}; // set array order for red LED's

//Pins for the level select buttons
const int ELButton=A0;
const int MLButton=A1;
const int HLButton=A2;

//Input for game win to set off blue LED and WIN sequence
const int finishPin = 4;

//Set default value for lives
int lifeCount=5;
int origLifeCount=lifeCount;

//Default Button state values used to avoid bounceback
int buttonState=0;         // current state of the button
int lastButtonState=0;     // previous state of the button 
int ELbuttonState=0;
int lastELbuttonState=0;
int MLbuttonState=0;
int lastMLbuttonState=0;
int HLbuttonState=0;
int lastHLbuttonState=0;

//state to ensure when level select buton pressed
int levelSelected=0;

//set default delay value
//this will be used to set part of the level difficulty
int DelayVal=500;

// Function holders (used to state these functions exist).
void startSeq (void);
void lifeCountSet (void);

void setup() {

  // put your setup code here, to run once:

  // initialize the button pins as inputs:
  pinMode(buttonPin,INPUT);
  pinMode(finishPin,INPUT);
  pinMode(ELButton,INPUT);
  pinMode(MLButton,INPUT);
  pinMode(HLButton,INPUT);

  // initialize the LED(s) as an output:
  pinMode(ledG,OUTPUT);
  pinMode(ledY,OUTPUT);
  pinMode(ledB,OUTPUT);
  pinMode(ledR1,OUTPUT);
  pinMode(ledR2,OUTPUT);
  pinMode(ledR3,OUTPUT);
  pinMode(ledR4,OUTPUT);
  pinMode(ledR5,OUTPUT);

  // Set LED start state
  digitalWrite(ledY,HIGH);
  digitalWrite(ledB,LOW);
  digitalWrite(ledG,LOW);
  digitalWrite(ledR1,LOW);
  digitalWrite(ledR2,LOW);
  digitalWrite(ledR3,LOW);
  digitalWrite(ledR4,LOW);
  digitalWrite(ledR5,LOW);
  
  // initialize serial communication:
  Serial.begin(9600);
  
  //Serial.println(lifeCount);
}

//while(digitalRead(pin) != LOW) { } // do nothing

void loop()
{
  //wait for input from one of the level select pins (buttons) and set level adjustment veriables accordingly
  while (levelSelected < 1)
  {
    ELbuttonState = digitalRead(ELButton);
    delay(100);
    if (ELbuttonState != lastELbuttonState) {
      if(ELbuttonState==HIGH){
        startSeq(500, 5);
      }
    lastELbuttonState = ELbuttonState;
    }

    MLbuttonState = digitalRead(MLButton);
    delay(100);
    if (MLbuttonState != lastMLbuttonState) {
      if(MLbuttonState==HIGH){
        startSeq(300, 4);
      }
    lastMLbuttonState = MLbuttonState;
    }
  
    HLbuttonState = digitalRead(HLButton);
    delay(100);
    if (HLbuttonState != lastHLbuttonState) {
      if(HLbuttonState==HIGH){
        startSeq(100, 3);
      }
    lastHLbuttonState = HLbuttonState;
    }
  }
  
  //once level select activated run main game
  while (levelSelected >= 1) {
    for (int i=0; i<lifeCount; i++) // turn on the number of red LED's to cover the lumber of lives for level selected
    {
      digitalWrite(ledR[i], HIGH);
    }
    
  origLifeCount=lifeCount; // keep a note of the original life count for later
  
  buttonState = digitalRead(buttonPin);
    delay(DelayVal);
    if (buttonState != lastButtonState) {
      if (buttonState==HIGH)
      {
        lifeCount--;
        switch (lifeCount) {
          case 4:
          lifeCountSet();
          break;
          case 3:
          lifeCountSet();
          break;
          case 2:
          lifeCountSet();
          break;
          case 1:
          lifeCountSet();
          break;
          default:
        lifeCount=0;
            int flashNum=0;              // set count at 0
            do {
              digitalWrite(ledR1, HIGH);   // turn the LED on (HIGH is the voltage level)
              digitalWrite(ledR2, HIGH);
              digitalWrite(ledR3, HIGH);
              digitalWrite(ledR4, HIGH);
              digitalWrite(ledR5, HIGH);
              tone(speakerOut, 200, 300);
              delay(600);                  // wait for a split second
              digitalWrite(ledR1, LOW);    // turn the LED off by making the voltage LOW
              digitalWrite(ledR2, LOW);
              digitalWrite(ledR3, LOW);
              digitalWrite(ledR4, LOW);
              digitalWrite(ledR5, LOW);
              delay(600);                  // wait for a second
              flashNum++;                  // set count plus 1
          }
            while (flashNum < 5);
            digitalWrite(ledY, HIGH);
            levelSelected = 0;
          break;
        }
      }
    lastButtonState = buttonState;
    }
  }
}

void startSeq(int DVal, int lCount)
{
  DelayVal=DVal;
  lifeCount=lCount;
  levelSelected = 1;
  digitalWrite(ledY,LOW); // turn off the yellow (waiting) LED
  int flashNum=0;
  do {
    digitalWrite(ledG, HIGH); //Flash green LED as part of game start sequence - to be replaced with a start 'sound' later
    tone(speakerOut, 200, 50);
    delay(100);
    digitalWrite(ledG, LOW);
    delay(100);
    flashNum++;
  }
  while (flashNum < 3);
  digitalWrite(ledG, HIGH); // keep green LED on for START
}

void lifeCountSet()
{
  digitalWrite(ledG, LOW);
  for (int i=lifeCount; i>0; i--)
  {
    digitalWrite(ledR[i], LOW);
  }
  tone(speakerOut, 100, 500); 	
}

For my individual LED's, would I need something like this in front of each one in order to ensure the correct and stable current? https://www.sparkfun.com/products/13716

And if I do, then I guess I would use the Arduino to connect a pin and program in the brightness as needed instead of the basic digitalWrite right? Providing this is correct I will start finding examples of using PWM for this as that's new to me at this stage.

If this is the way to go... And I'm happy if anyone can state anything they feel is better for my need, then I have another question (of course I do)...

Do I really need one of these for 'every' LED I want to use? or could I set up groups of LED's from one and still manage which ones light up when? I am just thinking that buying 8 of these for one project starts to get a bit pricy and may be overkill. Or may not...

tommarshall: For my individual LED's, would I need something like this in front of each one in order to ensure the correct and stable current? https://www.sparkfun.com/products/13716

Yes.

tommarshall: And if I do, then I guess I would use the Arduino to connect a pin and program in the brightness as needed instead of the basic digitalWrite right?

No, if you only want the leds to be fully on or off, digitalWrite() is fine, and you can use any digital-capable pin, does not need to be a pwm pin.

tommarshall: Do I really need one of these for 'every' LED I want to use?

Yes.

tommarshall: or could I set up groups of LED's from one and still manage which ones light up when?

You could connect groups of leds together by connecting them in series and using a higher voltage power supply. But you would not have individual control over each led.

Thank you, the input is really apreciated. I will go in that direction and see how I get on.

I have purchased some nice 3w LED's on heatsink chips/boards:

The secret to success on a budget is to ask advice before spending you money, not after.

Have a look at Adafruit Pixie leds. Warning: not cheap!

PaulRB: "The secret to success on a budget is to ask advice before spending you money, not after."

100% agree, which is why I thought I would check before spending the money on the buck LED controllers ;) But happy to spend the money for the right solution. The 3W LED's I got were a £1 a piece so I was not too worried about them as if I find or get advice on a better solution, I will just hold on to them for a next project (I have the bug now lol).

That being said though, them Adafruit ones look fantastic, but I may just keep them in mind for something fancier and once I have a better idea what I am doing so I don't go breaking something so expensive.