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

takao21203

Joined Apr 28, 2012
3,702
OP

you need a circuit like shown here. Trying to archieve the work of a C script with hardware is not easy. Even if possible, you need to resolder the circuit if you want to change it. Where as for a FLASH controller, you simply reflash the software. This is the reason why this technology is used nowadays.

A ring oscillator is maybe interesting for you. Its simple to build, you can add diodes for instance to change the fading. If you install feedback between several ring oscillators, for sure you can get some chaotic looking effects, similar to random flickering. One way could be optical coupling so the signal is passed to some point in another ring oscillator when the LED lights up. If you use analogical clocking, by the capacitors in the ring oscillators, their speed will be different. So the point when a triggering happens will be random.

In the end you get something like a transistor based shifting register.

You can emulate all hardware in software but you cant emulate all software with hardware.
 

Attachments

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
OP

you need a circuit like shown here. Trying to archieve the work of a C script with hardware is not easy. Even if possible, you need to resolder the circuit if you want to change it. Where as for a FLASH controller, you simply reflash the software. This is the reason why this technology is used nowadays.

A ring oscillator is maybe interesting for you. Its simple to build, you can add diodes for instance to change the fading. If you install feedback between several ring oscillators, for sure you can get some chaotic looking effects, similar to random flickering. One way could be optical coupling so the signal is passed to some point in another ring oscillator when the LED lights up. If you use analogical clocking, by the capacitors in the ring oscillators, their speed will be different. So the point when a triggering happens will be random.

In the end you get something like a transistor based shifting register.

You can emulate all hardware in software but you cant emulate all software with hardware.
i really want to use a micro, but i dont have the tools necessary or the skill needed. also if you read my terrible signature you would know that i have IGCSE and thus no time! i also dont want to pay alot as a 16 year old who is making 15 of these! i could not find any MCU in a DIP package that costs 5$ or less and has the sufficient PWM channels, and as a person with very limited c++ knowledge it would be impossible to create a good software PWM that will not only work, but do so for a lifetime (this is a gift to be given off that i want to work for as long as my friends live). this, however, is achievable using regular circuits when i remove all the complexity of sequences and buttons and just keeping the random look and the fading.
i would not like for someone to program it for me, as no one should do other's work without the other wanting to understand it and comprehend it. i would not be able to understand the code, but when i do build the circuit i will understand how it works! TBH no one will just tell me: "here! code that took me 20 hours to perfect just for you! i will flash it for you on some ICs with my programmer and ship it to you to the United Arab Emirates! pay me the chip price on paypal!" and i wouldn't want that...
 

takao21203

Joined Apr 28, 2012
3,702
Well I understand what you say.

No there arent really volunteers out there to deliver such services.

You need plain C skills no C++ at all for small MCUs.

The 16F1709 is a quite new controller, it should have PWM, and it can run as fast as 32 MHz no crystal required.
You need a PICKIT3 which costs less than 20 USD as clone.
The softwares, MPLABX and XC8 are both free.

MPLABX has templates and configuration of the MCU can be done with copy&paste.

I can sell these PCBs with SMD parts assembled, demo flashed, for about $10 you would have to add LEDs yourself. And I do have a source code for the 16F716 demo above.
I still have to adapt it to this MCU but its mainly affecting the configuration.

For 15 boards I could give you a discount even. The plain chip costs about $2 I would actually be happy to sell of some my stock and can put them on SOIC adapters. I can solder SOIC quickly, so lets say USD 3 for each if you want just the ICs.

A PCB isnt really needed as there would be just the LEDs. On the PCB I do have two small driving ICs. So I can have the IO ports free for other use.

Its a powerful MCU with 16K flash and can be used for many purposes.

The alternative is Arduino of course! PIC and Arduino sources are almost all exchangeable.
There you also have the Arduino.cc forum, which has many members and they are friendly, easy to get help and assistance.

For assembling the dc dc converter Id want another $2 as the small SOT23 part isnt all that easy, Then you can power it with a single battery cell.

If you dont have any C language skills, it would take you some months and several frustration because you have to search a lot for information, and the compiler manual is anything but lengthy and cryptic.
After some while, C is easy to use and quite powerful.

C++ is only needed if you want to run several threads on a large controller. It needs some amount of RAM as starting point to spawn objects and threads. A controller with "only" 1K RAM is ruled out, even if this is plenty of RAM.

Maybe you could try the ideas earlier in the thread and the ring oscillator.
A nicely built ring oscillator for sure is impressive and there can be fading or abrupt changes. Simply play with the circuit, for instance change the voltage offset with diodes.

Ebay is easy going if you examine the sellers before buying. Chinese are mostly OK well I never bought things when I didnt have a good feeling. Even the fashion sellers with just some electrical stuff are OK.

I could sell you just the PCB and parts, but the assembly is not easy probably. If you havent done SOIC before.

Also if you just give Arduino boards to your friends, maybe its nothing special.

By the way I can put custom part kits from all my items into plastic sorters and sell at competitive price.
Im not bound to quantity in the item, as the chinese are, they cant change package sizes mostly.

Tracked shipping to any country costs $10 to $20 depends if it is a flat or a box. Untracked for this I charge USD 4.

I can post the C source for the RGB circuit above here, I dont program for a living. Its a small script.
Yes I plan to advertise the PCB as RGB LED chaser soon, several customers asked me for programability.
It was a LED matrix PCB but recently I found it works fine with RGB LEDs.

