Hello all.
Thank you to all involved in providing this forum. I am new to the forum but not completely new to electronics. Had some schooling on digital logic, ttl, etc. and now work in the field of industrial control.
I am building an automatic pet water fountain. This is a DIY, keep myself busy in the winter project, just for fun. I won't bore you with all the details but the circuit basically is controlling a pump with two relays, one timing and one discrete. The inputs to the circuit are 0.5cm-15cm digital optical sensors that send active low ttl signals. These signals go to a 3 input nand chip, then to a mosfet switch output to drive the relay coils.
All is working well except for one functional problem. At the distance threshold (~15cm) of the optical sensors, the signal fluctuates from 0-5v causing the relay to chatter. I would like to prevent this from happening to prolong the life of the relay. I have looked into different circuits, comparator with hysteresis, 555 timer, etc. but am not sure what the best approach is. Don't want anyone to do my work for me, just need a push in the right direction.
The ideal setup would be :
If the input signal is fluctuating, output is low.
Once signal is solid for more than ~0.5 sec, output goes high.
The relay and sensor used linked below.
Pololu Carrier with Sharp GP2Y0D815Z0F Digital Distance Sensor 15cm
Pololu Basic SPDT Relay Carrier with 5VDC Relay (Assembled)
Thank you in advance for any replies to the one post noob.
Thank you to all involved in providing this forum. I am new to the forum but not completely new to electronics. Had some schooling on digital logic, ttl, etc. and now work in the field of industrial control.
I am building an automatic pet water fountain. This is a DIY, keep myself busy in the winter project, just for fun. I won't bore you with all the details but the circuit basically is controlling a pump with two relays, one timing and one discrete. The inputs to the circuit are 0.5cm-15cm digital optical sensors that send active low ttl signals. These signals go to a 3 input nand chip, then to a mosfet switch output to drive the relay coils.
All is working well except for one functional problem. At the distance threshold (~15cm) of the optical sensors, the signal fluctuates from 0-5v causing the relay to chatter. I would like to prevent this from happening to prolong the life of the relay. I have looked into different circuits, comparator with hysteresis, 555 timer, etc. but am not sure what the best approach is. Don't want anyone to do my work for me, just need a push in the right direction.
The ideal setup would be :
If the input signal is fluctuating, output is low.
Once signal is solid for more than ~0.5 sec, output goes high.
The relay and sensor used linked below.
Pololu Carrier with Sharp GP2Y0D815Z0F Digital Distance Sensor 15cm
Pololu Basic SPDT Relay Carrier with 5VDC Relay (Assembled)
Thank you in advance for any replies to the one post noob.