Saturday, December 22, 2018

HOW TO MAKE SELF ROBOT

 


The Self  Robot Obstacle Detect  Path Can be found. How to make a self robot go to stepwise.

Components Used:-

  1. Plastic Box                    - Buy
  2. DC motor-2                  -Buy
  3. Switch                           -Buy
  4. Ultrasonic Senser       -Buy
  5. Servo Motor                 -Buy
  6. Castor Wheel               -Buy
  7. Arduino                        -Buy
  8. Motor Drive                 - Buy
  9. Battery-9v                    -Buy

              STEP(1)

  STEP(2)




  STEP(3)





  STEP(4)








  STEP(5)

Ultrasonic Sensor is Four terminal  VCC, GND, Trig. , Echo. 
  1. VCC  is Connected 5v supply in Arduino.
  2. GND  is Connected ground in Arduino.
  3. Trig.   is Connected Analog1 in Arduino.
  4. Echo.  is Connected Analog2 in Arduino.


  STEP(6)

Servo motor is three terminal VCC, GND, a Control pin.          

  1. VCC  is Connected 5v supply in Arduino.
  2. GND  is Connected ground in Arduino.
  3. Control pin is Connected Digital pin 10. 

                                                                             STEP(7)

Motor Drive is two motors connected output1 and output2.
  1. IN1 is Connected digital pin 7
  2. IN2 is Connected digital pin 6
  3. IN3 is Connected digital pin 5
  4. IN4 is Connected digital pin 4

  STEP(8)

Project Code:-

// connect motor controller pins to Arduino digital pins
// motor one
int enA = 10;
int in1 = 9;
int in2 = 8;
// motor two
int enB = 5;
int in3 = 7;
int in4 = 6;
void setup()
{
  // set all the motor control pins to outputs
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}
void demoOne()
{
  // this function will run the motors in both directions at a fixed speed
  // turn on motor A
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enA, 200);
  // turn on motor B
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enB, 200);
  delay(2000);
  // now change motor directions
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH); 
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH);
  delay(2000);
  // now turn off motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW); 
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
}
void demoTwo()
{
  // this function will run the motors across the range of possible speeds
  // note that maximum speed is determined by the motor itself and the operating voltage
  // the PWM values sent by analogWrite() are fractions of the maximum speed possible
  // by your hardware
  // turn on motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH); 
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH);
  // accelerate from zero to maximum speed
 
 for (int i = 0; i < 256; i++) {
analogWrite(enA, i);
analogWrite(enB, i);
delay(20);
}
// decelerate from maximum speed to zero
for (int i = 255; i > 0; --i)
  {
    analogWrite(enA, i);
    analogWrite(enB, i);
    delay(20);
  }
 
  
  // now turn off motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW); 
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW); 
}
void loop()
{
  demoOne();
  delay(1000);
  demoTwo();
  delay(1000);
}


Circuit Diagram:-




Wednesday, December 12, 2018

How to make Bluetooth Control Light



Show the circuit diagram of the Bluetooth control circuit.AT mega328 Ic is connected in this circuit diagram and also program this Ic. Required mobile phone,5v dc supply and etc..

Components Used:-
  1. Atmega328 Ic
  2. Bluetooth Module
  3. LEDS  etc....


How to make 5v power supply


How to make Arduino  


Relay circuit 




How to make Bluetooth control 








Arduino Code:- 


int lamp1=2;
int lamp2=3;
int lamp3=4;
int music=5; 
int pc=6;
int mobile=7;
int fan=8;
int socket=9;

int Received=0;
int lamp1_state=0;
int lamp2_state=0;
int lamp3_state=0;
int music_state=0; 
int pc_state=0;
int mobile_state=0;
int fan_state=0;
int socket_state=0;

void setup(){
  
  Serial.begin(9600);
  pinMode(lamp1,OUTPUT);
  pinMode(lamp2,OUTPUT);
  pinMode(lamp3,OUTPUT);
  pinMode(music,OUTPUT);
  pinMode(pc,OUTPUT);
  pinMode(mobile,OUTPUT);
  pinMode(fan,OUTPUT);
  pinMode(socket,OUTPUT);
  
}

void loop(){

 if(Serial.available()>0)
 { 
    Received = Serial.read();
    
 }

if (lamp1_state == 0 && Received == '1')
  {
    digitalWrite(lamp1,HIGH);
    lamp1_state=1;
    Received=0;  
  }
if (lamp1_state ==1 && Received == '1')
  {
    digitalWrite(lamp1,LOW);
    lamp1_state=0;
    Received=0;
  }


if (lamp2_state == 0 && Received == '2')
  {
    digitalWrite(lamp2,HIGH);
    lamp2_state=1;
    Received=0;  
  }
if (lamp2_state ==1 && Received == '2')
  {
    digitalWrite(lamp2,LOW);
    lamp2_state=0;
    Received=0;
  }

if (lamp3_state == 0 && Received == '3')
  {
    digitalWrite(lamp3,HIGH);
    lamp3_state=1;
    Received=0;  
  }
if (lamp3_state ==1 && Received == '3')
  {
    digitalWrite(lamp3,LOW);
    lamp3_state=0;
    Received=0;
  }

 if (music_state == 0 && Received == '4')
  {
    digitalWrite(music,HIGH);
    music_state=1;
    Received=0;  
  }
if (music_state ==1 && Received == '4')
  {
    digitalWrite(music,LOW);
    music_state=0;
    Received=0;
  }

 if (pc_state == 0 && Received == '5')
  {
    digitalWrite(pc,HIGH);
    pc_state=1;
    Received=0;  
  }
if (pc_state ==1 && Received == '5')
  {
    digitalWrite(pc,LOW);
    pc_state=0;
    Received=0;
  }

 if (mobile_state == 0 && Received == '6')
  {
    digitalWrite(mobile,HIGH);
    mobile_state=1;
    Received=0;  
  }
if (mobile_state ==1 && Received == '6')
  {
    digitalWrite(mobile,LOW);
    mobile_state=0;
    Received=0;
  }

 if (fan_state == 0 && Received == '7')
  {
    digitalWrite(fan,HIGH);
    fan_state=1;
    Received=0;  
  }
if (fan_state ==1 && Received == '7')
  {
    digitalWrite(fan,LOW);
    fan_state=0;
    Received=0;
  }

 if (socket_state == 0 && Received == '8')
  {
    digitalWrite(socket,HIGH);
    socket_state=1;
    Received=0;  
  }
if (socket_state ==1 && Received == '8')
  {
    digitalWrite(socket,LOW);
    socket_state=0;
    Received=0;
  }

}



      

How to make relay control circuit

i

Show the circuit diagram of the relay circuit. The amplifier circuit is used to amplify the signal
transistor base is applied wike signal output can be shown.

Components  Used:-
 

  1. Relay 5v                       →Buy
  2. Transistor-Bc547         →Buy
  3. Resistor                        →Buy
  4. Diodes-IN4148             →Buy
  5. 5v supply                      →Buy
  6. LED                              →Buy








How to make 5v power supply on breadboard



Show the circuit diagram of 5v dc supply on a breadboard. Input is connected 12v, 9v, 7v, and
any voltage is applied to the circuit. any voltages are converted into 5v dc supply on breadboard.ne

Component Used:-

  1. 7805 Ic                             →Buy
  2. 10-micro F Capacitor       →Buy
  3. LED                                  →Buy
  4. 220-ohm resistor              →Buy
  5. breadboard                       →Buy

How to make arduino on breadbroad:-Link

Tuesday, December 11, 2018

How to make arduino on breadboard



Show the fig. Arduino connection diagram. 28 pin AT Mega328 Ic  13 Digital pin and
5 Analog pin. It is simple to design Arduino. 

Component Used 

  1. AT Mega328 Ic        →Buy
  2. 16 MHz crystal        →Buy
  3. 22 pf Capacitor        →Buy
  4. LED                         →Buy
  5. 200-ohm Resistor    →Buy
  6. 5v Power supply      →Buy




Arduino code:- 
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino model, check
the Technical Specs of your board at https://www.arduino.cc/en/Main/Products



// the setup function runs once when you press reset or power the board
void setup() {

// initialize digital pin LED_BUILTIN as an output.
pinMode(12, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(12, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}