Today, Im going to solder the 4 remaining LEDs, and probably adapt the source code.

Probably you wont be able to understand the source code well.
For one the LEDs are multiplexed. And also, the interface to the MCU is serially.
I can get away with a 20pin small IC this way.

If I need DIL for prototype, I put these ICs on adapter boards, its very easy for SOIC, after learning howto on youtube. Its faster to solder than DIL ICs even.

Also some time I plan to make a PCB for ring oscillator. People even buy 2 LED multivibrator DIY kits, so I think there could be buyers.

I have been absent from the forum and didnt have use of most equipment for some time but Im back at this recently.
 

Thread Starter

AnasMalas

Joined Nov 27, 2015
66
Well I understand what you say.

No there arent really volunteers out there to deliver such services.

You need plain C skills no C++ at all for small MCUs.

The 16F1709 is a quite new controller, it should have PWM, and it can run as fast as 32 MHz no crystal required.
You need a PICKIT3 which costs less than 20 USD as clone.
The softwares, MPLABX and XC8 are both free.

MPLABX has templates and configuration of the MCU can be done with copy&paste.

I can sell these PCBs with SMD parts assembled, demo flashed, for about $10 you would have to add LEDs yourself. And I do have a source code for the 16F716 demo above.
I still have to adapt it to this MCU but its mainly affecting the configuration.

For 15 boards I could give you a discount even. The plain chip costs about $2 I would actually be happy to sell of some my stock and can put them on SOIC adapters. I can solder SOIC quickly, so lets say USD 3 for each if you want just the ICs.

A PCB isnt really needed as there would be just the LEDs. On the PCB I do have two small driving ICs. So I can have the IO ports free for other use.

Its a powerful MCU with 16K flash and can be used for many purposes.

The alternative is Arduino of course! PIC and Arduino sources are almost all exchangeable.
There you also have the Arduino.cc forum, which has many members and they are friendly, easy to get help and assistance.

For assembling the dc dc converter Id want another $2 as the small SOT23 part isnt all that easy, Then you can power it with a single battery cell.

If you dont have any C language skills, it would take you some months and several frustration because you have to search a lot for information, and the compiler manual is anything but lengthy and cryptic.
After some while, C is easy to use and quite powerful.

C++ is only needed if you want to run several threads on a large controller. It needs some amount of RAM as starting point to spawn objects and threads. A controller with "only" 1K RAM is ruled out, even if this is plenty of RAM.

Maybe you could try the ideas earlier in the thread and the ring oscillator.
A nicely built ring oscillator for sure is impressive and there can be fading or abrupt changes. Simply play with the circuit, for instance change the voltage offset with diodes.

Ebay is easy going if you examine the sellers before buying. Chinese are mostly OK well I never bought things when I didnt have a good feeling. Even the fashion sellers with just some electrical stuff are OK.

I could sell you just the PCB and parts, but the assembly is not easy probably. If you havent done SOIC before.

Also if you just give Arduino boards to your friends, maybe its nothing special.

By the way I can put custom part kits from all my items into plastic sorters and sell at competitive price.
Im not bound to quantity in the item, as the chinese are, they cant change package sizes mostly.

Tracked shipping to any country costs $10 to $20 depends if it is a flat or a box. Untracked for this I charge USD 4.

I can post the C source for the RGB circuit above here, I dont program for a living. Its a small script.
Yes I plan to advertise the PCB as RGB LED chaser soon, several customers asked me for programability.
It was a LED matrix PCB but recently I found it works fine with RGB LEDs.

Today, Im going to solder the 4 remaining LEDs, and probably adapt the source code.

Probably you wont be able to understand the source code well.
For one the LEDs are multiplexed. And also, the interface to the MCU is serially.
I can get away with a 20pin small IC this way.

If I need DIL for prototype, I put these ICs on adapter boards, its very easy for SOIC, after learning howto on youtube. Its faster to solder than DIL ICs even.

Also some time I plan to make a PCB for ring oscillator. People even buy 2 LED multivibrator DIY kits, so I think there could be buyers.

I have been absent from the forum and didnt have use of most equipment for some time but Im back at this recently.
thanks for the suggestions, but i have IGs that are 20 days away and i will have to stop all projects. i want to give them something i made because thats the whole point, so sorry but i can buy from you unless you can sell logic gates... i will order from a seller who you recommended on ebay after some time as i need to get a one time visa card (i am under the age limit for a proper visa) and i dont have time for that now. thanks anyway.
 

takao21203

Joined Apr 28, 2012
3,702
thanks for the suggestions, but i have IGs that are 20 days away and i will have to stop all projects. i want to give them something i made because thats the whole point, so sorry but i can buy from you unless you can sell logic gates... i will order from a seller who you recommended on ebay after some time as i need to get a one time visa card (i am under the age limit for a proper visa) and i dont have time for that now. thanks anyway.
Sure I have very little time anyway currently.
G&C is recommendable + reliable. USD 50 and up they will use free tracking, below of this, you should enquire beforehand. It can be important to have tracking to see if the package is stuck in customs.
You could call the customs. They may not notify you and bounce the package. Happened to customers of mine.

Instruct them to write proper CN22 declaration (value + description). Ive had even USD 2 flat envellop bouncing from south America, because description wasnt good enough, or that kind not allowed to import.
 
Top