3 potentiometers to control color of rgb strip

Hello. I'm very new to this. I am trying to control the color of an RGB LED strip using 3 potentiometers to adjust the red, green, and blue.

Like this page, but with a strip instead of single LED:
http://playground.arduino.cc/Main/RGBLEDPWM

This actually works without the Arduino (although is this safe? tell if something's going to overheat or something). However, it has two tiny problems. You have to turn the potentiometers almost half way before the lights start to come on (but not enough to just switch to 5K ohm potentiometers instead of 10k). Also, and this is the more annoying problem, they fade smoothly from off to about half or 3/4 brightness, but then they jump suddenly to full brightness. So I wanted to use the Arduino to fix these issues.

I set it up as the page says, but with the strip instead of the single led. Also, 5v won't light my strip, so I switched to a 9v battery plugged into the breadboard and moved to pin Vin. Red and green work, but blue does not. Also, if you turn green very dim by itself, then begin to add red, it will turn green off. So I have problems, but I'm not sure what.

I'm thinking I need to add transistors or MOSFETs, but I don't really understand why or how these work.

Any help would be much appreciated. Thanks.

Let's assume that your led strip uses 100mA. The power over a potentiometer at 5k will be 50mW (P = IIR); I think that should be safe.

If your led strip uses 1A, it will be a totally different story. So it depends on which potentiometer you're using if it's safe.

Please provide a drawing how it is all connected. A single LED does not draw much current and is safe to use connected via a resistor to a pin on the Arduino. A strip (or each color in a strip) is another story as it draws a lot more current and you can easily blow the pin on the Arduino that it is connected to. So do you have a driver board or are you using transistors or fets?

Potentiometers have their pitfalls. Bad contacts on the runner are one thing. Another one can be the difference between a linear potentiometer and a logarithmic one (and that might be your problem).

You will be better of using buttons or a rotary encoder.

Just using a pot in seriese with an LED is a bad idea. There is nothing to stop you exceeding the maximum current for the LED and you will burn out the pot when it is close to minimum.

How much current does your strip take? Most probable you will need to switch each colour though a transistor. Then read the pot in the analogue ports and set the PWM duty cycle accordingly. It sounds like you have a log law pot you need a linear one.

Most strips like this are designed to run off 12V and have their own built in resistors.

If your led strip uses 1A, it will be a totally different story. So it depends on which potentiometer you're using if it's safe.

I do not know the specs of my strip. I got it cheap on ebay and it didn't say or come with anything. I'm using 10k potentiometers. Is this okay, or should I switch them?

Please provide a drawing how it is all connected.

It's connected as the link I gave describes, except for the changes I mentioned. Is there a free schematic-drawing program that you guys use for this stuff? I'll have to figure out how to draw it (or just sketch it by hand and take a picture), then get back to you.

you can easily blow the pin on the Arduino

How would I know if I accidentally did this? Hopefully I didn't. I turned it off somewhat quickly when I realized it wasn't working, assuming something was wrong. My strip is currently only a piece that I was using for testing, so about a dozen lights.

So do you have a driver board or are you using transistors or fets?

I don't know how to use these.

the difference between a linear potentiometer and a logarithmic one (and that might be your problem)

Is there a way to know if they're linear or logarithmic? They came in a kit of random stuff and only say "10K" on them.

You will be better of using buttons or a rotary encoder.

The only thing I know how to do with buttons is have the lights either on or off, which gives me only 7 color options. I'm afraid I don't quite know what a rotary encoder is. How is it different from a potentiometer? Like I said, I'm VERY new to this. Please bear with me.

Thanks for helping.

Grumpy_Mike:
Just using a pot in seriese with an LED is a bad idea. There is nothing to stop you exceeding the maximum current for the LED and you will burn out the pot when it is close to minimum.

How much current does your strip take? Most probable you will need to switch each colour though a transistor. Then read the pot in the analogue ports and set the PWM duty cycle accordingly. It sounds like you have a log law pot you need a linear one.

Is there a tutorial somewhere for how to do this?

Most strips like this are designed to run off 12V and have their own built in resistors.

That I understood! Yes, it is meant for 12v and does indeed have resistors.

Have another look at the pot where they say "10k".... they may (should?) have an "A" or "B" there, which indicate log and linear respectively.

I use ExpressSCH for simple schematics, dead simple to use.

girlwhowasnt:
I do not know the specs of my strip. I got it cheap on ebay and it didn't say or come with anything. I'm using 10k potentiometers. Is this okay, or should I switch them?

Can you post a link? See alsi grumpy's reply.

girlwhowasnt:
It's connected as the link I gave describes, except for the changes I mentioned. Is there a free schematic-drawing program that you guys use for this stuff? I'll have to figure out how to draw it (or just sketch it by hand and take a picture), then get back to you.

You can draw by hand, scan or take a picture and attach it. I'm currently learning 'eagle pcb'.

girlwhowasnt:
How would I know if I accidentally did this? Hopefully I didn't. I turned it off somewhat quickly when I realized it wasn't working, assuming something was wrong. My strip is currently only a piece that I was using for testing, so about a dozen lights.

Use e.g. a modified version of the blink example and test the individual pins. If they work, you're lucky for now. Damage can be done that gets worse over time and eventually kills the pin.

girlwhowasnt:
I don't know how to use these.

I think there are ready made boards. My electronics knowledge is too rusty to advise on transistors or fets.

girlwhowasnt:
Is there a way to know if they're linear or logarithmic? They came in a kit of random stuff and only say "10K" on them.

They will usually state it on the housing. You can use an ohm meter to measure. Put the potentiometer in the middle position; if it reads half the value of the total (5k for a 10k potentiometer), it's linear.

girlwhowasnt:
The only thing I know how to do with buttons is have the lights either on or off, which gives me only 7 color options. I'm afraid I don't quite know what a rotary encoder is. How is it different from a potentiometer? Like I said, I'm VERY new to this. Please bear with me.

A rotary encoder is a device that gives pulses when you turn it. You can count the pulses.

Below a simple example for a code using 2 buttons to increment the intensity of one led / color in a led strip

// led pins
#define LEDRED 9
#define LEDGREEN 9
#define LEDBLUE 9

// buttons
#define PINUP 4
#define PINDOWN 5

void setup()
{
  pinMode(PINUP, INPUT_PULLUP);    // switch connected between pin and GND
  pinMode(PINDOWN, INPUT_PULLUP);  // switch connected between pin and GND

  pinMode(LEDRED, OUTPUT);
  pinMode(LEDGREEN, OUTPUT);
  pinMode(LEDBLUE, OUTPUT);

  digitalWrite(LEDRED, LOW);
  digitalWrite(LEDGREEN, LOW);
  digitalWrite(LEDBLUE, LOW);
}

void loop()
{
  // current PWM values for LED outputs
  static int currentRed = 0;
  static int currentGreen = 0;
  static int currentBlue = 0;

  // if UP button pressed
  if (digitalRead(PINUP) == LOW)
  {
    // if maximum not reached
    if (currentRed < 255)
    {
      // increment intensity
      currentRed++;
    }
  }
  
  // if DOWN button pressed
  if (digitalRead(PINDOWN) == LOW)
  {
    // if minimum not reached
    if (currentRed > 0)
    {
      // decrement value
      currentRed--;
    }
  }

  analogWrite(LEDRED, currentRed);
}

sterretje:
A rotary encoder is a device that gives pulses when you turn it. You can count the pulses.

My thread here may shed some light on how to do that.

OK a dozen LEDs will draw about (20 X 12) / 3 = 80mA. This is twice the amount of current where damage starts to occur, so yes you need to use a transistor, this link shows you how.

I would avoid using a rotary encoder at this stage because it is a bit more complex, the next step up so to speak.
Stick with your pots for the moment while you get the rest of your hardware working.