Arduino Tutorials – பாடம் 25 – L298N Motor Driver Module using Arduino UNO

L298N Motor Driver ஐ பயன்படுத்தி 2 DC மோட்டார்களை  கட்டுப்படுத்துவது.

Required Components

  1. L298N Motor Driver Module -1 no
  2. Arduino UNO -1 no
  3. DC Motor(gear) -2 no
  4. 12V Battery -1 no
  5. Data Cable -1 no
  6. Connecting Wires -4 no

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. மோட்டார் Driver போர்டு உடன் +12V battery இணைக்க வேண்டும்.
  3. +12V பேட்டரி இணைப்புகளை சரியாகவும் கவனமாகவும் இணைக்க வேண்டும்.
  4. மோட்டார் Driver போர்டு ENA, IN1, IN2, IN3, IN4, ENB பின்களை Arduino பின்களான 4,2,3,5,6,7 உடன் இணைக்க வேண்டும்.
  5. மோட்டார் Driver போர்டு OUTPUT பின்களை DC மோட்டார் பின்களுடன் இணைக்க வேண்டும்.
  6. மோட்டார் Driver போர்டு gnd ஐ Arduino UNO board gnd உடன் இணைக்க வேண்டும்.
  7. Arduino program ஐ சரி பார்க்க வேண்டும்.
  8. மின்சுற்றை சரி பார்க்க வேண்டும்.
  9. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

int motor1pin1 = 2;
int motor1pin2 = 3;
int enPin1 = 4;

int motor2pin1 = 5;
int motor2pin2 = 6;
int enPin2 = 7;


void setup() 
{
  pinMode(motor1pin1, OUTPUT);
  pinMode(motor1pin2, OUTPUT);
  pinMode(enPin1, OUTPUT);
  digitalWrite(enPin1, HIGH);
  
  pinMode(motor2pin1, OUTPUT);
  pinMode(motor2pin2, OUTPUT);
  pinMode(enPin2, OUTPUT);
  digitalWrite(enPin2, HIGH);
}

void loop() 
{
  digitalWrite(motor1pin1, HIGH);
  digitalWrite(motor1pin2, LOW);
  digitalWrite(motor2pin1, HIGH);
  digitalWrite(motor2pin2, LOW);
  delay(1000);
  
  digitalWrite(motor1pin1, LOW);
  digitalWrite(motor1pin2, HIGH);
  digitalWrite(motor2pin1, LOW);
  digitalWrite(motor2pin2, HIGH);
  delay(1000);
}

Usage

  1. நேரோட்ட மின்சார இயக்கி(Drive DC motors)
  2. படிநிலை இயக்கி(Drive Stepping motors)
  3. ரோபாட்டிக்ஸ்(In Robotics)

Arduino Tutorials – பாடம் 26 – Accelerometer sensor with servo motor control using Arduino UNO

Accelerometer sensor உடன் இணைக்க பட்ட Servo மோட்டாரை Arduino mega 2560 உதவியுடன் கட்டுப்படுத்துவது. 

Required Components

  1. Accelerometer sensor (MPU 6050) -1 no
  2. Arduino UNO board -1 no
  3. Jumper cable -4 no
  4. Servo motor -1 no

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Accelerometer sensorல் உள்ள SDA மற்றும் SCL பின்களை Arduino வில் உள்ள SDA மற்றும் SCL பின்களுடன் இணைக்க வேண்டும்.
  3. Arduinoன் +5V மற்றும் ground சப்ளையை servo மோட்டார் மற்றும் Accelerometer sensor உடன் இணைக்க வேண்டும்.
  4. Servo மோட்டார் மற்றும் Accelerometer Sensor ஐ Bread board உடன் இணைக்க வேண்டும்.
  5. Servo மோட்டார் டேட்டா பின்னை Arduino mega 2560 வின் 2 வது pin உடன் இணைக்க வேண்டும்.
  6. Arduino program ஐ சரி பார்க்க வேண்டும்.
  7. மின்சுற்றை சரி பார்க்க வேண்டும்.
  8. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include <Wire.h>
#include <MPU6050.h>
#include <Servo.h>   
Servo sg90;          
int servo_pin = 2;
MPU6050 sensor ;
int16_t ax, ay, az ;
int16_t gx, gy, gz ;

