[SOLVED] 3-phase 400VAC interfering Arduino operation

Thread Starter

abuhafss

Joined Aug 17, 2010
307
Hi

Below is the schematic of a pretty simple and straightforward Stepper Controlling Module built around Arduino Nano.

a) A 6-pole selector switch is connected to analog pin A0. Depending upon the values of the active resistors the analog value is selected at pin A0. This value is interpreted as number of STEPS to move the stepper motor. The stepper is 3-phase, 6A, 12Nm and is installed on a power press which is several feet away from the module and the driver.

b) D6 & D8 issue direction & pulse signals to the stepper driver.

c) D2 is connected to the output of an inductive proximity sensor thru an opto coupler. When the sensor gets on, an ISR function is called to rotate the stepper. This function is a simple for() loop which is repeated for the number of STEPS interpreted by the selector switch. The sensor is installed on the power press.

d) Two push buttons are attached to D2 and D4. FWD button moves 1 step in forward (anti clockwise) direction. REV button moves 1 step in reverse (clockwise) direction. Both the buttons are also installed on the power press (green wires).

The module is working fine as programmed. However, I have noticed that the press operation interferes the module operation, though both are totally isolated. The press is operating at 3-phase 400VAC whereas, the module is powered from 220VAC. (Of course, Arduino is powered with regulated 5V). Whenever, the pedal switch of the power press is pressed; the OUTPUT of the proximity sensor gets ON for a short moment which triggers the rotation of the stepper. The LED on the sensor remains off, which shows that the sensor does not gets ON, only its output is getting some "noise". Similarly, when the pedal is released, the output of the sensor gets ON again.

I would highly appreciate if someone out there could help me with this issue.

2021-05-27.png
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
Does that GND symbol indicate correctly? i.e. Earth GND?
Is the prox shield connected correctly?
Is this a 2 wire or 3 wire prox?
 

BobaMosfet

Joined Jul 1, 2009
2,113
Hi

Below is the schematic of a pretty simple and straightforward Stepper Controlling Module built around Arduino Nano.

a) A 6-pole selector switch is connected to analog pin A0. Depending upon the values of the active resistors the analog value is selected at pin A0. This value is interpreted as number of STEPS to move the stepper motor. The stepper is 3-phase, 6A, 12Nm and is installed on a power press which is several feet away from the module and the driver.

b) D6 & D8 issue direction & pulse signals to the stepper driver.

c) D2 is connected to the output of an inductive proximity sensor thru an opto coupler. When the sensor gets on, an ISR function is called to rotate the stepper. This function is a simple for() loop which is repeated for the number of STEPS interpreted by the selector switch. The sensor is installed on the power press.

d) Two push buttons are attached to D2 and D4. FWD button moves 1 step in forward (anti clockwise) direction. REV button moves 1 step in reverse (clockwise) direction. Both the buttons are also installed on the power press (green wires).

The module is working fine as programmed. However, I have noticed that the press operation interferes the module operation, though both are totally isolated. The press is operating at 3-phase 400VAC whereas, the module is powered from 220VAC. (Of course, Arduino is powered with regulated 5V). Whenever, the pedal switch of the power press is pressed; the OUTPUT of the proximity sensor gets ON for a short moment which triggers the rotation of the stepper. The LED on the sensor remains off, which shows that the sensor does not gets ON, only its output is getting some "noise". Similarly, when the pedal is released, the output of the sensor gets ON again.

I would highly appreciate if someone out there could help me with this issue.

View attachment 240049
Use isolation.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
307
Does that GND symbol indicate correctly? i.e. Earth GND?
Is the prox shield connected correctly?
Is this a 2 wire or 3 wire prox?
The GND symbol is common negative supply between 5V (for Arduino) and 24V (for the proximity sensor).
The proximity sensor is a 3-wire NPN sensor. Brown wire of the sensor connected to +24V, Black wire to pin 2 of opto coupler and Blue wire to GND.2021-05-27.png
 
Last edited:

strantor

Joined Oct 3, 2010
6,798
Do you mean a pull-up resistor on pin #2 of the opto coupler?
no I meant a pull down resistor like the 3.9k resistors you have on D3 and D4 (the circuit showing the opto was added after i posted).

The arduino is bad about floating inputs. D2 isn't exactly floating, but the 10k pull-up resistor may be too high.
 

dendad

