How to make Coca-Cola Vending Machine | Homemade Sensor Vending Machine| Proximity Dispenser
Table of Contents
Introduction
In this tutorial, you will learn how to create a homemade Coca-Cola vending machine using a proximity sensor. This DIY project utilizes basic materials such as cardboard, a water pump, and an IR sensor to dispense Coca-Cola. Whether you're a hobbyist or looking for a creative project, this guide will walk you through the essential steps needed to build your own sensor-based vending machine.
Step 1: Gather Materials
Before you start building, ensure you have all the necessary materials:
- Cardboard (for the structure)
- Water pump (to dispense the drink)
- Transistor (BC547)
- Coca-Cola (or any beverage of your choice)
- Proximity sensor (IR sensor)
- Battery (3.7V or 5V)
- Wires and connectors
Tip:
Organize your workspace to make the building process smoother.Step 2: Build the Vending Machine Structure
- Create the Base: Cut a piece of cardboard to form the base of your vending machine.
- Construct the Walls: Cut additional pieces of cardboard to create walls around the base. Ensure there's an opening for the dispensing area.
- Make a Top Section: Create a top section that can hold the beverage container. Ensure it aligns with the dispensing area.
Common Pitfall to Avoid:
Make sure the structure is stable and can support the weight of the beverage.Step 3: Install the Water Pump
- Position the Pump: Place the water pump inside the base of the vending machine, ensuring it fits securely.
- Connect the Tubing: Attach one end of the tubing to the pump and the other end to the dispensing area. This will allow the drink to flow out when the pump is activated.
Practical Tip:
Test the water pump with water first to ensure it functions properly before using Coca-Cola.Step 4: Set Up the Proximity Sensor
- Attach the Sensor: Install the IR sensor at the front of the vending machine. This will detect when someone is in proximity.
- Connect the Wiring
- Connect the sensor to the transistor (BC547).
- Follow the wiring diagram that shows how to connect the sensor's output to the transistor, which will control the pump.
Wiring connections
Wiring connections
- IR Sensor Output → Base of BC547
- Collector of BC547 → Water Pump
- Emitter of BC547 → Ground
Tip:
Make sure the connections are secure to avoid any operational issues.Step 5: Power the System
- Connect the Battery: Use a 3.7V or 5V battery to power the entire system.
- Check Voltage: Ensure that the voltage is suitable for both the water pump and the sensor.
Common Pitfall to Avoid:
Double-check that you are using the correct battery voltage to prevent damage to components.Step 6: Test the Vending Machine
- Activate the Sensor: Stand in front of the vending machine to trigger the IR sensor.
- Test Dispensing: The pump should activate and dispense Coca-Cola from the nozzle.
Practical Tip:
Adjust the sensor's sensitivity if needed to ensure it activates at the right distance.Conclusion
Congratulations! You've successfully built a homemade Coca-Cola vending machine using a proximity sensor. This project not only demonstrates basic electronics and DIY skills but also results in a fun, working model. As next steps, consider customizing the design or experimenting with different beverages. Enjoy your creation and share it with friends!