Saturday, 12 October 2019

Rexon RDM150 ESTOP Retrofit

Summary
In a prior blog, minor repair work was undertaken on a Rexon drill press, model RDM 150D. The drill press came with only the standard run stop switch, no other safety or features. This blog follows the design, build and fitting of an emergency stop controller to the drill press.


Requirements
The requirements for the emergency stop controller were not strict; provide an emergency stop button on the front of the drill press. The stop action would be performed utilising a suitably rated contactor to interrupt the motor. The second feature (option) was to monitor rotation of the spindle to identify belt slippage or spindle stall whilst drilling. In the event of an error the contactor could be used to interrupt the motor.


Original Electrical Wiring
Shown below is a representation of the original electrical wiring for the RDM 150D. The main components shown in the diagram are the run stop switch and induction motor.


Rexon RDM150D Electrical
Rexon RDM150D Electrical
Electrical Wiring Update - Stage 1
The updated electrical wiring is shown below. The changes in the design consist of a circuit breaker, contactor, ESTOP button and controller. As the ESTOP controller and contactor operate from a supply voltage of 24VDC, a suitable AC to DC switch mode power supply is shown in the updated electrical wiring.


Rexon RDM150D Stage 1 Electrical
Rexon RDM150D Stage 1 Electrical
ESTOP Enclosure and Switch
With a clearer picture of the electrical hardware required the electrical enclosures were selected due to limited space. This was especially relevant to the emergency stop button. The switch chosen was from manufacturer EAO, model 84-5041.2B20, with double poles, normally closed contacts and internal LED. The short solder tail pins on the rear of the switch cater were ideal for shallow depth mounting enclosures.
EAO ESTOP Switch
EAO ESTOP Switch
To house the emergency stop switch, a wall mounted enclosure was utilised.


Wall Mount Enclosure
Wall Mount Enclosure


Controller Housing
Two DIN rail devices were required in the updated design, a contactor and an AC DC switch mode power supply. Staying with the DIN rail theme, a DIN rail enclosure was chosen from the Taiwanese manufacturer Dinkle. With all the hardware features required for the controller, an enclosure with 4 sets of 3 way connectors was selected. A similar to Dinkle part is DMEN-T3.


Dinkle DIN Rail Mount Enclosure
Dinkle DIN Rail Mount Enclosure
DIN Rail Electrical Enclosure
To contain items such as the circuit breaker, contactor, switch mode power supply, emergency stop controller and the sundry electrical wiring, a small plastic electrical enclosure was chosen. Supplier ABB manufacture a Europa series of enclosures which are suitable for holding DIN rail equipment. ABB Part number 1SL0880A00. This enclosure does not come with DIN rail and needed to be fitted.


ABB Enclosure
ABB Enclosure
Controller Hardware Design
To perform the operation of controlling the contactor (coil), based on the position of the emergency stop button, a dedicated controller would not usually be required. Series connection of the emergency stop buttons normally closed contacts with the contactor coil would suffice. The updated design does however provide a few other options for expandability so a controller was required.

microcontroller (Cypress PSoC) based solution was implemented in this project. This device was chosen because the internal FPGA could be used to monitor the two emergency stop inputs and activate both of the output drivers responsible for driving the contactor 24V and 0V rails, with the need for very little firmware. Certainly a code free design was not an essential feature nor intended however, using the microcontroller FPGA allowed for quicker implementation.


Hardware Features
As mentioned in the Hardware Design section, separate hardware drivers were used to drive the contactor supply rails of 24V and 0V. Displayed below is a portion of the schematic, with the two FET based switches used for driving the contactor coil.


Driver 0V
Driver 0V
Driver 24V
Driver 24V
The inputs to the controller were designed to convert the external 24V to the internal 5V level used. A voltage divider, with Zener protection, was used to limit the maximum voltage. Two separate inputs were used for the emergency stop contacts.


Controller Inputs
Controller Inputs
Four controller inputs were mapped to the micontrontroller, two for the emergency stop and two for the spindle stall detection option.


Controller Inputs to PSoC
Controller Inputs to PSoC

The emergency stop button contained an LED which was used to feedback the the switch state. Control of the LED was achieved using a single discrete driver as shown below.
LED Driver
LED Driver
Mapping of the inputs and outputs to the microcontroller was performed after the IDE (PSoC Creator) project was successfully generated. Shown in the capture below is the resulting connections to the PSoC.


PSoC IO Connections
PSoC IO Connections
Lastly was the 5VDC power supply for the boards logic devices which included the PSoC and the output driver for the 0V.


Power Supply - 5VDC
Power Supply - 5VDC
PSoC Pin Mapping
Mapping of the PSoC pins using PSoC Creator to generate the application was made concurrently with drafting the schematic.


PSoC Pin Mapping
PSoC Pin Mapping
The capture above was taken from the PSoC Creator project which illustrates the various connections made to the microcontroller.

Below is a capture of the page responsible for monitoring of the inputs from emergency stop switch contacts, driving the contactor to switch off the drill press motor and controlling the emergency stop switch LED.


Emergency Stop Inputs and Outputs
Emergency Stop Inputs and Outputs
The logic shown in the above capture was separated into three parts. Firstly the two glitch filter components provide debounce for the emergency stop switch.


Emergency Stop Switch Glitch Filter
Emergency Stop Switch Glitch Filter
Second were two outputs for driving the contactor FET switches for 24V and 0V.

Lastly were a pair of PWM components with slightly different timing to create the breathing effect for driving the LED.


PWM1 Configuration for Breathing LED
PWM1 Configuration for Breathing LED
PWM2 Configuration for Breathing LED
PWM2 Configuration for Breathing LED
Also included in the project was a tick timer, UART component for debugging, two inputs used for future options and a status LED.


Miscellaneous Project Items
Miscellaneous Project Items
With an application generated from PSoC Creator and a schematic, the controller PCB design was started.


PCB Shape
To determine the shape of the PCB a quick check of the controller enclosure datasheet was performed. The Dinkle datasheet did provide an elaborate design for the PCB shape however the more important spacing for the terminal blocks was also shown.


Dinkle Suggested PCB Layout
Dinkle Suggested PCB Layout
Using a physical Dinkle enclosure and the suggested layout from the data sheet, a PCB shape was finalised.


Control PCB Dimensions
Control PCB Dimensions
PCB Layout
The PCB components were placed with the microcontroller, power supply and switching FET's well separated from each other. Placement of the four 3-way connectors, representing the terminal blocks on the Dinkle enclosure, were made according to the Dinkle suggested layout.


Control PCB Parts Placement
Control PCB Parts Placement
A four layer PCB was used for routing the control board. Two external signal layers and two internal planes. One of the internal planes was solely used for 0V and the second was segmented into planelets for the various power supplies.

The capture below shows the top layer route concentrating on high current paths and breaking out connections from the microcontroller.


Control PCB Top Layer Route
Control PCB Top Layer Route
In the following capture the bottom layer input and output routes are shown.


Control PCB Bottom Layer Route
Control PCB Bottom Layer Route
The capture below shows the two internal planes, 0V to the top and power to the bottom.
Control PCB 0V Plane
Control PCB 0V Plane
Note that the power plane is split into four planelets. One section was for the input supply, a second for powering ESTOP devices, a third for 5V to power logic devices and a digital 5V required only by the microcontroller.


Control PCB Power Plane
PCB Manufacture
The control PCB was manufactured by Chinese board house 3PCB (PCBWay). During the ordering process the surface finish was selected as lead free tin with an option to use gold plating (ENIG). As shown below the PCB received was gold plated.


Control PCB Unpopulated
Control PCB Unpopulated
PCB Population
As is usually performed with a new prototype PCB, sections of the design were loaded then tested in stages. For the control PCB the 5V power supply was populated then tested. This was followed by the high low switches and lastly the microcontroller. The capture shows the mostly populated PCB during testing.


Control PCB Populated
Control PCB Populated
Controller Testing
For testing of the contactor driver outputs, a control register called Control_ESTOP was configured in code which enabled the contactor driver outputs. Toggling the contactor state was possible by toggling the emergency stop button. The code below shows a portion of the code to setup the micro and drive the control register.

/**
* @brief Initialise PSoC Components and ISR
*/
void Init_Components(void)
{
    Status_LED_Write(true);
    LED_PWM1_Start();
    LED_PWM2_Start();
    isr_SysTick_StartEx(isr_SysTick_Handler);
    UART_Start();
}

/**
* @brief Send firmware version to UART
*/
void UART_Print_Ver(void) 
{
    char buf[20] = {0};                 /* Init used vars */
    sprintf(buf, "%s%d%d%d", "Drill Press v" , ver_maj, ver_min, ver_build);  
    UART_UartPutString(buf);            /* Output UART buffer */
    UART_UartPutCRLF(0);
}

/**
* @brief Setup and configure micro
*/
int main(void)
{
    CyGlobalIntEnable;                  /* Enable global interrupts. */
    Init_Components();
    UART_Print_Ver();
    Control_ESTOP_Write(0x1);   /* ESTOP output follows ESTOP button */
    for(;;)
    {

    }
}

ESTOP Housing
Mounting of the ESTOP button was made utilising a wall mount enclosure which, served as the base to attach against the chassis of the drill press.


Mounted ESTOP Button
Mounted ESTOP Button
A double insulated multicore cable (3 pair) was used to connect the mounted button to the ESTOP controller.

ESTOP LED and Contactor
With the necessary switch contacts and LED connections made to the controller, the firmware was loaded into the controller using PSoC Creator. With the ESTOP button in the deactivated position, the LED was always illuminated. In the activated position, the LED pulsed between on and off. A short video of the LED cycling is shown below.



The contactor was connected to the controller and bench tested with the ESTOP switch to verify operation.


Contactor Connection
Contactor Connection
Control of the ESTOP contactor can be visualised with a Wavedrom timing diagram as displayed below. The diagram illustrates the dependency of the contactor and LED on the PSoC operating and executing code. In the diagram the initial state of the ESTOP switch is in the released position. Changing position of the ESTOP switch causes the contactor to de-energise and the LED to begin the PWM operation. Returning the switch to the original position restores the contactor and LED to energised and non-PWM states respectively.
ESTOP Controller Stage 1 Timing


Mounting Electrical
Mounting the electrical components in the ABB enclosure was performed using a DIN rail. This was fitted inside the enclosure and fixed with bolts to a steel flat bar (2mm) on the rear of the enclosure. Additional tapped holes were provided on the flat bar to facilitate mounting to the body of the drill press.

Mounted Electrical Hardware
Mounted Electrical Hardware
The existing electrical cabling was temporarily removed to facilitate removal of the drill press motor.


Drill Press Electrical Disconnection
Drill Press Electrical Disconnection
With the motor belt disconnected and the fixing bolts removed, the drill press motor was removed.


Drill Press Motor Removal
Drill Press Motor Removal
To access the body of the drill press frame the motor mounting plate was removed.
Drill Press Motor Mounting Plate
Drill Press Motor Mounting Plate
Two small bolts were used to attach the steel flat bar against the chassis of the drill press.


Enclosure Mounting Bar
Enclosure Mounting Bar
The motor mounting plate was replaced and drill press motor mounted back onto the plate.

There were some changes to electrical wiring on the drill press, primarily because a miniature circuit breaker was added to the design. This meant that the mains power entered the new electrical enclosure first. Shown below is the wired enclosure.
Wired Drill Press Electrical Enclosure
Wired Drill Press Electrical Enclosure
Mounting ESTOP
To mount the ESTOP button the existing plate showing spindle speeds vs power line frequency was removed.


Drill Press Plate
Drill Press Plate
Two holes were tapped into the drill press to hold the enclosure, then the button was wired and tested.


Wired ESTOP  Button
Wired ESTOP Button
Finalising
To secure the cable between the ESTOP button and the electrical enclosure a metal clip was added.


Drill Press ESTOP Cabling
Drill Press ESTOP Cabling
Finally the cover for the electrical enclosure was fitted in place.


Electrical Enclosure Lid Fitted
Electrical Enclosure Lid Fitted
Downloads
ESTOP Module Schematics
ESTOP Module Schematics
ESTOP Controller Gerber
ESTOP Controller Gerber

PSoC Creator 4.2 ESTOP Controller Project
PSoC Creator 4.2 ESTOP Controller Project


Updates
16/11/2024    Corrected link to PSoC code


No comments:

Post a Comment