Relay

relay


relays coil
The relay is actually an electromagnet, which when voltage applied to the ends of the coil attracts and retains an iron, or more properly a part of several steel parts, insulated from each other.
At the end of the movable iron part have adapted one or usually more electrical contacts, insulated from one another as well as to the electromagnet.
As the voltage across the coil exists, there is magnetism. When you stop the voltage, a spring that has meanwhile compressed is geting back the electrical contacts.


parts of one relay
relays label
If contacts are at rest, ie when there is no current in the coil of the relay the contacts is open, then when magnetized, closed and vice versa. The open marked as Normally Open (NO) and closed as Normally Close (NC).

There is great variety in the number of contacts, size and operating voltages of the coil.
There relay specially constructed to withstand more effectively in resistive (eg, resistance heating), inductive (eg motors) or capacitive load (eg compensation capacitors)


A form of relay common in industry and in control of three phase electric motors is that of photographs.
relays contact

Smal finder relays
The voltage of the coil is not usually printed on the relay label but in the body that carries the coil, which is an accessory that can be changed.
Problem dysfunction can occur after heavy use or poor choice of power or damage to load - consumption control. Usually the power contacts are those most frequently damaged.


The ends of the coil Names as A1 and A2 in the majority of manufacturers relay.


relays contact
Electronic board with relays
This relay photos marked as 5,5 KWatts relay at 24 volts AC, which means that for 400 volts three-phase network, is designed to withstand, the usual applications, three-phase motors up to 5,5 KWatts and coil built to 24 Volts alternating current (AC).
The contacts withstand current for motors 5,5 KWatts called power contacts and is three Normally Open, one for each phase.
The remaining contacts in the auxiliary relay are designed for low current and are from one to six. They also called contacts or auxiliary automation.
Usually an auxiliary NO is standard in main body of the relay, and if we want more NO or NC we must to buy separately and add them to the socket on the relay and are usually clipped





Example of OMRON CP1E PLC programming using CX - programmer



The PLC of OMRON is generally consistent with many capabilities.It has many models with many variations that cover a variety of needs.

The main method is by programming with LADDER language , computer and program CX - programmer, series programs CX - one, sold separately.

DEMO version of the software is free for download and use.

A small model is the OMRON CP1E associated with the H / PC via a single USB cable from where the example of this suspension.




Simple example program for the Omron PLC CP1E with Ladder 


The 0.00 is the word 0 bit 0 and is always input while 100.01 is bit 1 of word 100 which is always output.

In the example the logical process tells to the PLC:

((if the input I 0.00 is 1 or the input I 0.02 is 0) and the input I 0.01 is 1 then the output Q 100.01 becomes 1)

(If input I 0.03 comes 1 the output Q 100.00 becomes restraint 1 (Set))

(If input I 0.04 comes 1 the output Q 100.00 is 0 (Reset))
end of the program

Programming example of the small PLC. Siemens LOGO!

Programmable Logic Controllers from the original of which was named PLC, are electronic, primarily circuits - devices with electrical inputs and outputs. We can say that it is a relatively small force computer programmed with its own programming languages.
LOGO! from SIEMENS
There are many microcontrollers, small PLC, in trade. One of the most popular is the LOGO! from siemens.
The Telemecanique zelio of the group Schneider Electric is another, similar, popular small PLC.
It is ideal to start a familiarity with the PLC and have evolved into power and memory capacity making them ideal for many applications.
The demo of the software program called LOGO! Soft Comfort, is freely available and the only function that has cut is the communication between the PC and the hardware device LOGO! made with a special cable. With LOGO! Soft Comfort can each experiment and as he wants to plan the LOGO! in the screen of his computer at no cost.
Programming can be done from the small screen that has the LOGO! but cumbersome method.
The same data apply to zelio.

