Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stock Controller Card Connecting Limit Switches #123

Closed
rseijo opened this issue Feb 10, 2017 · 191 comments
Closed

Stock Controller Card Connecting Limit Switches #123

rseijo opened this issue Feb 10, 2017 · 191 comments

Comments

@rseijo
Copy link

rseijo commented Feb 10, 2017

Hi, I am new to CNC and GRBL. Wondering if Limit Switches can be connected to the stock controller card? if yes, does anyone have wiring and GRBL programming instructions? Using GRBL v1.1f

The card in question is the Woodpecker CNC GRBL 0.9

Thanks!
Ralph

woodpecker cnc brbl 0 9

@electrokean
Copy link

Start here: https://github.com/gnea/grbl/wiki/Wiring-Limit-Switches
Although that is a work in progress - there is also a long discussion at #96
Nothing specific to the Woodpecker though

@luben111
Copy link

@rseijo
Can you bring some more information about your board? Some links, schematics and data sheets in order to help you. Thanks

It looks like Arduino core with added dedicated connectors for stepper drivers.

@chamnit
Copy link
Contributor

chamnit commented Feb 10, 2017

Closing because this is not a bug, but feel free to continue.

@chamnit chamnit closed this as completed Feb 10, 2017
@rseijo
Copy link
Author

rseijo commented Feb 10, 2017

Thanks so much for the quick responses!!
In review of the Wiki for Wiring Limit Switches it covers Arduino Cards & Shields; not the stock board (in above image) that came with the CNC Machine. Any ideas?

Also, I have yet to locate any nomenclature, data sheets, etc. for the stock board.

@luben111
Copy link

@rseijo Until this is Arduino nano processor with Grbl you can do the following:

  • measure with multimeter and find which header pins to which pins of micro controller are connected
  • once you have this list we can figure out the correct end switches wiring

@electrokean
Copy link

Ralph, the only reference to this "stock board" you mention that I could find is one AliExpress seller:
https://www.aliexpress.com/store/product/GRBL-0-9J-USB-port-cnc-engraving-machine-control-board-3-axis-control-laser-engraving-machine/1941516_32713561151.html
This isn't really a common board, and if there is no documentation for it it will be difficult for us to assist you.

The standard grbl limit inputs are on D9 (X) D10 (Y) and D12 (Z). See https://github.com/gnea/grbl/wiki/Connecting-Grbl
There are pins on the header that seem to be labelled A0-A7 and D13 - and the diagram on the above linked page tells you what those are used for.
I can also see some with labels starting with X/Y/Z but I can't make out the labels clearly. At a guess I'd expect those to be the ones you need for the limits. Can you tell us what they say? Maybe a close up photo from front and back of PCB near that connector would help us.
If you have a multimeter, it would be possible to use that to trace out the connections from the ATmega IC to the header pins as suggested by @luben111

All that said, this board uses a CH340 USB to serial chip, and this has been known to be the cause of communication problems for many people (data loss). I would personally recommend getting a board that is more common and well documented, such as the Protoneer shield, and an Arduino Uno to plug it into. I expect those stepper drivers on the Woodpecker board follow the standard "Pololu" pinout, so you should be able to move them across to a new shield. After all the time and cost invested a CNC, you really don't want to use an unreliable and unsupported controller, even more so as a beginner.

@BlueOrangeLive
Copy link

Hello.

The external contacts are all GND.
2* Limit-X-Axis
2* Limit-Y-Axis
2* Limit-Z-Axis
A5 = Probe
A4 =
A3 = Coolant Enable
A2 = Cycle Start/Resume
A1 = Feed Hold
A0 = Reset/Aboat
A7 =
A6 =
D13 = Spindel Direction
RST
5V

Limit Switch Wiring:

From another shop's view from the back of the board:
pcb_backside

Greetings Jürgen

@luben111
Copy link

We need to know the connections between the header pins and the microcontroller.

Use a multimeter and probably a needle or pin to touch the microcontroller pins. It may take 15-20 minutes to get all connections.

@rseijo
Copy link
Author

rseijo commented Feb 11, 2017

Kean, Luben111 and Jurgen, thanks so much for the guidance and collaboration! I thought I was going to be lost on this issue.

Jurgen, I think you have cracked the code 👍 I will try the suggested setup and report my finding.

