Breaking homing switches - Uh, and lot's of other stuff

How did you determine this? I’ve tested the Arduino current draw on the USB line and it’s only 50mA. USB ports typically deliver 500mA which is 10 times the current draw of the Arduino.

Actually, while monitoring the voltage on my switches. I was having brown out faults until I added external power especially with the laptop (HP G7) I could have a bad cable too, its been around a while… With external power it is rock solid @ 5v on the switch ports when they aren’t closed and connected to ground.

The “unbreakable” magnetic switches are described here:

For the Arduino power, I cut a small hole for the standard jack plug and power it externally with $5.50 power supply obtained from Altronics.

So far - no trouble whatsoever: if the code brings my machine to the wrong position - it stops and lights an LED. Naz never hit metal-to-metal (fingers crossed)
Homing is reliable within 0.5 mm (or less).
For each run, I include a “reference tap” - a 0.3 mm drilling/tapping the material at X-5 Y-5 mm. Thus, the homing accuracy can be checked with tiny angle square.

If you use an original Arduino Uno or a fully-compatible analogue board, the power source is selected automatically. The board has a MOFSET switch, NDT2955 (if I am not mistaken), which selects the external source, as soon as the jack voltage exceeds about 7.2V. Thus, no board modification is necessary as soon as your external power supply is at the nominal (my supply is 9V as measured on the open socket and written on the label).

(1) some cheap Chinese “Arduino-compatible” boards have no automatic power source selection! That’s the price we pay…
(2) unless you are absolutely sure what you are doing: never power up Arduino via 5V pin! Use the power jack or Vin pin, or you toast the on-board supplies.

The good guidance is here:

Nice! I would love to do a clock, just got the planes yesterday, but my XC will not cut a perfect circle. Im thinking i made a mistake going with the XC. Ive had it running since june and all i seam to do is adjust, check and make calls trying to get to the point your at.

Killing microcontroller power to stop a CNC is probably not a good idea. The 24V will be still applied to the GShield, and the digital lines will “source” Arduino! The current will not be enough to start the microprocessor, but may damage GShield if applied for sufficiently long period of time. See “10 Ways to Destroy an Arduino” here:

Case #1 is: the machine is unattended and reaches the limit (say wrong code or missed position). The GRBL hard limit control does a very good job of doing it right way, as the “real” industry machines do. I was thinking about the external board to kill the 24V at the power supply side (a Schmitt trigger and two solid-state relays), but after experimenting with the GRBL hardware control for a month, I believe it’s safe to rely just on GRBL.

Case #2: You are trying to achieve a safe stop in case of AC power off and then back on. For this, you need to have some kind of surge protector board with a manual reset switch (I use the $11.95 protector from Bunnings) or a UPS. The latter is way more expensive, but saves your material! This is not so for sake of X-Carve, but mainly for the power supply itself. Positively, if you have an intermittent AC, the 350W supply will not last for long…

Anyhow, the original Arduino Uno may be modified to work from the external power only. Don’t cut the wrong line. You are after USBVCC supplied from C4 via fuse F1.

The easiest way to accomplish this is to use a protoshield as I do from adafruit also makes it easy to attach everything from touch probes to limit switches etc…

  • the only thing is it is wider than the arduino so your unit will not fit in the standard case the x-carve comes with, you will have to make a new one.

Just a point - the Arduino and the gShield are not powered by the 24 volt supply.

The 24 volt supply only powers the blue LED and applies motor power to the stepper motor driver chips.

All logic on the gShield is powered from the Arduino which is powered by the USB port for a stock X-carve.

True, but look at the GShield wiring diagram!
What happens to DRV8818 if the chip Vcc (“5V” from Arduino) is at ground, and the Vs is 24V?
Ok, there are 10K resistors in-between, but I would rather prefer my components to work as per the datasheet…

In short:

  • killing 24V while Arduino supplies 5V is safe any time
  • killing Arduino 5 V while 24V is on – “conditionally safe”
  • one should take care not to keep 24V on for prolonged (hours) time.

Personally, I would have preferred that Inventables powered everything from the 24 volt supply (regulated down to 5 volts for the logic) and just have the USB provide a signal path, no power.

But, I didn’t design it. :smile:

I’ve used this board in one of my robots. Good product. As a side benefit, connecting the limit switch wires and such without soldering.

True, but you have to solder the components on the proto shield so it’s a trade off

I meant: no need to solder the gShield “data header” which looks a bit like a “post-design feature”.
Anyhow, soldering the protoShield (with some add-on components) was not difficult at all:

If you are planning to use this shield anyway, why don’t you simply solder a 7809/LM340T9 and a capacitor to it, so Arduino is powered via Vin pin? And all your worries about the Arduino power are solved, even without external power supply and the jack.

Gave me a giggle. :smile:

Although easy enough to do by splitting the connection and hooking the splitter upto the eswitch, I don’t see a reason to emergency stop the arduino and gshield as long as the spindle and steppers power is cut.

Ok, you can eliminate the power from the USB cable by disconnecting Pin 1. Leave the other pins alone, they are ground, D+, and D-. You can still operate your machine and you don’t have to change the circuit on the Arduino.

Then you can use your external power supply to kill power to the Arduino and gShield.

I haven’t tested this, but it should work.

The trick is to do a soft reset after hitting the Estop and the program stops itself in its tracks.

Ah, come on Brian. You always go for the hardware fix. :smile:

Not this time :slight_smile: not a fan of playing around and shorting the arduino; their way to fragile.

You wouldn’t even have to do that. You could put a pull down resistor on the Arduino reset line and have a 5 volt power supply hooked up to raise the pull down up to five volts. When the 5v power supply turned off by the E-stop then the pull down resistor would reset the Arduino and hold it in reset until the 5v power supply was turned back on.

[Edit] - It’s possible to do this without modifying the Arduino. You wouldn’t use a 5 volt supply, but you could do it with an appropriate external voltage source and an appropriate pull-down resistor.