USB Relay Board to control solenoid valves and shop vac
08 Oct 2018 20:57 #118562
by silden
USB Relay Board to control solenoid valves and shop vac was created by silden
Hi All,
I plan to control a couple solenoid vales and the on/off of my dust extractor though G-code.
For this I wrote some user macros and all is good on this point, but I would like to use a USB relay board to control the valves physically. This would ease up the wiring and speed up the implementation.
My question is is there any documentation how to integrate a USB relay board, like the Tormach USB M-Code I/O Interface Kit or any no-name board.
Thank you,
Denis
I plan to control a couple solenoid vales and the on/off of my dust extractor though G-code.
For this I wrote some user macros and all is good on this point, but I would like to use a USB relay board to control the valves physically. This would ease up the wiring and speed up the implementation.
My question is is there any documentation how to integrate a USB relay board, like the Tormach USB M-Code I/O Interface Kit or any no-name board.
Thank you,
Denis
Please Log in or Create an account to join the conversation.
- InMyDarkestHour
- Offline
- User is blocked
Less
More
- Posts: 701
- Thank you received: 111
08 Oct 2018 23:43 #118567
by InMyDarkestHour
Replied by InMyDarkestHour on topic USB Relay Board to control solenoid valves and shop vac
A custom driver would need to be written to expose HAL pins. Which I guess would require some insight into how to talk to the USB relay board in question.
A second Parallel port board would be a solution that would be simpler to integrate, or connecting relays to any left over signals of your chosen interface.
A second Parallel port board would be a solution that would be simpler to integrate, or connecting relays to any left over signals of your chosen interface.
Please Log in or Create an account to join the conversation.
08 Oct 2018 23:48 #118568
by cmorley
Replied by cmorley on topic USB Relay Board to control solenoid valves and shop vac
You would need info about the software interface to the USB board.
Then you would write a driver in say C or python to talk to it.
I have written a similar idea driver for a VFD that used a serial protocol.
In this case I used a USB to serial converter.
You may be able to find software info about the Tormach USB I/O kit from looking at the Tormach source code.
Chris M
Then you would write a driver in say C or python to talk to it.
I have written a similar idea driver for a VFD that used a serial protocol.
In this case I used a USB to serial converter.
You may be able to find software info about the Tormach USB I/O kit from looking at the Tormach source code.
Chris M
Please Log in or Create an account to join the conversation.
09 Oct 2018 04:52 #118576
by silden
Replied by silden on topic USB Relay Board to control solenoid valves and shop vac
Hi Guys,
Thank you for reply.
I can use some outputs of my 7i76 to control these relays.
I only tried to avoid the long wiring for this.
Where I can find the source code of Path pilot to check how their relay board is working?
It seems that they use M64 and M65 to write some trigger to the board.
Thanks,
Denis
Thank you for reply.
I can use some outputs of my 7i76 to control these relays.
I only tried to avoid the long wiring for this.
Where I can find the source code of Path pilot to check how their relay board is working?
It seems that they use M64 and M65 to write some trigger to the board.
Thanks,
Denis
Please Log in or Create an account to join the conversation.
09 Oct 2018 14:26 #118585
by andypugh
Replied by andypugh on topic USB Relay Board to control solenoid valves and shop vac
+Tormach probably supply a HAL driver for their board, and then the G-code HAL outputs are connected to that.
It is possible that they simply use hal_input and have the relays pretend to be LEDs.
linuxcnc.org/docs/2.7/html/man/man1/hal_input.1.html
(Looking at the code I think that the manpage above has the LED directions the wrong way round)
If (and only if) the Tormach USB relay board declares itself as a USB_HID device then it would be easy to modify hal_input to work with whatever the relays actually claim to be.
It is possible that they simply use hal_input and have the relays pretend to be LEDs.
linuxcnc.org/docs/2.7/html/man/man1/hal_input.1.html
(Looking at the code I think that the manpage above has the LED directions the wrong way round)
If (and only if) the Tormach USB relay board declares itself as a USB_HID device then it would be easy to modify hal_input to work with whatever the relays actually claim to be.
Please Log in or Create an account to join the conversation.
09 Oct 2018 14:28 #118586
by andypugh
Replied by andypugh on topic USB Relay Board to control solenoid valves and shop vac
This one clames to be a HID device
www.ebay.co.uk/itm/USB-8-Channel-Relay-M...5:g:huUAAOSwp41bELKe
www.ebay.co.uk/itm/USB-8-Channel-Relay-M...5:g:huUAAOSwp41bELKe
Please Log in or Create an account to join the conversation.
Time to create page: 0.255 seconds