will1384's Shapeoko 2

will1384
Posts: 80
Joined: Sat Nov 23, 2013 5:48 am

Re: will1384's Shapeoko 2

Post by will1384 » Fri Jan 24, 2014 8:53 pm

I was under the impression that the limit switches on the Arduino Uno were wired the same was as the C10 breakout board, with the C10 breakout board all I had to do was ground the pin for limit switches, and there is an image in the Wiki that seems to shows just that:

http://www.shapeoko.com/wiki/index.php/Home_switches

but when I did some Google searching it looks like this might be incorrect, so I made up a limit switch wiring diagram showing what I think might be the correct way ?

Image

If this is correct I will use 1K Ohm Resistors.


Any help would be appreciated.

UPDATE: 02-062014

I made a better version of the Limit Switch wiring diagram, and used 330 Ohm resistors.

Image
Last edited by will1384 on Thu Feb 06, 2014 6:24 am, edited 1 time in total.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: will1384's Shapeoko 2

Post by cvoinescu » Fri Jan 24, 2014 9:16 pm

It looks correct to me. The resistors are optional, but I personally strongly recommend them, with a value between, say, 270 ohm and 1 Kohm. The Arduino inputs already have built-in pull-ups, but they're a couple orders of magnitude weaker. The lower the resistor, the more noise immunity, but also the larger the current and the worse the bouncing of the switch contact. However, limit switches are debounced very effectively in software, so there's no real downside in choosing a very low resistor value.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

MeanderBolt
Posts: 560
Joined: Mon Nov 04, 2013 6:45 pm
Location: Georgia
Contact:

Re: will1384's Shapeoko 2

Post by MeanderBolt » Fri Jan 24, 2014 9:34 pm

Please do not take this as gospel, but when I am using an Arduino for actual Arduino projects not cnc related, it is recommended to use 10k in button type situations.

So your diagram looks like the pins are seeing high and when the buttons close, it is pulled low, is this correct?
Shapeoko 2 # 3569 - DW660
Current tool chain > Draftsight > CamBam > ChiliPeppr
Build log

will1384
Posts: 80
Joined: Sat Nov 23, 2013 5:48 am

Re: will1384's Shapeoko 2

Post by will1384 » Fri Jan 24, 2014 10:34 pm

MeanderBolt wrote:Please do not take this as gospel, but when I am using an Arduino for actual Arduino projects not cnc related, it is recommended to use 10k in button type situations.

So your diagram looks like the pins are seeing high and when the buttons close, it is pulled low, is this correct?

Yes, the pins have 5v then they are pulled low when the switch closes, should that be reversed, with it low until the switch closes ?

Like this

Image

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: will1384's Shapeoko 2

Post by cvoinescu » Fri Jan 24, 2014 10:41 pm

will1384 wrote:Yes, the pins have 5v then they are pulled low when the switch closes, should that be reversed, with it low until the switch closes ?
No, you had them right the first time. GRBL expects pins to be normally high, and pulled low when a limit switch is activated.
MeanderBolt wrote:when I am using an Arduino for actual Arduino projects not cnc related, it is recommended to use 10k in button type situations.
That's because 10 kohm is plenty in a normal, less noisy environment with short wires. There's no gain from reducing it further and draining extra current when the button is pressed. However, with the Arduino connected to stepper motor drivers, an extremely noisy universal motor nearby (the typical spindle), and long wires, you want a much stiffer pull-up -- that's why I go for 330 ohm. Actually, I go for 330 ohm and wiring the NC contact to VCC, but connecting two switches together gets a tad more complicated. :)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

will1384
Posts: 80
Joined: Sat Nov 23, 2013 5:48 am

Re: will1384's Shapeoko 2

Post by will1384 » Fri Jan 24, 2014 10:56 pm

cvoinescu wrote:
will1384 wrote:Yes, the pins have 5v then they are pulled low when the switch closes, should that be reversed, with it low until the switch closes ?
No, you had them right the first time. GRBL expects pins to be normally high, and pulled low when a limit switch is activated.
MeanderBolt wrote:when I am using an Arduino for actual Arduino projects not cnc related, it is recommended to use 10k in button type situations.
That's because 10 kohm is plenty in a normal, less noisy environment with short wires. There's no gain from reducing it further and draining extra current when the button is pressed. However, with the Arduino connected to stepper motor drivers, an extremely noisy universal motor nearby (the typical spindle), and long wires, you want a much stiffer pull-up -- that's why I go for 330 ohm. Actually, I go for 330 ohm and wiring the NC contact to VCC, but connecting two switches together gets a tad more complicated. :)

Thanks

I never had any limit switch problems on my old CNC Router, but I did have a few times were the CNC Router went crazy and moved in random directions at random times during use, it turned out to be a USB hub that was to close to the stepper motor wires.

I guess I will try the 330 ohm resistors then, thanks.

Gadgetman!
Posts: 1061
Joined: Sun Aug 25, 2013 12:44 pm
Location: Norway
Contact:

Re: will1384's Shapeoko 2

Post by Gadgetman! » Fri Jan 24, 2014 11:22 pm

A good idea is to mark switches with 'NC' for 'Normally Connected' or 'NO' for 'Normally Open' to describe if they're open or closed when not activated.
Weird guy...
Shapeoko 2014F: 1000mm X/Y, 300W Quiet Cut spindle, Arduino Uno/G-shield and GRBL 0.9i
15x30 drag chains, custom spindle mount, 9mm belts, 8mm endplates, 6mm motor plates.

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: will1384's Shapeoko 2

Post by cvoinescu » Sat Jan 25, 2014 12:00 am

Gadgetman! wrote:'NC' for 'Normally Connected'
Sorry, but I have to nitpick (or I won't sleep well). NC stands for Normally Closed, not Normally Connected.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

will1384
Posts: 80
Joined: Sat Nov 23, 2013 5:48 am

Re: will1384's Shapeoko 2

Post by will1384 » Sat Jan 25, 2014 5:14 am

I got my Shapeoko 2 today :D

Image

Here are some images with the office table tops installed onto the CNC table.

Image

Its not perfect, I had to leave a little gap between the table tops, but it is flatter than plywood.

Image

I used an old computer monitor swing arm to mount the CNC control box to the table, the blue part is a cutting board, I had lost the part that attached to the computer monitor so I replaced it with a cutting board.

Image

You can see my vacuum setup.

Image

Tapping the Makerslide, I used some pieces cut from an old cutting board to keep the Makerslide safe from getting scratched, and used a Metric hand tap guide to help keep the tap straight.

WillAdams
Posts: 8608
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: will1384's Shapeoko 2

Post by WillAdams » Sat Jan 25, 2014 1:25 pm

great start!

Very nice tapping setup --- looking forward to seeing the end result!
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

Post Reply