Hello Guest it is June 18, 2019, 11:55:45 PM

Author Topic: Input Pins Are allways high (+5 volts) can not toogle on/off Limit Switch  (Read 7017 times)

0 Members and 1 Guest are viewing this topic.

Hello,
This is my first post. I have completed my machine and everything works. However, I cannot configure my limit switches. I bought a limit switch board from Hubbard CNC Inc (eBay store, see item # 330196205851). My interpretation of the wiring method is you need the input pins to be 0 volts and when a switch is tripped the limit switch board sends +5 volts to the corresponding input pin. My problem is this, my input pins put out +5 volts and I can't get them to go to 0 volts. When a switch is tripped the "watch dog" is triggered. I have played with the settings on the "input pins" page i.e., checking/un-checking "active low", but no luck. I have also played with the debounce settings but I don't think this is applicable to my situation. I have also downloaded a Printer Port Monitor program that allows you to see the status of each pin (input or output, high or low, and toggle them manually to high or low) The input pins cannot be toggled and they are allways "high" (+5 volts). How can you change input pins so they are allway low (0 volts)Help a noob out
Josh

Offline zarzul

*
  •  317 317
  • Wyoming, USA
    • View Profile
I would recommend you go read the mach book on printer ports,  also do a google search on parallel port IO. 

Basically you don't change the port itself, in mach3 configuration you change the logic determination on what input state  is considered high or low, +5 input hi or +5 input low.   

What is normally done is 5v is supplied to the port inputs from a breakout board, this would be with the limit switch open,  then with the limit switch closed, it pulls (shorts) the input to signal ground.  You need to have current limiting resistors in your circuit so that you are not directly shorting the 5v to ground. 

Hope this helps you in the right direction.

Arnie

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
If you are using an LPT1 printer port , then the five input pins are already at +5 volts - they are held there by internal pull up resistors in the computer.

Your limit switches need to be wired in one of two ways. We will assume your limit switch is a micro switch which has normally open and normally closed contacts.

1. Your limit switch is wired with the input to the computer on the common terminal, and a 0v suppy on the NORMALLY OPEN terminal. A signal ground connection will do from the printer port. The machine comes down, hits the switch, the normally open contact closes, and puts 0v on the input to the computer. Your ports and pins should show ACTIVE LOW for this. (Green tick)

2. Your limit switch is wired with the input to the computer on the common terminal and  a 0v supply on the NORMALLY CLOSED terminal. This means that 0v is input to the computer normally. Your machine hits the switch, the terminal opens, and the internal pull up resistor takes the input to 5v. Your ports and pins need to be active high - in other words active low has a red cross on.

The first method is simple, but the second method is prefered, especially if you have homing switches on as well. In this method, if the wire connecting your switch with the computer becomes detached, then the internal pull up resistors take the terminal to 5v and the limit switch trips, and lets you know there is a fault before you find out by running past a limit and hitting something.

Hope this gets you going.
Not me driving the engine - I'm better looking.

Offline Greolt

*
  •  956 956
    • View Profile

 The input pins cannot be toggled and they are allways "high" (+5 volts). How can you change input pins so they are allway low (0 volts)Help a noob out


Josh

As has been said above the inputs on the printer port are at 5v or "high" when at rest (nothing connected)

So you can switch them by connecting the pin to 0v or ground.  This will bring the pin low.

Or if you want to switch them by connecting to 5v then you must first make them low when at rest.

This is done by connecting a "pulldown" resistor between the pin and 0v

The value of this resistor will depend on whether you are using a BOB or direct connection to the LPT.

Greg
Thanks guys, I will try all of your recommendations and thanks for the speedy replies. I will let you know if they work, and, if you like, post some pics of my machine.
But just so I am clear, you don't have to apply voltage to the input pins?
You can either have N.O. switches that ground out the +5 volts when tripped or
N.C. switches when tripped, open the circut (thus, the +5 volts is still present in the pin)
You can only tell Mach3 how to interpret the presence of +5 volts in the pin i.e. +5 volts = high or +5 volts equals low

Here is the listing description of the limit switch board from Ebay and a scanned page from the manual.
"This board makes connecting limit switches and home switches to your computer from your machine easy and gives the most positive active high input that can be used with virtually any CNC Software. It has a power supply input and a 5 volt DC regulator and pull up resistors that will send positive +5 volt input signals from your limit switch to your computer.  It allows you to use any or all 5 of your computers input pins (any ones that your software allows) to input home or limit switch signals to your software.  It allows multiple limit switches per input.  Comes with complete documentation including description and wiring diagrams.  You will need a 5-20 vdc power supply to power this board, or buy our combo with power supply."

« Last Edit: December 10, 2007, 05:19:12 PM by joshie410 »

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Thie diagram above is totally misleading.

You do NOT need a seperate supply to your switches. As I said in my first post - if you are using the LPT1 printer port, then this already has internal resistors in the computer to pull up the pin to +5v. All you need is a switch to 0v. The diagram shows this.

The only reason I can see that they have put in a seperate power supply is for those machines that use a secondary port that may not already have the pull up resistors.

Wire it as shown, but scrap all the **** about a seperate power supply.

NO - you are getting confused about Mach 3.  0v is always LOW, +5v is always HIGH.  All you are telling Mach 3 is when the switch is ACTIVE.  In other words if you leave it normally open, and switch it to low when hit - then it is ACTIVE LOW, if you normally have it conected to 0v and the switch opens when hit - then it is ACTIVE HIGH

Not me driving the engine - I'm better looking.