How I made a snowblower 3.0 with Bluetooth control from an Android smartphone

    This is the shortest time history of turning a robotic lawnmower into a DIY snow blower with Bluetooth control from an Android phone.




    This is the third version of the snow blower. The first option I made from a combat robot. The second option from a lawn mower, which I am preparing for the competition . A video with a brief presentation of these “products” was already on Geektimes, also in the spoiler at the bottom of the post.

    The current design of the robot is very simple. The top layer of snow is removed by a scraper. The bottom layer is thrown sideways from under the snow blower. The power unit is an internal combustion engine from a manual lawnmower with a capacity of 0.9 hp Propulsion engines are gear motors from VAZ wipers. ICE turns the screw. The air flow and mechanical impact of the screw raises the snow from the surface and throws it to the side through the air duct. The skirt around the snow blower prevents the snow from flying apart. Screwed rubber significantly improves the permeability of the unit.


    Control


    Bluetooth control from an Android phone. Arduino nano + Monster Motor Shield + Bluetooth HC-06

    Bluetooth HC-06 works at 3.3V, i.e. it is necessary for proper operation to do the conversion of logical levels. Without this, the circuit will work, but there may be problems.

    Regarding the Monster Motor Shield, there are a lot of controversial issues, someone claimed that a large percentage of marriage. I really like this board because it holds current up to 30A.


    Arduino


    To receive data from the Bluetooth HC-06, I used Software Serial in order to leave the possibility of debugging through the terminal via the hardware Serial port. This, in particular, was needed to track what data we get from Arduino. In the simplest sketch, we check the received character via Bluetooth and turn on the engine driver.
    Arduino Code
    #include 
    #define BRAKEVCC 0
    #define CW   1
    #define CCW  2
    #define BRAKEGND 3
    #define CS_THRESHOLD 100
    int inApin[2] = {7, 4};  // INA: Clockwise input
    int inBpin[2] = {8, 9}; // INB: Counter-clockwise input
    int pwmpin[2] = {5, 6}; // PWM input
    int statpin = 10;
    SoftwareSerial mySerial(2, 3); // RX, TX
    char a,b;
    void setup()  
    {
      Serial.begin(9600);
      while (!Serial) {
        ; // wait for serial port to connect. Needed for Leonardo only
      }
     pinMode(statpin, OUTPUT);
      // Initialize digital pins as outputs
      for (int i=0; i<2; i++)
      {
        pinMode(inApin[i], OUTPUT);
        pinMode(inBpin[i], OUTPUT);
        pinMode(pwmpin[i], OUTPUT);
      }
      // Initialize braked
      for (int i=0; i<2; i++)
      {
        digitalWrite(inApin[i], LOW);
        digitalWrite(inBpin[i], LOW);
      }
      // set the data rate for the SoftwareSerial port
      mySerial.begin(9600);
      mySerial.println("Hello, world?");
    }
    void loop() // run over and over
    {
        digitalWrite(statpin, HIGH);
      if (mySerial.available()){
            a=mySerial.read();
        if(a=='F'){
      motorGo(0, CW, 1023);
      motorGo(1, CW, 1023);
        }
        if(a=='B'){
      motorGo(0, CCW, 1023);
      motorGo(1, CCW, 1023);
        }
        if(a=='L'){
      motorGo(0, CW, 1023);
      motorGo(1, CCW, 1023);
        }
        if(a=='R'){
      motorGo(0, CCW, 1023);
      motorGo(1, CW, 1023);
        }
         if(a=='I'){
      motorGo(0, CW, 500);
      motorGo(1, CW, 1023);
        }
        if(a=='G'){
      motorGo(0, CW, 1023);
      motorGo(1, CW, 500);
        }
        if(a=='H'){
      motorGo(0, CCW, 1023);
      motorGo(1, CCW, 500);
        }
        if(a=='J'){
      motorGo(0, CCW, 500);
      motorGo(1, CCW, 1023);
        }
           if(a=='S'){
      motorOff(1);
      motorOff(2);
        }
        Serial.write(a);
        }else{
        }
    }
    void motorOff(int motor)
    {
      // Initialize braked
      for (int i=0; i<2; i++)
      {
        digitalWrite(inApin[i], LOW);
        digitalWrite(inBpin[i], LOW);
      }
      analogWrite(pwmpin[motor], 0);
    }
    void motorGo(uint8_t motor, uint8_t direct, uint8_t pwm)
    {
      if (motor <= 1)
      {
        if (direct <=4)
        {
          // Set inA[motor]
          if (direct <=1)
            digitalWrite(inApin[motor], HIGH);
          else
            digitalWrite(inApin[motor], LOW);
          // Set inB[motor]
          if ((direct==0)||(direct==2))
            digitalWrite(inBpin[motor], HIGH);
          else
            digitalWrite(inBpin[motor], LOW);
          analogWrite(pwmpin[motor], pwm);
        }
      }
    }
    



    Andoid


    On Google Play, a huge number of ready-made applications for remote control. Of all, I liked this application the most .


    Interface The

    logic of the application The
    application sends every second code of the current combination of pressed buttons via bluetooth.
    • "S" - stop
    • "F" - go ahead
    • "B" - back
    • "L" - to the left
    • "R" - to the right
    • "I" - forward and to the right
    • "G" - forward and left
    • "H" - back and right
    • "J" - back and left

    Control is possible both by pressing keys and using a gyroscope. The functionality of the application is quite trivial, but that’s enough.

    Video




    Video Snow Blower 1.0 and 2.0
    Time goes by, and you need to train in robot control. I decided not to lose time until the next battles of the Armored Boat and to the contest of robotic lawnmowers . I attached a scraper to the combat robot, worked a little on increasing the friction of the wheels, by modifying the tread, set a special signal.



    PS: The next project is an autonomous underwater robot. I'm getting ready for the X-Prize contest . :). Link . It remains to save $ 2000.

    The registration deadline is 30 June, 2016 (11:59 PM UTC / 4: 59 PM PST). The registration fee is $ 2,000.00 USD.

    Also popular now: