I am trying to create a current sensor circuit using arduino Mega 2560. I need to measure the current through 1W LED lamp(Having SMPS module).I m using CT as current sensor.Across the burden resistor of 680 ohms I got spikes wave. Instead of 1 W LED , a 15W incandescent lamp is used. Then I got pure sine wave at the current transformer output. How can I accurately measure current through the LED lamp without spikes.
Is that possible to measure current through low power loads using CT..?
The spikes may be due to the fact that the load was an LED. Its hard to explain, but when an LED is forward biased, the LED does not limit the current, so it will pass as much current as possible. Without a shunt resistor that is too small, the current will become very large (enough so to look like spikes).
How exactly are you measuring current and why are you using a transformer?
I need to measure current through loads having few wattage.So the current is in few mA range.
I tried it with ACS712 5A Module. It is not capable to detect loads (Mentioned about incandescent lamp) below 15W. so I picked the CT.
measurement:
With burden resistor, secondary current converted voltage.Applying 2.5V dc clamping. Given to arduino ADC. Current is a calculated.With scaling current through the load can be calculated.
Is that possible to eliminate the spikes across burden when LED loads are connected in primary of CT..?
jremington:
You cannot measure DC current using a current transformer.
^ He is using mains to power the circuit (as in the image he attached), so I believe he is trying to measure AC current.
Either way, you will still have a problem finding the current since the Arduino can only measure DC voltage. You could take the output of the transformer circuit and input it to a circuit that includes a full wave rectifier in parallel with a resistor and capacitor to make the AC signal a DC one. In that case, you would be measuring the magnitude of the voltage across the 680 ohm resistor. You then divide the magnitude by sqrt(2) to get the Vrms value. Divide the Vrms by 680 to get Irms (current).
IMPORTANT: I'm still confused as to how you hook the LED to the circuit/transformer. Could you post another image or schematic with the LED specifically?
Also, how much experience do you have analyzing AC circuits?
The 3W LED Means , In the primary of CT the load is 230V 3W LED lamp(this is my load connected in AC). I need to measure the current flowing through this load.
I used the circuit that already attached. Your option is a good one.Instead of converting AC voltage across burden(680 ohm) to DC voltage , I am just clamp my dc level by 2.5V. So there is no negative half cycles. Then I directly given it to ADC of arduino. This is the method I am trying.
Attached is the schematic showing how I believe you are powering the LED.
Based on this ^ I think I know why you are getting spikes.
Short answer: Because you are using an LED with a transformer.
Long answer: LEDs only allow current to go in one direction. Let's first suppose the mains are reverse biasing the LED lamp. Therefore, no current flows through the lamp OR the transformer. BUT, as the mains switch polarity (since it is an AC signal), the LED lamp will become forward biased. Thus allowing the LED to conduct current through the transformer. AT THAT MOMENT, the change in current is infinite. Since transformers are essentially made of two inductors, the total voltage across the primary coil of the transformer will generally be (L * di/dt). But, since we just said di/dt is infinite, the voltage across the primary coil will be infinite. Also, since the voltage across the secondary coil is some scalar multiple of the voltage across the primary coil, the voltage across the secondary is ALSO INFINITE. That is why you are getting voltage spikes.
Possible Solutions:
Don't use transformer.
Use two LED lamps in parallel. LED lamps should current in opposite directions.
Hi,
Thank you for your helping mind.
I can't avoid LED lamp. It is essential in my project. I got the solution. output filtering is enough to eliminate spikes and I got pure sine wave at output.
Thank you once again for your points. Surely I note down your point for future reference.
Even with two LEDs there may be spikes, as the LED has a minimum voltage before it starts to conduct. Even with two LEDs in parallel, opposite biased, there should be a voltage range near zero that sees little or no current, then suddenly the current increases as the threshold is reached.
I am not using just LED's, it's one of those swanky light bulbs with a transformer and remote control hardware stuffed inside. So the actual schematic is a lot more complicated than just an inline diode.
I wondered if the op was also using led light bulb, and what he was seeing might have been noise of perhaps a capacitor based power supply. And with filter he meant low-pass and the "pure sine wave" more of a harmonic that includes the low-pass log...
I ended up adding some filtering but I wont call it a -pure sine wave-
I need to measure current through loads having few wattage.So the current is in few mA range.
I tried it with ACS712 5A Module. It is not capable to detect loads (Mentioned about incandescent lamp) below 15W. so I picked the CT.
measurement:
With burden resistor, secondary current converted voltage.Applying 2.5V dc clamping. Given to arduino ADC. Current is a calculated.With scaling current through the load can be calculated.
Is that possible to eliminate the spikes across burden when LED loads are connected in primary of CT..?
Low pass filter the CT's signal before digitizing. What is your sample rate?