Can someone help a complete amateur with LED fading effect please? :-)

Thread Starter

Vlk

Joined Apr 17, 2015
26
Hi folks!

I just started a little project - a thing I need to do in order to finish up a gift for my fiancee. The problem is, I am totally new to electronics. :) I've never build a single thing and all my electronic experience starts and ends with charging up my phone or my camera... :-D
So all these circuit plans I found on the web are really fun and nice, but I am very lost in them, although I can imagine they are as clear and simple as they can get.
I found exactly the thing I need on Youtube:

However, I started this project with exactly the same components needed for this project: http://www.instructables.com/id/LED-Cube-Night-Light/?ALLSTEPS

Since I will be building something quite similar (it will be a small box), I need all the components to be quite small and 12v battery is not exactly the smallest and lightest.

So my goal is to build fade in and fade out LED effect. Slow fade in, when the switch is pressed and slow fade out, when the switch is pressed once again. All this with 3x LEDs (LED 5mm blue; 40?; 2300 mcd; 3,3 V; 20 mA) and 2x CR2032 3V batteries (I might add up one more if it will be needed).
Now I can see there is solution and I almost came to understand it, but I simply don't have enough engineering brain cells to grasp it completely. :-D I know I need capacitor, I need some resistors etc. But which kind of capacitor to fit my batteries and LEDs? Which kind of resistors? And when I will have all that, in which order to tangle them together? The Instructables project I linked above is easily understandable for me, because it is nicely visual. I am really quite lost in the circuit plans... And I know, I could go back to my high school years and try and learn it, but I don't really have tons of time to do it, since birthday of my fiancee is drawing near.

Could please anyone help me with this and give me directions of what I should do? It would be really greatly appreciated!

Have a great day guys!
 

wayneh

Joined Sep 9, 2010
17,496
First, welcome and kudos for having done your research before posting. It makes it a lot easier to get going and it's a rare commodity around here.

So you want the light to fade in and then stay on until the button is pressed again? That makes it a bit more complicated than the example you found. Still doable, just another thing to work out. You need a flip-flop that changes from low to high with each button press.

How much room do we have?

Also, how much concern do you have about battery life? Those button cells don't have a lot of energy. They'd be fine for the intermittent use I think you need, but not for a flashlight.
 

Thread Starter

Vlk

Joined Apr 17, 2015
26
First, welcome and kudos for having done your research before posting. It makes it a lot easier to get going and it's a rare commodity around here.

So you want the light to fade in and then stay on until the button is pressed again? That makes it a bit more complicated than the example you found. Still doable, just another thing to work out. You need a flip-flop that changes from low to high with each button press.

How much room do we have?

Also, how much concern do you have about battery life? Those button cells don't have a lot of energy. They'd be fine for the intermittent use I think you need, but not for a flashlight.
Hi wayneh! Thank you very much for your reply! :) I am always doing a research when I seek to learn something, but this time I was really lost even after quite some time which I spent to figure it all out. I am a creative kind of guy, so all the technical things goes a little bit around me. :)
Yes, exactly! What I want is that the LED's (all three at once) will slowly fade in once the switch is pressed and stay in the normal volume of light. And then again, when the switch is pressed once more, to make the LED's slowly fade off.

Do you mean room in terms of time? I have to finish this in less than 3 weeks (4.5. it the deadline :) ).

I think I don't need high power life. It won't be something that will be shining for hours, more like seconds to minutes and quite infrequently. :) It will be like a box to store nice little things (for example jewelery) and this will be there just for effect. :) So definitely something that will be turned on quite rarely. Do you think those CR2032 will be enough for my cause?
 

wayneh

Joined Sep 9, 2010
17,496
I haven't worked up any details but what I'm thinking of is based off of what was linked. Eliminate R2, and replace the switch with the output of a flip-flop. The timing of the fades would depend on R1 and C1. I think there may be a better way to arrange Q1, R3 and the LED load, but we can get to that later.

One thing I'm not quite sure how to handle is the "off" state of the flip-flop circuit. You obviously want a very low current when the circuit is not doing anything, to extend battery life. I'm not sure the answer is in Bill's Blog, but you should go read some of that.


ledfadeinfadeout_1292750501.png

That guy's "Circuit #2" does solve some of the problems of this very simple circuit, at the cost of higher complexity.
 
Last edited:

Thread Starter

Vlk

Joined Apr 17, 2015
26
No, I was thinking about the space that everything needs to fit within.
Yes, I think they'll be fine.
Hehe, sorry, I don't know why I thought about time. :) Well, since I will be crafting the box myself, I will customize it's size according to the circuit, but smaller the better of course. :)
Thank you very much that you brainstorm about how this could work! What is flip-flop by the way?
I am really sorry and quite ashamed to say that, but I don't understand the Bill's Blog you've linked. :-( This is kind of where I got stuck earlier. I am sure it has to do with the fact that I am not a native speaker and combined with the fact that I am so so bad at all science stuff (I was literally failing at school, almost haven't passed the year because of mathematics, chemistry, physics and all these classes. Thank goodness for all the nice teachers I had...), it makes this all really hard for me to comprehend. I mean, looking at the circuit plan, I suggest that R1 is resistor and C1 is capacitor and I might imagine how to connect it all together, but this is pretty much where it ends for me...

The tutorial from Instructables was really easy for me to fathom, because as I said, it is visual and let's say "dumbed-down" - stick this to there and tangle this around this and so... :-D Even the circuit plan is much more understandable for me.