We can plan with two "languages" the microcontroller LOGO!.
In function block diagram (FBD), as shown in the example of the first image
or ladder diagram (LAD), as shown in second picture.
From the menu of LOGO! Soft Comfort can turn the program easily from one format to another
Siemens
fbd
Logo
lader program


Despite
This example shows the implementation of the following logic operation:
{
  ((If you see a trend in both input 1 and input 2)

or voltage appears at the input 3)

and pressed the up arrow of the logo

   Then it turned on the output 1.
}

The environment of LOGO! Soft Comfor has option to emulate the operation of the program, which is very useful for finding errors. From this screen modes the pictures are.

Bottom left in the images appear to be activated by clicking the mouse inputs "up arrow", I1 and I2.
With these conditions exit 1 is activated. The lamp Q1 in bottom left of the image is lit.
The blue line in the simulation indicates that it is logical 0 (no current passes) and the red line to logical 1 (current passes).

The output, depending on the model of the LOGO!, Can be activate contact relay or transistor.

For the name of the program elements used some letters and we can put comments to make it more understandable the circuit. The reviews are in fact very necessary, as an important piece of program documentation.
I come from the initial letter of the word INPUT .
B is the first letter of the word BLOCK.
To exit the letter Q is used as the O, the initial letter of the word OUTPUT is like 0 (zero) and is not used . The Q is what is more like the O so it was chosen.
The & is the symbol for logical AND.
The> = 1 is the symbol for the alternative or.

The exclamation point at the end of the word LOGO! is part of the trademark of Siemens


Wiring diagram for power circuit clockwise and counterclockwise rotation three phase motor.




The three-phase motors rotate clockwise or counterclockwise depending on the sequence of the three phases are provided.

The end of the three phases, which typically are named with English letters R, S, T, is clockwise and the motor to be connected in series with the U, V, W, will turn clockwise. But this is not always correct, because it depends on the manufacturer of the motor,  how has wrapped its coils and the "visual" of each. Besides, there is no right rotation for the motor; depends on the work that we want to achieve.

The change of direction is made in mutual permutation of two of the three phases. The plan change effect is accomplished by swapping the first to the third phase. The same effect can be rotating the second to the third or the first to the second.




A simple plan to control the rotation shown in the second drawing.
Design automation control direction three phase electric motor rotation


To avoid case to arm simultaneously two relays we put in a series on automation so-called latching contacts. Thus if one is armed relay can arm the other, even if pressing the START button, must necessarily be deactivated first reinforced by pressing the stop and then to activate the other. One relay that "latches" the other with a closed contact (normal close NC) to prevent the arm, hence the name of the contact.

This pattern of changing direction is not ideal because it requires the operator's attention to the actual stopping of the motor, wait some time before starting to reverse. Could someone, while the motor turns at once, press the stop and immediately after, without waiting at all, press the START of the other direction, bringing the motor and load abruptly and perhaps dangerous. This can be prevented by addition of another insurance provision.

Program for the siemens LOGO! : Fill control. logosoft.

Siemens
FBD chart. Click to enlarge
The program shown in the photo is for industrial machine.
Controls and rejects with the help of an external shift register, the bad products.
If there are three consecutive defects products the machine stops.
The check is for both weighing and a lack of product.


J3: Making on off the fill control
I4: Making on off of the weighing control
I6: mark the exact time to be tested .
I7: Signal for lack of product
I8: Signal from the mechanism of weight trashy product


Q2: Signal to the shift register to discard the product.

inverter circuit

inverter circuit



The three-phase motor, which is the first choice for many applications have their speed directly dependent on the frequency of the power supply.
Everywhere on earth, the frequency is determined and fixed by the provider and can not be selected
The only satisfactory way to test the speed is via inverter.

The inverter "reverses" (invert) the voltage, makes controlled AC rms and frequency.

The technique of creating alternating voltage constant, which is usually selected by the manufacturers of inverters,is the PWM (Phase Width Modulation)
The DC voltage they need is making from the alternating supply with single-phase or three-phase bridge rectifier.