void setup ()
{ 
  sg90.attach ( servo_pin );
  Wire.begin ( );
  Serial.begin  (9600); 
  Serial.println  ( "Initializing the sensor" ); 
  
  sensor.initialize ( ); 
  Serial.println (sensor.testConnection ( ) ? "Successfully Connected" : "Connection failed"); 
  delay (1000); 
  Serial.println ( "Taking Values from the sensor" );
  delay (1000);
}

void loop () 
{ 
  sensor.getMotion6 (&ax, &ay, &az, &gx, &gy, &gz);
  ax = map (ax, -17000, 17000, 0, 180) ;
  Serial.println (ax);
  sg90.write (ax); 
  delay (200);
}

Usage

  1. அலைபேசி (Mobile phones).
  2. ட்ரோன் நிழற்படக்கருவி உறுதிப்படுத்தல் (Drone camera stabilization).
  3. ரோட்டேட்டர் இயந்திரத்தில் உள்ள தவறுகளைக் கண்டறிய (To detect faults in rotator machine).
  4. இலக்கமுறை நிழற்படக்கருவியின் திரையில் செங்குத்தான நிலையில் காட்சி படிமம் காண (To display images in an upright position on screens of digital cameras).

Arduino Tutorials – பாடம் 24 – L298N Motor Driver with Node MCU

Arduino MEGA2560வை பயன்படுத்தி 2 DC மோட்டார்கள் மற்றும் 2 LED-களை ஒரே நேரத்தில் NodeMCU ஐ உபயோகப்படுத்தி கட்டுப்படுத்துவது.

Required Components

  1. Node MCU -1 no
  2. L298N Motor Driver -1 no
  3. 9V Battery -1 no
  4. 5V DC Motor -2 no
  5. Motor wheel -2 no
  6. Cable -1 no
  7. Jumper Wires -7 no

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. L298N Motor Driver உடன் 9V Battery ஐ கவனமாக இணைக்க வேண்டும்.
  3. L298N Motor Driver ENA, IN1, IN2, IN3, IN4, ENB பின்களை Node MCU D2, D0, D1, D7, D6, D5 உடன் இணைக்க வேண்டும்.
  4. L298N Motor Driver gnd உடன் Node MCU gnd ஐ இணைக்க வேண்டும்.
  5. L298N Motor Driver OUTPUT பின்களுடன் DC மோட்டார் OUTPUT பின்களை இணைக்க வேண்டும்.
  6. 2 LED Cathodes(+) & Anode (-) பின்களை Arduino MEGA 2560 Board D3, D4 பின்கள் & gnd உடன் இணைக்க வேண்டும்.
  7. Node MCU உடன் Power ஐ இணைக்க வேண்டும்.
  8. Arduino program ஐ சரி பார்க்க வேண்டும்.
  9. மின்சுற்றை சரி பார்க்க வேண்டும்.
  10. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include <ESP8266WiFi.h>
const char* ssid = "*****";
const char* password = "********";
int motor1pin1 = 16; //D0
int motor1pin2 = 5; //D1
int enPin1 = 4; //D2
int motor2pin1 = 13; //D7
int motor2pin2 = 12; //D6
int enPin2 = 14;//D5

int led1 = 0; //D3
int led2 = 2; //D4
WiFiServer server(80);

void setup() 
{
  Serial.begin(115200);
  delay(10);
  pinMode(motor1pin1, OUTPUT);
  pinMode(motor1pin2, OUTPUT);
  pinMode(enPin1, OUTPUT);
  digitalWrite(enPin1, HIGH);
  pinMode(motor2pin1, OUTPUT);
  pinMode(motor2pin2, OUTPUT);
  pinMode(enPin2, OUTPUT);
  digitalWrite(enPin2, HIGH);
  
  pinMode(led1,OUTPUT);
  pinMode(led2,OUTPUT);
  
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
  server.begin();
  Serial.println("Server started");
  Serial.print("Use this URL to connect: ");
  Serial.print("http://");
  Serial.print(WiFi.localIP());
  Serial.println("/");
}

