GRBL Optoisolator board

Discussion about the arduino based g-code interpreter, grbl
Post Reply
Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

GRBL Optoisolator board

Post by Will Winder » Tue Apr 16, 2013 1:16 am

For anyone having issues with GRBL resetting mid-job due to EMI, you might consider an optoisolator between your computer and GRBL. There is a lot of discussion about the issue in the sticky thread here, suffice to say some people have noticed too much EMI coming from their router, refrigerator, dust collector, etc... and it causes GRBL to freeze during a job.

Cvoinescu designed a circuit to optoisolate GRBL in an attempt to resolve the problem and was kind enough to provide it along with a parts list. All I did was built one, but figured others might want the information in one place.

The parts come from eBay and cost about $10-$15:
USB-to-serial with SiLabs CP2102: $3-5 on eBay
2x6N137 Optoisolators: $2-$4 eBay
USB Type A Female to USB Type B Female Adapter: $1.50 eBay
Breadboard/Perfboard - $4 at Radioshack
Resistors - $2 1x 270 ohm, 3x 470 ohm

The CP2102 board will need a new OS driver from silabs.com
To use it you will need an external power supply to power the arduino.
Follow the schematic for how to connect the optoisolarors to the arduino.

Here is the schematic (open in a new tab if you can't see the output labels on the right side):
Image

And the final product:
optoisolator_front.JPG
optoisolator_front.JPG (391.31 KiB) Viewed 2342 times
optoisolator_rear.JPG
optoisolator_rear.JPG (417.15 KiB) Viewed 2342 times
optoisolator_front_closeup.JPG
optoisolator_front_closeup.JPG (380.06 KiB) Viewed 2342 times
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

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

Re: GRBL Optoisolator board

Post by cvoinescu » Tue Apr 16, 2013 5:17 am

So I take it it works, after all? :)

By the way, the fast optocouplers I specified are overkill for GRBL at 9600 bps, but they also work fine with Marlin at 250,000 bps.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: GRBL Optoisolator board

Post by Will Winder » Tue Apr 16, 2013 11:01 am

Yeah, after powering the arduino properly everything seems to be working just right. I'm ready to finally close the door on these random resets!! :)
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

oldrayj
Posts: 93
Joined: Wed Sep 26, 2012 8:00 pm
Location: Bellbrook, Ohio
Contact:

Re: GRBL Optoisolator board

Post by oldrayj » Sun Jun 09, 2013 11:35 am

Having had a few unexplained USB glitches, I have purchased the parts to make an Optoisolator board. I see that "after powering the arduino properly, everything seems to be working just right". How did you power the board? Also, would it be acceptable to use a 9 volt Wall Wart plugged into the UNO to provide power? Thanks.

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: GRBL Optoisolator board

Post by Will Winder » Sun Jun 09, 2013 5:56 pm

I'm using a 12v wall wart which works fine. I tried using a 6v one before which turned on all the arduino's LEDs but didn't actually turn it on all the way.
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

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

Re: GRBL Optoisolator board

Post by cvoinescu » Sun Jun 09, 2013 9:19 pm

9 V is perfect: high enough to get the on-board regulator in a region where it's happy and can deal with a little droop, and low enough to dissipate only a little heat. You can probably run 12 V fans from it too, and they'd be quieter.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

oldrayj
Posts: 93
Joined: Wed Sep 26, 2012 8:00 pm
Location: Bellbrook, Ohio
Contact:

Re: GRBL Optoisolator board

Post by oldrayj » Mon Jun 10, 2013 11:22 am

Thank you both for the inputs. I think I will start with the the 9 volt and see how it works, Thanks again.

Post Reply