Arduino Coin-Operated Car Wash

Arduino Coin-Operated Car Wash with LCD & SSR Relays | Kids Robotics Project | MakeMindz

Arduino Coin-Operated Car Wash 🚗🫧

Drop a coin, press a button, and watch Wash, Soap, Blow and Water switch on one by one! Build a real vending-style controller with an LCD screen and learn how robots control big machines safely.

Arduino UnoAges 10+Intermediate2–3 Hours

🌟 What Will You Build?

This project is a multi-stage coin-operated car wash controller. A coin acceptor adds money (credit). You choose a stage with big arcade buttons: WASH, SOAP, BLOW or WATER. The Arduino switches the right SSR-40A relay, counts the credit down on the LCD, and switches everything off when the money runs out.

💡 Fun fact: An SSR (Solid State Relay) has no clicking parts inside. It switches with light and electronics, so it is silent and lasts a very long time!
⚠️ Safety first: The relay output side connects to pumps and blowers that may use mains power. Kids should build the low-voltage part (LCD, buttons, coin acceptor, LEDs). An adult must do all mains wiring.

🧰 Parts You Need

🧠Arduino UnoThe brain
📺16x2 I2C LCDShows credit and stage
🪙Multi-coin acceptor (12V)Pulse output type
🔴4 Arcade buttonsWash, Soap, Blow, Water
⚡4 × SSR-40A relays3–32V DC input
🔌12V 2A power supplyFeeds coin acceptor and Arduino
💡4 LEDs + 220Ω resistorsSafe test loads
🧵Jumper wires & breadboardFor connections

🔌 Circuit Diagram

ARDUINO UNO I2C LCD 16x2SDA SCL COIN ACCEPTORsignal pin 4 ARCADE BUTTONSWash SoapBlow Water A4 · A5D2D4 D5 D6 D7 D8D9D10D11 SSR1 WASHSSR2 SOAPSSR3 BLOWSSR4 WATER → Pumps / blower(adult wiring) All grounds (GND) joined together. Buttons use INPUT_PULLUP: other leg goes to GND.

📋 Wiring Table

PartPart PinArduino Pin
LCD (I2C)VCC / GND / SDA / SCL5V / GND / A4 / A5
Coin acceptor+12V / GND / Signal12V supply / GND / D2
Wash buttonOne leg / other legD4 / GND
Soap buttonOne leg / other legD5 / GND
Blow buttonOne leg / other legD6 / GND
Water buttonOne leg / other legD7 / GND
SSR1 to SSR4Input + (3) / Input − (4)D8, D9, D10, D11 / GND
🪙 Coin acceptor tip: Set it to send 1 pulse per coin using its teach/learn mode, and use a 10kΩ pull-up from signal to 5V if your model needs it.

🪜 Step-by-Step Instructions

1
Collect and check your parts. Lay everything out. Install the LiquidCrystal_I2C library in the Arduino IDE (Sketch → Include Library → Manage Libraries).
2
Connect the LCD. VCC to 5V, GND to GND, SDA to A4 and SCL to A5. The screen glows when powered.
3
Connect the coin acceptor. Give it 12V and GND, then join its signal wire to D2. Join its GND with the Arduino GND.
4
Wire the 4 arcade buttons. One leg of each button to D4, D5, D6, D7. The other legs all go to GND.
5
Test with LEDs first. Put an LED and 220Ω resistor on D8–D11 (long leg to the pin, short leg to GND). Safe and perfect for practice!
6
Upload the code below. Select Board: Arduino Uno and the right COM port, then press Upload.
7
Try it. Drop a coin. The LCD shows your credit. Press a stage button and its LED lights up while the credit counts down. Press the same button again to pause.
8
Connect the SSRs (adult job). Replace each LED with an SSR input: D pin to terminal 3, GND to terminal 4. The load (pump or blower) is wired in series with the live wire on terminals 1 and 2. Use a proper enclosure and fuse.

💻 Arduino Code

Change the prices in pricePerMin to set how much each stage costs per minute.

// MakeMindz - Coin-Operated Car Wash
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);   // try 0x3F if blank