void loop() 
{
  WiFiClient client = server.available();
  if (!client) {
    return;
  }
  Serial.println("new client");
  while(!client.available()){
    delay(1);
  }
  String request = client.readStringUntil('\r');
  Serial.println(request);
  client.flush();
  int value,value1 = LOW,value2 = LOW,value3 = LOW,value4 = LOW;
  if (request.indexOf("/MotorForward") != -1)
  {
    digitalWrite(motor1pin1, HIGH);
    digitalWrite(motor1pin2, LOW);
    digitalWrite(motor2pin1, HIGH);
    digitalWrite(motor2pin2, LOW);
    delay(1000);
    value1 = HIGH;
    value2 = LOW;
    value3 = HIGH;
    value4 = LOW;
  }
  if (request.indexOf("/MotorBackward") != -1)
  {
    digitalWrite(motor1pin1, LOW);
    digitalWrite(motor1pin2, HIGH);
    digitalWrite(motor2pin1, LOW);
    digitalWrite(motor2pin2, HIGH);
    delay(1000);
    value1 = LOW;
    value2 = HIGH;
    value3 = LOW;
    value4 = HIGH;
  }
  if (request.indexOf("/MotorLeft") != -1)
  {
    digitalWrite(motor1pin1, LOW);
    digitalWrite(motor1pin2, HIGH);
    digitalWrite(motor2pin1, HIGH);
    digitalWrite(motor2pin2, LOW);
    delay(1000);
    value1 = LOW;
    value2 = HIGH;
    value3 = HIGH;
    value4 = LOW;
  }
  if (request.indexOf("/MotorRight") != -1)
  {
    digitalWrite(motor1pin1, HIGH);
    digitalWrite(motor1pin2, LOW);
    digitalWrite(motor2pin1, LOW);
    digitalWrite(motor2pin2, HIGH);
    delay(1000);
    value1 = HIGH;
    value2 = LOW;
    value3 = LOW;
    value4 = HIGH;
  }
  if (request.indexOf("/MotorStop") != -1)
  {
    digitalWrite(motor1pin1, LOW);
    digitalWrite(motor1pin2, LOW);
    digitalWrite(motor2pin1, LOW);
    digitalWrite(motor2pin2, LOW);
    delay(1000);
    value1 = LOW;
    value2 = LOW;
    value3 = LOW;
    value4 = LOW;
  }
  
  if (request.indexOf("/LedOn") != -1)
  {
    digitalWrite(led1,HIGH);
    digitalWrite(led2,HIGH);
    delay(2000);
    value = HIGH;
  }
  
  if (request.indexOf("/LedOn") != -1)
  {
    digitalWrite(led1,LOW);
    digitalWrite(led2,LOW);
    delay(2000);
    value = LOW;
  }
  client.println("HTTP/1.1 200 OK");
  client.println("Content-Type: text/html");
  client.println(""); //  do not forget this one
  client.println("<!DOCTYPE HTML>");
  client.println("<html>");
  client.print("motor is now: ");
  
  if(value1 == HIGH && value2 == LOW && value3 == HIGH && value4 == LOW ) {
    client.print("Forward");
  }
  else if(value1 == LOW && value2 == HIGH && value3 == LOW && value4 == HIGH  ) {
    client.print("Backward");
  }
  else if(value1 == LOW && value2 == HIGH && value3 == HIGH && value4 == LOW  ) {
    client.print("Left");
  }
  else if(value1 == HIGH && value2 == LOW && value3 == LOW && value4 == HIGH  ) {
    client.print("Right");
  }
  else if(value1 == LOW && value2 == LOW && value3 == LOW && value4 == LOW  ) {
    client.print("Stop");
  }
  else if( value = HIGH) {
    client.print("LedOn");
  }
  else if( value = LOW) {
    client.print("LedOff");
  }
  client.println("<br><br>");
  client.println("<a href=\"/MotorForward\"\"><button>Forward </button></a>");
  client.println("<a href=\"/MotorBackward\"\"><button>Backward </button></a><br />");
  client.println("<a href=\"/MotorLeft\"\"><button>Left </button></a>");
  client.println("<a href=\"/MotorRight\"\"><button>Right </button></a><br/>");
  client.println("<a href=\"/MotorStop\"\"><button>Stop </button></a>");
  client.println("<a href=\"/LedOn\"\"><button>LedOn </button></a>");
  client.println("<a href=\"/LedOff\"\"><button>LedOff </button></a>");
  client.println("</html>");
  delay(1);
  Serial.println("Client disonnected");
  Serial.println("");
}

Projects

  1. DIWA Robot

Arduino Tutorials – பாடம் 23- L293D Motor Driver Control Shield with Arduino MEGA 2560

