Jimmylee
Banned
I’ve read this note RC Low-pass Filter Design (Sample) to design a a low pass filter for converting 120 VAC to 0-5V to input as analog into the arduino.
Attached is the filter I’ve got on the bread board now and it isn’t working and I can’t come up with where I’ve went wrong.
The voltage divider gets the voltage to 120*(680/68680) ~ 1.188 volts (plus or minus of course), then I pass it through the filter and DC offset. (The measured offset is a little more than 2.5 v due to 5% resistors), and I would expect something between 3.68v and 1.312 volts.
Where I would expect 3.68/(5v/1023steps) ~754 and 1.312/(5/1023)~268, so if I read the analog volts and then print them to the screen I’d expect the AC signal to oscillate between 754 and 268 with a center of roughly 500.
The problem is I’m seeing roughly 500 to 520.
I think its the filter taking out the 60hz signal but according to the design it should be passing the signal with minimal phase offset.
Can you spot where I’ve gone wrong? Thanks in advance!
Attached is the filter I’ve got on the bread board now and it isn’t working and I can’t come up with where I’ve went wrong.
The voltage divider gets the voltage to 120*(680/68680) ~ 1.188 volts (plus or minus of course), then I pass it through the filter and DC offset. (The measured offset is a little more than 2.5 v due to 5% resistors), and I would expect something between 3.68v and 1.312 volts.
Where I would expect 3.68/(5v/1023steps) ~754 and 1.312/(5/1023)~268, so if I read the analog volts and then print them to the screen I’d expect the AC signal to oscillate between 754 and 268 with a center of roughly 500.
The problem is I’m seeing roughly 500 to 520.
I think its the filter taking out the 60hz signal but according to the design it should be passing the signal with minimal phase offset.
Can you spot where I’ve gone wrong? Thanks in advance!