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.





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:
  1. //AC RMS Voltage and Current Measurement
  2. #include "LiquidCrystal.h"
  3. #include "EmonLib.h" // Include Emon Library
  4. EnergyMonitor emon1; // Create an instance
  5. LiquidCrystal lcd(10, 9, 5, 6, 7, 8);
  6. void setup()
  7. {
  8. Serial.begin(9600);
  9. lcd.begin(20, 4);
  10. emon1.voltage(1, 171.8, 1.7); // Voltage: input pin, calibration, phase_shift
  11. emon1.current(0, 17.8); // Current: input pin, calibration.
  12. }
  13.  
  14. void loop()
  15. {
  16. emon1.calcVI(20,2000); // Calculate all. No.of wavelengths, time-out
  17. emon1.serialprint(); // Print out all variables
  18.  
  19. float realPower = emon1.realPower; //extract Real Power into variable
  20. float apparentPower = emon1.apparentPower; //extract Apparent Power into variable
  21. float powerFActor = emon1.powerFactor; //extract Power Factor into Variable
  22. float supplyVoltage = emon1.Vrms; //extract Vrms into Variable
  23. float Irms = emon1.Irms; //extract Irms into Variable
  24.  
  25. lcd.setCursor(0, 0);
  26. lcd.print("Voltage :");
  27. lcd.setCursor(11, 0);
  28. lcd.print(supplyVoltage);
  29. //lcd.setCursor(16, 0);
  30. lcd.print(" V ");
  31.  
  32. lcd.setCursor(0, 2);
  33. lcd.print("RealPower:");
  34. lcd.setCursor(11, 2);
  35. lcd.print(realPower);
  36. //lcd.setCursor(16, 2);
  37. lcd.print(" W ");
  38.  
  39. lcd.setCursor(0, 1);
  40. lcd.print("Current :");
  41. lcd.setCursor(11, 1);
  42. lcd.print(Irms);
  43. //lcd.setCursor(16, 1);
  44. lcd.print(" A ");
  45.  
  46. lcd.setCursor(0, 3);
  47. lcd.print("PowerFactor:");
  48. lcd.setCursor(14, 3);
  49. lcd.print(powerFActor);
  50.  
  51. delay(1000);
  52. }

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:
  1. //Frequency Measurement
  2. #include "FreqMeasure.h"
  3. #include "LiquidCrystal.h"
  4.  
  5. LiquidCrystal lcd(7, 6, 12, 11, 10, 9);
  6.  
  7. void setup() {
  8. Serial.begin(57600);
  9. lcd.begin(8, 2);
  10. lcd.setCursor(0, 0);
  11. lcd.print("DITI Freq Meter");
  12. lcd.setCursor(0, 1);
  13. lcd.print("Freq:");
  14. Delay(5000);
  15. FreqMeasure.begin();
  16. }
  17.  
  18. double sum=0;
  19. int count=0;
  20.  
  21. void loop() {
  22. if (FreqMeasure.available()) {
  23. // average several reading together
  24. sum = sum + FreqMeasure.read();
  25. count = count + 1;
  26. if (count > 30) {
  27. float frequency = FreqMeasure.countToFrequency(sum / count);
  28. lcd.setCursor(6, 1);
  29. lcd.print(frequency);
  30. lcd.print(" Hz");
  31. sum = 0;
  32. count = 0;
  33. }
  34. }
  35. }

Speed (RPM) Measurement

Motor Speed (in RPM) Measurement

Arduino Code:
  1. // RPM Measurement
  2. #include "FreqMeasure.h"
  3. #include "LiquidCrystal.h"
  4.  
  5. LiquidCrystal lcd(7, 6, 12, 11, 10, 9);
  6.  
  7. void setup() {
  8. Serial.begin(57600);
  9. lcd.begin(16, 2);
  10. lcd.setCursor(0, 0);
  11. lcd.print(" DITI RPM Meter ");
  12. // lcd.setCursor(0, 1);
  13. // lcd.print("Speed:");
  14. FreqMeasure.begin();
  15. }
  16.  
  17. double sum=0;
  18. int count=0;
  19.  
  20. void loop() {
  21. if (FreqMeasure.available()) {
  22. // average several reading together
  23. sum = sum + FreqMeasure.read();
  24. count = count + 1;
  25. if (count > 10) {
  26. float frequency = FreqMeasure.countToFrequency(sum / count);
  27. float rpm=frequency*60;
  28. lcd.setCursor(3, 1);
  29. lcd.print(" ");
  30. lcd.setCursor(3, 1);
  31. lcd.print(rpm);
  32. lcd.print(" RPM");
  33. sum = 0;
  34. count = 0;
  35. }
  36. }
  37. }