New Project

CONNECT

Servo Motor Control Over Bluetooth via potentiometer

  • Page Views 2148
  • Spread the love
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  

    Something ordinary to drive the Servo Motor Control Over Bluetooth with the potentiometer.But we will do our project with the servo motor control potentiometer via bluetooth.Two will make the Arduino board via bluetooth wireless haberleştirerek control.Manages one of the modules for this (master) while the other managed (slaves) must be in mode.

    Materials:

    • 2 x Arduino (Nano enough)
    • servo-motor
    • 10k potentiometer
    • Hc-05 Bluetooth Module
    • Hc-06 Bluetooth Module

    Electronic Section:

    Transmitter Circuit:

     

     

    I’s put the signal pins to the analog potentiometer 0 pins.Hc-05 Insert the TX pin of the Bluetooth module to the 3.p 4.p the RX pin.

    Receiver Circuit:

    We are installing a servo motor signals to pin 10.p takalım.hc-06 module TX RX pin to the pins of the 4.p to 3.p.

    Software Part:
    Transmitter Software:

    //Yazılım Geliştirme By Robimek - 2015
    //Yazılım Lisans By Robimek
    //www.robimek.com
    #include <SoftwareSerial.h>
    #define BT_SERIAL_TX 4
    #define BT_SERIAL_RX 3
    SoftwareSerial BluetoothSerial(BT_SERIAL_TX, BT_SERIAL_RX);
    int potpin = A0;
    int val;
    void setup()
    {
    Serial.begin(9600);
    BluetoothSerial.begin(9600);
    }
    void loop()
    {
    val = analogRead(potpin);
    val = map(val, 0, 1023, 0, 179);
    switch(val){
     
    case 0: BluetoothSerial.print("0");break;
    case 1: BluetoothSerial.print("1");break;
    case 2: BluetoothSerial.print("2");break;
    case 3: BluetoothSerial.print("3");break;
    case 4: BluetoothSerial.print("4");break;
    case 5: BluetoothSerial.print("5");break;
    case 6: BluetoothSerial.print("6");break;
    case 7: BluetoothSerial.print("7");break;
    case 8: BluetoothSerial.print("8");break;
    case 9: BluetoothSerial.print("9");break;
    default: BluetoothSerial.print("0");break;
    }
    delay(100);
    }

    Receiver Software:

    //Yazılım Geliştirme By Robimek – 2015
    //Yazılım Lisans By Robimek
    //www.robimek.com
    #include <SoftwareSerial.h>
    #define BT_SERIAL_TX 4
    #define BT_SERIAL_RX 3
    SoftwareSerial BluetoothSerial(BT_SERIAL_TX, BT_SERIAL_RX);
    #include <Servo.h>
    Servo myservo;
    char servo_val = ' ';
    void setup()
    {
    Serial.begin(9600);
    BluetoothSerial.begin(9600);
    myservo.attach(10);
    }
    void loop()
    {
    if (BluetoothSerial.available()>0){
    servo_val = BluetoothSerial.read();
    int servo_deger = servo_val - '0';
    servo_deger=servo_deger*20;
    if(servo_deger>180){servo_deger=180;}
    myservo.write(servo_deger);
    }
    
    }

    After installing the software, you can manage your power engine now wirelessly via a potentiometer.

     

    Share

    5 Comments For "Servo Motor Control Over Bluetooth via potentiometer"

      • Anisha
        May 19, 2016

        Thakms.Adan, I was going to get into the background a bit more next time (or the one after that), but yeah, for sure, it brings Jones to mind. It’s no rip off (so I believe: although I haven’t actually gone to specifically check image similarities myself yet) but obviously anything after Jones on this general subject drew inspiration from him.

        Reply
    1. Larry Adams
      October 18, 2015

      Salama leckium.

      I have question.
      On receiver the TX goes to pin 3 or pin 4?

      On transmitter the TX goes to pin 3 or pin 4?
      Do I need any Arduino software download?

      Thank you!

      Reply
      • Janet
        May 19, 2016

        Wow! This could be one particular of the most beneficial blogs We17#2&8;ve ever arrive across on this subject. Basically Great. I am also an expert in this topic therefore I can understand your hard work.

        Reply
    2. October 18, 2015

      bluetooth tx >> 4, rx >> 3. pins
      Arduino software library is softwareserial dowland >> http://make.robimek.com/wp-content/uploads/SoftwareSerial.rar

      Reply

    Leave a comment

    Your email address will not be published. Required fields are marked *

    BE A FACEBOOK FAN

    Instagram