Incidentally, I order an Arduino UNO with the CNC Shield, so I have that as an alternative if this stock board does not workout,

BTW, here is a closeup image of the stock board Front.
img_3387

Thanks again!

@luben111
Copy link

@rseijo You still need to measure which pin of the header to which pin of the microcontroller is going by using simple multimeter. Set the multimeter to measure short circuit (beeps when you touch both probes). See below images describing the sequence. At the end you should get some list as:
Pin1 (Xon1) - pin XX of Atmega328
Pin3 (Xon2) - pin XX of Atmega328
Pin5 (Yon1) - pin XX of Atmega328
......
If we have this list we could draw nice diagram how to connect the limit switches.
1
2
3

@rseijo
Copy link
Author

rseijo commented Feb 12, 2017

Hi luben111, I will check that out and report back findings. It will be later today; on my way out to the grocery story :-) Thank you for the detailed instructions with images, this helps immensely!!!

@rseijo
Copy link
Author

rseijo commented Feb 13, 2017

Hi, I checked the PIN Out of the chip with the multi-meter and found that the Zen, Yen & Xen had no connection points to the Atmega328 chip. Continued checking the other pins and have identified where they reside on the chip (see below image please).

Enabled the Hard limits, boolean ($21=1) and connected a Normally Open switch on Yen. Started Candle (v1.1.7) in Jog mode moved the Y Axis, while it was moving closed the switch and the Axis stopped moving. Same results for X & Z Axis; on all 6 *en pins. Pressed Reset, Alarm appears, pressed Unlock and I am able to continue the Axis travel.

Is this the correct response and sequence to restart the travel?

cnc pinout

@luben111
Copy link

luben111 commented Feb 13, 2017

@rseijo The end switches are maybe going to some serial resistors - see image below.
cbf5e5fe-f067-11e6-9638-2d04dcadcb68

You need to find where the end switches are going, you can visually follow the wires on the PCB.

Also the enumeration of the microcontroller pin numbers is as follows (please add the pin numbers in the table where to each header pin is corresponding some controller pin).
up

Without populating the table above with some data we can't make the correct wiring,

@luben111
Copy link

BTW, if your current GRBL version is before 0.9j and you'd like to use the latest versions of GRBL you probably have to modify the PCB - the Z limit switch in latest versions is attached to different controller pin (compared to version before 0.9j). As I see the listed version is 0.9j so maybe there is no need to modify the board.

@rseijo
Copy link
Author

rseijo commented Feb 14, 2017

Hi Luben111, I posted the updated diagram above and here too.

The PIN Outs for the X, Y & Z connections are on the backside of the PCB. Added 2 close up pictures.

cnc pinout

fullsizerender

img_3399

@rseijo
Copy link
Author

rseijo commented Feb 14, 2017

With regard to GRBL version, I am using Candle v1.1.7

image

@electrokean
Copy link

OK, so it looks like

  • there are two pairs of header pins per axis wired in parallel - perfect if you want two NO switches
  • R20/R21/R22 are 100 ohm resistors in series with each limit input (for protection)
  • there are capacitors in parallel with the inputs to filter noise
  • the traces from those resistors disappear under the ATmega chip

Limit pins on the ATmega should be
Axis = Arduino pin name = AVR pin name = pin number via series resistor
X = D9 = PB1 = pin 13 via R20
Y = D10 = PB2 = pin 14 via R21
Z = D12 = PB4 = pin 16 via R22

With your multimeter you should be able to measure the 100R resistor between those header pins and ATmega pins to confirm

@luben111
Copy link

@rseijo
Now you need to make the final step and measure the connections between other end of resistors and the microcontroller as @electrokean suggested.

r

After that we'll create the proper wiring diagram for your board

@luben111
Copy link

luben111 commented Feb 14, 2017

The final wiring will be (first we need to confirm the connections - see above)
woodpecker
You can use some cable housing and crimp the wires to get more professional look (these connectors will fit straight into your header)
http://uk.farnell.com/multicomp/2226a-02/crimp-housing-1-row-2-way/dp/1593506

@rseijo
Copy link
Author

rseijo commented Feb 14, 2017

Hi Kean & Luben111,
Thanks for the continued guidance! Below is updated diagram with the PIN Locations for R20/R21/R22 on the Atmega328 chip.

