I am trying to make a bunch of LEDs fade out when they are turned off. The task is quite simple for a single LED by using a 1000uF capacitor to produce a time delay as in the following circuit:   The other possibility is using Arduino analogWrite() function and get my work done but I don't want to use any microcontroller.  When I try to make it work for like 25 LED in parallel. The capacitance needed grows quadratically to store that much energy. Is there any other way of getting this effect to work which does not involve the usage of a lot of capacitors and neither a giant one.  Note: Please add tags to this question that are more relevant as I could not find many.
121541
We've all played with different transformers and power supplies that have an LED indicator that dims before going out entirely when the power supply is unplugged.  I'm working on designing an accent light which would involve a translucent crystal light source (probably made of resin or glass if I can find a cheap supplier) containing LEDs and certain electronics, and a base which would supply electrical current. For gamers, it might appear somewhat like a Welkynd Stone. My question is what is the simplest way to cause the LEDs to dim slowly (say over 2-10 seconds) when the crystal is removed from the base? Similar to the unplugged transformer, but with an intentional and controlled dimming.  I just purchased some LEDs and plan to build a test system over the next month or two. These LEDs are in a 5 meter strip divided into 3 LED series run in parallel and rated at 12v. I do not know the amp rating of the LEDs, but I'm guessing in the 20ma range (what I've read is average for bright white). I will probably use 4 series totaling 12 LEDs in the test build.   If I have the transformer from AC power built into the base, I was guessing I could use a number of capacitors in parallel with a resistor to store electricity and slowly discharge it into the LEDs. But I'm a self-taught enthusiast so I honestly don't know if this would actually work. Nor do I know the number and ratings of capacitors and resitor that I would need.  If I have the transformer built into the crystal, the transformer and rectifier would retain a small amount of electricity, but I don't think it would be nearly enough to provide the effect I'm looking for, so something else would have to be added to make it last for several seconds.  A nicad battery with control electronics is literally my last resort for achieving this effect, and I'll probably give up on the idea before I go programming my own circuit board.  That's my main question. If anyone wants to toss in some thoughts on how to connect the crystal to the base, I'm open to suggestions. My original plan was to simply have a direct copper to copper connection with the base. But I've recently been considering an EM charging system (akin to a powermat or  my dad has). The concern with the wireless is providing consistent power to the LEDs, though it is safer. I've also learned quite a bit already about constructing the power supply from perusing this SE site, but if anyone has any suggestions for that, too, I'm all ears. For the test build I'll probably hook it up to a computer power supply, or a laptop power supply if I can find a 12v one at Goodwill or the local electronics parts store.  If I get the test model to work, I plan on building possibly a dozen of these for accent lighting around my home.
47229
What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well.
78960
I have an IC that has an GPIO with which I would like to drive a LED.   Since the device will be running off battery, keeping the power use low (Zero maybe) while the LED is off as a priority.  The GPIO supplies 3.3V when turned on and 0.0V votes when turned off.   It also has a limit of a maximum of 4mA.  The LED has a forward current of 20mA and a desired forward voltage of 2.0V.  When the LED is turned on it will most likely be blinking (using PWM) in the low kilohertz range.  After poking around I believe this may be the type of circuit I need.    Question 1: Am I even close to being on the right track.  Question 2: What is the correct component to use for item (5), (Transistor or  Mosfet), and how do I go about finding one (at the local Frys, RadioShack, Online) and how are they identified(specified)?  Question 3: Will the choice of item (5) have any effect on the ohm value of the resistor item (3)?  Apart from the normal Ohms law for the 3.0V power source and the 2.0V LED.  Question 4: What would be the ohm value of the resistor item (2), if any is required.
94441
I am building a large array of Light Switched relays, and due to the size of the array i want to keep the part count down.  Each 'Pixel module' has a 12V SPDT, bulb and an activate-on-dark circuit. There is a strong spotlight on the device and the viewers shadow is obscuring the light in their shadow so the swing is large.  I have seen the obvious LDR-and-Pot circuits with a junction out to a NPN Transistor, and the more stable comparator alternative  I was looking at "solar cell" types of Photodiodes (PiN Type), and I can't see why I cannot just lay one across a PNP transistor (Collector to Base?) or something so it applies a Base voltage when lit up.  Can someone briefly explain to me why I am wrong?  I figure it would be all over the net if it was that easy, and i cant find any examples!  Is this possibly the cheapest way to make a light switched 12V relay driver?  Note: I prefer solutions using discrete circuitry, as I have a thing for human readability, visual components etc :P
44170
So, i want to make a timer that will turn on/off a circuit. I want to turn on the connected device at 08:00 and stop it at 20:00, so the interval is 12 hours. Correct me if i'm wrong but i can't use IC 555(or another IC), i'll need some huge resistors/capacitors. Is there another way to build that other than using a microcontroller?
86676
I am a software developer trying to understand how computers work at a lower level.  I have managed to create a few simple circuits, one which lights up an LED.  I have noticed that all the instructions advise you to connect the components in a certain way.  Please have a look at the circuit .  The LED is connected to column E and column F.  Why can't you just connect the LED to G7 and H7 and the black cable to F7? Why does the LED plug in across the gap?  I seem to remember something about this from school.  I have checked my GCSE textbook and also two textbooks which I am working through.  I have also Googled it but I cannot find an answer and hence the reason for this very basic question.
54325
I would like to be able to control around 100 independent LEDs using an Arduino.  The problem is that the Arduino does not have nearly enough pins that can be configured for this.  What would be a way to solve this problem?  Is there a chip that can demux a more complex signal from the Arduino that could then control the LEDs?  Or is there another solution?
93208
I have a pulse signal at 1 hz which goes high +5V and low 0V. How do i turn it into a continuous one? +5V. i have searched in different places and what i found says that there are different methods such as using an op amp as an integrator, then i also found that it can be used a diode, resistor and a capacitor, others suggest that a sample and hold circuit can also work. However none of these answers seem to be clear to me. i am still a novice in this matter. Would somebody help me with an answer that has a schematic i could test?. I have also found that a retriggerable monostable can work but i am not sure if this is the right approach, as i need the "continuous signal" to go low immediately after the input pulse is interrupted. If possible i would like to do this using logic gates such as the ones found within 4000 cmos series. Thanks for taking your time reading my doubt.
24872
I am trying to turn on a LED for 5sec every 12 hours. I tried:  #include &lt;mega16.h&gt; #include &lt;delay.h&gt;  void main(void) {     DDRC.0 = 1;     PORTC.0 = 0;      while(1)     {              unsigned long i;        unsigned long j;        PORTC.0=1;         for(i=1; i&lt;432; i++)        {              delay_ms(100);          }         PORTC.0 = 0;         for(j=1; j&lt;100; j++)        {            delay_ms(50);          }     } }   but the LED was on for about 2 hour every week.
84139
I am a beginner with LED lights, but would like to use a 5mm UV LED to make a pendant with a small fluorescent crystal. (This is what I purchased ()). I would like to create a very simple, very compact circuit with a coin cell (watch battery), and an on/off switch. What would be the easiest way to do this? Also, would using 2 batteries fix the voltage issue?
96004
I'm hooking up a small DC motor to an arduino using an NPN transistor using the following diagrams I found online:       The circuit works, and I'm successfully able to make the motor run.  Now, I'm seeking to understand why it works the way it does.  In particular, I'd like to understand:     Why are the diode and capacitor hooked up in parallel to the motor?  What role do they serve here?   Why is a resistor needed between the transistor and the digital PWM pin on the arduino?  Would it be safe to run the circuit without it?
116487
I wonder if it's a good idea to put LEDs in parallel, as below:    I've heard that it might not be because the voltage threshold won't be exactly the same for each LED, so they'll shine all with very different brightness and you don't have a way to balance that. Is that true? So does it mean it's a bad idea?
99628
I'm trying to create a simple circuit that will turn a  green when the power is on and red when it is off. I figure the simplest way to do this would be using a SPDT switch, but the switch in the circuit I'm designing is a 40 amp relay, and I found a SPST one for about a buck while the SPDT one was almost 4. For future reference, and also to cut the cost of designing my current circuit I'm trying to come up with some way to wire it up and basically make a "normally on" switch for the red and "normally off for the green.  The closest I've come is finding this circuit which would work except for the fact that the bicolor led shares a cathode.     Is there any way to change up the circuit, or is there something else I can try which would free up the cathode to make it so I can independently switch on the two LEDs?
10533
I have always been taught to driver an LED using an MCP using the following method (Driving the pin high) as shown in the diagram below:   However I have recently seen LED's being driven using the following method as shown in the diagram below. I assume in this method the LED is driven when the digital pin is set to low. Which method is best practice and why?
86608
I've been trying to make a current source, and have finally gotten my hands on some  which should be an 'unlimited cap drive' op-amp. The problem is, it is still oscillating. This is the schematic and PCB layout:   I have tried to route the ground inside the loop area, close to the 5V connection for the opamp, so I could place the bypass capacitors as close as possible. Although the bigger 10uF cap has one of its legs at the groundplane (forgot to include this cap in the schematic picture.) This is what it looks like when I probe the gate of the MOSFET:  It's all over the place. I tried adding a 10uF capacitor across the DUT, so from VDD to ground. This removed a lot of the wierd noise and made it look almost like a sinewave:  I've tried with and without the gate resistor R1, it didn't seem to make any difference. What is going on? Any clues on why this just doesn't work? EDIT: Solved it! With the help from @Andyaka below, I used his solution of inserting a BJT emitter follower in between the op-amp and the MOSFET, together with an integrator and got some great results! Final circuit:  The simulations can be seen here:  The gain/phase bode plots I made on the PCB:  Bandwidth of approximately 350kHz! Very pleased.
16485
Why can't you use a single resistor for a number of LEDs in parallel instead of one each?
105516
I'm looking at a diagram and wondering if I could use just one resistor to limit the current of the LEDs instead of multiple resistors so that the cathodes are all connected to the same resistor.    JL