With decades of electrical experience and miliseconds of programming experience I am looking to use a LEONARDO to control the cutting height of a plasma torch as the torch moves when cutting a steel plate. I am looking for help to get started programming.
Existing hardware:
Plasma cutting torch that is moved in X, Y, Z directions controlled by MACH3 software and XP Windows computer. The plasma torch is mounted on a mechanical gantry CNC plate cutting table that is used to cut plate steel. The system currently functions with manual setting of the Z position. The Z axis motor is current used to manually adjust the height of the cutting torch for best cutting results using keyboard up down keys. The Z axis has two remote inputs ( up and down) control capability that is currently not connected.
Existing control input signals for LEONARDO input:
Control input 1 - Digital output from the system to activate the automatic up and down control of the Z axis by Arduino.
Control input 2 - 0 to 5 volt DC analogue signal developed by the plasma torch as measured from ground(0 volts) to plasma torch tip. The source voltage is about 100 VDC that is divided by resistor network to
reduce the voltage to a usable 0 to 5 v.
Objective:
When the plasma torch cuts on an uneven steel surface or the plate that is being cut is not level the torch to cutting surface distance will vary that causes poor cutting quality or a collision with the steel that is being cut.
As the distance of the torch from the steel that is being cut increases the voltage between the steel and the torch will increase as the plasma will transit a greater air gap, and the voltage will decrease as this distance or air gap decreases. The optimum distance to work is about 1mm to 2 mm depending on the type and thickness of steel being cut. When the torch in not cutting the input voltage will be 0 volts and when the torch is operating and cutting at a great distance from the steel say about 5mm the voltage input will be about 4.5V.
The objective is:
When control input 1 is high/on; provide a digital "UP" output signal when the analogue input 2 voltage is below 2.4 volts to raise the torch (Z axis up) until the input 2 voltage is greater than 2.4 volts.
When control input 1 is high/on; provide a digital "DOWN" output signal when the analogue input 2 voltage is greater than 2.6 volts to lower the torch (Z axis down) until the input 2 voltage is less than 2.6 volts.
Other related
I will test and record analogue input voltage fluctuations when cutting steel under optimal cutting conditions based on a manual torch height setup when cutting a perfectly flat and level steel sample to get base line analogue input voltage for refernce. The analogue input values stated above in objective are currently somewhat arbitrary as I am not sure exactly what I will find when I test for base line input voltage and expect to adjust those values in the Arduino sketch accordingly. I will also install a poteniometer (variable resistor) on the analogue input to manually bias the torch position up or down to suit fine adjustments for cutting different types and thickness of steel.
The operation of the above plasma CNC machine without Torch Height Control can be seen at the following link:
Any help writing the Arduino sketch or referral to a similar design would be appreciated.