Luben111, the diagram with the switches is awesome. Thanks

image

@luben111
Copy link

luben111 commented Feb 14, 2017

@rseijo
Well done! Now we have the whole puzzle:
pin 13 in TQFP32 is PB1 - goes to pin15 of DIP 28 and
pin 14 in TQFP32 in PB2 - goes to pin 16 of DIP 28
pin 16 in TQFP32 in PB4 - goes to pin 18 of DIP 28

This means that the wiring above is correct and you can use to connect the end switches.
Also this shows that you can upload GRBL v.1.1 and everything should work.

Please let us know what was the result after connecting the end switches.

BTW, the Woodpecker board is not bad at all and I'm inclined to use it in the future for small projects.

@electrokean
Copy link

electrokean commented Feb 14, 2017

@rseijo great work - if only they labelled it better, or bothered to provide documentation
@luben111 what a pity it uses a CH340

@rseijo
Copy link
Author

rseijo commented Feb 14, 2017

Luben111, Will do! Thanks for the confirmation and all your help!!

@rseijo
Copy link
Author

rseijo commented Feb 15, 2017

Guys, Complete and Total Success!
Connected the 4 NO switches (X & Y) and everything stops (travel and spindle) when a switch is triggered. Works perfectly! I need secure the wiring and then move on the next challenge; come up with a mounting bracket/place for the Y Axis switches that don't take up too much space.

I'm so grateful to your support and guidance. Best regards!

Ralph

@rseijo
Copy link
Author

rseijo commented Feb 15, 2017

Call me crazy, any suggested resources of where I can source parts to make a large CNC? 1ft x 3ft Table.

@electrokean
Copy link

That's pretty open ended - there is many types of CNC, but I'm assuming you mean a gantry style.
Also 1ft x 3ft isn't that large - maybe for a hobby user, but it is quite small for a business.
You could start with a common Chinese machine - do a search for "6090 cnc" on ebay or AliExpress
You're unlikely to get all the parts individually for much less, and there are sellers who supply the hardware without motors or electronics if you want to customise it.

@electrokean
Copy link

Also, check out cnczone.com if you haven't already - lots of build logs there.

@chamnit
Copy link
Contributor

chamnit commented Feb 15, 2017

A shapeoko 3 XL is pretty close to those dimensions.

@langwadt
Copy link

@rseijo parts are just a small part of building a cnc, but I've gotten stuff from http://www.robotdigg.com they've got tons of stuff and I think very decent prices

@Miq1
Copy link

Miq1 commented Jan 24, 2018

The Woodpecker board has already caps on the limit switch ports, as you can see from the schematic ilie321 posted some days ago.

@nickm324
Copy link

Ok thats odd then cause I am constantly getting false triggers. Any ideas why that could be?

@komradebob
Copy link

komradebob commented Jan 24, 2018 via email

@longjohn119
Copy link

Not just the stepper motors but also the stepper motor wires ..... If they are bundled together and in parallel then it can induce noise into the switch wiring. One simple trick that often helps is to twist your stepper motor wires ... Look at the photos in komradebob's post from November 9 for a good example of how to do it

@komradebob
Copy link

komradebob commented Jan 24, 2018 via email

@nickm324
Copy link

Ok, thanks for the info. I will go back and organize the wiring better and and I am no electronics whiz do you mind telling me which side to put the cap, NO or ground side?

@FixerDave
Copy link

have the same CNC (router + Laser) with the Woodpecker CNC GRBL 0.9, but the program is different (old version than Candle 1.1.7, GRBLCONTROL 0.8).
I download and instal Candle 1.1.7 but the "control manual" don´t work
Can you help me ?

Same issue... seems to be the controller board grbl version. GrblControl worked fine, until it crashed loading an NC file I wanted to run. After some futzing around, I discovered that Candle did not work but Grbl Panel did work (with one slight oddity) and did load my NC, so I'm running that (path of least resistance)

As for that oddity, the first time I connect Grbl Panel, it turns my spindle motor on... disconnect and reconnect, and everything is fine. It's consistent. Also, when I start GrblControl, it reports the Home position as when the controller board fired up. Grbl Panel reports Home as when I hit that connect button. Thus, Grbl Panel, and presumably Candle, somehow reset the control board while the old GrblControl does not. It's probably that reset that's causing the issue.

