CNC Torch Table Z Height Control

From Open Source Ecology
Jump to navigation Jump to search

Os manthc zaxis.png


Automatic capacitive sensing version of CNC Torch Table Height Controller

This is the automatic height levelling version based on the new TorchHeightCTRL_V.02 pcb. (All Sources on GitHub: [[1]])


Warning: The phoenix-contact powersupply connector has NOT the same configuration than the connector of the same type on RAMPS-boards !!!

Dont use the plug of a powersupply that was previously configured for use with a RAMPS-board and has 2 x 12V. The TorchHeightCTRL_V02 board has 1 x 5V and 1 x 12V and will be blown immedately if you give 12V to the 5V line !!!

Os THC02 wiringb.png



Firmware

Arduino-Code on Github:[[2]]

Manual adjustable version of CNC Torch Table Height Controller

This is a simple POC-version that allows a manual adjustment of the Z height by turning a jog wheel (see demonstration video on youtube: [3]). The wheel can be 3d-printed [4] and is connected to a rotary encoder of type KY-040.


- demonstration video on youtube: [5]


Design Rationale

With this rig it should be possible to manually operate the torch table height by following its slowly moving and regulate the height personally. This can be useful even if in the full version there is a capacitive sensor doing automatically that task, but one may use it then for setting the starting height or use it in other applications where a frequent manual control is an appreciated option.

The rotary encoder gives up to 20 pulses per revolution to an Arduino-Mega, which translates it into a number of motor steps and triggers these by a TB6600-based stepper-driver. A RAMPS 1.4 may act as a connection layer on top of the Arduino, but can also be omitted. We will show here which pins to wire on the Arduino and on the Ramps as well.

The firmware consist only of a few lines of Arduino-code, which makes it easy to extend and modify.

BOM

Quantity Part Supplier
1 Arduino Mega 2560 [6] or under Linux the CHG340-version: [7]
1 Ramps 1.4 [8]
1 TB6600 stepper driver [9]
1 KY-040 Rotary Encoder [10]
1 Power-Supply [11]
1 Stepper Motor 17HS19-2004S, Nema17, with 2A and 59Ncm holding torque [12]
1 5-pole DuPont connector breadbord-ribbon-cable, male2male [13]
1 5-pole DuPont connector breadbord-ribbon-cable, female2female [14]

Wiring

There are 3 kind of connections:

- Power-supply to Ramps/Arduino

- Rotary Encoder to Ramps/Arduino

- TB6600 to Ramps/Arduino




Power-supply to Ramps/Arduino

1. Ramps: Connect a 12V/5A-Line to the MSTBA4-Port an the Ramps, by using a phoenix-contact plug. This will provide power for Motor as well as board-power for the Arduino-Mega.

2. Arduino standalone: The Arduino musst be supplied with 5V to 12V. This can be done by the USB-connection to a desktop-pc or by a standard wall-wart ac/dc-adaptor (5V, 2A) for the Mega.


RotaryEncoder to Ramps/Arduino

The KY-040 RotaryEncoder has 5 Lines: GND, +5V, SW, DT, CLK. Connect these either to the AUX2 port of the Ramps, or directly to the corresponding digital I/O ports on the Arduino-Mega.

GND --> GND

5V --> 5V

SW --> D44

DT --> D42

CLK --> D40

TB6600 to Ramps/Arduino, Motor and Power

The TB6600 stepepr driverhas three phoenix contact like connectors,

- one 6-pin to the Ramps

- one 4-pin to the motor

- one 2 pin to power-supply


The 6-pin connector has the lines ENA-, ENA+, DIR-, DIR+, PUL-, PUL+.

Make a bridge between ENA- and DIR-, together with a second bridge from DIR- to PUL-. The PUL- contains a second cable which goes towards GND on the Ramps Extruder E0 port. So in total there are 4 wires going either to the Ramps or directly to the Arduino-Mega:

1. Ramps:

ENA+ --> EN

DIR+ --> DIR

PUL+ --> STEP

PUL- --> GND


2. Arduino-Mega:

ENA+ --> D24

DIR+ --> D28

PUL+ --> D26

PUL- --> GND




The 4-pin connector has the lines A+, A-, B+, B-.

In the case of a bipolar stepper motor with 4 wires two of them are the ends of one coil. Connect them like this:



An example for a tested Nema17-stepper with 2A and 59Ncm holding torque is the 17HS19-2004S, see [15], [16].



The 2-pin connector has the lines 12V+, 12V-.

Connect these to a power-supply which can deliver at least 5A. The TB6600 stepper driver is rated for up to 4A and 9-36V DC. That means you can instead of 12V also connect 24V or more towards it.

Firmware

Arduino-Code on Github: [17]