const byte COIN_PIN = 2;
const byte btnPins[4] = {4, 5, 6, 7};
const byte ssrPins[4] = {8, 9, 10, 11};
const char* names[4]  = {"WASH ", "SOAP ", "BLOW ", "WATER"};

float pricePerMin[4] = {30, 20, 25, 15};  // Rs per minute
const float COIN_VALUE = 10;              // Rs per coin pulse

volatile unsigned int pulses = 0;
volatile unsigned long lastPulse = 0;
float balance = 0;
int active = -1;                          // -1 = nothing running
unsigned long lastTick = 0, lastPress = 0, lastShow = 0;

void coinISR() {
  unsigned long now = millis();
  if (now - lastPulse > 30) { pulses++; lastPulse = now; }
}

void setRelays() {
  for (byte i = 0; i < 4; i++)
    digitalWrite(ssrPins[i], i == active ? HIGH : LOW);
}

void setup() {
  lcd.init(); lcd.backlight();
  for (byte i = 0; i < 4; i++) {
    pinMode(btnPins[i], INPUT_PULLUP);
    pinMode(ssrPins[i], OUTPUT);
    digitalWrite(ssrPins[i], LOW);
  }
  pinMode(COIN_PIN, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(COIN_PIN), coinISR, FALLING);
  lcd.setCursor(0, 0); lcd.print("MakeMindz CarWash");
  lcd.setCursor(0, 1); lcd.print("Insert coin...");
  delay(1500); lcd.clear();
}

void loop() {
  // 1. Add coins
  noInterrupts(); unsigned int p = pulses; pulses = 0; interrupts();
  if (p > 0) balance += p * COIN_VALUE;

  // 2. Read buttons
  for (byte i = 0; i < 4; i++) {
    if (digitalRead(btnPins[i]) == LOW && millis() - lastPress > 300) {
      lastPress = millis();
      if (balance > 0) {
        active = (active == i) ? -1 : i;  // press again = pause
        lastTick = millis();
        setRelays();
      }
    }
  }

  // 3. Count down credit while a stage runs
  if (active >= 0 && millis() - lastTick >= 1000) {
    lastTick += 1000;
    balance -= pricePerMin[active] / 60.0;
    if (balance <= 0) { balance = 0; active = -1; setRelays(); }
  }

  // 4. Update LCD
  if (millis() - lastShow > 250) {
    lastShow = millis();
    lcd.setCursor(0, 0);
    lcd.print("Credit: Rs "); lcd.print((int)balance); lcd.print("   ");
    lcd.setCursor(0, 1);
    if (active >= 0) {
      int secs = balance * 60.0 / pricePerMin[active];
      lcd.print(names[active]); lcd.print(" ON ");
      lcd.print(secs); lcd.print("s    ");
    } else {
      lcd.print("Pick a stage    ");
    }
  }
}

🧩 How the code works

The coin acceptor sends a tiny pulse for each coin. An interrupt catches it instantly, so no coin is missed. Every second, the Arduino subtracts the stage price from your credit. When credit hits zero, all relays turn off.

🛠️ Troubleshooting

LCD is blankTurn the blue contrast screw. Change the address from 0x27 to 0x3F.
Coins not countedCheck the pulse setting (1 pulse per coin) and the shared GND.
Relay stays onCheck that the SSR input + and − are not swapped.
Two coins counted for oneRaise the 30 ms debounce value in coinISR to 50.

🚀 Upgrade Ideas

Add a buzzer when time is almost over, save your earnings in EEPROM, add a Stop button, or use a bigger 20x4 LCD to show all four prices at once.

❓ FAQ

Can I use mechanical relays instead of SSR-40A?Yes. Use relay modules with a flyback diode, but SSRs are quieter and last longer.
Why use INPUT_PULLUP for buttons?It uses the Arduino's built-in resistor, so you need no extra parts.
Can kids build this alone?Kids can build the low-voltage part. Mains wiring needs an adult, always.
Can I run two stages together?Yes. Change the setRelays logic to allow more than one active stage.
Made with ❤️ by MakeMindz · makemindz.com · Learn, Build, Play

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course