Arduino MEGA2560வை பயன்படுத்தி 2 DC மோட்டார்கள்,2 Servos மற்றும் 2 LED-களை ஒரே நேரத்தில் Bluetooth ஐ உபயோகப்படுத்தி கட்டுப்படுத்துவது.

Required Components

  1. L293D Motor Driver Control -1 no
  2. Arduino MEGA 2560 Board -1 no
  3. 5V DC Motors -2 no
  4. Servo -2 no
  5. LED -2 no
  6. 9V Battery -1 no
  7. Bluetooth -1 no
  8. USB cable -1 no
  9. Jumper Wires -10 no

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Motor control shield(L293D) உடன் +5V battery இணைக்க வேண்டும்.
  3. +5V பேட்டரி இணைப்புகளை சரியாகவும் கவனமாகவும் இணைக்க வேண்டும்.
  4. Motor control shield(L293D) M3,M4 ஐ 2 DC மோட்டார்களுடன் இணைக்க வேண்டும்.
  5. Motor control shield(L293D) Servo1,Servo2 ஐ 2 Servo மோட்டார்களுடன் இணைக்க வேண்டும்.
  6. 2 LED Cathodes(+) & Anode (-) பின்களை Arduino MEGA 2560 Board 50,52 பின்கள் & gnd உடன் இணைக்க வேண்டும்.
  7. Bluetooth VCC & gnd ஐ Arduino MEGA 2560 Board 5V & gnd உடன் இணைக்க வேண்டும்.
  8. Bluetooth RXD,TXD ஐ Arduino MEGA 2560 Board TXD,RXD உடன் முறையே இணைக்க வேண்டும்.
  9. Arduino MEGA 2560 Board உடன் +5V battery இணைக்க வேண்டும்.
  10. Arduino program ஐ சரி பார்க்க வேண்டும்.
  11. மின்சுற்றை சரி பார்க்க வேண்டும்.
  12. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include <AFMotor.h>
#include <Servo.h>
AF_DCMotor motor1(3);
AF_DCMotor motor2(4);
Servo servo1;
Servo servo2;
Servo servo3;
int pos1=20;
int pos1min=50;
int pos1max=110;
int pos2=90;
int pos2min=110;
int pos2max=170;
int pos3=80;
int pos3min=50;
int pos3max=110;
int i=0;
int delaytime=10;
int led1 = 50;
int led2 = 52;
String inputString = "";
boolean stringComplete = false;

void setup() 
{
  Serial1.begin(9600);
  motor1.setSpeed(200);
  motor2.setSpeed(200);
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  servo1.attach(9);
  servo2.attach(10);
  servo3.attach(48);
  servo1.write(pos1);
  servo2.write(pos2);
  servo3.write(pos3);
  pinMode(led1,OUTPUT);
  pinMode(led2,OUTPUT);
  ledsOn();
}

void loop()
{
  ledsOn();
  serialEvent();
  if (stringComplete)
  {
    processCmd(inputString);
    inputString = "";
    stringComplete = false;
  }
}

void processCmd(String st1)
{
  st1.remove(st1.length());
  String cmd = st1.substring(0,1);
  st1="";
  if (cmd == "f")
  {
    motorForward();
  }
  else if (cmd == "b")
  {
    motorBackward();
  }
  else if (cmd == "r")
  {
    motorRight();
  }
  else if (cmd == "l")
  {
    motorLeft();
  }
  else if(cmd == "s")
  {
    motorStop();
  }
  else if(cmd == "1")
  {
    servoAction1();
  }
  else if(cmd == "2")
  {
    servoAction2();
  }
  else if (cmd=="o")
  {
    eyesBlink();
  }
}

void serialEvent()
{
  while (Serial1.available())
  {
    char inChar = (char)Serial1.read();
    inputString += inChar;
    if (inChar == '$')
    {
      stringComplete = true;
    }
  }
}
for(int i=0;i<5;i++)
{
  moveHandServoMotors(1);
}
delay(2000);
for(int i=0;i<5;i++)
{
  moveHandServoMotors(0);
}
delay(2000);


void motorForward()
{
  motor1.run(FORWARD);
  motor2.run(FORWARD);
  motor1.setSpeed(255);
  motor2.setSpeed(255);
}

void motorBackward()
{
  motor1.run(BACKWARD);
  motor2.run(BACKWARD);
  motor1.setSpeed(255);
  motor2.setSpeed(255);
}

void motorLeft()
{
  motor1.run(BACKWARD);
  motor2.run(FORWARD);
  motor1.setSpeed(255);
  motor2.setSpeed(255);
}

void motorRight()
{
  motor1.run(FORWARD);
  motor2.run(BACKWARD);
  motor1.setSpeed(255);
  motor2.setSpeed(255);
}

void motorStop()
{
  motor1.run(RELEASE);
  motor2.run(RELEASE);
}

void ledsOn()
{
  digitalWrite(led1,HIGH);
  digitalWrite(led2,HIGH);
}

void ledsOff()
{
  digitalWrite(led1,LOW);
  digitalWrite(led2,LOW);
}

void eyesBlink()
{
  for(int i=0;i<8;i++)
  {
    ledsOn();
    delay(250);
    ledsOff();
    delay(250);
  }
}

void servoAction1()
{
  for(int i=0;i<5;i++)
  {
    moveHandServoMotors(0);
  }
}

void servoAction2()
{
  for(int i=0;i<5;i++)
  {
    moveHandServoMotors(1);
  }
}

void moveHeadServoMotor(int tp)
{
  if (tp==0)
  {
    servo3.write(pos3min);
    delay(1000);
    servo3.write(pos3max);
    delay(3000);
  }
  if (tp==1)
  {
    for(int i=0;i<60;i++)
    {
      servo3.write(pos3min+i);
      delay(delaytime);
    }
    delay(1000);
    for(int i=0;i<60;i++)
    {
      servo3.write(pos3max-i);
      delay(delaytime);
    }
    delay(3000);
  }
}

void moveHandServoMotors(int tp)
{
  if (tp==0)
  {
    servo1.write(pos1min);
    servo2.write(pos2min);
    servo3.write(pos3min);
    for(int i=0;i<60;i++)
    {
      servo1.write(pos1min+i);
      servo2.write(pos2min+i);
      servo3.write(pos3min+i);
      delay(delaytime);
    }
    delay(200);
    for(int i=0;i<60;i++)
    {
      servo1.write(pos1max-i);
      servo2.write(pos2max-i);
      servo3.write(pos3max-i);
      delay(delaytime);
    }
    delay(200);
  }
  else if (tp==1)
  {
    servo1.write(pos1min);
    servo2.write(pos2max);
    servo3.write(pos3min);
    for(int i=0;i<60;i++)
    {
      servo1.write(pos1min+i);
      servo2.write(pos2max-i);
      servo3.write(pos3min+i);
      delay(delaytime);
    }
    delay(200);
    for(int i=0;i<60;i++)
    {
      servo1.write(pos1max-i);
      servo2.write(pos2min+i);
      servo3.write(pos3max-i);
      delay(delaytime);
    }
    delay(200);
  }
}

Usage

  1. நேரோட்ட மின்சார இயக்கி(Drive DC motors)
  2. படிநிலை இயக்கி(Drive Stepping motors)
  3. ரோபாட்டிக்ஸ்(In Robotics)

Projects

  1. திவா ரோபோட்(DIWA Robot)

Arduino Tutorials – பாடம் 22 – Micro Metal Gear Motor with Encoder

Arduino MEGA2560வை பயன்படுத்தி DC மோட்டாரை துல்லியமாக கட்டுப்படுத்துவது.

Required Components

  1. Arduino MEGA2560 -1 no
  2. Motor control shield(L293D) -1 no
  3. Micro Metal Gear Motor with Encoder -1 no
  4. Motor Wheel -1 no
  5. Bread Board -1 no
  6. Jumper Wires(Male to Male) -11 no
  7. Voltage Converter(5V-3.3V) -1 no
  8. 5V Battery -1 no
  9. USB cable -1 no

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Motor control shield(L293D) உடன் +5V battery இணைக்க வேண்டும்.
  3. +5V பேட்டரி இணைப்புகளை சரியாகவும் கவனமாகவும் இணைக்க வேண்டும்.
  4. Motor control shield(L293D) M3ஐ மோட்டார் M1,M2உடன் இணைக்க வேண்டும்.
  5. Arduino 5V, gnd ஐ voltage converter V IN,gnd உடன் கவனமாக இணைக்க வேண்டும்.
  6. voltage converter V OUT,gnd ஐ மோட்டார் VCC, gnd உடன் கவனமாக இணைக்க வேண்டும்.
  7. மோட்டார் C1,C2 பின்களை Arduino MEGA2560 18,19 பின்களுடன் இணைக்க வேண்டும்.
  8. Arduino program ஐ சரி பார்க்க வேண்டும்.
  9. மின்சுற்றை சரி பார்க்க வேண்டும்.
  10. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include <AFMotor.h>
