charge pump
-
This is where my limited testing and knowledge is revealed; that would require you to ensure the first switch stays triggered for the whole remaining 20cm, and it would still do a hard stop when this switch is met (maybe the motion planner will take the next move into account?) , this is why I'm saying "get someone who knows what they're talking about to chime in"
Edit: on the printers with low mass and some flex in the belts, its a non issue. Higher mass and ball screws changes that "a tad".
Edit2: does not seem to be much if any difference in using two endstops, the first seems to come to a full stop while the acceleration/jerk settings are observered for the next and slower move towards the last endstop.
-
Using a charge pump fed by a software-controlled pin can indeed been a good safety system. However, embedded processors such as those used the Duet have watchdog timers. Any situation in which a charge pump would signal failure would also be handled by the watchdog timer, except for sudden catastrophic failure of the processor. The processors used in the Duet WiFi/Ethernet and Duet 3 have backup watchdog timers too, and we use both watchdogs in the firmware.
It's different when using single board computers to control safety systems, because they generally do not include watchdog timer hardware.
Nevertheless, I am prepared to add a charge pump output facility to the firmware if it would add significant safety.
-
@bearer said in charge pump:
, the first seems to come to a full stop while the acceleration/jerk settings are
does not work like that ... you are in "unknown position" so you have no clue when you need to start decelerating, you just hit a switch out of nowhere and you need to stop, and you are moving 200kg for e.g. .. you need 5cm to stop all that .. or 10, or 20 .. unless if you are moving slow, and if you need to move few meters that will be too slow.. again for normal CNC work that's irrelevant as you do it by hand but for automatic homing it will not work ...
as for "make sure it's triggered" .. most limit switches on cnc machines work like that the are triggered while axis pass "trough" them
-
@dc42 I never had an issue with ARM that system failed and WD did not reboot it but I did have issues with dspic and pic32mx where kaboom happens and wd continues to reset... also never had bit toggle on ARM and seen bit toggle on 16bit pic's, but I believe that's just due to many more years and more projects I used one compared to other..
now, with regards to charge pump, it's a serious question how many installation will use this feature vs what's required (in your time and in resources on the mcu) .. If I'm the only one using it and you need to spend weeks to implement and test it... not worth it .. if whole bunch of ppl see that as useful and/or if it's 10min implementation .. I'd love to have it
-
@dc42 said in charge pump:
watchdog timers
potential scenario
- 3 kW heater is on (will be very often)
- EMI kills the SAM (neither are SAM's known to be super reliable nor there's some excessive EMI protection on the duet board) in the way that pin controlling heater is on (again possible)
- there is no watchdog to reset SAM, SAM is dead
- the heater burns the house down
Now look at it from CP perspective
- EMI kills the SAM in the way that pin controlling heater is on
- CP signal is lost (remains high or low) as the code is not running any more
- CP "safety check" circuit kills power to the whole system
Now, since my "safety board" will be pulling temp info using secondary probes this will not happen even without CP but I think the point is rather clear.
-
@smece said in charge pump:
my idea is to use 2 limit switches per side + homing sensor one side of each axis, so you run fairly fast till you hit first switch (~20cm from the edge) then you run slow till you home to optic or piezo
thats what i was referring to, the additional switch will with the current firmware and
G1 H1
moves will still come to a hard stop before continuing the next motion even if the next motion it is in the same direction as the one that just stopped. So another solution will be needed, which was the whole point I was trying to make.normally the soft limits will take care of it, and you can override the unkown state to jog manually but odds are that one time, it'll register two clicks/taps/detens/whatnot and move just that little further than you had planned just a tad to fast. it seems convenient to have soft stops, homing switches that can over travel and hard/e-stops for a machine of a given size - which, as far as i know, is not currently possible. which may or may not be a factor given the initial safety concern.
-
As far as EMI for the Duet goes, the intention is to rely on external housing for this, where you would also terminate shielded wires as the board does not have pins for shields on each i/o.
-
@smece said in charge pump:
@dc42 said in charge pump:
watchdog timers
potential scenario
- 3 kW heater is on (will be very often)
- EMI kills the SAM (neither are SAM's known to be super reliable nor there's some excessive EMI protection on the duet board) in the way that pin controlling heater is on (again possible)
- there is no watchdog to reset SAM, SAM is dead
- the heater burns the house down
Now look at it from CP perspective
- EMI kills the SAM in the way that pin controlling heater is on
- CP signal is lost (remains high or low) as the code is not running any more
- CP "safety check" circuit kills power to the whole system
Now, since my "safety board" will be pulling temp info using secondary probes this will not happen even without CP but I think the point is rather clear.
Yes, that is the "sudden catastrophic failure" of the MCU that I mentioned.
What output frequency would be suitable? 500Hz perhaps?
-
@dc42 said in charge pump:
500Hz perhaps?
https://www.geckodrive.com/support/step-drives/g540-initial-setup-guide.html
The G540 will not come out of FAULT mode unless there is a charge pump (watchdog timer) signal present. The charge pump sends a 10kHz signal to the G540 on pin 16, and must be enabled for the indicator LED to come out of FAULT mode.
I do recall reading elsewhere it was less picky and 5-50kHz should be fine given a 50% duty cycle. (Edit: I have one of those to test with btw)
-
I am also coming from the CNC world, using charge pumps to trigger the main power relay which switches the incoming threephase power, and also the servo drive enables are implemented as chargepumps. In my case the chargepump circuits are usually the simplest possible ones consisting of a transistor, resistor, capacitor and diode.
500Hz would be plenty. Easy to adjust RC time constants to the frequency at hand, but too low makes reaction time sluggish and makes the circuit susceptible for AC line noise.
I would prefer a line toggling when the main processing loop has verified that all subtasks are running fine over a subtask that simply puts out a squarewave, even if this means an irregular frequency and dutycycle. With a preemptive RTOS two tasks can be in deadlock while the chargepump task still keeps running, an undesirable situation. -
@bearer said in charge pump:
G1 H1 moves will still come to a hard stop
I was not thinking about it too much TBH but if we have variables in gcode something like
- move 10cm
- test switch1
- if triggered goto 5
- goto 1.
- G1 H1 to switch2 at crawl speed
now, as I mentioned before, never used variables in gcode nor have a clue if something like that will be possible... time will tell .. also never made this big cnc's with auto-homing so..
but even with "hard stop", the system will "try to stop", it will of course not stop and will go trough the stop, the idea is to not hit a hard limit (end of rail) but the only force is on the motor and spindle ..
@dc42 how does the G0H# move handles endstop now? the move start by accelerating, so we have ramp up part of the trapezoid, and then endstop is triggered, do you ramp down or you just stop stepping ?
-
@dc42 said in charge pump:
500Hz perhaps
for me 500Hz is enough, dunno how "standard" it is, most of the CP signals I dealt in the past are around 10kHz and below 50% DC but it's really a super simple "receiver" circuit so 500Hz is more then ok for me.. maybe someone else interested in functionality can chime in too
-
@bearer said in charge pump:
The G540 will
bunch of drivers that use CP for enable use that "around 10kHz" signal. mach3 is for e.g. pushing 12.5kHz iirc, linuxCNC also something around 12kHz.. need to check datasheet for these xinje drivers I use, attm I don't use enable signal on them at all..
now, I myself, plan to use this signal on my own "security board" so I'll read whatever is there, 500Hz is plenty .. the only important thing is consistency .. as in order to have "simple" reader the frequency and duty cycle need to be somehow consistent as the "reader" is just charging a capacitor .. and it is hard to size the input resistor and bleader resistor if the DC and freq. span too much
-
@dc42 btw, I'm still very far from this machine, the mechanics and base electronics (encoders, drivers..) should be done around september 2020, and then I need to add "brains" to it .. I asked about charge pump "now" 'cause I was sending some pcb's to china to be made and shipped here before prc ny so I noticed duet has no charge pump..
-
@smece said in charge pump:
it is hard to size the input resistor and bleader resistor if the DC and freq. span too much
How soon after the signal stops do you want to shutdown?
-
@zapta I'm targeting "under 1sec", that's why 500Hz is for me enough... but maybe someone want to use that signal as enable for drivers or for some other standardize equipment and 500Hz is maybe not enough for them, hence I mentioned that others should chime in if interested.. for me personally and the way I will be using it, 100Hz or more is enough.
-
@smece, < 1sec sounds reasonable. This is to detect that something is wrong with the duet and it's can't be trusted. However, in most cases, the duet itself will detect and signal the error, so you may want to have a fast path for that signal and immediate shutdown (e.g. if heater behavior diverge from PID model).
Another option is to leave a few of these around the printer http://www.afofireballs.com/
-
@zapta the "full story" is tad complex but there will be a small house dedicated to my "dirty hobbies" and that's all in the renovating phase attm so there will be a fire suppression system built in with small burstable capsules and the whole chabang there .. so no need for the afo balls .. they are interesting for smaller printers in enclosure.. this external safety board is just another layer of security, there always need to be more layers, wrt CP this is just in case MCU meltdown (which is rather rare, and in my experience does not happens to ARM's at all )
-
As said before, too low a frequency is not desirable; a charge pump circuit should not react to AC line frequencies, you want teh CP line frequency at least a couple of octaves above that so one can separate it with the 6dB/oct rolloff of a single RC.
@zapta: Love those AFO fireballs, thanks for the tip. I think I buy a few of them and put them inside my machines and above the workbench.
-
@DaBit, this is the European competitor. More expensive and potentially better quality(?). http://www.elidefire.eu.com/en/the-product