I don't want to sound stupid, it just doesn't go through me for some reason. :-( Physics and mathematics are really my weakest spot of all. Well, I picked the right project huh? :-D

But above all that, I am really sure I can do this - I've done so many things before and I see this challenge as no different from the others. I am quite skilful when it comes to "hand-made" stuff - I think that is a good starting point at least. :)

I know it must be annoying, but this why I came here - to get some "have you tried to turn it on and off" kind of advice, as I am a far away from my regular field of activity. And I don't really know to where else to turn, as in all the electronic's shops I tried to ask in looked at me with slight disgust and didn't help me at all. :-D
 

wayneh

Joined Sep 9, 2010
17,496
Excellent point, the switch IS the flip-flop.

The circuit found by Vlk, that does the right thing, is from here. We can use a toggling switch for S1.

The "off" current thru D1, R4 and Q2 is a question mark.
ledfadeinfadeout_1292754841.png
 

Thread Starter

Vlk

Joined Apr 17, 2015
26
Thank you for your replies! I definitely have the time to get new parts for the circuit - there is shop with pretty much everything in my town, so I can get there by bus any time.
I bought this switch for the project: http://www.gmelectronic.com/p-b1720d-smd-p630-12 - because it has this long button which can go through the wood of the box and it will be nicely hidden inside. Just the tip of the button would be visible from outside. But I guess this switch is not really suitable for what am I trying to achieve right?
I was trying to find the switch you are refering to on the web of the local shop but I was unable to find something similar. It is weird, because this shop always had what I searched for. Maybe I am looking into a different section as I am unsure how this switch works. Is it like a switch which moves from side to side and stays where you currently move it? Maybe something like this? http://www.gmelectronic.com/p-esp101-p631-263

So basically the circuit plan I linked works for me, but I just need to get a different switch and I suppose different resistors and capacitors, as I won't be working with 12V batteries?
 

wayneh

Joined Sep 9, 2010
17,496
Yes, some thought about the components will be required for operation at a lower voltage. The capacitor doesn't matter so much because you can compensate for a wide range of values using different resistors, which are cheaper and easier to find. So see what the shop has that is close, and go from there.
 

cirep

Joined Apr 17, 2015
15
Hi to you all,
i was wondering if microcontrollers of the PIC types can be used on an old AKAI receiver to handle switching of the inputs.The original push to make switch is out of service and it is really a problem for selection of a source.The sound from such an old equipment is simply stunning and i want to give it a chance again to charm my ears a few years more.Any advice on how to tackle this project is welcomed
 

djsfantasi

Joined Apr 11, 2010
9,156
No, it is a pushbutton switch. You press it once and it completes the circuit. Press it again and it opens the circuit. Also known as a push on push off, or mom on mom off. This is how you described the desired operation in an earlier post.
 

djsfantasi

Joined Apr 11, 2010
9,156
Hi to you all,
i was wondering if microcontrollers of the PIC types can be used on an old AKAI receiver to handle switching of the inputs.The original push to make switch is out of service and it is really a problem for selection of a source.The sound from such an old equipment is simply stunning and i want to give it a chance again to charm my ears a few years more.Any advice on how to tackle this project is welcomed
This is known as hijacking someone else's thread. You should start your own.
 

Thread Starter

Vlk

Joined Apr 17, 2015
26
Yes, some thought about the components will be required for operation at a lower voltage. The capacitor doesn't matter so much because you can compensate for a wide range of values using different resistors, which are cheaper and easier to find. So see what the shop has that is close, and go from there.
So something that is close to the linked PCBHeavens circuit plans? Can you please give me hint of which kind of resistors, capacitors and transistor should I get for the 2x3V batteries? I am not sure what kind of specifications should I watch while looking for these components. Or should I just get some and try different parts and choose which works best?
 

Thread Starter

Vlk

Joined Apr 17, 2015
26
No, it is a pushbutton switch. You press it once and it completes the circuit. Press it again and it opens the circuit. Also known as a push on push off, or mom on mom off. This is how you described the desired operation in an earlier post.
So the switch I bought is the good one after all? I think that it works exactly this way. Or is it more like something like this http://www.gmelectronic.com/p-sw201-blue-p624-225 ?
 

wayneh

Joined Sep 9, 2010
17,496
The capacitor, diodes and transistors can be as shown or replaced with similar parts as available.

If you want to use 6V, you'll need to put the LEDs in parallel as in the Instructable, not in series as in the schematic above. But unlike the Instructable, each LED should have its own current-limiting resistor, even if it's just 10Ω. The Instructable seems to get away without it by relying on the internal resistance of the batteries, but it's not a robust design in my opinion. So there should be three R7s.

To calculate the resistor, it's all about Ohm's law, V=I•R.
 

Thread Starter

Vlk

Joined Apr 17, 2015
26
Ok, so to sum this up, I will follow this plan, except for the fact that I will have a different switch (will the one I bought work or should I get a different one?), diodes connected in the same way as in the Instructables plans and resistors and capacitors will be basically the same as from the plans bellow, so something like the following:

Resistors: http://www.gmelectronic.com/ru-2r7-0207-0-25w-5-p119-280

Capacitor: http://www.gmelectronic.com/ce-470u-10vt-jam-tk-6-3x11-rm2-5-bulk-p123-724 (I chose here the one with U=10 V, because I noticed that the PCBHeaven plan has 25 V, which is like double of the power of his 2x 12 V batteries, so maybe I need a capacitor with lower U?) Or something like this might be better? http://www.gmelectronic.com/ce-1500u-6-3vit-hit-exr-8x16-rm3-5-bulk-p123-667 It has a 3 times higher UF number, not sure if it something I want or don't want.

Transistor: Found this one with lower V, might it be suitable for my cause? http://www.gmelectronic.com/2sc1417-p215-457

Switch: I bought this one: http://www.gmelectronic.com/p-b1720d-smd-p630-125 Is this one not suitable? Should I get something like this instead? http://www.gmelectronic.com/p-esp101-p631-263

Sorry for asking so many questions, I just want to be sure I am doing the right thing and there are so many types of resistors, capacitors and transistors and I am really lost in all those numbers (not sure if I did the right thing, looking for lower voltage parts, it just felt like the right thing, since I won't be working with 60 V etc.). I tried to calculate the resistors, but I don't know how to know my current and my resistance... Ehm, I know, I am horrible... :-(

 

djsfantasi

Joined Apr 11, 2010
9,156
You have the supply voltage. Let's call it VS and pretend it is 12 VDC. Then, the LEDs have a forward voltage and a current rating. Let's say the VF is 2.5 VDC and the current is 10mA (or 0.01A). I am making these numbers up for this example. And you have three LEDs in series. The current limiting resistor R = V/I or

R = (VS-3*VF/I). <-- voltage to drop after LEDs
Or (12VDC-3*2.5)/0.01A <-- putting in your numbers
Or 4.5vdc/0.01A = 4,500 ohms

Remember, this is only an example. Your numbers will be different. Most of the information needed will come from the LED specs.
 
Top