Lick debounce #105
-
Hi, The lick detector (PyControl hardware) detects a single lick sometimes when the reward solenoid (triggered by the same circuit) is triggered. The debounce value is the default 5ms. Should I increase it? Does anyone have a similar experience? Is it recommended to add a capacitor or something to the circuit to dampen possible electrical spikes (not action potentials😄)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @AtMostafa, I don't think debouncing is going to help with this because it prevents multiple events from being generated within a specified window, but will not stop a single event being generated due to crosstalk between the solenoid and lick detector. The best way to resolve this problem is to minimise electrical coupling between the solenoid circuitry and the sensitive part of the lick detection circuitry, which includes the lick spout itself and the wire connecting it to the lickometer. The main ways to achieve this are:
Some combination of these steps should fix the issue. Let me know how you get on. |
Beta Was this translation helpful? Give feedback.
Hi @AtMostafa, I don't think debouncing is going to help with this because it prevents multiple events from being generated within a specified window, but will not stop a single event being generated due to crosstalk between the solenoid and lick detector. The best way to resolve this problem is to minimise electrical coupling between the solenoid circuitry and the sensitive part of the lick detection circuitry, which includes the lick spout itself and the wire connecting it to the lickometer. The main ways to achieve this are: