Hello All. I made a cat door informer. My plan is simple.
I installed an accelerometer ( ADXL335 ) on the cat door. ( Please see diagram at the very bottom of this post ).
If a cat goes through the door, the accelerometers' x or y or z axis changes in value.
My Arduino, that works in tandem with the accelerometer ( ADXL335 ) informs me when a cat goes through the door.
Its a fairly simple setup.
Here is the issue:
When the cat is done going through the door, the door keeps oscillating!
This is messing things up for me.
Because the sensor, which is the accelerometer in this case, is physically oscillating, I am getting these extra, false, unnecessary readings that are telling me that a cat is going through the door, when in reality, it is not!
It is the door oscillating around the threshold 'z' value that is creating the fale messages.
The oscillations are making the z value of the sensor go from 344 to 350 and then back to 344 to 349 etc etc.
Every time the cat door oscillates such that the z value is greater than 348, a false message is being generated that a cat just went through!
Ideally, once the z value is higher than 348 I want the Arduino to tell me just once, that the cat came in.
When the cat door is fully closed, My Arduino was telling me that:
x = 274
y = 341
z = 338
Everytime a cat goes through the door, the serial monitor is telling me that:
x = 274
y = 341
z = 352
I dont want the extra "A cat just came in" fake messages which are being generated due to the oscillations of the door around the threshold value of 348.
( This will be an issue going forward, because I want to have a buzzer in this system and I don't want the buzzer going off due to the oscillations. i just want one buzz when the cat comes in.)
Ty for the replies!

I installed an accelerometer ( ADXL335 ) on the cat door. ( Please see diagram at the very bottom of this post ).
If a cat goes through the door, the accelerometers' x or y or z axis changes in value.
My Arduino, that works in tandem with the accelerometer ( ADXL335 ) informs me when a cat goes through the door.
Its a fairly simple setup.
Here is the issue:
When the cat is done going through the door, the door keeps oscillating!
This is messing things up for me.
Because the sensor, which is the accelerometer in this case, is physically oscillating, I am getting these extra, false, unnecessary readings that are telling me that a cat is going through the door, when in reality, it is not!
It is the door oscillating around the threshold 'z' value that is creating the fale messages.
The oscillations are making the z value of the sensor go from 344 to 350 and then back to 344 to 349 etc etc.
Every time the cat door oscillates such that the z value is greater than 348, a false message is being generated that a cat just went through!
Ideally, once the z value is higher than 348 I want the Arduino to tell me just once, that the cat came in.
When the cat door is fully closed, My Arduino was telling me that:
x = 274
y = 341
z = 338
Everytime a cat goes through the door, the serial monitor is telling me that:
x = 274
y = 341
z = 352
I dont want the extra "A cat just came in" fake messages which are being generated due to the oscillations of the door around the threshold value of 348.
( This will be an issue going forward, because I want to have a buzzer in this system and I don't want the buzzer going off due to the oscillations. i just want one buzz when the cat comes in.)
- Can you guys give me some feedback on how to stop the fake messages that are being generated due to the oscillations? Is there a electronics hardware solution to this kind of a problem?
- I am willing to replace the project with any other sensor. Can you recommend other types of sensors, which might job this job without these oscillations/ fake message issues? I choose an accelerometer just cause it was lying around.
Ty for the replies!
