Welcome! Log In Create A New Profile

Advanced

RAMPS1.4 stop

Posted by cozmicray 
RAMPS1.4 stop
January 23, 2014 12:30PM
How to get "stop motor" and "Emergency STOP" buttons to work

Arduino mega 2560 RAMPS 1.4 Repetier firmware Repetier host SW

Can I wire in a Hardware "Emergency STOP"?

Tnx
Re: RAMPS1.4 stop
January 24, 2014 03:21AM
There is no hardware emergency stop support in RAMPS.

That's one of the things we've added in RAMPS-FD, but it's not quite ready for end users.
Re: RAMPS1.4 stop
January 24, 2014 08:52AM
And how about the "kill" button you can find at the Gadgets3D LCD?
In configuration.h you can find the Kill pin assignment.
Re: RAMPS1.4 stop
January 24, 2014 01:21PM
So where do I hook up the KILL BUTTON and how do I configure it in Firmware/software?

confused smiley
Re: RAMPS1.4 stop
January 24, 2014 08:00PM
I thought the ramps reset was the kill button.
Re: RAMPS1.4 stop
January 25, 2014 12:46AM
The options you have for RAMPS are:

1. Wire up the reset button. This will stop things but the Arduino will reboot. If whatever is talking to it keeps sending data AFTER you reboot, it might move/do stuff again. It's not really a proper Emergency stop, but it suffices for basic things.

2. Any software-based Emergency Stop will be slower than a hardware-based Emergency Stop, as you're waiting on the software to get around to noticing you've hit the stop button. Also if the software goes haywire, how well it works is unpredictable (if it works at all).

3. If you're using external drivers, you can break the "Enable" line to the motors (eg: with a a multi-pole switch and a bunch of resistors) so the steppers are disabled when you hit the switch. This is not the simplest thing to do and you'd want to be fairly good with electronics or know someone who is to help you. You could technically also do it with with the on-board drivers, but you need to cut a lot of tracks and run a lot of wires away from the board to your cut-off circuit.

Basically RAMPS was only designed for running 3D printers, and was not designed with an Emergency stop (hardware or software) in mind. There are ways to hack this sort of thing in, but it's complicated and you need to know what you're doing.
Re: RAMPS1.4 stop
January 25, 2014 01:53PM
Duh
So someone would use a RAMPS without plug in drivers???

Wouldn't this require the breaking of 4 driver enable pins
4 pole double throw switch??

What about disabling of heaters

I am resigned to the fact that RAMPS just doesn't support a STOP function

Just like you can't flush the commands built up

Hey coders and electronic hackers out there come up with a fix.


Quote
Cefiar

