Sunday, June 10, 2012

Arduino CNC Motion Controllers

I have been examining projects using a gcode parser and step motor controller running on an Arduino. Here are the projects I've come across.


GRBL: ( Simen Svale Skogsrud ) This open source program has been developed to run on a basic Arduino; however, it cannot be compiled using the Arduino IDE. The code is compiled directly using the avr-gcc and downloaded or programmed into the ATmega328 ( Here is another loader ).. The development of GRBL seems very active which is a plus. Take a look at the Github site. I only wished it compiled using the Arduino IDE. For an overview of GRBL including implemented gcodes try here.


If you are interested in trying GRBL, here are some suggestions:
  1. Download the Arduino IDE. Can be used to test your Arduino board.
  2. Download WinAVR. Can be used to compile GRBL, if you wish.
  3. Download the hex file and source for GRBL from GitHub
  4. Purchase an Arduino. I would suggest the Duemilanove which can be obtained from Amazon for $20.
  5. Purchase a proto shield and wire whatever connector is needed to connect to your driver board.
Notes:
  1. Some of the older sketches, like those below, will not compile with the Arduino IDE 1.0, so also download Arduino IDE 023.
  2.  I have made sure the drivers on this blog are opto isolated, if yours is not you could do that on the proto shield.



TinyG:


The following Gcode interpreters are directly or indirectly from the RepRap project. The code below has mostly gone dormant, but the code is there to look at and play with.


Reprap_Arduino_Firmware:


Reprap_New_Firmware: ( Chris Meighan )


Reprap_New_Firmware_Arc: ( MMarz )


RSTEP: ( Reza Naima )

Still working on this post

Sunday, December 25, 2011

Torsion Box for CNC Router Table

I have been off on other workshop projects for several months, but I am now ready to get back to the CNC Router.

I have been investigating a torsion box assembly bench for general use in my shop. A torsion box provides a stable flat surface on which to assemble projects and furniture. Here are some links:

http://www.finewoodworking.com/PlansAndProjects/PlansAndProjectsArticle.aspx?id=28855

http://www.woodworkinghistory.com/glossary_torsion_box.htm

http://www.scottmorton.com/series/torsion-box-assembly-table/

http://www.google.com/search?q=torsion+box&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&um=1&ie=UTF-8&source=og&sa=N&hl=en&tab=wi&biw=1256&bih=862&tbm=isch#q=torsion+box&um=1&hl=en&client=firefox-a&sa=N&rls=org.mozilla:en-US:official&tbm=isch&fp=1&biw=1152&bih=702&cad=b&bav=on.2,or.r_gc.r_pw.,cf.osb

This last is a google image search of torsion boxes and includes some designed for CNC routers.

While I was investigating, I looked closely at the CNC router table surface that had already been built and found that it was no longer flat. The table surface is an integral part of our CNC router design providing flatness, rigidity and mass. For these reasons the table surface will be replaced by a 32" x 24" x 2.5" torsion box.

What is a torsion box? If you build a box with 6" sides, like a sand box and glue plywood skins, top and bottom, you have a torsion box. Placing the box between two saw horses and a load at the center, the top skin will try to compress and bottom stretch. As long as the spacing between sheets is held fixed the box will resist bending and its strength goes as the cube of the thickness. So we need to build a box with a grid of spacers inside, a honey comb to maintain constant thickness.

Building a torsion box is a chicken and egg problem. For the torsion box to be flat it must be built on a flat surface. So to build a flat surface you must first make a flat surface. Look at the first two links above and you can see how they solved that problem. Things are simpler for us since the surface is small; therefore, instead of jointing and planing 2x4's, I obtained three inexpensive 4ft levels from Harbor Freight for $7 each. These levels will take the place of the 2x4's and eliminate the need for a jointer and planer which I don't have.

Our torsion box will be built from MDF with the sides and core using 1/2" material and the skins 1/4" sheet.

Tuesday, May 24, 2011

StepTB6560 Step Motor Driver

Schematic


BOM: To be added.

Batchpcb:
http://www.batchpcb.com/product_info.php?products_id=50084&check=33e8b36118a8e7ceaf3179ebcbc71752

Step298 Step Motor Driver

Schematic:




BOM:
Bill of Material for Step298_04C.PCB

On 5/27/11 at 9:25:51 AM








Qty
Label-Value
Pattern
Designation(s)
Mouser










