Arduino Uno Failure when VSD Powers 1.5kW 3 Phase Motor

Good day

My Problem: When the VSD puts power to the motor from the Start button - my Arduino LCD goes blank and my Hall Effect Sensor is not read on the ISR for pin 2. (I assume I have EMI)

My Setup:

  1. Rotating Drum
  2. 1.5kW 400V 3 Phase Motor driven by an Allen Bradley Powerflex 525 VSD (rotates the drum).
  3. Arduino Uno (Used to count Revs and Calculate Speed)
  4. SR15C-A3 Hall Effect Sensor
  5. 16x2 LCD with PCF8754 Backpack (Crystal library installed)
  6. 5V Digital Relay with 2NO and 2NC relays (Signalled and powered from Arduino)
  7. 220VAC to 12V DC 1.3A PSU to Arduino

I have attached electrical drawings of all systems. The Arduino is configured for a Interrupt Service Routine on a falling edge (Pullup resistor 10kOhm accross SR15C VCC and Signal Out). The code has a “software” debounce in the ISR. The counter will only trigger approximately every 2.4 seconds when operational.

On the bench the hardware and software ran " as expected".

I have installed all components in a single electrical panel. When there is power on everything in the panel (including the 3phase supply to the VSD) the Arduino is functional. When the “Start” button is pressed and the VSD puts power to the motor, the said problem occurs.

Admittedly I have no active shielding or Decoupling Capacitors on anything. This may be a good start…

Here is my code:

/* Demonstration sketch for PCF8574T I2C LCD Backpack 
Uses library from https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads GNU General Public License, version 3 (GPL-3.0) */
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C  lcd(0x27,2,1,0,4,5,6,7); // 0x27 is the I2C bus address for an unmodified backpack
 
 // Variable Setup
  int Revs = 0;
  float start =0 ;       // Data Types must be the same for mathematic operations
  float elapsed = 0; 
  double Speed =0;

void setup()
{

   //Interrupt For Counting Revolutions and Speedo
attachInterrupt(digitalPinToInterrupt(2), Count, FALLING);
   start = millis();
   
  // activate LCD module
  lcd.begin (16,2); // for 16 x 2 LCD module
  lcd.setBacklightPin(3,POSITIVE);
  lcd.setBacklight(HIGH);

  // Pin Setup
  pinMode (4,OUTPUT);
  pinMode (7,OUTPUT);


}

void loop()
{

  if (Revs ==0){
    digitalWrite(7,HIGH);
  lcd.home (); // set cursor to 0,0
  lcd.print("Revs = ");
  lcd.setCursor (7,0);        // go to 1st line 8th position
  lcd.print(Revs); 
  lcd.setCursor (0,1);        // go to start of 2nd line
  lcd.print("RPM = ");
  lcd.setCursor (7,1);        // go to 2nd line 9th position
  lcd.print(Speed); 
  }

else if (Revs >=20) {
  digitalWrite (4, HIGH);
  //lcd.clear();
  lcd.home (); // set cursor to 0,0
  lcd.print("Test Complete");
  lcd.setCursor (0,1);        // go to start of 2nd line
  lcd.print("Please Reset ");  

}

else {
  digitalWrite(7, LOW);
  lcd.home (); // set cursor to 0,0
  lcd.print("Revs = ");
  lcd.setCursor (7,0);        // go to 1st line 8th position
  lcd.print(Revs); 
  lcd.setCursor (0,1);        // go to start of 2nd line
  lcd.print("RPM = ");
  lcd.setCursor (7,1);        // go to 2nd line 9th position
  lcd.print(Speed); 
  
}

  }

// Interrupt Service Routine
  void Count() {
    //++Revs;
    elapsed = millis()-start;     //Elapsed time = Instananous time now - Time from when program started
    start = millis();             //Set the variable "start" to equal the Instantaneous program time now.

     if ( elapsed > 500) {
      ++Revs;
      Speed = 60000L/elapsed; //RPM = 60 000 miliseconds divided by millisecond time per revolution
     }
    
  }

Any Suggestions on what I can do to prevent Arduino Failure or any obviously incorrect arrangements?

Thank you for your time in advance.

Cheers
Jon

Arduino.pdf (32.8 KB)

380V Sys.PNG

Admittedly I have no active shielding or Decoupling Capacitors on anything. This may be a good start…

So perhaps you now realise that such precautions are essential in a 400V motor control system.

Hi Mark

Yes one does appreciate this.

I have put a decoupling Cap (1000uF) between 5V and Gnd on Arduino.
Similarly I put a Cap(1000uF) between12v+ and 12V- on the transformer supplying the arduino.
(This alone did not make a difference)

I am busy wiring in shielding wires now for the Digital I/Os and power lines.

Do you have any recommendations?

Thanks

jon

No, those changes aren't useful, the Arduino is already decoupled on-board.

The sensor needs decoupling, and it should have a shielded cable, and you must avoid
ground loops and you must avoid running any of your circuitry anywhere near the 400V
stuff.

The input to the Arduino pin would benefit from some transient protection, standard
schottky diode protection circuit and probably 100 ohms in series to 1nF to ground to
knock down the high speed spikes would be good.

Perhaps a diagram of what you already have would be useful?

Hi Mark

I have upgraded the cables to the Shielded ones.

After having done that the LCD and Arduino worked normally for about 3 seconds when I turned on the motor. Then again the LCD went blank and Arduino seizes.

I then coded out the use of the interrupt on pin 2 in the sketch and completely disabled pin 2 to test how the system behaves while not reading in a signal. The LCD and Arduino did NOT crash this time. A stray character randomly shows on the LCD every now and then.

SO… I do believe that looking after the interference on my pin 2 is key. The protection on the input pin sounds like it could be the answer. I have attached two schematics found online. Is this what you are suggesting?

As for the random character on the LCD - I have seen that putting 4.7kOhm resistors on the SDA and SCL lines might improve comms. Would you recommend this?

Thanks for your feed back. It is greatly appreciated.

Transient Protection.PNG

Transient Protection 2.PNG

I have the same issue, but with 7.5 kW motor. I haven`t solved this problem with Arduino and I changed it to industrial controller. But I still have not leaved this idea. My plan is to rise voltage on encoder up to 24 V and use optocoupler between encoder and Arduino input.

Normally industrial encoders use differential line drivers - you need differential line receivers to read them.

For my purpose this sample code works good.

if (digitalRead(encoder0PinA) == digitalRead(encoder0PinB)) {
encoder0Pos++;
} else {
encoder0Pos--;
}

But a long wires from arduino to motor encoder + EMI make my system fail.

Does your encoder have differential line driver outputs? If not don't expect it to work with long
wires. In an industrial environment (lots of electrical noise), you cannot get away without
proper attention to signalling.

Just an update on where I am at with my issue.

I removed all DC components from the AC Panel and set up 10 meters away from the AC Panel and the motor.

My LCD screen did not go blank and displayed correctly. However, when the motor was started the Arduino froze. The only crossing AC and DC lines were the 220V AC supply to the power supply unit and the 12V DC output to the Arduino.

As a test I removed the 12V DC supply from the PSU and used my USB cable to Power Arduino and its systems. I started the motor and the Arduino worked CORRECTLY! I then walked up to the AC panel and the Arduino only froze once I placed the Arduino back into the AC panel. So a separate DC panel will be required.
I then reset the arduino and walked up to the motor and the Arduino worked correctly too.

SOOO... it would appear that the noise from the PSU is upsetting the Arduino. Here is the PSU. RS-15-12 - ENCLOSED PSU I=220 O=12 1A3 15W . It seems to be a decent spec.

I am considering a series inductor on the 12V+ line and parralel Cap between 12v+ and 12V-.

What are suggestions/ thoughts on this arrangement?

Thanks

I would be more worried about common-mode interference, but it can't help to improve the
quality of the power - a 'scope is very handy for tracking such things down.

When USB powered was the source of USB itself connected to the mains, if so was it an isolated
supply?