Pseudo-Random multiple LED fade in/fade out circuit (No MCU/programming)

Alec_t

Joined Sep 17, 2013
14,314
i just need some clarification
1) Yes.
2) Yes.
3) '04 or '14 will work, but with 14 you may have to reduce the value of R5 (and its brothers in the other Modules) to get the Fader oscillator working. Also, one or other of the weighting resistors R7/R8 may need tweaking.
4) The gate (e.g. U1e) driving the LED needs to be a relatively high current type; hence an HC one is suitable whereas a CD4049 wouldn't be.
5) Yes.
6) Yes.
7) An asc file is just a text file used by the LTspice simulation software that I (and many others) use.

Which would be easier, cheaper and work better?
I suppose the fewer components the easier it would be, but cost would depend on what your sources are. I don't know which would be 'better' for you. I suggest you build a prototype 1-LED circuit for each and acompare them. One thing I haven't shown in my circuit is the 100nF decoupling capa needed across the supply pins of each IC.
 

hp1729

Joined Nov 23, 2015
2,304
Hello! I am sorry if this is the wrong place to post, but i felt like the 4017 doesnt belong to the Embedded and micro section. if it does please tell me, i will close this thread and open one there, alternatively a moderator could move it.

You could have seen my previous (Waaaaaaaaaaaaaay too long) post (more like essay) asking to do this with programming MCUs, specifically 15 LEDs randomly fading and with a button press they would go in a sequence (They are tied to letters of someone's name) that spells out a joke (Example Mad Dad from Adam....) here: http://forum.allaboutcircuits.com/t...ble-microcontroller-for-multiple-leds.117905/

back then i felt the need for doing it how i visioned it (I was a perfectionist back then, but a small sour experience was enough to rip that out of me), and didnt take any proper advice that i should have.
i didnt have time to learn more programming ever since, so ive changed my mind
NOT TO BORE YOU WITH ANOTHER ESSAY, HERE IS MY PROBLEM(TL;DR)

I now want to just have randomly fading in and out LEDs that randomly fade (not a pattern). i want to use chips that dont require programming and heard many talk about 555 + 4017 or other chips, so that is what i need.

Also are EBAY listings like:
http://www.ebay.co.uk/itm/20Pcs-CD4...592812?hash=item3f56f147ec:g:COgAAOSwCypWmGTT
any good? will they come damaged? are there different types of this chip? Thank you.
Have you considered just getting blinking LEDs?
Electronic Goldmine sells a lot of such stuff. Blinking, flashing, fading LEDs.
 

Attachments

Alec_t

Joined Sep 17, 2013
14,314
Here's a variation of my previous circuit, using one less gate, one less resistor, one more cap per Module. There would be 15 Modules with different timing components R1/C1 to give the different (pseudo-random) fade rates.
LED-Fader.PNG
The R1/C1 values shown give a fade cycle of ~10 secs. Adjust as necessary.
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
Still another choice; similar to 555 in operation but 6 invertors in the package. Besides the 74HC14 Schmitt trigger there similar ones, 74C14, 74C914, 40106, etc. One of 6 circuits shown.
The output, pin 2, is a full amplitude square wave with a period of about 1.4 X R1 X C1. R2C2 are selected to give most pleasing result, so on breadboard R2 is a 1.5 m pot. which gives a small mid brightness flutter to a rounded edge square wave. Generally I would set R2 C2 to be a little longer than R1 C1, maybe 1.3 X.
R3 sets maximum LED current. Darlington transistor MPSA14 can also be made from 2 NPN transistors if necessary. The oscillator could drive more than one output circuit. Better control of fading can be had if R2 is replaced with 2 R's & 2 diodes so that rise & fall are controlled independently but adds more complexity.Throbing LEDs 00000.jpg
 

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
Here's a variation of my previous circuit, using one less gate, one less resistor, one more cap per Module. There would be 15 Modules with different timing components R1/C1 to give the different (pseudo-random) fade rates.
View attachment 103965
The R1/C1 values shown give a fade cycle of ~10 secs. Adjust as necessary.
Alright, this time using the 14 it seems. Also this time no need for a "master" Pwm generator or the modin/modout? oh. also this could be very glaringly obvious but where does power input go? is the chip Vcc powering all this?

Still another choice; similar to 555 in operation but 6 invertors in the package. Besides the 74HC14 Schmitt trigger there similar ones, 74C14, 74C914, 40106, etc. One of 6 circuits shown.
The output, pin 2, is a full amplitude square wave with a period of about 1.4 X R1 X C1. R2C2 are selected to give most pleasing result, so on breadboard R2 is a 1.5 m pot. which gives a small mid brightness flutter to a rounded edge square wave. Generally I would set R2 C2 to be a little longer than R1 C1, maybe 1.3 X.
R3 sets maximum LED current. Darlington transistor MPSA14 can also be made from 2 NPN transistors if necessary. The oscillator could drive more than one output circuit. Better control of fading can be had if R2 is replaced with 2 R's & 2 diodes so that rise & fall are controlled independently but adds more complexity.View attachment 103967
Thanks for this circuit, Thats one of the 6 gates inside a 74HC14 use per LED, correct? also could you just please clarify the capacitor values? muF or mF? oh, also that transistor, i was wondering why not do this the other day. thought i made something new.... oh well.

i am thinking of buying many chips, both the 04 and the 14 (possibly if the supplier also has Opamps that i get those) and trying out all 4 circuits suggested. could you please tell me if Ebay is a good place to buy from or if the chips are counterfeit and will self destruct the magic smoke seals after a month or two? Couldnt find any local supplier and DigiKey has a fixed rate of shipping to the united arab emirates of 75$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
I will change the topic of this post so that people that are looking for a similar problem can find it more easily.
 

hp1729

Joined Nov 23, 2015
2,304
Alright, this time using the 14 it seems. Also this time no need for a "master" Pwm generator or the modin/modout? oh. also this could be very glaringly obvious but where does power input go? is the chip Vcc powering all this?



Thanks for this circuit, Thats one of the 6 gates inside a 74HC14 use per LED, correct? also could you just please clarify the capacitor values? muF or mF? oh, also that transistor, i was wondering why not do this the other day. thought i made something new.... oh well.

i am thinking of buying many chips, both the 04 and the 14 (possibly if the supplier also has Opamps that i get those) and trying out all 4 circuits suggested. could you please tell me if Ebay is a good place to buy from or if the chips are counterfeit and will self destruct the magic smoke seals after a month or two? Couldnt find any local supplier and DigiKey has a fixed rate of shipping to the united arab emirates of 75$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Ouch on that shipping cost. Is there no way around that? I have sent packages to a lot of countries. That is outrageous.
 

Alec_t

Joined Sep 17, 2013
14,314
Also this time no need for a "master" Pwm generator or the modin/modout? oh. also this could be very glaringly obvious but where does power input go? is the chip Vcc powering all this?
Indeed, no 'master' PWM oscillator. I didn't show it, but you could still do the modin/out modulation if you want. Power for the LEDs is from the chip Vcc (5V) at pin 14, assuming a LED current of ~8mA. For significantly higher current you would need to drive the LED indirectly via an added transistor.
 

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
Ouch on that shipping cost. Is there no way around that? I have sent packages to a lot of countries. That is outrageous.
Here in this tax free country we pay more than the tax intensive UK. go figure.

but ARAMEX, a leading shipping company here (Which shares nationality with me! Yay!) has a program called SHOP and SHIP where you get 16 addresses all over the world and then ship back to UAE for a fixed weight rate, first .5 kilos are ~12$ so if i want to buy lots of things i can.
Of course the other alternative is Ebay, free (not too slow) shipping too! but are the chips any good?!!
 

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
Indeed, no 'master' PWM oscillator. I didn't show it, but you could still do the modin/out modulation if you want. Power for the LEDs is from the chip Vcc (5V) at pin 14, assuming a LED current of ~8mA. For significantly higher current you would need to drive the LED indirectly via an added transistor.
Thanks. Will test ASAP when i find a good source of chips.
 

Bernard

Joined Aug 7, 2008
5,784
I made an attempt to breadboard post # 23 with mixed results. On-Off or a step change in brightness. Red LED was used & noted strange result-- was reading alternate 36 mA & 46 mA. Turned up the room light a bit & brown band turned to black, guess 10 ohm a bit low for R5. Out of time to play for the week end.
 

hp1729

Joined Nov 23, 2015
2,304
Here in this tax free country we pay more than the tax intensive UK. go figure.

but ARAMEX, a leading shipping company here (Which shares nationality with me! Yay!) has a program called SHOP and SHIP where you get 16 addresses all over the world and then ship back to UAE for a fixed weight rate, first .5 kilos are ~12$ so if i want to buy lots of things i can.
Of course the other alternative is Ebay, free (not too slow) shipping too! but are the chips any good?!!
Shopping on ebay seems questionable?
 

dannyf

Joined Sep 13, 2015
2,197
Wouldn't you be able to do that with a 555 timer? The ramp-up / down voltage is pretty nice to drive an led gradually on and gradually off.
 

Bernard

Joined Aug 7, 2008
5,784
Re post # 23. I substituted a stage from a 74HC4049 for U1b; smooth action but somewhat limited range. With white LED, low out .5 mA, high 3 mA; red LED, low 3.4 mA, high 9.9 mA.
 

dannyf

Joined Sep 13, 2015
2,197
smooth action but somewhat limited range.
1. Get rid of the 2nd oscillator;
2. put a bjt / mosfet on the first oscillator - its base / gate on the capacitor, its emitter to ground through a resistor, and the led on the collector. You may need to play with that emitter resistor to get sharp action given your supply voltage / device used but it will work.
 

takao21203

Joined Apr 28, 2012
3,702
ow thei
Shopping on ebay seems questionable?
I dont know why this rumour is fueled here on AAC continously.

There are different kinds of sellers. Some know their parts, some dont.
There are profiteers with moon prices as well Ive researched their throughput is 10 to 15% of mine.

Ive bought merchandize on ebay for at least 10K and not one faulty or counterfeit.
And I bought from 98% sellers at times.

There are a few fully professional sellers. Their parts are totally fine.
Then others will try to sell you used or generic parts as branded.
Check the photos!

Stock photo or "homemade"
Quantity accurate or not (alarm bell here)
Parts on photo old but description = new?
Brand in description different than photo?

Check description.
If it is overloaded with details = alarm bell.

Check their sales and non generic comments and negs. Chinese of course get a lot of negs for very cheap items, its a sport.

One professional parts seller I recommend is G&C their pricing is good too.
http://stores.ebay.com/G-C-Supermarket-HK-Co-Ltd
Wonderco buy from Taiwan have excellent electric hardware
http://stores.ebay.com/wondercobuy79/

From the USA
http://stores.ebay.com/experimentersdiscountwarehouse/
He is a professional seller and has some hard to find parts
http://stores.ebay.com/milparts-online
He sells surplus all 100% genuine

Yes there are bad sellers I could spot them by some criteria.
One for instance trying to sell single piece parts with little real use for inflated prices.
If such seller has feedback a lot for bogus parts, you will get a feeling.

Its wrong if not just plain nonsense to judge ebay. Its individual sellers. In case of doubt, contact the seller first!
So pls pls you should stop spreading the rumours. I didnt see it once even.
I had one component tester not working. Bought another too much hassle to look after a claim.

ONTOPIC


Here I use a simple 16f716 for a RGB chaser. The LEDs just plain wired to IO ports.
All it needs is a C script.

OP if you wish to use analogical parts there will be these issues

1 the design will be complicated
2 the pattern will be set into stone

Its really as easy for small amount of LEDs to just wire to IO port.
 
Top