I am trying to create a sensor to detect if a Window AC unit is running. I’m currently trying to use a piezo film sensor hooked up to the ADC of the esp8266. I know that the piezo is capable of generating voltage much greater than the 1V that the esp8266 can handle, however, in my testing, I’m not seeing values above 120 mv, so I think I’m okay for now. But my problem is that the readers are not granular enough. When the AC is off I’m getting about 20mv, when it’s on I’m getting betweeen 50-150 mv. Not much room for error between 20-50 mv.
Currently the piezo film sensor is hooked directly to ground and the ADC pin of the esp8266. I know most tutorials suggest a simple 1 Ohm resistor across the sensor’s pins to bring down voltages to ranges inside 1V, but when I do that, the reading when the AC unit is on is so low, there’s even less discrimination between AC on and AC off in sensor values.
Is there a way to amplify the output of the piezo film, while clamping it’s max to 1V?
Or can you think of a better way to detect if the window AC is on?
When the AC is on it will draw current through its power cord. It seems to me a simple induction system would be able to detect this current flow. Such a device is for sale right here on SparkFun.
You’re going to have to fiddle a bit with the SparkFun device.
From the comments (reviews) on the item’s page:
there’s a catch of course. I had an idea that you just clamp it around a cable and you all set - just ADC signal and that’s it. First, you don’t clamp this around CABLE, you clamp it around WIRE. An it’s just the beginning
You cannot simply clamp around the power cord since the current flowing into the A/C is the same as the outgoing current and is opposite direction and cancels. Then the current transformer detects no effective current.
It has to be on ONE lead of the power cord.
then there’s the issue of the device producing voltage and you need to ensure that it’s compatible with your analog input, and so on.
Ok, this can be done far more simply. A tilt switch on a pivot that has a lightweight “paddle” which will be pushed over when the AC fan kicks on. Maybe even easier would be a reed switch, or IR pair, that is tripped by the same tilting “paddle” which has a tiny magnet (for reed switch) attached.