#include <Encoder.h>
AF_DCMotor motor1(4);
Encoder myEnc1(18,19);
long oldPosition1  = -999;
long m1Pos = 0;
long m1Dir = 0;
long md1=2000;


void setup()
{
  Serial.begin(9600);
  Serial.println("Motor test!");
  motor1.setSpeed(200);
  motor1.run(RELEASE);
  motor1Move(md1,0);
}

void loop()
{
  checkMotor1();
  delay(5);
}

void motor1Move(int d1,int d2)
{
  m1Pos=d1;
  m1Dir = d2;
  if (d2==0)
  {
    motor1.run(FORWARD);
  }
  else if (d2==1)
  {
    motor1.run(BACKWARD);
  }
}


void checkMotor1()
{
  long newPosition1 = myEnc1.read();
  if (m1Dir==0)
  {
    if ( newPosition1>m1Pos)
    {
      m1Pos=0;
      motor1.run(RELEASE);
      myEnc1.write(0);
      motor1Move(md1,1);
    }
  }
  else
  {
    if ( abs(newPosition1)>m1Pos)
    {
      m1Pos=0;
      motor1.run(RELEASE);
      myEnc1.write(0);      
      motor1Move(md1,0);
    }
  }
}

Arduino Tutorials – பாடம் 21 – Stepper motor control Using Arduino UNO

Stepper மோட்டாரை Arduino UNO கொண்டு கட்டுப்படுத்துவது.

Required Components

  1. Stepper Motor (NEMA17) -1 no
  2. A4988 Stepper Driver -1 no
  3. 12V 2A Adapter -1 no
  4. Arduino Board UNO or MEGA -1 no
  5. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Stepper மோட்டார் Driver ஐ Arduino UNO உடன் இணைக்க வேண்டும்.
  3. Stepper மோட்டாரை Driver உடன் இணைக்க வேண்டும்.
  4. Stepper மோட்டார் உடன் வெளிப்புற power supply இணைக்க வேண்டும்.
  5. Arduino UNO பின்னான 3 &4 ஐ motor driver உடன் இணைக்க வேண்டும்.
  6. motor driver உடன் +5V மற்றும் Ground ஐ இணைக்க வேண்டும்.
  7. Arduino program ஐ சரி பார்க்க வேண்டும்.
  8. மின்சுற்றை சரி பார்க்க வேண்டும்.
  9. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include <Stepper.h>
const int stepPin = 3;
const int dirPin = 4;

void setup( )
{
  pinMode(stepPin,OUTPUT);
  pinMode(dirPin,OUTPUT);
}
void loop( )
{
  digitalWrite(dirPin,HIGH);
  for(int x = 0; x < 200; x++)
  {
    digitalWrite(stepPin,HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin,LOW);
    delayMicroseconds(500);
  }
  delay(1000);
  digitalWrite(dirPin,LOW);
  for(int x = 0; x < 400; x++)
  {
    digitalWrite(stepPin,HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin,LOW);
    delayMicroseconds(500);    
  }
  delay(1000); 
}

Usage

  1. பையகப்படுத்துதல்(Packaging)
  2. தொழில் தானியங்குமயம் (industry automation)
  3. கொணரிப்பட்டை (conveyer belt)

Projects

  1. ரோபோ கை (Robot arm)
  2. குப்பைத்தொட்டி(Dustbin)

Arduino Tutorials – பாடம் 20 – Color Sensor Using Arduino UNO

Colour Sensor ஐ Arduino UNO வை கொண்டு கட்டுப்படுத்துவது.

Required Components

  1. Arduino UNO -1 no
  2. Color Sensor -1 no
  3. USB cable -1 no
  4. Jumper Wires -7 no

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Colour detector ஐ Arduino UNO உடன் இணைக்க வேண்டும்.
  3. Arduino UNO பின்னான 4 மற்றும் 5 ஐ Colour detector S0 மற்றும் S1 உடன் இணைக்க வேண்டும்.
  4. Arduino UNO பின்னான 6 மற்றும் 7 ஐ Colour detector S2 மற்றும் S3 உடன் இணைக்க வேண்டும்.
  5. Colour detector உடன் +5V மற்றும் Ground ஐ இணைக்க வேண்டும்.
  6. Arduino program ஐ சரி பார்க்க வேண்டும்.
  7. மின்சுற்றை சரி பார்க்க வேண்டும்.
  8. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#define s0 4
