My DIY Bot

May 4,2017

Dear friends, recently I have completed one small project to develop one small home robot. Like to share the details with you all. This robot is an extension Alphabot kit from waveshare. Alphabot main board has following features :
  • Raspberry Pi & Arduino interface
  • Servo Motor interface for 2 wheels
  • Obstacle avoidance module interfaces
  • Battery holder: that supports 18650 batteries (but for my project , I have used little more additional powers)
  • Speed measuring interface
  • UART interface
  • Line tracking module interface
  • IR Receiver - To control the robot remotely via infrared. Refer section IR remote module Assembly for details I have used additional Raspi camera control units , humidity & temperature sensors, light and smoke detection sensors to extend the capability of this robot. Main features of this Robot:
  • This robot can be maneuvered from any where.
  • My Raspberry pi has fixed url, which can be invoked from any where using web browser or mobile, if we have internet.
  • we have following controls in main page : camera unit movement in any axis (x,y,z) (by clicking sidebars or using touch in cell phone). Also you can control robots movement in (x,y) pane via clicking left,right, forward,backward or stop buttons. see the attached image:


  • This is develop using webiopi interfaces in raspberry pi and for camera control we have used M-JPEG streamer.
  • This robot can be maneuvered via track line as it has track liner sensor units. Using thick black tape, if you create a track line, this robot can also move following that track line guided path.
  • This robot can be maneuvered also via a remote control.
  • This robot continuously captures the static images and video, so it can be used as alternative to CCTV solutions
  • Two Obstacle sensors protect this bot continuously to avoid collision. If it detects a wall or an obstacle it automatically corrects it's movement.
  • I have added additional axelta sensor board with this alphabot for humidity, temperature, light level etc. tracking. Please refer below image
  • This robot can be plugged to any external power bank (output of 5V)
  • Please find below¬†Arduino all sensor code:

  • #include ;
    int R = 5; // reed switch
    int P = 6; // power switch
    int X = 7; // PIR
    int T = A2; // Temperature
    int H = A5; // Humidity
    int L = A4; // Light
    float CELSIUS, HUM, LIGHT;
    dht11 DHT11;
    void setup() {
    Serial.begin(9600);}
    void TEMPERATURE()
    {
    int value_temp = analogRead(T);
    delay(10);
    value_temp = analogRead(T);
    delay(10);
    float millivolts_temp = (value_temp / 1023.0) * 5000;
    CELSIUS = millivolts_temp / 10;
    Serial.print(' TEMP: ');
    Serial.print(CELSIUS);
    }
    void HUMIDITY()
    {
    int chk = DHT11.read(H);
    HUM = DHT11.humidity;
    Serial.print(' HUMIDITY: ');
    Serial.print(HUM);
    }
    void LIG()
    {
    int value_lig = analogRead(L);
    delay(10);
    value_lig = analogRead(L);
    float volts_lig = (value_lig / 1023.0) * 5;
    LIGHT = 500/(4*((5-volts_lig)/volts_lig));
    Serial.print(' LIGHT LEVEL: ');
    Serial.print(LIGHT);
    }
    void POWER()
    {
    if (digitalRead(P) == LOW)
    {
    Serial.print(' POWER: OFF');
    }
    else
    {
    Serial.print(' POWER: ON');
    }
    }
    void REED()
    { if (digitalRead(R) == LOW){
    Serial.print(' REED: OPEN');}
    else {
    Serial.print(' REED: CLOSE');}}
    void PIR()
    { if (digitalRead(X) == LOW) {
    Serial.print(' MOTION: YES');}
    else {
    Serial.print(' MOTION: NO');}
    delay(2000);}
    void loop() {
    TEMPERATURE();
    HUMIDITY();
    LIG();
    POWER();
    REED();
    PIR();
    delay(5000);
    Serial.println('');}
  • Arduino is connected with raspberry pi using USB cable and I have created a small python program that gets data from arduino and creates a sensor.html page
  • find the below image image for the sensor link and sensor data.
  • Next Step: Now I am working to extend this robot to track different items with BLE tags automatically for quick identifications.

    #IoT,#Raspberrypi,#Arduino,#sensors