Control driver's power through linuxcnc

More
23 Nov 2019 16:39 #151064 by Muz94
Hi, i'm in the final stages of the build of my new 3D printer.
At the moment i directly power all the systems (power supplies, drivers ecc) when i insert the plug in the wall outlet, but that of course is not acceptable, especially on a 3d printer where a fault in the heating elements must result in immediate cut of power to avoid setting the whole building on fire.

This said, i'm here to ask you: how can i link the "machine on" state of linuxcnc to a BOB output that i can use to control a relay / contactor?
Is this the correct approach? Should i instead generate an external "machine on" signal that would drive both the contactor and linuxcnc's "machine on" internel signal?
Thank you!

Please Log in or Create an account to join the conversation.

More
23 Nov 2019 17:30 #151068 by tommylight
Linuxcnc has "amplifier enable" for exactly that.
You can link that to any physical pin, even several of them at once.
In hal it is usually as
Xena or Yena or other ena signals.

Please Log in or Create an account to join the conversation.

More
23 Nov 2019 17:58 - 23 Nov 2019 17:58 #151071 by Muz94
Ok, but how about actually cutting power to the whole system?
Can i use that signal to control a contactor? Am i sure that when the system starts that signal will be low so that the machine won't be powered before i want to?
Last edit: 23 Nov 2019 17:58 by Muz94.

Please Log in or Create an account to join the conversation.

More
23 Nov 2019 19:19 #151078 by tommylight
If using parallel port, a charge pump is a must if you want safety.
In case of Mesa boards, they will not power any output until explicitly told to.
But if using a Mesa 5i25 or 6i25 or 7i92 without a daughterboard, they start at high level on all pins as they have pull up resistors.

Please Log in or Create an account to join the conversation.

More
23 Nov 2019 23:38 #151085 by Muz94
For now i came up with this (reading a few topics on the forum).

With this circuit i should have the machine to turn on by pressing a button that bootstraps the main contactor "loop".
Now i need to figure out how to integrate the software side (and the e-stop button) so that
1- Linuxcnc is aware of the machine-on state (i think i just need to connect the output of the top - right psu to the BOB, right?)
2- Linuxcnc is aware of the e-stop state
3- Linuxcnc can trigger the emergency stop via software
4- Linuxcnc can (at least) turn off machine power (i think it is not possible to have software control on the machine-on signal in that circuit).
Attachments:

Please Log in or Create an account to join the conversation.

More
24 Nov 2019 01:03 #151087 by Leon82
The estop is usually on an input, so if you power the machine with the estop pressed it will see it thru the input.

It won't let you power up( activate charge pump /enable untill you unlatch the estop

Please Log in or Create an account to join the conversation.

More
24 Nov 2019 01:10 #151088 by tommylight
The drive enable should be wired to drive enable from PC, the e-stop should be wired to drive power if required, usually it is not except when using DC brushed servo motors. In that case there should be two limit switches at each end of any axis, the normal limit and the extreme limit that cuts the power if triggered.
Linuxcnc can do both, and in any combination.
That diagram has a huge flaw, namely once turned on, you can not turn it of without unplugging the wall socket.
The ON button should be wired to the PC so in case something is wrong with it, the machine can not be powered. From the PC there should be an enable wired to drive enable inputs, and another e-stop signal wired to a relay that can switch the power on or off.
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
24 Nov 2019 06:49 #151096 by rodw
Why not add an estop switch that switches mains power on and off? Thats how my machine is set up. A second contactor on the switch is connected to the logic circuit so an input is enabled when estop is turned on to tell Linuxcnc estop has been pressed.

NOte that in my case, I just drop mains power to the stepper drives so everything else is still enabled. I would drop power to the heating element and the drives.

Please Log in or Create an account to join the conversation.

More
24 Nov 2019 11:36 #151099 by Muz94
Where would you use the charge pump? I'm reading a few posts about that but it still isn't very clear to me.
However i'm aware of that flow on that schematic, it's just a start point where i have to add all the other stuff i've written above.

Please Log in or Create an account to join the conversation.

More
24 Nov 2019 11:39 - 24 Nov 2019 11:40 #151100 by Muz94

Why not add an estop switch that switches mains power on and off? Thats how my machine is set up. A second contactor on the switch is connected to the logic circuit so an input is enabled when estop is turned on to tell Linuxcnc estop has been pressed.

NOte that in my case, I just drop mains power to the stepper drives so everything else is still enabled. I would drop power to the heating element and the drives.

Can the software side trigger an e-stop and cut power with this setup?
My main concern is the case of the heater MOSFET locked in the close state, in that case the arduino that controls the temperature in my machine throws an alarm which causes the control to trigger the e-stop. That must cut the power
Last edit: 24 Nov 2019 11:40 by Muz94.

Please Log in or Create an account to join the conversation.

Time to create page: 0.117 seconds
Powered by Kunena Forum