[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

led fade in / out

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 3

File: FoL_immense_ut4jn1.jpg (243KB, 1080x720px) Image search: [Google]
FoL_immense_ut4jn1.jpg
243KB, 1080x720px
Hi guys. I'm wondering how to make a display where 3 or 4 leds slowly fade in and out. I'd like a blue, white green and red one and I'll have them behind some acrylic to wash the light a bit. What I'm wondering is, if its not possible to do this with single components. What about a arduino type thing ? I don't really want to learn or buy an arduino. So I was wondering is there some little chip one can programme and put on a breadboard that could achieve this task ??
Many thanks..
>>
Arduino is complete overkill for a project like this so you're right to look for something else. Any low end microcontroller like something from the PIC12F or an Atiny families more than enough. You can implement PWM LED fading in software on any digital output, it doesn't have to be an "analog" (PWM) output.

> inb4 somebody tries to start a PIC, AVR, ARM debate.

One of the reason the Arduino is popular is because it can be programmed just by plugging the USB cable into your computer. Most dev boards come with bootloaders like that, but a raw microcontroller needs some equipment to be programmed. A chinese clone PICKIT 2 costs around $12 on ebay and will let you program PICs.

There are also plenty of 555 LED fader schematics you can find through google. There's no programming if you take that route, but you'll need a small assortment of resistors and capacitors to build the circuit.
>>
>>912134
>> inb4 somebody tries to start a PIC, AVR, ARM debate.
You already did. Since the OP is obviously a complete newbie, an Arduino is a perfect solution.
>>
There's nothing really wrong with Arduino, while it's certainly overkill for the application, it's still a good learning tool as long as you realize that Arduino should just be a stepping stone towards pure AVR or other platforms. Nothing wrong with either of them.
The thing you quickly need to realize is that 'Arduino' is really just the ATMega mounted on top of a vastly overpriced board, if you go the Arduino route, first up buy a Chinese one, such as Funduino, it's much, much cheaper than straight Arduino and works just as well. The let's say 'proper' way of using Arduino should be as a 'programmer' where as you'll be building the finished circuits with just the ATMega and a few 'necessary' components to get it running (Crystal oscillator, 2 33pF caps and a resistor).
Now the reason why you SHOULD start with Arduino is also the flexibility of the platform. It's perfectly capable of working as a programmer for certain PIC series microcontrollers.
>>
OP here. I forgot to say that, if possible, I'd like the fade rate to be constantly changing, and the amount of 'off time' to be randomly chosen each cycle but between 5-60 seconds. A lot to ask I know. Thanks guys, looking into a PIC12F now.
>>
>>912136
> I am fucking determined to get my name out there
> I literally cannot stop being a board celebrity

Seriously, whats the thing?
>>
>>912138
>I'd like the fade rate to be constantly changing, and the amount of 'off time' to be randomly chosen each cycle but between 5-60 seconds
Not too difficult.
In C you have a function called Random (rand()), which allows you to generate a "random" number within a specified range. Now the number is not truly random, but you can get fairly close by picking a good reference value as a seed. Generally you'd be using the time counter of the microcontroller as a seed value or the analog value of electrical noise from the AD converter.
>>
File: magicbulb_tyqrtwyertqyetrqwrt.jpg (118KB, 1218x628px) Image search: [Google]
magicbulb_tyqrtwyertqyetrqwrt.jpg
118KB, 1218x628px
>>912128
>Hi guys. I'm wondering how to make a display where 3 or 4 leds slowly fade in and out. I'd like a blue, white green and red one and I'll have them behind some acrylic to wash the light a bit. What I'm wondering is, if its not possible to do this with single components.
there is a ton of remote-control lights that do this, available cheap from the orient (pic related, it's a lightbulb. there is also battery-powered lamps, and also some don't include a remote but they use an Android/bluetooth to control the lamp's settings).... *usually* they have a setting where it will slowly fade between colors you choose. or at least, it will fade between the different solid colors.

if you insist on absolute-total-control, then an arduino is the way. Cost would be maybe $12 total, plus something to put it in.

there are also LEDs that fade between red/green/blue automatically, but I can't find any at the moment. And you can't alter how they blink.... (looking..)

>>912136
>There's nothing really wrong with Arduino, while it's certainly overkill for the application, it's still a good learning tool as long as you realize that Arduino should just be a stepping stone towards pure AVR or other platforms.
not much reason to really; using the complete arduino is faster and easier, and prolly cheaper too--you can buy a complete Chinese Uno clone direct for less than US places will charge you just for the processor chip alone
>>
File: slowrgbleds_puoiupoiupoiupu.jpg (138KB, 1282x612px) Image search: [Google]
slowrgbleds_puoiupoiupoiupu.jpg
138KB, 1282x612px
here is one example of the LEDs that change color automatically.
you would need a few more parts (limiting resistors and a power supply). still cheap tho, <$10 to get at least 20-30 LEDs running...
>>
go on aliexpress and search for "led rgb slow change", there is bunches of them that run in different color combinations

they would still each need a limiting resistor (cost is maybe a couple dollars for those) and a power supply (cost is probably <$5, for a 5v DC wall wart)
>>
WHY NOT JUST GO TO WALMART OR TARGET AND BUY A STRING OF THOSE MULTI FUNCTION LIGHT SETS AND CUT OFF THE CONTROLLER AT THE END AND WIRE IT UP TO YOUR OWN LEDS AND USE THE BUILT IN FUNCTION CONTROL TO CHANGE THE FLASHING OR FADING EFFECT
>>
>>912128
correct me if I am wrong, but arent LED always either on or off?
>>
>>912738
Yes, but you could turn them on and off thousands of time a second to create various power levels.
>>
>>912738
Embrace the magic of Pulse Width Modulation.
Thread posts: 14
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.