Alcohol Scavenging Pet

The Alcohol Scavenging Pet is an arduino-based line-following robot designed to play an interactive game with its owner. The robot moves along the path line (black tape) on a loop. The owner treats the pet one shot per time on its path line. When the robot detects the shot (obstacle), it stops in front of it and “smells” it (checks alcohol level). If the shot contains alcohol, the pet gets excited (plays respective melody), and stores the shot in its nest (Alcohol House terminal). If the shot does not contain alcohol, it gets disappointed (plays respective melody), and “discards” the shot to the bin (Water House terminal). Then it gets back to its track for more scavenging!

Step 1: Gather Materials, Components and Tools

Materials and Components:

For the robot you will need:

  • 1x 2WD Smart Motor Robot Car Chassis KIT
  • 2x Wood Boards 2mm - 25 x 50 cm
  • 2x Metal Spacers 20mm
  • M2 x 6mm Screws
  • M2.5 x 6mm Bolts
  • M3 x 6 Bolts
  • Double Sided Foam Tape

  • 1x Arduino Uno R3 ATmega 328P
  • 1x Prototype Shield with Mini Breadboard for Arduino Uno R3
  • 1x USB Cable Type A/B
  • 2x Line Following TCRT5000 IR Sensors
  • 1x Ultrasonic Sensor HC-SR04
  • 1x MQ3 Alcohol Ethanol Sensor
  • 1x Blue LED
  • 1x Resistor 1kΩ
  • 1x Piezo Passive Buzzer
  • 1x Haljia L9110S Dual-Channel H-Bridge
  • 2x DC Motors (2WD Smart Motor Robot Car Chassis KIT)
  • 1x Switch (2WD Smart Motor Robot Car Chassis KIT)
  • 1x 5000mAh Mini Power Bank with 2.4A Output
  • Jumper Wires

For the set-up you will need:

  • Kappa Board
  • Black Tape
  • Shot glasses
  • Cocktail Umbrellas
  • Alcohol and Non-Alcoholic Drink

Tools:

  • Small Precision Screwdriver Set
  • Pliers
  • Cutter
  • Hot Glue Gun
  • Soldering Station

Step 2: Laser Cut the Chassis

Download the Chassis.3dm file and laser cut the parts.

Step 3: Build the Robot

Put together the laser-cut chassis, the wheels and the electronic components:

  1. Solder black and red jumper wires to the pins on the DC Motors.
  2. Fix the DC Motors on the chassis base using bolts and nuts, as shown in the image.
  3. Push the jumper wires through the holes in the chassis, as shown in the image.
  4. Attach the two front wheels and the back wheel.
  5. Mount the Power Bank between the DC Motors.
  6. Mount Arduino UNO R3 on the upper side of the chassis.
  7. Place the Breadboard Expansion Board above.
  8. Add the Dual-Channel H-Bridge in the designated location and connect the DC Motors’ jumper wires to the Motor A and B pins. The left DC Motor is connected to Motor A pins and the right one to the Motor B pins, as shown in the circuit diagram.
  9. Add the Switch positioned as shown in the image. Cut the USB Cable - that will connect the Power Bank with Arduino UNO R3 - in two, and strip black and red cables on both sides.
  10. Solder the black (ground) wires together. Solder the red wires to the switch terminals. Insulate with hot glue.
  11. Mount the Ultrasonic Sensor, the IR Sensors and the Alcohol Sensor on the laser-cut parts as shown in the image.
  12. With the two metal spacers fix the IR Sensors’ mounting part to the chassis.
  13. Mount the Ultrasonic Sensor on the chassis, as shown in the image.
  14. Mount the Alcohol Sensor on the chassis, as shown in the image.
  15. Mount the cap.

Step 4: Connect Circuit Elements ( Circuit Diagram )

1. Using red jumper wires and black jumper wires create a power and a ground line on the Breadboard Expansion Board. All ground and power jumper wires of the circuit elements will be connected to this lines.

2. Connect H-Bridges pins to the right pins on the breadboard as shown in the circuit diagram.

3. Connect the Sensors pins to the pins on the breadboard as shown in the circuit diagram.

4. Add the Buzzer and LED connected to pins as shown in the circuit diagram.

Step 5: Build the Setup

The track is constructed from black tape with a 3,5 cm width. The terminals are perpendicular to the track and have a width of 13 cm and a length of around 40 cm. The track should not have any bumps in the surface, that could prevent the cup from sliding along when it is pushed by the robot.

The cups don’t have alcohol or water in them, only the red umbrellas are sprayed with alcohol.

The robot will be positioned on the track as to have the black path between both IR Sensors.

Step 6: Load the Code

Summary :

The loop movement on the path is defined by a series of functions. The basic functions are: moveForward(), moveBackward(), rotateLeft(), rotateRight() and stopMotors(). The rotation, done when the robot reaches a terminal, is defined in the function reverseDirection(). This function is triggered when both IR sensors are on black color. The orientation of the robot towards the right terminal, after detecting if the cup is alcohol or water, is done in the function turnAroundObject().

In the void loop(), through a series of If statements, the process is directed. If both IR sensors sense white color, the robot will go forward. If black is detected by one of the IR sensors, the robot will recalibrate its movement to follow the path.

If the robot meets an obstacle, sensed with the Ultrasonic Sensor, the robot will stop and check with the Alcohol Sensor MQ3, if there is alcohol. If the value for the alcohol spikes, then the buzzer will play the alcohol song and it will rotate or move forward so that the cup is pushed towards the alcohol terminal. If the value doesn’t spike, the buzzer will play the water song and the same steps are repeated towards the water terminal.

Share

    Recommendations

    • Arduino Contest 2019

      Arduino Contest 2019
    • Fandom Contest

      Fandom Contest
    • Gardening Contest

      Gardening Contest

    Discussions