This trainer module can be used to demonstrate the Induction motors stator’s alternating magnetic fields with a compass, series test of the coils, measure the speed (in RPM) of the motor, measure the electrical parameters like voltage, current, frequency, power and power factor. All the measurements are done with the help of microcontrollers and displayed on LCDs.

### Block Diagram

Voltage and Current Meter Schematic and Breadboard View

RPM Meter( and or Frequency Meter) Schematic and Breadboard View

### Voltage and Current Measurement

Voltage Signal Pre-Processing:

The AC Voltage we want to measure is 220 V RMS, typically. Since we are planning to measure the Voltage using a Microcontroller, whose ADC can only take voltage from 0Volt to +5Volt DC, we have to convert it into that range. Hence this Voltage pre-processing circuit is needed. A step down transformer converts the 230 V AC to 12 V AC. A Voltage divider made of a 100K and a 10 K resistor, generate a one-tenth of this voltage i.e. 1.2 Volt AC RMS. This voltage signal has both Positive and Negative Halves, which cannot be given as a input to the ADC of the microcontroller. Hence the voltage level has to be shifted so as to make it all positive. Hence an OPAMP based OFFEST adding Circuit is used, which adds +5 Volt with the signal from the Voltage divider, so as to make it all positive. This signal is measured with the ADC of the microcontroller, which then calculates the AC RMS Voltage and displays it on the LCD.

The voltage and current waveforms are converted into analogue waveforms within 0V to 5V by the signal pre-processing circuits. These signals are given as Inputs to the ADC of the Microcontroller, which converts it into a digital value which can be understood by the Microcontroller. Then the microcontroller calculates the RMS voltage and current and Displays them on the LCD.

AC RMS Voltgae and Current Measurement, calibrated for 230 Volt Measurement

`Arduino Code://AC RMS Voltage and Current Measurement#include "LiquidCrystal.h"#include "EmonLib.h"             // Include Emon LibraryEnergyMonitor emon1;             // Create an instanceLiquidCrystal lcd(10, 9, 5, 6, 7, 8);void setup(){    Serial.begin(9600);  lcd.begin(20, 4);  emon1.voltage(1, 171.8, 1.7);  // Voltage: input pin, calibration, phase_shift  emon1.current(0, 17.8);       // Current: input pin, calibration.} void loop(){  emon1.calcVI(20,2000);         // Calculate all. No.of wavelengths, time-out  emon1.serialprint();           // Print out all variables   float realPower       = emon1.realPower;        //extract Real Power into variable  float apparentPower   = emon1.apparentPower;    //extract Apparent Power into variable  float powerFActor     = emon1.powerFactor;      //extract Power Factor into Variable  float supplyVoltage   = emon1.Vrms;             //extract Vrms into Variable  float Irms            = emon1.Irms;             //extract Irms into Variable   lcd.setCursor(0, 0);  lcd.print("Voltage  :");  lcd.setCursor(11, 0);  lcd.print(supplyVoltage);  //lcd.setCursor(16, 0);  lcd.print(" V  ");   lcd.setCursor(0, 2);  lcd.print("RealPower:");  lcd.setCursor(11, 2);  lcd.print(realPower);  //lcd.setCursor(16, 2);  lcd.print(" W  ");   lcd.setCursor(0, 1);  lcd.print("Current  :");  lcd.setCursor(11, 1);  lcd.print(Irms);  //lcd.setCursor(16, 1);  lcd.print(" A   ");   lcd.setCursor(0, 3);  lcd.print("PowerFactor:");  lcd.setCursor(14, 3);  lcd.print(powerFActor);   delay(1000);  }`

### Frequency Measurement

Frequency Measurement

Frequency Signal Pre-Processing:

AC frequency cannot be directly measured with a Microcontroller, as it contains both positive and negative halves. It has to be converted into a positive only square wave whose frequency is same as the input signal’s frequency. A 12Volt transformer steps down the 230 Volt ac to 12V AC. This voltage is used to drive an optocoupler MCT2E’s Internal Photodiode through a 5K resistance. A Diode is connected to bypass the reverse voltage applied across the Optoisolator. When the Optocoupler’s IR LED is forward biased, it makes the Phototransistor forward biased which generates a +5 Volt signal at its emitter. For the negative half cycle the signal at the emitter becomes 0 Volt. This creates a square wave with about 50% duty cycle at the emitter of the optocoupler. This signal is given to the Microcontroller which counts how many pulses are for a specific period of time and calculates the frequency.

`Arduino Code://Frequency Measurement#include "FreqMeasure.h"#include "LiquidCrystal.h" LiquidCrystal lcd(7, 6, 12, 11, 10, 9); void setup() {  Serial.begin(57600);  lcd.begin(8, 2);  lcd.setCursor(0, 0);  lcd.print("DITI Freq Meter");  lcd.setCursor(0, 1);  lcd.print("Freq:");  Delay(5000);  FreqMeasure.begin();} double sum=0;int count=0; void loop() {  if (FreqMeasure.available()) {    // average several reading together    sum = sum + FreqMeasure.read();    count = count + 1;    if (count > 30) {      float frequency = FreqMeasure.countToFrequency(sum / count);      lcd.setCursor(6, 1);      lcd.print(frequency);      lcd.print(" Hz");      sum = 0;      count = 0;    }  }}`

### Speed (RPM) Measurement

Motor Speed (in RPM) Measurement

`Arduino Code:// RPM Measurement#include "FreqMeasure.h"#include "LiquidCrystal.h" LiquidCrystal lcd(7, 6, 12, 11, 10, 9); void setup() {  Serial.begin(57600);  lcd.begin(16, 2);  lcd.setCursor(0, 0);  lcd.print(" DITI RPM Meter ");//  lcd.setCursor(0, 1);//  lcd.print("Speed:");  FreqMeasure.begin();} double sum=0;int count=0; void loop() {  if (FreqMeasure.available()) {    // average several reading together    sum = sum + FreqMeasure.read();    count = count + 1;    if (count > 10) {      float frequency = FreqMeasure.countToFrequency(sum / count);      float rpm=frequency*60;      lcd.setCursor(3, 1);      lcd.print("          ");      lcd.setCursor(3, 1);      lcd.print(rpm);      lcd.print(" RPM");      sum = 0;      count = 0;    }  }}`