Week 10

Mechanical design & machine design.

For this week we were divided into two groups; Girls vs boys so for our group ; we did all the work together as a team and out of smart vacuum cleaner and smart dustbin we decided to make the smart vacuum cleaner, since our instructor suggested that the vacuum cleaner was quite interesting and fun for the weekly assignment.

The Link to boys assignment group here.

The Link to girls assignment is here.

Work distribution among our group.

kuku ugyen Yeshey
Team lead video & photography 3D & 2D designing
leaser and vinyl cutting Documentation 3D & leaser cutting
Assembling components Assembling components Programming

Why smart vacuum cleaner; Since the requirement for this week's assignment was to design a machine that includes mechanism+actuation+automation+application so smart vacuum cleaner was a perfect project for this and it is cheap and every household can have a smart vacuum cleaner at a very cheap price. The smart vacuum cleaner is very affordable since the components used in this machine are very cheap compared to the ordinary vacuum cleaner at the market.Components used in the machine; we used an acrylic sheet at the base to hold on the components. And we used cardboard for the body to cover the components inside. We even used breadboards to place components and connections on the board to make circuits without soldering it. Wheels for the vacuum to move around, DC motors to make the wheels move, Ultrasonic sensor to detect the obstacles, batteries (9 V for arduino to program the motors ) And another battery (12 V for the fans to collect the dust.) Stepper Motor drivers convert the low current single from the batteries to the wheel . Jumper wires for connection. Keys SR1y Relay Module is used to control the flow of electricity. IR receiver with remotes for on and off instead of switch button. Fan with 12V for suction.

Workflow

So first we cut out a circle shape on the acrylic sheet for the wheels and components to hold on, then we attached the wheels on the motors. Then we attached the caster wheel on the front to make it stable and for smooth movement for the vacuum cleaner. Then we tried to attach the motor drivers in order to convert the current from the batteries to the wheels for the movement. We used Arduino Uno R3 and connected the motor wheel’s wire to the Driver controller. The battery passes the current to the motor drivers through the bread board.We connected the ultrasonic wire to the to the arduino pins,we used IR receiver for the remote for “ON” and “OFF” IR is connect to the arduino as well and the current from the batteries flows to the relay which is also connected through arduino.

Connection of pins.

Arduino uno R3 Motor driver

Pin 2 → In 1

Pin 3 → In 2

Pin 4 → In 3

Pin 5 → In 4

Pin 9 → ENA

Pin 10 → ENB

GND → Breadboard any pin

VIN → Breadboard any pin

Motor Drivers

Gnd(Middle one ) → Breadboard GND

12V (First one ) → Breadboard VCC

Motor Drivers

OUT 1 & OUT 2 → 1st motor with wheel

OUT 3 & OUT 4 → 2nd motor with wheel.

power supply

+Ve → V of breadboard

-Ve → GND of the breadboard

Remote controlling with the fan

Arduino uno IR Receiver

+Ve → Red cable

GND → Black cable

Pin 6 → Output

Relay

+Ve 5v in arduino

-Ve GND in arduino

S → pin 7 arduino

How it works

So we first cut out the circle from cardboard but that looked awful so we decided to cut on the acrylic sheet and use vinyl sheet on it to look attractive. At first we thought of just a prototype so we cut it out on cardboard but after the result we decided to make it on the acrylic sheet to look better. We even cut out a rectangle to cover the body of the vacuum cleaner.

Girl in a jacket

It was not easy as it is seen. Although it took us almost a week to complete the assignment, we first attached the DC motors to the wheels and tried to connect with the arduino. We got the code from google and tried programming. The code are below

After that we tried to program with the remote using an IR(Infrared)receiver.tThe main reason for using the IR receiver is that instead of using the push button and manually going near the vacuum cleaner to turn it on, we thought of using the IR receiver to turn on using the remote.This remote can Control your arduino .And also easy to use for controlling the output. So below you can see the code. For on its 1 and for off it is 0.

This is the code for IR receiver

#include <IRremote.h>
int RECV_PIN = 9;

int relay = 8;
void setup() 
{
  Serial.begin(9600);
  pinMode(relay, OUTPUT);
  IrReceiver.begin(RECV_PIN, ENABLE_LED_FEEDBACK);
}
void loop() 
{
  if (IrReceiver.decode()) 
   {
     

    if(IrReceiver.decodedIRData.decodedRawData == 0xF30CFF00){
      digitalWrite(relay, HIGH);
      //Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
      Serial.println("on");
      }


     else if(IrReceiver.decodedIRData.decodedRawData == 0xE916FF00){
      digitalWrite(relay, LOW);
      //Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
      Serial.println("OFF");
      }
      
     IrReceiver.resume(); // Receive the next value
   }
  
}  

Now we tried to program with the ultrasonic sensor, which is used mainly to detect the obstacles. When the vacuum cleaner is working it needs to detect the obstacles to change the direction and to avoid hit.according to google it has the sensing capability to sense all the material types. It can work in any adverse conditions. It even has a higher sensing distance in cm and inches compared to inductive/capacitive proximity sensor types. It provides good reading in the sensing of large sized objects with hard surfaces.When the sensor senses the obstacles the direction of the wheel will be towards right, the left wheel will speed up whereas the right wheel will slow down inorder to go to the right direction.

