Proximity sensor hardware debounce?
- hitchhiker
- Away
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 12
08 Sep 2025 07:21 #334610
by hitchhiker
Proximity sensor hardware debounce? was created by hitchhiker
Hi ! I struggle with a failure with my toolchanger.
i use the latest carousel.comp.
the atc is controlled by 3 proximity sensors.
the proximity sensors are npn normaly open.
i connect them to my mesa 7i92t.
on the mesa 7i92t i have the pullup jumper selected.
If i connect the sensor to 24v,gnd from mesa (on the idc connector) together with gnd of the 24v supply and the signal cable to a input on the mesa i see the pin change the state if i hold the sensor to a screw or something metallic.
original on this machine the signal cable goes to a 22k ohm resistor which is connected to ground. Then it goes to another 22k resistor in series.. which haves a ceramic cap 1nf to gnd. and then to a 74c14 schmitttrigger.. from there it goes to the mcu.
i will draw a small sketch later.
in linuxcnc i debounce the pin with the value 3.
the sensor cables ate not shielded.. and are near to the main drive and maindrive cables.. main drive becomes a 280v pwm signal up to 5amps.
so sometimes the atc stops turning anywhere .. i think it get count signal.. but thete is no count signal.
should i clean the signals like original controller it do?
thanks
i use the latest carousel.comp.
the atc is controlled by 3 proximity sensors.
the proximity sensors are npn normaly open.
i connect them to my mesa 7i92t.
on the mesa 7i92t i have the pullup jumper selected.
If i connect the sensor to 24v,gnd from mesa (on the idc connector) together with gnd of the 24v supply and the signal cable to a input on the mesa i see the pin change the state if i hold the sensor to a screw or something metallic.
original on this machine the signal cable goes to a 22k ohm resistor which is connected to ground. Then it goes to another 22k resistor in series.. which haves a ceramic cap 1nf to gnd. and then to a 74c14 schmitttrigger.. from there it goes to the mcu.
i will draw a small sketch later.
in linuxcnc i debounce the pin with the value 3.
the sensor cables ate not shielded.. and are near to the main drive and maindrive cables.. main drive becomes a 280v pwm signal up to 5amps.
so sometimes the atc stops turning anywhere .. i think it get count signal.. but thete is no count signal.
should i clean the signals like original controller it do?
thanks
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19151
- Thank you received: 5291
08 Sep 2025 22:52 #334659
by PCW
Replied by PCW on topic Proximity sensor hardware debounce?
I would use an RC filter if in a high noise environment
Also not sure from your description, whats 24V and whats 5V
no 24V signal should be anywhere near 7I92T I/O pins
Also not sure from your description, whats 24V and whats 5V
no 24V signal should be anywhere near 7I92T I/O pins
Please Log in or Create an account to join the conversation.
- hitchhiker
- Away
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 12
09 Sep 2025 08:42 #334677
by hitchhiker
Replied by hitchhiker on topic Proximity sensor hardware debounce?
I make a drawing in few hours.
Its 5v i measured but later with the drawing it would be better to understand
Its 5v i measured but later with the drawing it would be better to understand
Please Log in or Create an account to join the conversation.
- hitchhiker
- Away
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 12
09 Sep 2025 11:24 #334682
by hitchhiker
Replied by hitchhiker on topic Proximity sensor hardware debounce?
Here i am again.. this shows us the original circuit of the original controller . the proximity sensor switching gnd. Its a npn normaly open proximity sensor without shielded cables.
Sensor is powered with 24v.
my now setup is:
the output cable from the sensor goes direct to my mesa 7i92t. i see the gpio toggles if i bring the sensor to some metal. it works. the mesa 7i92t is jumpered to pullup.
if i use this circuit i must set the jumper to pulldown. correct?
thanks for your help
Sensor is powered with 24v.
my now setup is:
the output cable from the sensor goes direct to my mesa 7i92t. i see the gpio toggles if i bring the sensor to some metal. it works. the mesa 7i92t is jumpered to pullup.
if i use this circuit i must set the jumper to pulldown. correct?
thanks for your help
Attachments:
Please Log in or Create an account to join the conversation.
- hitchhiker
- Away
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 12
10 Sep 2025 09:55 #334761
by hitchhiker
Replied by hitchhiker on topic Proximity sensor hardware debounce?
On the bench it works.
Important is to know that the signal is inverted.
Option 1 use a second schmittriger to re invert. As example.. from 1Y to 2A and from 2Y to motion card.
Option 2 change signal in hal from in to in_not.
Important is to know that the signal is inverted.
Option 1 use a second schmittriger to re invert. As example.. from 1Y to 2A and from 2Y to motion card.
Option 2 change signal in hal from in to in_not.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19151
- Thank you received: 5291
10 Sep 2025 14:12 - 10 Sep 2025 14:16 #334775
by PCW
Replied by PCW on topic Proximity sensor hardware debounce?
Either way will work, there is no technical advantage of using 2 external
inverters.
Pullups/pulldowns on the 7I92T don't really matter for this specific signal
since they are overdriven by the Schmitt trigger
(the pullup/pulldown mode may matter for other signals)
inverters.
Pullups/pulldowns on the 7I92T don't really matter for this specific signal
since they are overdriven by the Schmitt trigger
(the pullup/pulldown mode may matter for other signals)
Last edit: 10 Sep 2025 14:16 by PCW.
Please Log in or Create an account to join the conversation.
- hitchhiker
- Away
- Elite Member
-
Less
More
- Posts: 208
- Thank you received: 12
11 Sep 2025 11:48 #334819
by hitchhiker
Replied by hitchhiker on topic Proximity sensor hardware debounce?
It works.
I use a second channel to re invert the signal.
Now no noise on the signal.
I use a second channel to re invert the signal.
Now no noise on the signal.
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds