Pulsing, selectable colour LED circuit

Thread Starter

McGondy

Joined Mar 21, 2015
9
Hi all,

I'm an absolute beginner and in a few weeks I'd like to start making a circuit that can pulse/breath at a selectable frequency at a selectable wavelength/RGB combination (whatever is easier). It will sit in a housing beneath a variety of clear, interchangeable props for a board game (see below)
circuit 1.png
The first part is "easy" as I've found numerous 555 timer circuit diagrams. My question is can a variable resistor be used to change the frequency? If so, where can it be used?

Secondly, I've looked over the internet for "selectable RGB circuit" and only come up with prebuilt disco things that connect to LED strips. Is there a way to set an RGB LED to a specific wavelength? Is 3 individually coloured LEDs with varied intensities a valid method of colour control? This is either a really smart or incredibly stupid question -.-"

Anywho, materials for the props aren't going to arrive for a few weeks but any help would be appreciated.

Cheers!
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
Hi, sorry for the ambiguous wording.

I'd like 1 knob to control the speed of the pulse and another set of controls to change the LED colour. As I was driving I realised I could have a switch to go between the two colours I am planing on using (green, purple) or I could use a white LED and have a colour filter on the prop but my original plan was much more flexible so if that's doable, that would be awesome =)
 

bushrat

Joined Nov 29, 2014
209
flasher.jpg
R1 will control speed of your flashing circuit, in picture it is almost al lowest resistance, therefore it will flash 320 times a second (since you want output on LED's, anything over 80 Hz will appear "always on"). Speed can go down to 5 Hz, so careful with seizures.
R3 will control which LED will be on. The reason for R3 to be 10k is that it will not be enough current to illuminate both LED's at once. Once you max out R3 in either direction, it will be 0 ohms resistance, therefore current will be controlled by either R4 or R5. This will cause only 1 LED to be on. If you are gentle, you can actually control the brightness of "lit-up" LED.

If you prefer, you can replace R3 with SPDT switch.

Try not to attach more LED's, as 555 timer does not have sufficient current to drive more LED's.
*Disclaimer* it works on simulation, don't take my word for it..
 
Last edited:

Søren

Joined Sep 2, 2006
472
I'd like 1 knob to control the speed of the pulse and another set of controls to change the LED colour.
I recently designed a fairly simple RGB controller with a potentiometer for each of the 3 colors and a fourth potentiometer for master control (dimming while keeping the selected color).

This could easily be changed to flash the selected color instead, but I guess you want the LED to fade in/out rather than "hard" flashes?

It's bedtime now, but if you're interested, tomorrow I'll see if that may be within minor changes of the circuit.
If so - do you want it going up-down-up-down, or rather up-down-pause-up-down-pause, or something else entirely?

You need to define the frequency range as well.
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
Thanks for the quick replies guys. Depending on the complexity of your circuit Soeren, I may go with the "simple one". I think my uncle was an electrical engineer, I may have to get him to help me with this, it's been about 15 years since I've held a soldering iron =]
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
[Sorry about the double post, laptop died mid-edit - Feel to to merge posts admins]

And to answer your questions Soren, yeah soft fades are preferable. No rush man, got a few weeks and homework to do anywho. I appreciate the assist. I was thinking up - down - up - down, can we do 100%-20%-100% or is it 100%-0%-100%? Can this be selectable (not required and feel free to leave off if way too complex - This monster is going to have 20 knobs by the time I'm done :lol:

Frequency would be great at <1Hz, as in over a few seconds. It's for a column of light to pulse so anywhere from 0.3Hz to 0.03? Lower? Not sure on the exact number but maybe 1 to 0.001 just to be sure - I can't visualise it. And can we make a bypass circuit for just "on" without going past/accidently being set on the epileptic danger zone? It may put a dampener on the night if someone at the table fits, and I'd feel pretty bad too =(
 

Søren

Joined Sep 2, 2006
472
[...] soft fades are preferable.
For your purpose, I'd say mandatory.


I was thinking up - down - up - down, can we do 100%-20%-100% or is it 100%-0%-100%? Can this be selectable [...]
It is possible to have the low level at whatever percentage, to make it adjustable from 0% and up to whatever would make sense (eg. 95% for the low level would sort of defeat its purpose I guess, but that's still doable). It could be made selectable with a switch as well, but a potentiometer gives more freedom of choice.


Frequency would be great at <1Hz, as in over a few seconds. It's for a column of light to pulse so anywhere from 0.3Hz to 0.03? Lower? Not sure on the exact number but maybe 1 to 0.001 just to be sure - I can't visualise it.
Hmmm, 0.001Hz means a cycle time of 16 minutes and 40 seconds - nobody would see that as pulsing at all.
I think that you should rather stick to a max cycle time of 10s (or more realistic, around a third of that) and faster - making a huge range, of which you only have a need for a small fraction, will only make it harder to adjust.


And can we make a bypass circuit for just "on" without going past/accidently being set on the epileptic danger zone? It may put a dampener on the night if someone at the table fits, and I'd feel pretty bad too =(
Full on could be selected by eg. a switch.

You shouldn't worry too much about photosensitive epilepsy for a number of reasons.
Only around 3% of all people suffering from epilepsy are vulnerable to photosensitive seizures and less than 1% of the entire population suffers from epilepsy in any form, so less than 0.03% of the population are prone to photo sensitive seizures.
According to some US government regulations I read, the "critical" range is 3Hz to 55Hz (above that, you don't see the flashes).
Even in that range, it's severity depends on how much of a persons field of view is occupied by flashing, the contrast towards the ambient, the color (red appears to be the "worst") and a couple of other similar factors.
There's much less influence from a pulsing light than from a hard on/off (contrast between on and off is somewhat washed out).

I took a look at what needs to be changed, to make what you want, from the circuit I mentioned and a first guess is, that it will grow from 1 chip to 3 or 4 plus a handful transistors, caps and resistors. All that extra could be done in a µcontroller to lower component count considerably of course, but since you mentioned being a beginner, I think it might be way too much for you to handle as a first project. Perhaps start out with this circuit:
http://www.pcsilencioso.com/cpemma/throbber.html
which does approximately what you want, with a frequency range ~0.25Hz to ~5.5Hz as is (fairly easy to change within limits). Only snag is that fade out time is around twice as long as fade in, but a well placed resistor and diode should be able to correct this to close to 50:50.
You can get LEDs in both green and purple and a simple switch could select which is in use.
This would be a more suitable first project and prepare you for something more involved :)


Is there a way to set an RGB LED to a specific wavelength? Is 3 individually coloured LEDs with varied intensities a valid method of colour control?
You don't set an RGB LED to a single wavelength, but rather to 3 different wavelengths, as these LEDs contains 3 LEDs, red, green and blue - it's called additive color blending.

The above pic only shows blending equal amounts. To get the "inbetween" hues, you just vary the amount/intensity of each color.
This goes for separate LEDs as well of course, but it's hard (impossible) to get all of them to cover the exact same spot. Even in RGB LEDs, you will have "auras" (due to the fact that each LED crystal will be mounted slightly offset from the optical center of the encapsulation), so wide angle LEDs and/or a mild diffuser gives the best results,

My best advice for now: Build the circuit I linked to and play around with it a bit (with green and purple LEDs) and when you know and understand that circuit intimately, we can go for the full Monty.
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
Firstly, thank-you very much for being very thorough in your answers. I have much to learn and I feel you are setting me on a well guided path.

It is possible to have the low level at whatever percentage [...] It could be made selectable with a switch as well, but a potentiometer gives more freedom of choice.
Brilliant, I didn't want to demand too much as I wasn't sure this was possible. This is exactly what I want.

Hmmm, 0.001Hz means a cycle time of 16 minutes and 40 seconds - nobody would see that as pulsing at all.
I think that you should rather stick to a max cycle time of 10s (or more realistic, around a third of that) and faster - making a huge range, of which you only have a need for a small fraction, will only make it harder to adjust.
Yes, completely agree here on all points. If I had taken a moment to apply f=T^-1 instead of pulling numbers I would have noticed =]

Full on could be selected by eg. a switch.
Sorry, that's what I meant - I was just worried I'm adding more to an already, relative to my skill level, complex circuit.

You shouldn't worry too much about photosensitive epilepsy for a number of reasons.
Only around 3% of all people suffering from epilepsy are vulnerable to photosensitive seizures and less than 1% of the entire population suffers from epilepsy in any form, so less than 0.03% of the population are prone to photo sensitive seizures.
According to some US government regulations I read, the "critical" range is 3Hz to 55Hz (above that, you don't see the flashes).
Even in that range, it's severity depends on how much of a persons field of view is occupied by flashing, the contrast towards the ambient, the color (red appears to be the "worst") and a couple of other similar factors.
There's much less influence from a pulsing light than from a hard on/off (contrast between on and off is somewhat washed out).
I don't need to get into the >1Hz range, and it will be pulsing so it sounds cool, we won't worry about this.

I took a look at what needs to be changed, to make what you want, from the circuit I mentioned and a first guess is, that it will grow from 1 chip to 3 or 4 plus a handful transistors, caps and resistors. All that extra could be done in a µcontroller to lower component count considerably of course, but since you mentioned being a beginner, I think it might be way too much for you to handle as a first project. Perhaps start out with this circuit:
http://www.pcsilencioso.com/cpemma/throbber.html
which does approximately what you want, with a frequency range ~0.25Hz to ~5.5Hz as is (fairly easy to change within limits). Only snag is that fade out time is around twice as long as fade in, but a well placed resistor and diode should be able to correct this to close to 50:50.
You can get LEDs in both green and purple and a simple switch could select which is in use.
This would be a more suitable first project and prepare you for something more involved :)
Sounds like something I can do. I'll look up some guides on getting started and go over the theory again (it's been over a decade). I don't want to assume I'll remember.

