Making Custom led colors on a rgb led without microprocessor?

I know this is very simple to do in general if you have 3 potentiometers, problem is, I only have 1, and I'm bored and wanted to do a quick random project just for today, plus I'm curious if this is possible anyways.

I can't think of any ways this could work without some kind of special chip or controller but I might be wrong.

I do have rotary encoders, but I don't know how easy it would be to use them without a processor... and I only have one potentiometer. I have limited resources but I'm curious if I could find something that would make this work.

If there was somehow a way to push a button and then have the potentiometer adjust to whatever button I'm pressing but keep the voltage from the potentiometer separately on each pin, that would be really helpful, but I doubt it is because that doesn't even really make sense lol.

Maybe some other way to control resistance on each pin? I have a bunch of different types of resistors and I can think of a way that I could use the resistors to control the voltage, IF MY BUTTONS WEREN'T ALL MOMENTARY... lol please help me I'm going crazy trying to solve a puzzle that is probably impossible to solve.

Please be patient with me as well, I'm still kinda new to this and stupid. :slight_smile:

I have no idea about what you, in particular, consider a custom color. All colors we see are based on the sensors in our eyes. LEDs produce a single color whose intensity is based on the current flowing in the junction of the LED. What you, individually, see as a color is unique to you. Others may see it differently. The problem occurs when someone tries to put a name to that color that they see.

You could use a potentiometer as a rheostat, which adjusts the current going to one specific LED junction, but it would need to be in the range of 100 to 1,000 Ohms. That would require three rheostats.

When you are theorizing about electronics or electrical stuff, begin by drawing a schemaic of what you are considering. That will help you to answer your own questions.

There my be no solution with the components you've got. I have a pretty-good selection of parts but I've probably never built a project where I didn't have to place an order or two...

You can change resistor values and you can use switches to switch-in different resistor values but with momentary switches you'd have to hold them down to hold the color. If you've got enough buttons, you've got 10 fingers and you could make something like a musical keyboard that "plays colors", and like a keyboard it wouldn't do anything when you're not touching it.

You can do a lot with logic and linear circuits but sometimes a processor is the most straight-forward solution. I've got a little audio amplifier with a lit-up ring around the volume control. It has a "dumb feature" and it continuously fades-through a sequence of colors (not activated by the sound or anything). I've never looked inside but there are no digital features so I'm pretty sure there is no processor. It's probably an oscillator and some simple counter circuits that cycle through different PWM values.

1 Like

I just meant to control the voltage going to the red pin, green pin, and blue pin to make a specific color. I don't know what a rheostat is, never heard of it. Could you explain it a bit more? I doubt I have the materials for that though.

The hard part is keeping the old values as you switch among the Red, Green, and Blue components. You could use the button to switch between Red, Green, and Blue but require the potentiometer to be turned to both 0 and 1023 before it can be used to change the color component.

void loop()
{
  // (Insert state change detection here)
  if (buttonState == LOW)
  {
    // Button state just changed to pressed
    // Switch to next component.
    colorComponent = (colorComponent + 1) % 3;
    colorVisited0 = false;
    colorVisited1023 = false;
  }

  int colorInput = analogRead(ColorInputPin);
  if (colorInput == 0)
    colorVisited0 = true;
  if (colorInput == 1023)
    colorVisited1023 = true;
  if (colorVisited0 && colorVisited1023)
  {
    // Color input is enabled
    components[colorComponent] = colorInput;
    analogWrite(RedPin, components[0]);
    analogWrite(GreenPin, components[1]);
    analogWrite(BluePin, components[2]);
  }
}

I have dozens and dozens of momentary push buttons, I could definitely get it to work with those and some resistors, but I might have to hold down the buttons. I could potentially press the three buttons I want at once to check the color, and then just use those resistor values on the pins. This would give me a custom color, but I was more looking for something that could be changed to many colors live just by turning the dials to adjust it without having to change the circuit. I don't know if it's possible but I might try just getting a custom color using resistors. If anyone has any ideas on how to do this though in a single circuit, I'd loves to hear your ideas.

I'm trying to do this without a microprocessor. Sure I could buy a arduino, 3d print a case, use better components, etc... to have a good quality project, but I am using my arduinos on other projects and the point of this project is to see if it is possible without a microprocessor so I can get this project done today without having to order parts as well as to see if this is possible, because I'm curious.
Thanks for the advice though!

Be curious no longer. This can't be done without a processor.

You could do it with one control pot by using that pot to convert its reading into HSV colour space, which would then give you all the colours from one knob. But without a processor forget it. You can't do it.

Anyway you might not have noticed but this is an Arduino forum, and you are asking about a project that doesn't use an Arduino, so a bit outside our remit don't you think?

you can make separate current controllers for each led or you can implement simple pwm for each led using transistors or simple chips like switchs or comparators. but to "remember" different colors,you need something else like other guys said... i think.

But you can't control the three PWM generators independently with only one pot.

You could use a rotary encoder without a processor by using a bunch of logic gate chips and a bi-directional counter chip feeding into a ladder D/A and have that control an NE555 PWM generator. But I suspect the OP has not got a stash of logic chips.

Yeah I thought about that but decided to post anyways because I didn't know where else to ask, sorry... :sweat_smile:

1 Like

Given enough resources it can be done.

  1. I doubt you have the resources needed (unless you bought some 1000 transistors at discount).
  2. A microprocessor solution would be simpler, smaller, cheaper, faster to build and debug, easier to change...

Unless you use a FPGA of course. But I would consider it cheating.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.