3. If you're using external drivers, you can break the "Enable" line to the motors (eg: with a a multi-pole switch and a bunch of resistors) so the steppers are disabled when you hit the switch. This is not the simplest thing to do and you'd want to be fairly good with electronics or know someone who is to help you. You could technically also do it with with the on-board drivers, but you need to cut a lot of tracks and run a lot of wires away from the board to your cut-off circuit.
Re: RAMPS1.4 stop
January 26, 2014 12:24AM
FWIW: RAMPS-FD (which isn't quite yet ready) DOES support proper Emergency Stop, and it does this by disabling the motors AND all the heaters too.

Note: Those using RAMPS with external stepper drivers are doing so they don't have to make up the heater mosfet circuits or the thermistor stuff (which apart from housing the stepper drivers, is pretty much all RAMPS does).
Re: RAMPS1.4 stop
January 26, 2014 02:35AM
Ok so if you want to stop motor and heaters. Wouldn't a switch to the power supply acomplish this? Or is there more to this kill switch, that I'm missing?
Re: RAMPS1.4 stop
January 26, 2014 03:27AM
Yes a PSU switch will do this, but you need to make sure that the switch you use is capable. Most of the cheaper E-Stop switches are not really designed for either high current DC or mains AC.

You really want to kill the DC side of the PSU (completely disconnect it), as the PSU will take a small time to shut down if you disconnect the AC side. If you're using RAMPS, you at least could put it on the 5A only side (motors and hot end), so you only have 5A to contend with. If you want to disconnect both the motors, hot end and the heated bed, you need to worry about 16A.

The main issue is that with large currents, the switch may actually fuse shut if you try and open it with lots of current going through it. The "arc" as it tries to disconnect gets hot enough to melt the plastic or even the metal of the contacts, rendering the switch damaged in some way. If it's damaged but permanently open, it's safe but annoying if you have to replace the fuse every 3-4 uses (example numbers only). If it ends up fused shut, then it's not doing it's job.
Re: RAMPS1.4 stop
January 26, 2014 09:18AM
Quote
cozmicray
I am resigned to the fact that RAMPS just doesn't support a STOP function

Just like you can't flush the commands built up

Hey coders and electronic hackers out there come up with a fix.

I am with you in that, having watched several times while the printer tries to beat itself up. The other thing that bugs me is that if the printer is waiting for a set temperature, I can't even monitor the temperature.

In RAMPS-FD I introduced the EMS hardware feature, which allows an external kill switch which also works if the firmware is stuck in a loop, unlike a soft kill button. This EMS stop feature is not a complete safety solution, as you would need to cut mains power in that case. However, it does lead the way to some self-protection, for example, a hardware overtemperature trip, or some stepper drivers now have a Fault output. If the controller continues running then you can get a reason why it stopped. Killing the mains is ultimately safe, but leaves you wondering exactly what fault occurred.

The second part of the puzzle is getting the firmware to respond to stop requests from the host. The RepRap "Gcode protocol" is poorly designed from that point of view, and most firmwares are poorly implemented with "busy wait" architecture. So to fix that requires changes to host software, the Gcode protocol, and firmwares. There are couple of firmwares that have implemented some ad hoc solutions (a bit hacky IMO), but most software is using the legacy method.

I have a simple proposal for the Gcode protocol, which is simply that the firmware sends "BUSY" when it is busy and cannot process a command! The host must retry commands at suitable intervals, which is a relatively straightforward change. Firmware must change so that it never blocks on a command (or other operation), and is always able to accept a new command (such as STOP, or non-blocking commands like read temps), and will reply BUSY if the new command cannot be actioned (e.g. move queue is full).

Changing the firmware is the hardest part, as the busy wait is so ingrained in the architecture. There are some simple hacks to implement a Kill function, but a more general solution requires reviewing the whole architecture. At least RepRapPro are committed to eliminating the busy wait in their new Duet firmware, but it seems they still have some issues with firmware hanging.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS1.4 stop
January 26, 2014 11:24AM
Quote
Cefiar
Yes a PSU switch will do this, but you need to make sure that the switch you use is capable. Most of the cheaper E-Stop switches are not really designed for either high current DC or mains AC.

You really want to kill the DC side of the PSU (completely disconnect it), as the PSU will take a small time to shut down if you disconnect the AC side. If you're using RAMPS, you at least could put it on the 5A only side (motors and hot end), so you only have 5A to contend with. If you want to disconnect both the motors, hot end and the heated bed, you need to worry about 16A.

The main issue is that with large currents, the switch may actually fuse shut if you try and open it with lots of current going through it. The "arc" as it tries to disconnect gets hot enough to melt the plastic or even the metal of the contacts, rendering the switch damaged in some way. If it's damaged but permanently open, it's safe but annoying if you have to replace the fuse every 3-4 uses (example numbers only). If it ends up fused shut, then it's not doing it's job.


With that argument, i should be fearful of every switch i own. I have a power switch on my mains, correctly rated of course, and yes there is a short delay in shutdown, but i don't need a big red button, that says push me incase of disaster, i know my machine, i know where the switch is, and if something happens, i know how to use it. There are plenty of properly rated big red switches that would work.

I agree a kill switch is needed, but over complicating it only leads to more problems for those who don't understand how it works(internally), and most likely a long rewrite of the software.
Re: RAMPS1.4 stop
January 27, 2014 01:01AM
Quote
cat.farmer
Quote
Cefiar
Yes a PSU switch will do this, but you need to make sure that the switch you use is capable. Most of the cheaper E-Stop switches are not really designed for either high current DC or mains AC.

You really want to kill the DC side of the PSU (completely disconnect it), as the PSU will take a small time to shut down if you disconnect the AC side. If you're using RAMPS, you at least could put it on the 5A only side (motors and hot end), so you only have 5A to contend with. If you want to disconnect both the motors, hot end and the heated bed, you need to worry about 16A.

The main issue is that with large currents, the switch may actually fuse shut if you try and open it with lots of current going through it. The "arc" as it tries to disconnect gets hot enough to melt the plastic or even the metal of the contacts, rendering the switch damaged in some way. If it's damaged but permanently open, it's safe but annoying if you have to replace the fuse every 3-4 uses (example numbers only). If it ends up fused shut, then it's not doing it's job.

With that argument, i should be fearful of every switch i own. I have a power switch on my mains, correctly rated of course, and yes there is a short delay in shutdown, but i don't need a big red button, that says push me incase of disaster, i know my machine, i know where the switch is, and if something happens, i know how to use it. There are plenty of properly rated big red switches that would work.

I agree a kill switch is needed, but over complicating it only leads to more problems for those who don't understand how it works(internally), and most likely a long rewrite of the software.

Most of the AC side switches out there on PSU's are fine. They're rated for the job they've been given. That said, they don't disconnect the DC side, and without AC power a PSU can run into the sub-seconds, depending on the power it can pull. That said, if you put in a sub-par switch in their place, it can fail. You need the right switches for the job.

When you start doing things on the DC side, with people wiring in whatever they like, then you could end up with below-par switches handling much higher current than they're supposed to.

I just had a case where a laser cutter had a small keyswitch and an E-Stop switch on the AC side of the power supply. The keyswitch on the machine has now fused in the ON position as it was NOT rated for the voltage/current that it was being used for, and really the E-Stop isn't either. And that wiring was the way it came from the factory in China.

Basically it comes down to: If you or the supplier cuts corners to save costs and use stuff that isn't rated for the voltage/current that it's expected to carry, you're more likely to have problems. We see this every day here in the forum, from people using RAMPS with 24V for heated beds (where the PTC fuse is only rated to 16V), to bad connectors on boards arcing and getting hot (that are rated to 8A and carrying 10A+).

Many people know what they're doing, and either live with the consequences, or know the risks if they choose a sub-par component. There is however quite a lot who don't know anything about electronics, and don't have the knowledge or judgement to make the right decisions.

Edited 1 time(s). Last edit at 01/27/2014 01:03AM by Cefiar.
Re: RAMPS1.4 stop
January 27, 2014 01:33PM
I completely Agree with you, but there is no cure for stupid. I deal with subpar components all the time. Cap’s mostly, the Chinese are very good at putting in under rated or just rated components that fail over a short time. but then as consumers we buy their products, because they are cheaper, and they are cheaper because of the subpar components. We the consumer just needs to be aware of this, as most are, and we tend to accept the risk, or at the very least ignore it, to save money. Our greed is just as bad as theirs, IMO.

Ok back to the thread..

I guess I don't understand (assuming that everything is rated correctly) why a mains switch wouldn't work for this. I get that there is a +or- second delay after killing power, but I would much rather have my PS shut down as part of the Kill switch (ok that can be software enabled too) then to just shut down the motors and heaters. I am more worried about my PS catching fire than any other part of my printer. Why? Because I bought a Chinese PS or is that POS..LOL though a kill switch won't put a fire out either. The idea of making it more complicated for the average user with more wires and switches and configuration, just does not make sense to me, when a simple switch would do the job. I can only imagine the amount of posts that will get answered "did you check and configure the kill switch?"

A software solution would be more elegant, but then we are asking the coders to do a fairly hefty rewrite, to put that interrupt in there that will need to be monitored constantly by the processor, which is being pushed pretty hard now.
Re: RAMPS1.4 stop
January 27, 2014 02:37PM
Some firmwares already support a kill button, so that cat is out of the bag. Of course, if it is an interrupt, it does not need to be constantly monitored. That part doesn't require a rewrite, or a heavy CPU load.

If you are happy using mains switch, then go ahead smiling smiley

I don't that will prevent other people trying to improve things though. Turning off the mains to halt a print is somewhat excessive, when all you want to do is cancel the current print job. Same thing as a 2d printer, you should be able to cancel without drastic measures.

There is more to it than just a kill function, improving self protection for unattended operation, better responsiveness are useful goals.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: RAMPS1.4 stop
January 27, 2014 06:23PM
Ok i see your point.. i was thinking of that emergency, when something goes horribly wrong, and the print is ruined anyway.
I had to laugh a little, i am a printer guy, i have over 3000 printers i over see for my work, your 2d analogy was a little close to home, or maybe i need to talk to our printer vender to see if they can add a kill button...
Re: RAMPS1.4 stop
January 27, 2014 07:03PM
My Ramps1.4 set up with my Ordbot Hadron Marlin and Repitier host
Responds to "stop motor" by stopping the motors when it can get a command in
and responds to Emergency stop by issuing a reset

None of these work on another printer using RAMPS1.4 and Repetier firmware and R-H software

Is there a fix in Repetier Firmware I should be fixing?

confused smiley
Re: RAMPS1.4 stop
March 03, 2018 12:35PM
If you are running a firmware with WATCHDOG, you can wire a momentary switch in parallel with one of your thermistors. A press of the button shorts the thermistor, which halts ALL functions of the printer until a RESET is performed.
Attachments:
open | download - 20180303_103205.jpg (608.6 KB)
Re: RAMPS1.4 stop
March 04, 2018 03:49AM
The thread is from 2014 winking smiley grinning smiley
Re: RAMPS1.4 stop
March 30, 2018 05:38PM
Thats right, but how to interpret the drawn ???


H.
Re: RAMPS1.4 stop
March 30, 2018 06:27PM
Sorry, I couldn't resist...




Proud owner and maker of build from scratch FDM 3D printer [forums.reprap.org]
Sorry, only registered users may post in this forum.

Click here to login