#define s1 5
#define s2 6
#define s3 7
#define out 8
int data=0;

void setup()
{
  pinMode(s0,OUTPUT);
  pinMode(s1,OUTPUT);
  pinMode(s2,OUTPUT);
  pinMode(s3,OUTPUT);
  pinMode(out,INPUT);
  Serial.begin(9600);
  digitalWrite(s0,HIGH);
  digitalWrite(s1,HIGH);
}

void loop()
{
  digitalWrite(s2,HIGH);
  digitalWrite(s3,HIGH);
  Serial.print("Red value= ");
  GetData();
  digitalWrite(s2,LOW);
  digitalWrite(s3,HIGH);
  Serial.print("Blue value= ");
  GetData();
  digitalWrite(s2,LOW);
  digitalWrite(s3,LOW);
  Serial.print("Green value= ");
  GetData();
  Serial.println();
  delay(500);
}

void GetData()
{
  data=pulseIn(out,LOW);
  Serial.print(data
  Serial.print("\t");
  delay(20);
}

Usage

  1. வண்ணம் கண்டறிதல்(Colour Detection)
  2. வீடியோ செயலாக்கம்(video processing)
  3. படிம வருடி(image scanning technique)
  4. வருடுதல்(Scanner)
  5. அச்சுப்பொறி நுட்பம்(printer)

Arduino Tutorials – பாடம் 19 – Sound And Light Program Using Arduino UNO

Sound sensor ஐ பயன்படுத்தி LED களை எரிய வைப்பது.

Required Components

  1. Arduino UNO -1 no
  2. Sound sensor -1 no
  3. Resistor 150 ohm -6 no
  4. LEDs -6 no
  5. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Sound sensor ஐ Arduino UNO இணைக்க வேண்டும்.
  3. Arduino UNO பின்களான 8 ,9 ,10 ,11 ,12 ,13- இவைகளை LED உடன் இணைக்க வேண்டும்.
  4. Arduino UNO பின்னான A0 ஐ Sound sensor உடன் இணைக்க வேண்டும்.
  5. அனைத்து LED உடனும் அதற்குண்டான 150 ohm Resistor களை கொண்டு இணைக்க வேண்டும்.
  6. Sound sensor உடன் +5V மற்றும் Ground ஐ இணைக்க வேண்டும்.
  7. Arduino program ஐ சரி பார்க்க வேண்டும்.
  8. மின்சுற்றை சரி பார்க்க வேண்டும்.
  9. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

int ledPin1= 8; 
int ledPin2= 9;
int ledPin3= 10;  
int ledPin4= 11;
int ledPin5= 12;
int ledPin6= 13;
int sensorPin= A0; 
int val = 0;

void setup( )
{
  pinMode(ledPin1, OUTPUT); 
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);
  pinMode(ledPin6, OUTPUT);
  pinMode(sensorPin, INPUT); 
  Serial.begin (9600);
}

void loop (  )
{
  val =analogRead(sensorPin);
  Serial.println (val);
  if (val >= 127) 
  {
    digitalWrite(ledPin1, HIGH); 
  }else {
    digitalWrite(ledPin1, LOW);
  }
  if (val >= 378) 
  {
    digitalWrite(ledPin2, HIGH);
  }else {
    digitalWrite(ledPin2, LOW);
  }
  if (val >= 505) 
  {
    digitalWrite(ledPin3, HIGH);
  }else {
    digitalWrite(ledPin3, LOW);
  }
  if (val >= 632)
  {
    digitalWrite(ledPin4, HIGH);
  }else 
  {
    digitalWrite(ledPin4, LOW);
  }
  if (val >= 759) {
    digitalWrite(ledPin5, HIGH);
  }else 
  {
    digitalWrite(ledPin5, LOW);
  }
  if (val >= 886)
  {
    digitalWrite(ledPin6, HIGH);
  }else 
  {
    digitalWrite(ledPin6, LOW);
  }
}

Usage

  1. அலுவலகம் அல்லது வீட்டிற்கான பாதுகாப்பு அமைப்பு (Security system for Office or Home)
  2. உளவு சுற்று (Spy Circuit)
  3. வீட்டு ஆட்டோமேஷன்(Home Automation)
  4. திறன்பேசி(Smart Phones)
  5. சுற்றுப்புற ஒலி அங்கீகாரம்(Ambient sound recognition)
  6. ஆடியோ பெருக்கி (Audio amplifier)

Projects

  1. Lightning cloud

Arduino Tutorials – பாடம் 18 – A Solenoid Valve Control Using Arduino UNO

Arduino UNO உடன் Solenoid  valve ( வரிச்சுருள்) ஐ இணைப்பது.

Required Components

  1. Solenoid valve -1 no
  2. Darlington Transistor -1 no
  3. Resistor(10K) -1 no
  4. IN4001 Diode -1 no
  5. Arduino UNO -1 no
  6. Bread board -1 no
  7. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Transistor ஐ Solenoid valve மற்றும் Arduino UNO உடன் இணைக்க வேண்டும்.
  3. Transistor உடன் 10K resistor ஐ இணைக்க வேண்டும்.
  4. Solenoid valve உடன் வெளிப்புற power Supply ஐ இணைக்க வேண்டும்.
  5. Solenoid valve உடன் Arduino வை இணைக்க வேண்டும்.
  6. Resistor ஐ பின் எண் 2 உடன் இணைக்க வேண்டும்.
  7. Arduino program ஐ சரி பார்க்க வேண்டும்.
  8. மின்சுற்றை சரி பார்க்க வேண்டும்.
  9. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

int solenoidPin = 9;
                                   
void setup( )
{
  pinMode(solenoidPin, OUTPUT);          
}

void loop( )
{
  digitalWrite(solenoidPin, HIGH);           
  delay(1000);                                             
  digitalWrite(solenoidPin, LOW);            
  delay(1000);                                             
}

Usage

  1. கணினி அச்சுப்பொறிகள்(Computer printers)
  2. எரிபொருள் ஊசி கியர்(Fuel injection gear)
  3. கார் போன்ற வாகனம்(Vehicles like cars)
  4. தொழில்துறை அமைப்பு(Industrial setting)

Arduino Tutorials – பாடம் 17 – Soil Moisture Sensor Using Arduino UNO

Arduino UNO ஐ பயன்படுத்தி Soil moisture(மண்ணின் ஈரப்பதம்) sensor ஐ கட்டுப்படுத்துவது.

Required Components

  1. Soil sensor -1 no
  2. Arduino UNO -1 no
  3. Connecting Wires -1 set

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Arduino UNO உடன் Soil moisture(மண்ணின் ஈரப்பதம்) sensor ஐ இணைக்க வேண்டும்.
  3. Arduino UNO பின்னான A0 ஐ Soil moisture(மண்ணின் ஈரப்பதம்) sensor ன் (Analog) அல்லது (Digital)ல்இணைக்க வேண்டும்.
  4. Arduino UNO உடன் interfacing (இடைமுகம்) ஐ இணைக்க வேண்டும்.
  5. Soil moisture(மண்ணின் ஈரப்பதம்) sensor உடன் +5V மற்றும் Ground ஐ இணைக்க வேண்டும்.
  6. Arduino program ஐ சரி பார்க்க வேண்டும்.
  7. மின்சுற்றை சரி பார்க்க வேண்டும்.
  8. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

int sensorPin = A0;
int sensorValue;
int limit = 300;

void setup( )
{
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop( )
{
  sensorValue = analogRead(sensorPin);
  Serial.println("Analog Value : ");
  Serial.println(sensorValue);
  if (sensorValue<limit)
  {
    digitalWrite(13, HIGH);
  }
  else{
    digitalWrite(13, LOW);
  }
  delay(1000);
}

Usage

  1. வேளாண் அறிவியல் மற்றும் தோட்டக்கலை(Agricultural science and horticulture)
  2. நீர்ப்பாசன திட்டமிடல்(Irrigation planning)
  3. காலநிலை ஆராய்ச்சி(Climate research)
  4. தீர்வு போக்குவரத்து ஆய்வுகள்(Solute transport studies )
  5. மண் சுவாசத்திற்கான துணை சென்சார்கள் (Auxiliary sensors for soil respiration)