Joined Feb 20, 2016
4,476
Just a couple of points..
The optp coupler on the prox does not give isolation as you have the 24V and 5V 0V lines connected. As it is, the opto is just a handy way to level shift.
A floating 5V supply that is fully isolated from the 24V power may help, and add opto isolation to the stepper drive as well.
UMDC.jpg
Here is one of the boards I make. It has isolated I/O and a 24V to 5V power supply that is isolated too.
Running all the cables in shielded leads and using metal enclosures too.
Keep the analog leads short as you can, and shield them. Do not run them beside the cables that the motors use.
And a good well filtered power supply is worth it too.
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
The GND symbol is common negative supply between 5V (for Arduino) and 24V (for the proximity sensor).
The proximity sensor is a 3-wire NPN sensor. Brown wire of the sensor connected to +24V, Black wire to pin 2 of opto coupler and Blue wire to GND.
When you say GND that is not earth GND as the symbol implies? IOW the wrong symbol is used in the diagram.
Try actually making it earth GND and see if this improves it.
You normally have a star Ground point where these commons are connected including the service earth ground conductor.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
307
One other possibility ...........
High-Impedance Wiring running all over the place makes for an excellent Antenna.
A sparking Motor-Contactor within ~10-feet of this unit could wreak havok on every Input.
.
.
.
Yes, I am also convinced about the sparking Contactor. The press activates the contactor and releases it which is creating this mess.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
307
Just a couple of points..
The optp coupler on the prox does not give isolation as you have the 24V and 5V 0V lines connected. As it is, the opto is just a handy way to level shift.
A floating 5V supply that is fully isolated from the 24V power may help, and add opto isolation to the stepper drive as well.
View attachment 240053
Here is one of the boards I make. It has isolated I/O and a 24V to 5V power supply that is isolated too.
Running all the cables in shielded leads and using metal enclosures too.
Keep the analog leads short as you can, and shield them. Do not run them beside the cables that the motors use.
And a good well filtered power supply is worth it too.
The three wires of the prox-sensor are shielded.
The module, 24V SMPS, the module and the stepper driver are enclosed in metallic cabinet.
You suggested not to run the analog cables beside the motor cables. Here, which motor you are referring to? The 3-phase motor running the press or the stepper motor. The PULSE & DIRECTION wires are shielded.
Would you please elaborate "add opto isolation to the stepper drive".
 
Last edited:

Thread Starter

abuhafss

Joined Aug 17, 2010
307
One important thing, I have noticed is that the sparking contactor interferes only when the common wire of the push buttons is connected to the 5V line. When the wire is disconnected (buttons disabled) there is no disturbance.
 

Ian0

Joined Aug 7, 2020
9,814
The GND symbol is common negative supply between 5V (for Arduino) and 24V (for the proximity sensor).
The proximity sensor is a 3-wire NPN sensor. Brown wire of the sensor connected to +24V, Black wire to pin 2 of opto coupler and Blue wire to GND.View attachment 240051
If the opto input and output are connected together (pin 2 to pin 3) then it's not isolated!
All you have achieved is to put a 1k load on the sensor and set a 1.2V threshold.
I'd say, use filtering.
How is the proximity sensor connected? How have you reduced the 24V output down to 5V.
If it's just a resistive divider then a capacitor across the lower resistor might do the job.
 

Thread Starter

abuhafss

Joined Aug 17, 2010
307
If the opto input and output are connected together (pin 2 to pin 3) then it's not isolated!
All you have achieved is to put a 1k load on the sensor and set a 1.2V threshold.
I'd say, use filtering.
How is the proximity sensor connected? How have you reduced the 24V output down to 5V.
If it's just a resistive divider then a capacitor across the lower resistor might do the job.
The connections of the proximity sensor are shown in post #4.
The Brown wire to +24V.
The output BLACK wire to pin 2 of the opto coupler.
The Blue wire to GND.
When the sensor is ON the output is LOW and vice versa.
Basically, I had used the opto coupler just for level shift (24V to 5V).
 

Ian0

Joined Aug 7, 2020
9,814
The question is - Is the press interfering with the connection between sensor and circuit, or with the sensor itself? After all - it is an inductive sensor.
Is there any connection between the pedal and the nano? If so, can you program it to ignore the sensor at the point the pedal is pressed?
 

Thread Starter

abuhafss

Joined Aug 17, 2010
307
The question is - Is the press interfering with the connection between sensor and circuit, or with the sensor itself? After all - it is an inductive sensor.
Is there any connection between the pedal and the nano? If so, can you program it to ignore the sensor at the point the pedal is pressed?
The sensor is installed separately on the press, quite far from the console box containing the contactors.

The pedal is not connected to Nano.
I have mentioned earlier, the press operation is controlled separately by 3-Phase 400VAC supply.
The Nano just controls the Stepper Motor when the sensor gets ON.
In the present scenario, when the pedal activates the contactor to run the press, the opto coupler gets a false pulse when the pedal is pressed (when the contactor activates) and when the pedal is released (when the contactor deactives).
Interestingly, even if the sensor wires are removed from the circuit, still the opto coupler gets those false pulses.
 
Top