Feeding Johnny

by SINGU in Circuits > Arduino

225 Views, 0 Favorites, 0 Comments

Feeding Johnny

WhatsApp Image 2022-06-13 at 11.51.57 PM (1).jpeg
WhatsApp Image 2022-06-13 at 11.51.57 PM.jpeg

By Ali Shokri, Chia Yen Wu & Sai Praneeth Singu.

This project was done as part of a useless machine assignment for the ITECH Programme

Johnny is your hungry and greedy four wheeled robot. Everytime it finds people or obstacles, it turns around and opens its box (mouth). Then you have to feed it money (coins). Then it closes and goes away in search of other people.

Supplies

download.jpg
maxresdefault.jpg
Motor_shield.jpeg
SEN-US01-02.png
TT-Motors-3-6V-Dual-Shaft-148-Reduction-Ratio-125RPM-1.jpg
WhatsApp Image 2022-06-14 at 12.47.19 AM.jpeg
71z22cRPeeL._AC_SX679_.jpg

Basics:

Arduino Uno

Breadboard

USB Cable

Motor Driver shield L293D

Jumper Wires

AA Batteries (x 4)


Sensors:

HC-SR04 Ultrasonic sensor

Piezo Capsule

Motor Related:

DC Motors 6V (x 4)

Micro Servo SG-90 ( x 2)

Display:

LED Light ( x 2)

Mechanics:

Plastic tyre wheels ( x 4)

Material:

Plywood 

Skeleton

assembled.jpg
Exploded_view.jpg
all wood.png
full mechanics.png
WhatsApp Image 2022-06-14 at 3.02.44 AM.jpeg
WhatsApp Image 2022-06-14 at 3.03.30 AM.jpeg

Firstly,  we imagine what our robot should look like in the final stage based on its functionality.Then we design each component according to the dimensions of electrical elements like breadboard, Uno and the  length of wires. In order to do that we Cut some plywood pieces  of 1 inch thickness as shown in the images below.

The 1st part is the base frame which is (17*20) cm2. It is connected with two side walls & one back wall. They are glued together to the base frame. They are permanent connections. We also have the partition wall between the uno & the box. There are two servo motor holders & a coin deposit plate. Also there are two servo motor holders, one for the head & the other for the box.

Now, there's a cap made out of 3 pieces & is connected to the side walls through means of dowels. as shown in the fig.

Downloads

Assemble Motors & Battery Holder

WhatsApp Image 2022-06-13 at 10.54.16 PM.jpeg
WhatsApp Image 2022-06-14 at 2.26.09 AM.jpeg
WhatsApp Image 2022-06-14 at 2.28.25 AM.jpeg
WhatsApp Image 2022-06-14 at 2.37.35 AM.jpeg

On the bottom of the base plate, first we will glue the 4 dc motors on the edges with a glue gun. Then we put 4 AA batteries into the battery holder & stick it on the front. Then, we solder some wires to the motors so that we have a secure connection. The two servos are mounted on their respective platforms. the servo inside the box is given an extension by a pvc pipe which helps to open the box

Motor Connections

WhatsApp Image 2022-06-14 at 2.09.33 AM.jpeg
WhatsApp Image 2022-06-14 at 2.27.17 AM.jpeg
WhatsApp Image 2022-06-13 at 10.39.30 PM.jpeg

Next, we connect the motor driver shield onto the uno board & fix it on the plate by means of a double sided tape. Now, plug the 4 dc motors, 2 servo motors into the allocated slots. We also put the ultrasonic sensor into a holder and onto the 1st servo.

Circuit Diagram

Circuit_Diagram.png

Each connection in the diagram is explained as following:

HC-SR04 Ultrasonic sensor

     Vcc pin:  connected to Motor Driver shield 5V

     Trigger pin: connected to Motor Driver shield A2

     Echo pin: connected to Motor Driver shield A1

     Ground pin: connected to Motor Driver shield GND


Piezo Capsule

     Pin1: connected to Breadboard VCC

     Pin2: connected to Breadboard GND and Motor Driver shield A3


Micro Servo SG-90

     ServoLook

       Signal pin: connected to Motor Driver shield Servo Terminal 1 (pin 9)

       Power pin: connected to Motor Driver shield 5V

       Ground pin: connected to Motor Driver shield GND


     ServoLook

       Signal pin: connected to Motor Driver shield Servo Terminal 2 (pin 10)

       Power pin: connected to Motor Driver shield 5V

       Ground pin: connected to Motor Driver shield GND


DC Motors

     DC Motor1: connected to Motor Driver shield M1

     DC Motor2: connected to Motor Driver shield M2

     DC Motor3: connected to Motor Driver shield M3

     DC Motor4: connected to Motor Driver shield M4



Piezo & Led Circuit

WhatsApp Image 2022-06-14 at 2.52.52 AM.jpeg
WhatsApp Image 2022-06-14 at 2.53.45 AM.jpeg

The breadboard is placed inside the box & the Piezo capsule along with 2 led's are connected to the motor shield using breadboard. The 2 led's are put into the holes on the back wall & they show if the robot is moving or not.

Code & Working

box mechanism through piezo
Hungry robot demo 2
Hungry robot

Mount the wheels to the motor. Upload the code by connecting the Usb to the Uno port. Now power the Motor shield with the AA batteries & the Arduino with the help of a Power Bank. The 4 dc motors start rotating & the robot moves forward until the ultrasonic sensor detects an obstacle within it's range. When it does, the motors stop rotating for 2 seconds. Then the motors rotate backwards for 2 seconds & the robot turns 180 degrees. then the 2nd servo actuates & the box opens. Now feed Johnny with coins through the coin collector below the box. As soon as the coin hits the floor, the piezo detects the vibration & the servo actuates to close the box. Johnny goes to find a new feeder

Downloads

Finished

Congratualtions. You have made your own Johnny which is both hungry & greedy. Thanks for following through.