And the faster fade in doesn't sound too bad (It's not a bug, it's a feature!)

You don't set an RGB LED to a single wavelength, but rather to 3 different wavelengths, as these LEDs contains 3 LEDs, red, green and blue - it's called additive color blending.

The above pic only shows blending equal amounts. To get the "inbetween" hues, you just vary the amount/intensity of each color.
This goes for separate LEDs as well of course, but it's hard (impossible) to get all of them to cover the exact same spot. Even in RGB LEDs, you will have "auras" (due to the fact that each LED crystal will be mounted slightly offset from the optical center of the encapsulation), so wide angle LEDs and/or a mild diffuser gives the best results,
Ah, I was wondering what the mechanism was, thanks for explaining that. And I was thinking of dulling the surface of the LED (RGB or otherwise) with some fine grit sandpaper. I have heard this makes the light more diffuse.

My best advice for now: Build the circuit I linked to and play around with it a bit (with green and purple LEDs) and when you know and understand that circuit intimately, we can go for the full Monty.
Couldn't agree more on the emphasis on understanding it. I want to know how this thing works, I'll study up on the theory and work this thing out.
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
Hi, I'm giving the schematic a look over and I realised it's designed to operate at 12V (makes sense as it's a PC modding site). Will I have to re-calculate things to work at 9V to provide more current or will the pots provide enough leeway for me to get away with it?

[Disclaimer]: Never understood how the transistor worked in an amplifier, understood everything up to that but I think I'm missing something in the fundamentals, not sure what though =[
 

Søren

Joined Sep 2, 2006
472
Hi,

Will I have to re-calculate things to work at 9V to provide more current or will the pots provide enough leeway for me to get away with it?
The only real difference will be the LED getting less current (and it's a bit on the low side already) - it will be safe to change R6 to 150 Ohm, giving around 23mA at the high peaks (and ~5mA in the lowest "valleys") on the highest setting of VR2.

The oscillator works with percentages of the supply, so to speak, so the frequency won't change in any drastic way.
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
Thanks! I'll make a note to change it out.

I'm having a hard time finding things, primarily the board. I found the one below, but I'm thinking it is not correct for me as it does not have the horizontal strips but instead has copper "donuts". Is it in fact ok to use or do you have a much simpler solution. I am also based in Australia if that helps =]
board 1.png
 

MCU88

Joined Mar 12, 2015
359
Oh wait! I've found them... I've been looking for breadboards instead of stripboards. /sigh
Go with the matrix veroboards. The stripboards tend to lock you in a bit with the layout, and you need an drill bit to cut the strips to suit your requirements. It is easy with an soldering iron and some practice to bridge the donuts to make your own track. Use wire wrap for most of your connections though.
 

Søren

Joined Sep 2, 2006
472
Oh wait! I've found them... I've been looking for breadboards instead of stripboards. /sigh
As you can see, it's a matter of preference. If I have to go with matrix boards, I'll take stripboard any day - with the single pad variety, you have to solder wire ower where you wanna bridge, if you wanna be sure to have a good connection - much too fiddly for me.

Stripboard OTOH gives a more rigid connection with nothing but a little planning on where to cut tracks and add jumpers and with a few exceptions, this is the sole kind of matrix board I've used since like forever.

The last couple of decades, I have mostly gone directly to PCB for anything that's supposed to actually have a function besides experimenting :)
 

Thread Starter

McGondy

Joined Mar 21, 2015
9
I think I'm going to err on the side of the stripboards here, if only in this case as I have the grid layout printed to scale and that should keep me from messing up :)
This project is plenty complex for me, I'm not going to try and make it more efficient yet :p
 
Top