Arduino Tutorials – பாடம் 40 – Sweep Servo Motor Control Using Raspberry Pi Pico

Raspberry Pi Pico வை பயன்படுத்தி Servo மோட்டாரை சுற்ற வைப்பது

Required Components

  1. Servo motor(5V)-1 no
  2. Raspberry Pi Pico board-1 no
  3. Connecting wires-1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Servo மோட்டாருக்கு மூன்று இணைப்புகள் உள்ளன, அதில் ஒன்று data pin, +5v மற்றும் ground.
  3. Raspberry Pi Pico GP15 ஆவது இணைப்பை நேரடியாக மோட்டார் உடன் இணைக்க வேண்டும்.
  4. Servo வில் உள்ள +5v மற்றும் ground ஐ Raspberry Pi Pico VBus மற்றும் gnd உடன் இணைக்க வேண்டும்.
  5. Arduino program ஐ சரி பார்க்க வேண்டும்.
  6. மின்சுற்றை சரி பார்க்க வேண்டும்.
  7. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include<Servo.h>
Servo servo1;

void setup(  )
{
  servo1.attach(15);
}

void loop(  )
{
  servo1.write(0);
  delay(1000);
  servo1.write(90);
  delay(1000);
  servo1.write(180);
  delay(1000);
}

Arduino Tutorials – பாடம் 29 – Servo motor control by Ultrasonic Sensor Module using Arduino UNO

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

Required Components

  1. Ultrasonic sensor board -1 no
  2. Arduino Uno board -1 no
  3. Servo Motor -1 no
  4. Bread board -1 no
  5. Data Cable -1 no
  6. Connecting Wires -8 no

Circuit

Steps

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

Arduino Program

#include <Servo.h>
Servo myservo;
#define echoPin 2 
#define trigPin 3 
long duration; 
int distance; 
void setup() 
{
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  myservo.attach(5); 
  Serial.begin(9600);
  Serial.println("Ultrasonic Sensor HC-SR04 Test"); 
  Serial.println("with Arduino UNO R3");
  myservo.write(0);
}
void loop() 
{
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;  
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");
  
  if(distance<=40)
  {
    myservo.write(0);
  }
  else
  {
    myservo.write(160);
  }
}

Usage

  1. Robotic sensing.

Projects

  1. Sensor dustbin.

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 – பாடம் 5- Servo Motor Angle Setup Using Arduino UNO

Arduino UNOவை பயன்படுத்தி servoமோட்டாரின் நிலையை கட்டுப்படுத்துவது.

Required Components

  1. Servo motor(5V) -1 no
  2. Arduino board -1 no
  3. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. 5V sweep servo மோட்டார் பயன்படுத்தப்படுகிறது.
  3. Servo மோட்டாருக்கு மூன்று இணைப்புகள் உள்ளன, அதில் ஒன்று data pin, +5v மற்றும் ground.
  4. Arduino 9 ஆவது இணைப்பை நேரடியாக மோட்டார் உடன் இணைக்க வேண்டும்.
  5. மோட்டாரின் நடு இணைப்பை +5V உடன் இணைக்க வேண்டும்.
  6. மோட்டாரின் கடைசி இணைப்பை Ground உடன் இணைக்க வேண்டும்.
  7. ஒவ்வொரு முறையும் மோட்டார் சுழலும்போது +90 அல்லது -90 இருக்குமாறு Program ஐ எழுத வேண்டும்.
  8. Arduino program வை சரி பார்க்க வேண்டும்.
  9. மின்சுற்றை சரி பார்க்க வேண்டும்.
  10. Arduino program வை ரன் செய்ய வேண்டும்.

Arduino Program

#include <Servo.h>
Servo myservo;
int pos=0;
int stepdelay=10;

void setup(  )
{
  myservo.attach(9);
}

void loop(  )
{
  moveFromTo(0,90);
  delay (1000);
  moveFromTo(90,180);
  delay(1000);
  moveFromTo(180,90);
  delay (1000);
  moveFromTo(90,0);
  delay (1000);
}

void moveFromTo(int From, int To)
{
  if (From <=To)
  {
    for (pos=From; pos <=To; pos +=1)
    {
      myservo.write(pos);
      delay( stepdelay);
    }
  }
  else
  {
    for(pos=From; pos >=To;pos -=1)
    {
      myservo.write(pos);
      delay( stepdelay);
    }
  }
}

Usage

  1. கன்வேயர் பெல்ட் (Conveyor Belts).
  2. கேமரா ஆட்டோ ஃபோகஸ் (Camera Auto Focus).
  3. சூரிய கண்காணிப்பு அமைப்பு (Solar Tracking System).
  4. மெட்டல் கட்டிங் & மெட்டல் ஃபார்மிங் இயந்திரம்(Metal Cutting & Metal Forming Machines).
  5. ஆண்டெனா நிலைப்படுத்தல் (Antenna Positioning).
  6. அச்சகங்கள்/அச்சுப்பொறிகள் (Printing Presses/Printers).

Projects

  1. Robot-Arm.
  2. Sensor dustbin.

Arduino Tutorials – பாடம் 4 – Sweep Servo Motor Control Using Arduino UNO

Arduino Uno வை பயன்படுத்தி Servo மோட்டாரை சுற்ற வைப்பது.

Required Components

  1. Servo motor (5V) -1 no
  2. Arduino UNO board -1 no
  3. Connecting wires -1 set

Circuit

Steps

  1. நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
  2. Servo மோட்டாருக்கு மூன்று இணைப்புகள் உள்ளன, அதில் ஒன்று data pin, +5v மற்றும் ground.
  3. Arduino 9 ஆவது இணைப்பை நேரடியாக மோட்டார் உடன் இணைக்க வேண்டும்.
  4. Arduino வில் உள்ள +5v and ground ஐ bread board உடன் இணைக்க வேண்டும்.
  5. bread board ல் இணைத்த +5v and ground ஐ Servo +5v மற்றும் ground உடன் இணைக்க வேண்டும்.
  6. Arduino program ஐ சரி பார்க்க வேண்டும்.
  7. மின்சுற்றை சரி பார்க்க வேண்டும்.
  8. Arduino program ஐ ரன் செய்ய வேண்டும்.

Arduino Program

#include<Servo.h>
Servo servo1;

void setup(  )
{
  servo1.attach(9);
}

void loop(  )
{
  servo1.write(0);
  delay(1000);
  servo1.write(90);
  delay(1000);
  servo1.write(180);
  delay(1000);
}

Usage

  1. தொழில்துறை ரோபோடிக்ஸ் (industrial robotics).
  2. சிடி/டிவிடி பிலேயேர்ஸ் (CD/DVD players).
  3. உயர்த்தும் சாதனம் (elevators).
  4. கப்பலின் திசை திருப்பக்கட்டை (rudders).
  5. தானியங்கி கதவுகள் (automated doors).

Projects

  1. Robot-Arm.
  2. Sensor dustbin.

Arduino Tutorials – Lesson 29 – Servo motor control by Ultrasonic Sensor Module using Arduino UNO

Creating Servo motor control by Ultrasonic sensor program using Arduino UNO

Required Components

  1. Ultrasonic sensor board -1 no
  2. Arduino Uno board -1 no
  3. Servo Motor -1 no
  4. Bread board -1 no
  5. Data Cable -1 no
  6. Connecting Wires -8 no

Circuit

Steps

  1. Make sure the components are working properly.
  2. Ultrasonic Sensor board, Servo motor VCC, GND connected to 5V, GND of Arduino Uno Board through breadboard.
  3. Connect Ultrasonic sensor Board echo, trigger pin to the Arduino Uno Board 2, 3 pin.
  4. Connect Servo motor data pin to Arduino Uno Board pin 5.
  5. Check the Arduino program.
  6. Check the Circuit Connections.
  7. Run the Arduino program.

Arduino Program

#include <Servo.h>
Servo myservo;
#define echoPin 2 
#define trigPin 3 
long duration; 
int distance; 
void setup() 
{
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  myservo.attach(5); 
  Serial.begin(9600);
  Serial.println("Ultrasonic Sensor HC-SR04 Test"); 
  Serial.println("with Arduino UNO R3");
  myservo.write(0);
}
void loop() 
{
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;  
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");
  
  if(distance<=40)
  {
    myservo.write(0);
  }
  else
  {
    myservo.write(160);
  }
}

Usage

  1. Robotic sensing
  2. Dustbin open and close