But, anyways, thanks to everyone for all the info. I've got a pile of limit switches, and I now know the connector pinout to wire them up, and that they'll likely work if I remember to set the proper gcode on the controller. "Enabled the Hard limits, boolean ($21=1) and connected a Normally Open switch..."

@donovanlaoh
Copy link

Hi All,

I'm very new to this world of cnc, but i love to make something with arduino. I bought my first cnc engraving from aliexpress : https://www.aliexpress.com/item/CNC-3018-with-ER11-Diy-mini-CNC-Laser-Engraving-Machine-3-Axis-Plastic-Acrylic-Pcb-PVC/32848631081.html?spm=a2g0s.9042311.0.0.V71Fhh

img_20180322_124037

After i received it, i try to build it and it's done successfully. But the problem start when i tried to engrave something. The machine stop working randomly with the spindle still running. I use some app like source rabbit, candle, grbl control and universal g code sender. i use the supplied g code sample ( text : "Iphone"). Sometimes it's done sometimes it's not. After one week trying to change any configuration and still randomly stop working, finally i found this thread about limiting switch with woodpecker board, related to CH340 chip that being used that caused error.

img_20180322_124048
my limit switch.

From this thread i found that using bluetooth HC-05 as serial input is the most possible option i have to bypass the CH340 chip. So i did some testing with multitester and found the line of digital pin 0 and digital pin 1. I try not to solder it directly to the chip because i'm afraid it will burn the entire Atmega328 chip. so i found another spot to solder it with safe.

img_20180322_124609 copy
Here are my woodpecker board version and RX TX pin.

My bluetooth HC-05 has been set to BAUD 115200.

img_20180322_131117 copy
Another connection pin for HC-05

After doing this modification, i connect the grbl through bluetooth COM Port, and try to send the gCode. The result is satisfying, every job is done successfully. Sometimes the machine paused about 1s, but it will continue and finish the job.

My Spec:

Macbook pro mid 2012, Windows 7 Ultimate (only for doing cnc and some window specific app.) and here are my GRBL setting. I use Candle for sending GCode. My woodpecker board has been flashed successfully with GRBL 1.1f.

2018/03/22 13:07:29 - $0=10
2018/03/22 13:07:29 - $1=25
2018/03/22 13:07:29 - $2=0
2018/03/22 13:07:29 - $3=5
2018/03/22 13:07:29 - $4=0
2018/03/22 13:07:29 - $5=0
2018/03/22 13:07:29 - $6=0
2018/03/22 13:07:29 - $10=3
2018/03/22 13:07:29 - $11=0.010
2018/03/22 13:07:29 - $12=0.002
2018/03/22 13:07:29 - $13=0
2018/03/22 13:07:29 - $20=0
2018/03/22 13:07:29 - $21=1
2018/03/22 13:07:29 - $22=1
2018/03/22 13:07:29 - $23=3
2018/03/22 13:07:29 - $24=25.000
2018/03/22 13:07:29 - $25=500.000
2018/03/22 13:07:29 - $26=250
2018/03/22 13:07:29 - $27=3.000
2018/03/22 13:07:29 - $30=1000
2018/03/22 13:07:29 - $31=5
2018/03/22 13:07:29 - $32=0
2018/03/22 13:07:29 - $100=800.000
2018/03/22 13:07:29 - $101=800.000
2018/03/22 13:07:29 - $102=800.000
2018/03/22 13:07:29 - $110=1500.000
2018/03/22 13:07:29 - $111=1500.000
2018/03/22 13:07:29 - $112=1500.000
2018/03/22 13:07:29 - $120=40.000
2018/03/22 13:07:29 - $121=40.000
2018/03/22 13:07:29 - $122=40.000
2018/03/22 13:07:29 - $130=300.000
2018/03/22 13:07:29 - $131=150.000
2018/03/22 13:07:29 - $132=44.000

I hope it will helps other that find difficulties with this Chinese Woodpecker board.

@CoolZeroNL
Copy link

CoolZeroNL commented Apr 2, 2018

ilie321 commented on 17 Jan:
https://s3.amazonaws.com/linksprite/cnc/schematic+2.pdf
--

Nice, thanks this helps alot but.
@ilie321 would you also want to share the eagle files?

@ilie321
Copy link

ilie321 commented Apr 2, 2018

