I am trying to make a ~1 second delay using RC Circuit to delay power delivering to a strip of LEDs (12v),
when testing the RC Circuit without load it works fine but when i attach the load the voltage drops significantly from 12v to 4.5v.
I think that the LED strip is discharging the capacitor in a very fast manner, So how can i fix this?
I am connecting a resistor and a cap in series with the voltage supply and the load is parallel with the cap.
This is an XY problem and RC circuit is unable to solve it. Describe what you need a we may help you to find a solution. But we need to know why you need the delay.
I think you will find a 1 second delay using just R & C is not practical. The capacitor you would need is the size of a 1 Liter soda bottle and would for a short time draw over 10x the LED current from you supply.
Basically you are asking the capacitor to almost short out the input supply to ground (through the series resistor) for nearly a second.
I'm afraid you will need some active components (mosfet) to get your delay.
The problem is little weird..but after some tests I got the cause of it,however didnt figure out a solution for it.
In my Hydroponic system I'm using arduino MEGA with a big AC pump,three small DC pumps and the Light System.
I am implementing two external interrupts (two buttons) in my code that stops the operation and return back to Menu when they get pressed.
In those two ISRs, I'm just setting a global flag(no other way to set the flag except through the ISRs).
Now the problem is (may be one of the problems) when the AC Pump is switched from ON to OFF position while the Light System is ON, the whole System stops (giving me a Stop Screen) it's neither hanging nor restarting.
This scenario cannot be happened unless the global flags are set (Stop_Flag=1) and the global flags are set only in the two ISRs (external buttons).
In a nutshell, the cause of the problem is due to some sort of electrical noise that makes the arduino execute the two ISRs without pressing the buttons OR may be i miss the right implementation of the External Interrupt driver.
I'm driving both the AC Pump(220v) and the Light System(220v) using two relays controlled by arduino MEGA
and here's the code for the external intterrupts:
I did several tests and the error did not occur, but i'd prefer that i could eliminate that electrical noise specifically there's not any physical connection between the Loads (AC Pump and Lights) and the MEGA.
False triggering of interrupts ia quite common in noise environments, I was once dealing with a similar situation where my self built smps was just way to noisy for the interrupts and would false trigger every now and then, to counter this I tried a combination of ceramic caps between my interrupts and ground and that basically did the trick for me. Secondly a schematic would be good, do you have free wheeling diodes across the relay coil?
I did several tests and the error did not occur, but i'd prefer that i could eliminate that electrical noise specifically there's not any physical connection between the Loads (AC Pump and Lights) and the MEGA.
I am quite sure this is not the solution. delay does not work inside an ISR. Your are only hiding another problem with your "bug fix"
waqaszahid:
False triggering of interrupts ia quite common in noise environments, I was once dealing with a similar situation where my self built smps was just way to noisy for the interrupts and would false trigger every now and then, to counter this I tried a combination of ceramic caps between my interrupts and ground and that basically did the trick for me. Secondly a schematic would be good, do you have free wheeling diodes across the relay coil?
Hi,
Yes there are Fly wheel diodes across the relays, By the way i am using smps to power on my led system(220v ac to 12v dc), So here's the sequence MEGA --> Relay --> SMPS --> Led System