9
FR202
DIODE0.4
D1 D2 D3 D4 D5 D6 D7 D8 D9
583-FR202-B
1
220pf
cap100s
C1
80-C315C221J1G
5
.1uf
cap100s
C10 C4 C6 C7 C9
80-C320C104K1R
1
3300pf
cap100s
C2
80-C320C332J1G
1
.1uf 100v
cap100s
C3
80-C320C104K1R
1
10nf
cap100s
C5
581-SR151C103K
1
220uf 63VDC
C+400D200
C8
647-UHE1J221MPD
2
Fuseholder
Fuse3517
F1
534-3517
1
Heatsink
HS677A
HS1
677-20ABP
1
66506-001LF
XIDC10
J1
517-D2510-6002-AR
1

SIP3
JP1
517-647-01-03
3

SIP2
JP2 JP3 TP1
517-647-01-02
1

LED
LD1
638-HLMP1790
4
1R 1W
AXIAL0.5L
R1 R2 R3 R4
282-1.0-RC
3
10K
AXIAL0.3
R10 R11 R9
299-10K-RC
1
22K
AXIAL0.3
R12
299-22K-RC
1
1K
AXIAL0.3
R13
299-1k-RC
1
240R 1%
AXIAL0.25
R15
270-240-RC
1
715R 1%
AXIAL0.25
R16
270-715-RC
4
330R
AXIAL0.25
R17 R18 R19 R21
299-330-RC
3
1K
AXIAL0.25
R20 R22 R23
299-1K-RC
1
1K5
AXIAL0.25
R24
299-1.5K-RC
2
2K 1%
AXIAL0.3
R6 R7
270-2K-RC
1
2K
AXIAL0.3
R8
299-2K-RC
1
2N3904
TO-92A
T1
512-2N3904BU
3
T-Block-2
MKD2X
TB1 TB2 TB3
538-39880-0402
1
2K
TRIM2
TR1
858-67WR1KLF
1
L298N
L298
U1

1
L297
DIP20
U2

1
6N137
DIP8
U3
512-6N137
1
HCPL2630
DIP8
U4
512-HCPL-2630/31
1
LM317HV
TO-220V
U5
LM317HVT Digikey
1
IC Socket 20p

U2S
517-4820-3004-CP
2
IC Socket 8p

U3S,U4S
517-4808-3004-CP



Batchpcb:
http://www.batchpcb.com/product_info.php?products_id=46128&check=d1866a6ff4033116953019e09b4f316c


Sunday, April 24, 2011

Table for CNC Router

I decided that I needed a table on which to both assemble and run the CNC router and which incorporates a heavy stable top made of MDF. The table design is based on Scott's router table shown on this site, http://www.scottmoore.net/projects/router/index.html. The construction uses Kreg pocket screws and glued joints and is made of Poplar. Adjustable feet are incorporated for leveling the table and, possibly, retractable casters. Since Scott's site shows construction details, only a few photos will be shown for this project with an explanation of any differences.

The table height is 37 1/2" with a top surface 24" by 32" by 1 1/2". The home stores carry 1 1/2" square Poplar cut to 36" which was used for the legs.  The top is made from two pieces of MDF glued together with wood glue. A trowel was used to spread the glue in a thin layer and clamps and heavy weights used during bonding.

The construction sequence is as follows:

  1. Glue and screw all joints
  2. Make two side assemblies as shown in the first picture.
  3. Add the four cross members to one of the side assemblies, picture 2.
  4. With the base upside down use a doweling jig to drill 7/16 holes in the leg bases, picture 3.
  5. Screw threaded inserts ( McMaster 92105A415, 5/16-18) in leg bases.
  6. Add levelers (McMaster 23015T62)
  7. Turn base right side up and attach top. Note pocket screw holes in first picture for this purpose.

Poplar is soft enough that care must be taken using Kreg screws, so set the torque on the drill to prevent screw tear-out.

Side Assembly
Adding side pieces
Drilling holes for 5/16 threaded insert for levelers using Harbor Freight doweling jig.
Assembled table
Table with CNC Router base end pieces.

Wednesday, April 20, 2011

SLA7078 Step Motor Driver

A step motor driver using the SLA7078MPR has several advantages over one using the SLA7062M: one, a newer design, two,seems to be more available with a price of $12ea or $8 per ten, three, SLA7078 series has built in sense resistors and,four, the PR version has built in protection circuits.

The design shown below has two version: with and without opto isolation. An idle delay feature has been incorporated which places the motor in half power mode when idle for 10 seconds. This driver does not set motor current by a selection of sense resistors as with the SLA7062 driver. With that driver the reference voltage was fixed, such that a .5 ohm resistor gave 1 amp motor current, so three .5 ohm resistors in parallel gave 3 amps. In the SLA7078 the sense resistors are located in the chip and current settings are adjusted using the trimmer pot. To set the current, a multimeter is attached to the reference signal, JC1 in schematic above, and the trimmer adjusted to a voltage given in the SLA7078 datasheet.

The delay feature uses a 74HCT4538 retriggerable oneshot. A circuit using a LMC555 was investigated which would probably work, but the board space required is about the same as with the 4538 even though only half the 4538 package is used. The circuit works as follows: as long as step signals are arriving, the oneshot stays triggered and the motor stays at full power, but when the step pulses stop, 10 seconds later the motor switches to half power. The first step after a delay should immediately switch the motor to full power. Whether this switching is fast enough will be determined during testing of the prototype driver.

Stepit 4A: Driver using SLA7078MPR with delay

Schematic:


BOM:


Bill of Material for C:\PCB PIC\SLAgm_04C.PCB


On 4/28/11 at 12:18:18 AM








Count
Label-Value
Pattern
Designation(s)
Mouser










1
330uf 50V
C+400D200
C1
647-UHE1H331MPD
1
47uf
C+200D80H31
C2
647-UHE1E470MDD
4
.1uf
cap100
C3 C4 C5 C7
80-C320C104K1R
1
47uf 50V
C+200D100H31
C6
647-UPW1E470MDD
1
15uf tant
cap100
C8

581-TAP156K016SCS
1

DIP6
DS1

774-2063ST
1

XIDC10
J1
517-D2510-6002-AR
2

SIP2
JC1 JP1
517-647-01-02
1

SIP3
JP2
517-647-01-03
4
10K
AXIAL0.25
R1 R5 R6 R8
299-10K-RC
1
4k7
AXIAL0.25
R2
299-4.7k-RC
1
1M
AXIAL0.25
R3
299-1M-RC
3
1K
AXIAL0.25
R4 R7 R9
299-1K-RC
1
10K
SIP8
RN1
265-10K-RC
2
BC327
TO-92A
T1 T2
512-BC32740BU
1
BC547
TO-92A
T3
512-BC547CBU
1

TB508A_2
TB1
538-39880-0402
2

TB508-3
TB2 TB3
538-39880-0403
1
1K
TRIM2
TR1

858-67WR1KLF
1
SLA7078MPR
SLA7078
U1

1
74HCT4538
DIP16
U2

595-CD74HCT4538E
1

DIP16 Socket


517-4816-3004-CP


Next will be the schematic and BOM for the opto-isolated version, Stepit 4

Stepit 4: Driver using SLA7078MPR with opto-isolation, regulator and delay

Schematic:

BOM:
Bill of Material for C:\PCB PIC\SLAgm_05A.PCB


On 4/30/11 at 2:23:09 PM








Count
Label-Value
Pattern
Designation(s)
Mouser










1
330uf 50V
C+400D200
C1
647-UHE1H331MPD
6
.1uf
cap100
C10 C4 C5 C6 C8 C9
80-C320C104K1R
1
47uf
C+200D80H31
C2
647-UHE1E470MDD
1
47uf 50V
C+200D100H31
C3
647-UPW1E470MDD
1
15uf
cap100
C7

581-TAP156K016SCS
1
FR202
DIODE0.35
D1
583-FR202-B
1

DIP6
DS1

774-2063ST
2
Fuse Holder
Fuse3517
F1
534-3517
1
Socket IDC 10p
XIDC10
J1
517-D2510-6002-AR
2

SIP2
JC1 JP1
517-647-01-02
1

SIP3
JP2
517-647-01-03
1
HLMP1790
LED
LD1
638-HLMP1790
1
240R 1%
AXIAL0.25
R1
270-240-RC
1
1M
AXIAL0.25
R10
299-1M-RC
5
1K
AXIAL0.25
R11 R12 R6 R7 R9
299-1K-RC
4
10K
AXIAL0.25
R13 R14 R15 R16
299-10K-RC
1
720R 1%
AXIAL0.25
R2
270-720-RC
3
330R
AXIAL0.25
R3 R4 R5
299-330-RC
1
4K7
AXIAL0.25
R8
299-4.7K-RC
1
10K
SIP8
RN1
265-10K-RC
2
BC327
TO-92A
T1 T2
512-BC32740BU
1
BC547
TO-92A
T3
512-BC547CBU
1

TB508A_2
TB1
538-39880-0402
2

TB508-3
TB2 TB3
538-39880-0403
1
1K
TRIM2
TR1

858-67WR1KLF
1
SLA7078MPR
SLA7078
U1

1
74HCT4538
DIP16
U2

595-CD74HCT4538E
1
6N137
DIP8
U3
512-6N137
1
HCPL2631
DIP8
U4
512-HCPL-2630/31
1
LM317HV
TO-220V
U5
LM317HVT Digikey
2
IC Socket 8p

U3S U4S
517-4808-3004-CP
1
IC Socket 16p

U2S
517-4816-3004-CP