The basic design operating an inverter shown.
As switches data, T1 to T6, used fast response power transistors. The diodes D1 to D6, which are free-flow passages are also fast response and is to protect the transistor.
Schneider-phase inverter

There are in-phase inverter market is small triphasic motors, three-phase inverter and intended for larger motors.
The characterization of single phase or three phase, indicating loading it, if we have a single-phase input voltage of 230 volts for Greece, or three-phase 400 volts. And also identify the maximum rms value of the output voltage can give, ie 230 volts to 400 volts single phase and three phase for.

The operating parameters of the inverter varies with the brand, the size of their power and capabilities and "passed" to memory by either the panel with the display having, or several models, through PC.
The main parameters include acceleration time (how many seconds from startup reaches the selected speed - frequency), time delay (in number of seconds the command will stop reaches the minimum allowable frequency before stopping), the minimum and maximum operating frequency , setting a maximum output current and thermal power.

Under the lid of inverter

Because of the way creating the alternating voltage, fragmentation of continuous electronic switches with large frequencies (approximately 5 to 20 KHz selected via parameter) there are unwanted harmonic frequencies as they are called, which are multiples of the frequency of fragmentation.
In motor controlled by inverter there is the disadvantage of unnecessary "movement" of these harmonic currents that generate unwanted heat pipes and can in some cases the energy waste is measurable and relatively large example in large industries.

The cable from the inverter to the motor must be grounded conductive mantle, that is, blentaz, as they say, because the frequencies of the harmonics are such as electromagnetic pulse transmitted by "parasites" in adjacent circuits and certainly not good for man .

Three-phase inverter yaskawa brand


The motor controlled by inverter must have good ventilation at low speeds because there is adequate ventilation by their own cooling fans.
If it works then at low revs must enter separate cooling fan. There are specially designed motor with higher heat dissipation surfaces specifically to be driven by inverter.

Air conditioners with inverter control the speed of the compressor motor freon according to the temperature setting and not the maximum speed of the motor, as it would be if they had the inverter, thus achieving a better result and economy.

Arduino. Programmable AVR microcontroller from ATMEL. Example programming.

The Arduino uno in version R3. 
Arduino is a small, relatively, capability, computer board with memory for program and data, digital inputs, analog inputs and outputs to 5 volt DC, or 3,3 volt DC for newer models. It has the advantage of low price compared to what it offers.

Most models have a simulation of analog output at specific pins, using the technique of PWM (Pulse-width modulation), are the outputs on the board with the symbol of the wave as the alternating current.

The Arduino due has real analog outputs.

Connected to computer and programmed via simple USB cable .

The processor of arduino is from Atmel (Advanced Technology for MEmory and Logic) which has established the Greek George Perlegas 1984 in the USA Before the foundation of working in Intel.
The AVR is a RISC architecture construction (Reduced Instruction Set Computer) processors provide high speed of execution, usually in a circle of the clock.

On the main board Arduino adapted various boards called Shields and add extras such possibility: Monitors, gsm card, ethernet, bluetooth, relay etc. The each of them has its own commands (routines). Libraries.

There is a small PLC, as the LOGO! based on Arduino, is compatible with it and called controllino. http://www.controllino.cc/

Programming is done in an integrated development environment (IDE Integrated Development Environment) based on C language and is freely available from the site http://www.arduino.cc/.

These programs are called sketch because the environment is based on the Processing language aimed at graphic designers.
The Arduino programming environment with an example.
With pinMode we set the corresponding pin as input or output because the Arduino pins can be both, of course not at the same time.

The program runs continuously until you cut the current flow rate, it is set in routine loop () from baseline ({) to the final bracket (}).

Right from the "//" put comments for program documentation

Megger. ohmmeter