I found it on Internet is not mine

@biasedlogic
Copy link

important!
This PCB has a bug: the AVCC pin of the uC is not connected to power. You need to patch it, else all signals interfacing the analogue port (PORTC) will be erratic...

@CONSULitAS
Copy link

important!
This PCB has a bug: the AVCC pin of the uC is not connected to power. You need to patch it, else all signals interfacing the analogue port (PORTC) will be erratic...

@biasedlogic
Thank you for the hint. For which reversion of the board?

There are a lot. Only a few Examples:
V 0.9 here
V 2.6 http://www.cnc-club.ru/forum/viewtopic.php?f=147&t=16449&start=20#p390328
V 2.8 http://ejs.seniejitrakai.net/2018/01/21/woodpecker-2-8-grbl-board-and-isp-connector/
V 2.9 https://de.aliexpress.com/item/GRBL-0-9J-USB-port-cnc-engraving-machine-control-board-3-axis-control-support-laser-engraving/32785635479.html
V 3.0.2 #336 (comment)

@biasedlogic
Copy link

@CONSULitAS there are many versions, but many are based off the same schematic. Since the silkscreen printed version may not be unique across board designs there's only one thing left: check your board. Two out of two i had in my hands were wired wrong

@spankywetfish
Copy link

I managed to flash my WP 3.1 to grbl 1.1f using Xloader.
After trying at 115200 which is the baud used when using Candle etc. and being unsuccessful, i changed the baud within Xloader to 57600 and it uploaded straight away.

@alexkelik
Copy link

img_20181014_150655
Need these pin routing assignment, so i can use my offline grbl controller

@Donlatch
Copy link

Regarding limit switches on the stock Woodpecker board. I don't know where to access the machine settings to enable them. I am using Candle 1.1.7 and a laptop with XP. The gui has some machine setting check boxes but I cannot access and edit the full set of machine settings.

What am I missing?

@109JB
Copy link

109JB commented Jan 24, 2019

I'm not familiar with candle, but grbl settings can be accessed using a serial monitor program? The Arduino idea has one under the tools pull down menu. From there the wiki has a lot of information regarding configuration.
https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration

@ilie321
Copy link

ilie321 commented Jan 25, 2019

@Donlatch with $$ on cadle terminal from right bottom of screen you can see grbl settings. Write there $21=1 and press send to enable hardware switches

@machv5
Copy link

machv5 commented Mar 26, 2019

Man! I often thought that i would like to be a cat, but then I wouldn't have all this crazy cool stuff to play with like cnc engravers and the like. If i was a cat i'd probably slap mice and birds around in frustration at not having opposable thumbs. Then i'd take that mouse to my human and meow this toy sucks and then claw the couch to bits while grumbling.

@dsl400
Copy link

dsl400 commented Mar 29, 2019

I have random false triggering of hard limits just by touching aluminium chassis with pull-up resistors installed.
any helping idea would be appreciated

@komradebob
Copy link

komradebob commented Mar 29, 2019 via email

@remias
Copy link

remias commented May 22, 2019

FYI >> woodpecker_3'2_schematic:
woodpecker_3'2_schematic.pdf

@raindancer2204
Copy link

Hi i have a question about the Serial Port for the Remote Controll Board plug. The photo of alexkelik showes the plug.

I want to use it with Estlcam. In the Shop ist gives at a LPT Paralleboard Adapter for Estelcam.

Is therere any posbility to connect this adapter directly to the serial remote Port?

Do we have a circuit diagram for the Woodpeaker V0.9 board seriell plug?

I want to print from estelcam directly.

Regards Raini

@ilie321
Copy link

ilie321 commented Jun 8, 2019

you can use an multimeter to see where the header pins connect and with the schematic you can easy deduce what each pin does ...
or use this woodpecker_3'2_schematic.pdf from 2 posts up if you have same version and search for OFFLINE-CONTROLLER or HEADER 4X2

@gojimmypi
Copy link

Thanks everyone for sharing all this great information! I've compiled some of the details from above along with other things I've learned into my blog: The road to limit switches, part of a multi-page series that includes designing mounting brackets, (fairly specific to the CNC3018) as well as limit switch wiring, and some firmware notes, that hopefully will be helpful to others.

Those are all my notes created while working on my CNC3018 over the course of the last few weekends:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests