DIY Automatic Water Vending Machine Using Arduino
DIY Automatic Water Vending Machine Using Arduino
Home (/) / Microcontroller Based Projects (/microcontroller-projects) / DIY Automatic Water Vending Machine using Arduino
Debasis Parida
Opta Expansions
(/users/debasis- (https://bit.ly/49SXcM4
parida) )
16 programmable inputs for
Author connecting digital sensors and
eight more relays to operate
machines
(https://bit.ly/49SXcM4
)
WaterVending
Solutions: Thin, low profile cabl
(https://bit.ly/455GmZx with extremely tight bend radii
007
)
防钓型
Machine
Black Plated RF
Connectors and
Adapters
DIY Automatic Water Vending Machine using Arduino
(https://bit.ly/3KlNesc )
USINGARDUINO
Vending machines are very popular nowadays due to their ease of
Industrial plating option with
enhanced durability for a
variety of harsh environments
(https://bit.ly/3KlNesc )
use, multiple use cases, and no human intervention. It can dispense
products such as beverages, tickets, snacks, etc. by inserting currency G9KB Series High
coins. Vending machines appear in public and private areas such as Power PCB DC Relay
(https://bit.ly/3R5kpUL
malls, markets, offices, etc. for various applications. In this project, we
)
are going to build a Portable Drinking Water vending machine Omron's G9KB series supports
high current applications with
(https://circuitdigest.com/project/arduino-based-vending-machine) high capacity load ratings
using Arduino which can be used in any public places such as tourism
places to dispense drinking water or any other beverage using (https://bit.ly/3R5kpUL
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 1 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
(https://bit.ly/453b0D5
)
As shown in the block diagram above, the Coin acceptor module acts as
the input device which gives the signal to Arduino when it detects a
valid Coin inserted within it. Arduino receives the signal and gives the
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 2 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
Coin acceptor modules accept currency coins which can be suitable for
various vending machines. Coin acceptor modules are available in
multiple categories including single coin acceptor
acceptor,, comparable
type coin acceptor
acceptor,, multi-coin coin acceptor, etc. The Single coin
acceptor is specially designed to accept only a specific coin. A
comparable type of coin acceptor is used to accept the coins that are
similar to the coins put aside the coin acceptor. Multi-coin coin
acceptors can accept different coins with one machine, and output
different signals to the microcontroller. In this project, a single coin
acceptor is used.
The coin accepting device has an inbuilt microcontroller that takes data
from the sensor inside the device and collects different coins. Using
this data, the microcontroller knows whether this coin needs to be
accepted or returned. The device is easily programmed using a push-
button located on the top. The coin acceptor device gives us an impulse
signal on the output pin for every inserted coin and by counting
impulses we know how many coins have been inserted. It also has three
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 3 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
To train the Module for a specific coin, follow the steps below:
First, press the push button located on the top and hold it for 4-5
seconds until the RED LED glows up, and then release it.
While the RED LED is on, insert the coin we want to program it for.
For example, if we want to program it for 2 Rupees coins, then we
will insert only 2 Rupees coins while we program it.
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 4 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
Insert the same coin into the device 30 times in order to train the
coin to memory. After the programming is over, the LED will turn off
and the device is ready for use.
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 5 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
Optocoupler
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 6 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
ACPUMP
230VAC
GND
SIG
12V
CircuitDigest
(/fullimage?i=/circuitdiagram_mic/Drinking-Water-Vending-Machine-
Circuit-Diagram.jpg)
First, define the pins which are used in the hardware as shown below.
Digital Pin 2 is used as an input interrupt pin and Digital pin 6 & 12 are
used for TRIAC & LED respectively.
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 7 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
void setup() {
Serial.begin(9600);
attachInterrupt(digitalPinToInterrupt(COIN), coinInterrupt, RISING);
pinMode(TRIAC, OUTPUT);
pinMode(LED, OUTPUT);
}
void loop() {
if(Coin_insert) {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(TRIAC, HIGH);
delay(12000);
digitalWrite(TRIAC, LOW);
delay(2000);
Coin_insert = false;
}
else {
digitalWrite(LED, LOW);
digitalWrite(TRIAC, LOW);
}
}
void coinInterrupt() {
Coin_insert = true;
}
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 8 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
After assembling all units in an enclosure, the setup looks like below:
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 9 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
Code
Coin_Acceptor.ino
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 10 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
void loop()
{
if(Coin_insert)
Video
Tags
(Https://Chat.whatsapp.com/JR4e0Fc0V20H6jTMDd1daT)
TELEGRAM
(Https://T.me/Circuitdigest)
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 11 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
DISCORD
(Https://Discord.com/Invite/UXJrFJSWpz)
FORUM
(Https://Circuitdigest.com/Forums)
Comments
Submitted by Beast (/users/zxcesler) on Fri, 11/18/2022 - 11:42
Permalink (/comment/35806#comment-35806)
Log in (/user/login?destination=/microcontroller-projects/diy-
automatic-water-vending-machine-using-arduino%23comment-form)
or register (/user/register?destination=/microcontroller-projects/diy-
automatic-water-vending-machine-using-arduino%23comment-form)
to post comments
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 12 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
(/simple-raspberry-pi-projects-for-beginners)
(/arduino-esp8266-projects) All
projects)
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 13 of 14
DIY Automatic Water Vending Machine using Arduino 16/06/2024, 01:29
OUR
NETWORK
(https://circuitdigest.com)
(https://components101.com)
(https://iotdesignpro.com)
https://circuitdigest.com/microcontroller-projects/diy-automatic-water-vending-machine-using-arduino Page 14 of 14