Limit switch pull-up?

Post technical questions about the Buildbotic Controller here.
Forum rules
No profanity, no gambling, no illegal activity, so sexual or pornographic material.

Posts not related to the Buildbotic CNC Controller are likely to be moved or deleted.
Post Reply
Adrianop
Posts: 7
Joined: Sun Feb 27, 2022 8:37 am

Limit switch pull-up?

Post by Adrianop » Sat Mar 05, 2022 7:37 am

Hi,
I'm, having some issues getting my limit switches to work correctly for my custom machine. I have PNP NO inductive proximity switches in both directions (min and max) on all three axes. They are supplied by +24V and share ground with the buildbotics controller which I bought a few weeks back. I read in the latest manual that the limit switch inputs can go up to 50V without damaging the controller so these switches are NO with 0V for not engaged and +24V for activated.

Now, the problem is that there seems to be some voltage offset somewhere that makes the output of my limit switches be at around 0.8 V when they are not activated/engaged and this is above the logic voltage level threshold for this type of input according to the buildbotics manual v1.1.

Also, when I measure the voltage between ground and the motor # max/min pin without any switch connected I measure 3.2 V, which leads me to belive these inputs are pulled-up by the controller? SInce the inputs are pulled up: Is this set by the microcontroller or the raspberry or are there soldered resistors on the controller PCB?
I see the point of having a pull-up resistor if a classic microwitch is used, but not really in any other situation..

Any insight would be very helpful.
Thx,
Adrian

User avatar
Doug
Posts: 343
Joined: Fri Feb 02, 2018 4:56 pm

Re: Limit switch pull-up?

Post by Doug » Sat Mar 05, 2022 8:14 am

Are the switch inputs configured for normally open on the Settings->Motor configuration pages?

Adrianop
Posts: 7
Joined: Sun Feb 27, 2022 8:37 am

Re: Limit switch pull-up?

Post by Adrianop » Sat Mar 05, 2022 8:34 am

Yep! The limit-switches are configured as normally-open in the settings.

User avatar
Doug
Posts: 343
Joined: Fri Feb 02, 2018 4:56 pm

Re: Limit switch pull-up?

Post by Doug » Sat Mar 05, 2022 12:50 pm

OK, you said that the output voltage from your limit switch is around 0.8V when "not activated". When they are not activated (normally open), they should be in the high state, which could be up to 24Volts. This could happen if the limit switch is pulling the output down.

The limit switch inputs are pulled up by resistors inside the microprocessor. The limit switches are protected by shottkey diodes, so there is a small voltage drop (<0.3 Volts) across the diode when the output of the switch is in the low state. This means that you could read up to 0.3 Volts plus any voltage being output by your limit switches when in the low state. If they are normally open, the low state should be "when activated".

You also said that the input pin on the BB Controller reads 3.2 Volts when the switch is disconnected. This is the expected value, so I am guessing that the input pin is on the BB Controller is OK.

If you disconnect the limit switch from the BB Controller, what voltages do you see across the limit switch output when activated and when not activated?

Adrianop
Posts: 7
Joined: Sun Feb 27, 2022 8:37 am

Re: Limit switch pull-up?

Post by Adrianop » Sat Mar 05, 2022 2:04 pm

Ok, thanks Doug :)
Now I understand the confusion here. You see, my limit switch has the switch on the high side and hence when it is closed the output of the limit switch is tied to +24V, when the switch is open there is a pull down resistor inside the limit-switch that makes the output go low. I have attached a quick drawing of (roughly) how I think the circuit is built up.

So, even though this is a normally open switch, if I change the limit-switch setting in the buildbotics interface to be normally closed, will this mean the internall pull up in the MCU gets turned off so that this will be the correct setting for my setup?
Attachments
limit-switch-circuit.jpg

User avatar
Doug
Posts: 343
Joined: Fri Feb 02, 2018 4:56 pm

Re: Limit switch pull-up?

Post by Doug » Sat Mar 05, 2022 3:15 pm

Correct. Does it work now?

Adrianop
Posts: 7
Joined: Sun Feb 27, 2022 8:37 am

Re: Limit switch pull-up?

Post by Adrianop » Sat Mar 05, 2022 11:50 pm

Yes, that solved it.
Thx :)

Post Reply