Megger
The Megger is a power tool used for checking the insulation of various materials and equipment or facilities.In fact, measures the resistance in mega ohm (million ohms).It has an internal voltage generator. 
The one in photo it has 500 volts DC generator but with very little power (that's is harmless), which is achieved by turning with constant speed  the crank.
There are also with more than 500 volts but 500 volts is quite acceptable for most applications in domestic electrical installations.


The instrument has two dots at 1 and 100 mega ohm.

Left from the first dot means poor insulation
Measurement over the second dot is good insulation.
Mid term means that there is doubt about the quality of insulation.The main use of the instrument is to check the insulation in the motor.Putting the black connector on earth (earth terminal on the motor) and red alternately in the three windings an three-phase motor, we see the quality of insulation.Multimeter have also ohmmeters with voltage source for measuring ohms, usually up to 9 volts, which is why they can not show whether an insulation volts in normal operation is acceptable.
Ideal for insulation consider the infinite resistance.

The thyristor (Thyristor SCR Silicon-Controlled Rectifier)

triac 





The thyristor (SCR Silicon-Controlled Rectifier) ​​is the silicon chip with three ends. With proper polarity and electrical command can becomes  switch  controlled.

If the anode of the thyristor is positive voltage relative to the cathode and the gate "give" small continuous instantaneous current by isolated circuit to the cathode, then the anode will be current to the cathode



Once the nihilist tendency or is negative, the thyristor "cuts" and wait again positive voltage pulse and starting to turn again.
The maximum current operation, which depends on the model and the form is on the order of thousands of amperes.
Reverse withstand voltage before destroyed (the cathode), is also in the thousands of volts.
The temperature developed during operation require the existence sink for heat dissipation.

Typically thyristor (scr). A Rising is the thread.
The descent into large and small projecting portal
metal right

 Name thyristor "came" from the beginning of the name thyratron and the ending of the word transistor. The thyratron was the ancestor of the thyristor as a lamp and did the same job.


The GTO thyristor (Gate Tern Off thyristor) is the thyristors, as the name suggests, can "cut" the power if we give to give the gate reverse current


thyristor
The triac (triac) is flanked by two thyristors in the same "package" so that you can control the flow in both directions. The triac is the element used in the dimmer that control the intensity of the incandescent lamp brightness.

Multimeter: Digital test equipment for appliances

multimeter 

 One of the most useful equipment for an electrician is the multimeter.
The name "Multimeter" shows that are many instruments together in the same case.

In this photo we have:

1. Voltmeter to measure voltage in volts ac and dc to dial numbers in black-choice and switch ac - dc in proper position. Measured by the voltage present in the test circuit in parallel connection.
2. Ohmmeter and diode controller to measure resistance in ohms and voltage threshold in volts for the diode in green numbers. Measuring without voltage in the concerned circuit.
3. Frequency meter to measure frequency in Hz in white numbers. In a parallel connection.
4. Ammeter to measure current in amperes in orange numbers. Measuring under voltage connected in series in the cable that we want to measure the amps.
5. Capacitance meter to measure capacity in farad at the blue numbers. No voltage. The ends of the capacitor goes into the slots with the symbol of the capacitor. If the capacitor is electrolytic correct in the write polarity.

The black connector is permanently attached to the connector COM (From the word common). The red probe goes into the slot with the same color you choose on the rotary knob.

In position control knob channels there is also the function of "pager", in which between terminals if the resistance is less than 20 ohms the buzzer sounds

In all options the rotary switch knob shows the number of the maximum value that can measure the multimeter. E.g. position 2 volt for up to two volt, if the voltage is greater displayed is displaying 1 with a dot (1.) to notify us that the voltage is greater than 2 volts and choose the next larger scale. It is best to start for an unknown expected value measure from the widest possible choice (p, e.g. for voltage 600 volts) and descending scale if needed, so we achieve the greatest possible accuracy.

Stepper motor control with arduino via serial interface and AccelStepper library


The library for stepper motors that comes along with the development environment of arduino has several but not enough control possibilities. A good library with many control options are the AccelStepper from airspayce that can be freely downloaded from internet.

Whith AccelStepper library we can control more than one motor simultaneously from arduino. Also important characteristic is the acceleration and deceleration control .

A pilot project in operation shown in the following video.

The controller - driver and the stepper motor is from  a faulty printer.
The driver receives the inputs I01, I11 to the first (H) bridge ant the inputs I02, I2 for the second (H) bridge to control the current according to the table below.
Ampere Control via input driver.
Via the serial interface available to the arduino we give three control parameters, steps we want to move (positive or negative, left or right) maximum speed (in steps per second) that we want to catch and acceleration-deceleration (in steps per second squared).
If we give 6 or 9 numbers, separated by commas or other non-numeric character and then ENTER the motor will make in series two or three different movements, notifying us in computer screen which ones.
Not allowed negative number (or zero) to speed or acceleration so via the program we avoids this possibility.
bipolar stepper motor

The stepper motor in the video takes 200 steps to a full circle so it makes a full circle when we give to make 200 steps.

Below the control program. Anyone can copy - paste the code


// Έλεγχος bipolar stepper μοτέρ με τον οδηγό ΑΜ2170 της ΑΜtek από
// το serial interface δίνοντας 3 νούμερα:
// αριθμός βημάτων, μέγιστη ταχύτητα, επιτάχυνση(+επιβράδυνση).
// http://greekelectrician-arduino.blogspot.gr/

#include <AccelStepper.h>


// Ορισμός pin του ΑΜ2170 που συνδέονται στο arduino uno

#define I01 5
#define I11 6
#define phase1 7
#define I02 8
#define I12 9
#define phase2 10

// Ορισμός του μοτέρ και των pin που συνδέεται.

AccelStepper stepper (2,phase1,phase2); // FULL2WIRE = 2 (2 pins) στα 7 και 10

int vimata; // Από -32768 έως 32767

float taxitita; //βήματα το sec
float epitaxinsi; // βήματα το sec^2
    
void setup()
{
    Serial.begin(9600);

    //  Ορισμοί εξόδων
    pinMode(I01, OUTPUT);
    pinMode(I11, OUTPUT);
    pinMode(I02, OUTPUT);
    pinMode(I12, OUTPUT);

    //   Αρχικοποίηση  

    digitalWrite(I01, LOW);
    digitalWrite(I11, HIGH);
    digitalWrite(I02, LOW);
    digitalWrite(I12, HIGH);

    Serial.println("\nDose (+-)vimata,taxitita,epitaxinsi(ENTER)\n");
}

void loop()


  // Αν υπάρχουν διαθέσιμα νούμερα διαβασέτα:
  while (Serial.available() > 0)
  {
    // έλεγχος για τα επόμενα 3 έγκυρα νούμερα από την σειριακή είσοδο:
    vimata = Serial.parseInt();
    taxitita = Serial.parseFloat();
    epitaxinsi = Serial.parseFloat();

    taxitita = abs(taxitita); // όχι αρνητική

    epitaxinsi = abs(epitaxinsi); //όχι αρνητική
    if (taxitita == 0) taxitita = 0.1; //όχι μηδέν
    if (epitaxinsi == 0) epitaxinsi = 0.01; // όχι μηδέν

    // εμφάνιση στην οθόνη του Η/Υ

    Serial.print("vimata\t\t=\t");
    Serial.println(vimata,DEC);
    Serial.print("taxitita\t=\t");
    Serial.println(taxitita,2);
    Serial.print("epitaxinsi\t=\t");
    Serial.println(epitaxinsi,2);
      
    stepper.setMaxSpeed(taxitita);
    stepper.setAcceleration(epitaxinsi);
    stepper.move(vimata);
     
    while(stepper.distanceToGo() != 0)
    stepper.run();
     
    Serial.println("\n\nTelos kinisis\nDose (+-)vimata,taxitita,epitaxinsi(ENTER)\n");
  }
}

The stepper motor. Control with arduino and driver. Example motion program

One type of motor who is used to precisely control the position of his axis is the stepper motor.
Motor is working with direct current (DC), does not have brush and is compact construction, is resistant and economical.
We usually found in small power and dimensions like printers, scanner, solenoids, CNC machines,and elsewhere.
The name of it : "stepper" comes from the way it operates, giving DC voltage without changing its polarity a single angle step is made . A typical number is 200 steps for a full rotation.
To control the motor we necessary need driver circuitry having the necessary electronics to supply and connecting the two coils, who usually have, in the stator in the fixed portion.The coils can be in the middle of the motor , what is commonly called a rotor.
 Usually the control drivers have two separate power sources, one for the logical partition, usually in a 5 volt and one to power the motor, usually from 12 to 50 volts The control program is usually micro controller

The video shows a stepper motor controlled by arduino and dual full-bridge PWM motor driver AM2170 board of AMtek.
The motor and controller dismantled by faulty printer.


//_________________________________________________________________
// From the arduino serial monitor the control environment we delay (in msec) among the four steps.
// A negative value changes the direction.
              
// Set pin of AM2170 connected to arduino uno
#define I01 5
#define I11 6
#define phase1 7
#define I02 8
#define I12 9
#define phase2 10

int xronos = 230; //msec.
int xrono;
int peristrofi = 1;

void setup()
{
   Serial.begin(9600);

//  Outputs
    pinMode(I01, OUTPUT);
    pinMode(I11, OUTPUT);
    pinMode(I02, OUTPUT);
    pinMode(I12, OUTPUT);
    pinMode(phase1, OUTPUT);
    pinMode(phase2, OUTPUT);

//   Initialization      
     digitalWrite(I01, HIGH);
     digitalWrite(I11, HIGH);
     digitalWrite(I02, HIGH);
     digitalWrite(I12, HIGH);
     digitalWrite(phase1, LOW);
     digitalWrite(phase2, LOW);

}

void loop()
{
    if (Serial.available() > 0)
    {
  
               xronos = Serial.parseInt();
              
               if (xronos > 0)
                    {
                     Serial.println(xronos);
                     peristrofi = 1;
                     }
               else
                  if (xronos == 0) // not 0 allowed
                    {
                     xronos = 1;
                     peristrofi = 1;
                     Serial.println(xronos);
                    }
               else
                   {
                    peristrofi = -1;
                    Serial.println(xronos);
                   }                       
    }
  
    if (peristrofi==1)
    {
// The four steps of the one-way
  digitalWrite(I01,LOW);
  digitalWrite(I02,HIGH);
  digitalWrite(phase1,HIGH);
  digitalWrite(phase2,LOW);
  delay(xronos);

  digitalWrite(I01,HIGH);
  digitalWrite(I02,LOW);
  delay(xronos);

  digitalWrite(I01,LOW);
  digitalWrite(I02,HIGH);
  digitalWrite(phase1,LOW);
  digitalWrite(phase2,HIGH);
  delay(xronos);

  digitalWrite(I01,HIGH);
  digitalWrite(I02,LOW);
  delay(xronos);
    }
    else
    {
    xrono=abs(xronos);
  
// The 4 steps of other direction
    digitalWrite(I01,HIGH);
    digitalWrite(I02,LOW);
    digitalWrite(phase1,LOW);
    digitalWrite(phase2,HIGH);
    delay(xrono);

    digitalWrite(I01,LOW);
    digitalWrite(I02,HIGH);
    delay(xrono);

    digitalWrite(I01,HIGH);
    digitalWrite(I02,LOW);
    digitalWrite(phase1,HIGH);
    digitalWrite(phase2,LOW);
    delay(xrono);

    digitalWrite(I01,LOW);
    digitalWrite(I02,HIGH);
    delay(xrono);
    }
  
}