Trouble receiving inputs over parallel port
- F4br1c4t3D
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
03 Feb 2019 23:04 #125620
by F4br1c4t3D
Trouble receiving inputs over parallel port was created by F4br1c4t3D
LinuxCNC noob here looking fro some advice on setting up my first machine. I've built CNC machines on other platforms before so Im familiar with the basics but I've never interfaced via parallel port before.
I have a lathe, all wired up, steppers are working just fine. I have NPN inductive proximity switches as limit and home for X and Z They're receiving 24V from the PSU and an LED on the sensor illuminates when I wave metal at them. The black signal wire goes to one of the input pins and the ground goes to the common input ground on my BOB (One of these - bit.ly/2Gin2Pw). The BOB has 24v in so the optocouplers should be working. Reading the voltage between the ground pin and the sensor input pin shows it switching from 24v when no metal is present to 0v when metal is in range of the sensor. Reading the "computer side" of the optocouplers, I don't see a change in the voltage between the PC 5V ground and the optocoupler. I did get the signal to register on this side when I had pullup resistors on the optocouplers connected to PC 5V (from following tips from another thread on here) but ultimately the signal wasn't received by the PC. (Verified by watching the pins from within the halconfiguration utility run from within linuxCNC) After doing a bit more reading I removed them as it was suggested in another thread that they were only to go on that side of the optos to make the bob work with a specific mobo. I've also tried pullups on the machine side of the optos.
The input pins always appear to be active when I view them with the available utilities. I've also tried the standalone paraport testing utility linked on the wiki as suspected the output pins work and switch between 0 and 3.3V when tested with a multimeter between the PC case and the respective pin. I tried "piping" this signal back in to one of the input pins to see if it would change it's state when I triggered the output but all pins remain active. Is there a good way to verify that the input pins are working correctly without the bob involved as at the moment I'm not sure where my problem lies and I'm struggling to narrow it down.
I've scoured the forums and tried every piece of advice I could find to make the inputs work but thus far no joy. I'm hoping someone can put me out of my misery. If there's any more detail required please let me know and I'll do my best to provide it.
Cheers
Steve
I have a lathe, all wired up, steppers are working just fine. I have NPN inductive proximity switches as limit and home for X and Z They're receiving 24V from the PSU and an LED on the sensor illuminates when I wave metal at them. The black signal wire goes to one of the input pins and the ground goes to the common input ground on my BOB (One of these - bit.ly/2Gin2Pw). The BOB has 24v in so the optocouplers should be working. Reading the voltage between the ground pin and the sensor input pin shows it switching from 24v when no metal is present to 0v when metal is in range of the sensor. Reading the "computer side" of the optocouplers, I don't see a change in the voltage between the PC 5V ground and the optocoupler. I did get the signal to register on this side when I had pullup resistors on the optocouplers connected to PC 5V (from following tips from another thread on here) but ultimately the signal wasn't received by the PC. (Verified by watching the pins from within the halconfiguration utility run from within linuxCNC) After doing a bit more reading I removed them as it was suggested in another thread that they were only to go on that side of the optos to make the bob work with a specific mobo. I've also tried pullups on the machine side of the optos.
The input pins always appear to be active when I view them with the available utilities. I've also tried the standalone paraport testing utility linked on the wiki as suspected the output pins work and switch between 0 and 3.3V when tested with a multimeter between the PC case and the respective pin. I tried "piping" this signal back in to one of the input pins to see if it would change it's state when I triggered the output but all pins remain active. Is there a good way to verify that the input pins are working correctly without the bob involved as at the moment I'm not sure where my problem lies and I'm struggling to narrow it down.
I've scoured the forums and tried every piece of advice I could find to make the inputs work but thus far no joy. I'm hoping someone can put me out of my misery. If there's any more detail required please let me know and I'll do my best to provide it.
Cheers
Steve
Please Log in or Create an account to join the conversation.
04 Feb 2019 07:12 #125642
by Clive S
Replied by Clive S on topic Trouble receiving inputs over parallel port
It might help if you gave a pic. of the BOB or type. If it is one of the Chinese type with the blue relay on it then the inputs won't work without feeding the BOB with 5V AND between 12-24V at the opposite end to the inputs (centre two pins) you might have to link the two -ve together.
The following user(s) said Thank You: F4br1c4t3D
Please Log in or Create an account to join the conversation.
- F4br1c4t3D
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
04 Feb 2019 08:34 #125647
by F4br1c4t3D
Replied by F4br1c4t3D on topic Trouble receiving inputs over parallel port
Hi Clive,
Cheers for your response. If you check the link provided in my post, you'll see the type of bob I'm using. It's one of the Chinese boards as you surmised.
It has both 24v from my PSU and 5v from the USB. I've not yet tried connecting the grounds from both of these supplies, I assume you mean at the board? i.e. from the PC 5V ground to the 24v input ground. I thought these 2 supplies were supposed to remain independent, hence the optocouplers.
I would like to establish if the paraport inputs are actually working at all first, is there a simple way of testing this without the bob in the equation?
Cheers,
Steve
Cheers for your response. If you check the link provided in my post, you'll see the type of bob I'm using. It's one of the Chinese boards as you surmised.
It has both 24v from my PSU and 5v from the USB. I've not yet tried connecting the grounds from both of these supplies, I assume you mean at the board? i.e. from the PC 5V ground to the 24v input ground. I thought these 2 supplies were supposed to remain independent, hence the optocouplers.
I would like to establish if the paraport inputs are actually working at all first, is there a simple way of testing this without the bob in the equation?
Cheers,
Steve
Please Log in or Create an account to join the conversation.
04 Feb 2019 09:13 #125649
by Clive S
Replied by Clive S on topic Trouble receiving inputs over parallel port
Sorry I missed the link. I have used that board a lot you should be able to get them for around £5 . www.ebay.co.uk/itm/New-CNC-5-Axis-Breako...bQboH&frcectupt=true
I always use a a 5v. PS and connect the two -ve together. I don't like using the usb for power..
I always use a a 5v. PS and connect the two -ve together. I don't like using the usb for power..
Please Log in or Create an account to join the conversation.
- F4br1c4t3D
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
04 Feb 2019 14:25 #125658
by F4br1c4t3D
Replied by F4br1c4t3D on topic Trouble receiving inputs over parallel port
Ok I'll give this a shot. Although I'm still not 100% on the reason to tie up the grounds for both supplies.
I have a power distribution board that can supply the bob as opposed to the PC 5V. I take it it's just a case of removing the USB cable from the equation and feeding 5V and ground to the 5v and ground terminals on the bob?
I have a power distribution board that can supply the bob as opposed to the PC 5V. I take it it's just a case of removing the USB cable from the equation and feeding 5V and ground to the 5v and ground terminals on the bob?
Please Log in or Create an account to join the conversation.
04 Feb 2019 15:50 #125662
by Clive S
Yes try that
Replied by Clive S on topic Trouble receiving inputs over parallel port
Ok I'll give this a shot. Although I'm still not 100% on the reason to tie up the grounds for both supplies.
I have a power distribution board that can supply the bob as opposed to the PC 5V. I take it it's just a case of removing the USB cable from the equation and feeding 5V and ground to the 5v and ground terminals on the bob?
Yes try that
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
04 Feb 2019 19:58 - 04 Feb 2019 19:58 #125679
by Todd Zuercher
Replied by Todd Zuercher on topic Trouble receiving inputs over parallel port
I believe that the inputs on that breakout board are sourcing inputs. They normally float high and to trigger them, they need to be pulled to the ground of the 12-24v supply. If your sensor is only supplying voltage they will not trigger. If you add a pull down resistor, in addition to your sensor connection that should get them working (albeit inverted to what you may have expected).
Last edit: 04 Feb 2019 19:58 by Todd Zuercher.
The following user(s) said Thank You: F4br1c4t3D
Please Log in or Create an account to join the conversation.
- F4br1c4t3D
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
04 Feb 2019 20:09 #125681
by F4br1c4t3D
Replied by F4br1c4t3D on topic Trouble receiving inputs over parallel port
Hi Clive,
Well I've tried that but the problem still persists. With the usb unplugged, 5V from my PBD fed to the BoB and a jumper wire between the 5V and 24V ground terminals on the BoB, I have the same behaviour as before. Steppers running just fine but no signal at the computer when inputs are triggered.
Going to probe the BoB outputs and make sure there's definitely action when the switches are triggered. If I can narrow down where the interruption in the signal path is troubleshooting will be much easier.
Well I've tried that but the problem still persists. With the usb unplugged, 5V from my PBD fed to the BoB and a jumper wire between the 5V and 24V ground terminals on the BoB, I have the same behaviour as before. Steppers running just fine but no signal at the computer when inputs are triggered.
Going to probe the BoB outputs and make sure there's definitely action when the switches are triggered. If I can narrow down where the interruption in the signal path is troubleshooting will be much easier.
Please Log in or Create an account to join the conversation.
- F4br1c4t3D
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
04 Feb 2019 20:13 #125682
by F4br1c4t3D
Replied by F4br1c4t3D on topic Trouble receiving inputs over parallel port
Hi Todd,
Thanks for your response. How (where) is this pull down added and what sort of resistance value should I be using?
Thanks for your response. How (where) is this pull down added and what sort of resistance value should I be using?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
04 Feb 2019 20:56 #125686
by Todd Zuercher
Replied by Todd Zuercher on topic Trouble receiving inputs over parallel port
Not sure what resistance 1k-10k. What ever is nessisary to pull the input low.
Connect it between the inputs screw terminal and the ground terminal right beside them. When you connect the right sized resistor the input should be true in hal when your sensor is inactive (not supplying 24v) and false when the sensor is active.
Connect it between the inputs screw terminal and the ground terminal right beside them. When you connect the right sized resistor the input should be true in hal when your sensor is inactive (not supplying 24v) and false when the sensor is active.
The following user(s) said Thank You: F4br1c4t3D
Please Log in or Create an account to join the conversation.
Time to create page: 0.074 seconds