Changing the batteries, we used a drill machine battery which was 19 V and also rechargeable, the motors drained a lot of battery volt so we decided to use the rechargeable batteries, it was a little heavy so we gave a 200 speed limit. Below is the final video where our smart vacuum cleaner is perfectly working. So the Difficulties we faced in these past two weeks, although it was a week break for us we did waste our time sitting back, we came as a group me, yeshey and Kuku three of us. We came to the lab everyday to complete our assignment. The mistake we made was that while using the cardboard it did not look good, so later on we used the acrylic sheet to cut it in a circle. We just used cardboard to cover the component. Next for the wheels we changed it twice and finally came up with the same wheels, the yellow wheel and used screws to hold it tight. At first we used the red wheels but the wheels had trouble moving and could not carry the load. We even 3D printed the wheel holder to hold it tight but later on we got from the different wheel, For the batteries it was very difficult for us to get the 12v batteries from the market it was not available in the lab as well as in the market , finally we decided to use the drill machine battery which was of 19 v, this was too much high volt for our vacuum cleaner so we used the voltage regulator and supplied 12 v (Required voltage for all the supplies.) for the cases like to collect the dust by the vacuum we needed a container to collect the dust so we 3D printed a case which was attracted to the fans, so when the dust is collected by the fans the container will hold the dust inside it.

Girl in a jacket Girl in a jacket Girl in a jacket Girl in a jacket

Below here is the final compiled code.

    #include <IRremote.h>
    int RECV_PIN = 6;
    
    int relay = 7;
    
    int trigPin = 11;    // Trigger
    int echoPin = 12;    // Echo
    long duration, distance;
    
    int motor1pin1 = 2;
    int motor1pin2 = 3;
    
    int motor2pin1 = 4;
    int motor2pin2 = 5;
    int flag = 0;
    void setup() 
    {
      Serial.begin(9600);
      pinMode(relay, OUTPUT);
      IrReceiver.begin(RECV_PIN, ENABLE_LED_FEEDBACK);
    
      pinMode(trigPin, OUTPUT);
      pinMode(echoPin, INPUT);
    
      pinMode(motor1pin1, OUTPUT);
      pinMode(motor1pin2, OUTPUT);
      pinMode(motor2pin1, OUTPUT);
      pinMode(motor2pin2, OUTPUT);
    }
    void loop() 
    {
    
      irLogic();
      readDistance();
    
      if(distance > 20 && flag == 1) 
      {
        analogWrite(9, 200); //ENA pin  //change the speed
        analogWrite(10, 200); //ENB pin // change the speed  make sure this one is same as above to maintain the same speed
    
       //Controlling spin direction of motors:
       digitalWrite(motor1pin1, HIGH);
       digitalWrite(motor1pin2, LOW);
    
       digitalWrite(motor2pin1, HIGH);
       digitalWrite(motor2pin2, LOW);
    
        }
    
        if(distance <= 20 && flag == 1) 
      {
       analogWrite(9, 50); //ENA pin  //change the speed
       analogWrite(10, 0); //ENB pin
    
      //Controlling spin direction of motors:
       digitalWrite(motor1pin1, HIGH);
       digitalWrite(motor1pin2, LOW);
    
       digitalWrite(motor2pin1, LOW);
       digitalWrite(motor2pin2, LOW);
    
      }
    
    
      
      
      
    } 
    
    void irLogic() 
    {
      if (IrReceiver.decode()) 
       {
         
    
        if(IrReceiver.decodedIRData.decodedRawData == 0xF30CFF00){
          digitalWrite(relay, HIGH);
          //Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
          Serial.println("on");
          flag = 1;
    
          
          }
    
    
         else if(IrReceiver.decodedIRData.decodedRawData == 0xE916FF00){
          digitalWrite(relay, LOW);
          //Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
          Serial.println("OFF");
          analogWrite(9, 0); //ENA pin
       analogWrite(10, 0); //ENB pin
    
      //Controlling spin direction of motors:
       digitalWrite(motor1pin1, LOW);
       digitalWrite(motor1pin2, LOW);
    
       digitalWrite(motor2pin1, LOW);
       digitalWrite(motor2pin2, LOW);
          flag = 0;
    
         
          }
          
         IrReceiver.resume(); // Receive the next value
       }
      }
    
    void readDistance(){
      digitalWrite(trigPin, LOW);
      delayMicroseconds(5);
      digitalWrite(trigPin, HIGH);
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
     
      // Read the signal from the sensor: a HIGH pulse whose
      // duration is the time (in microseconds) from the sending
      // of the ping to the reception of its echo off of an object.
      pinMode(echoPin, INPUT);
      duration = pulseIn(echoPin, HIGH);
     
      // Convert the time into a distance
      distance = (duration/2) / 29.1;     // Divide by 29.1 or multiply by 0.0343
    
      
    
      Serial.print(distance);
      Serial.println();
      
      delay(250);
      }
    
    

We would like to thank sir Thinley jamtsho Associate analyst who helped us with the programming and coding, since all three of us were not that perfect in programming, we asked sir to help us so we are very greatful for that.

Future Developments to work On

  1. So in the future we are planning to use 12V which is re-chargeable.
  2. We even planned on using pcb board instead of arduino.
  3. get a higher capacity for the suction of dust by the fans.
  4. modify the vacuum cleaner in a way that when the battery is running out.
  5. Modify the vacuum cleaner that it can go in every direction as well.

 Reference link.

3D design file

2D design file