IoT car-wash stations
Car-wash bays that start when a Faris card holder scans their card: a Raspberry Pi at every bay, driven by one server I built.
- Faris Petrol
- Dec 2022 – Jan 2023
Overview
Faris Petrol runs fuel stations in Palestine, and some have car-wash bays. Customers who fuel with a Faris card scan it at the bay, and the pump runs for the wash time they have left that day. As a full-stack developer there since 2019, I designed and built the system behind it, from the circuit at each bay to the server, and it ran at several stations.
The problem
Every bay had to know whose card was in front of it and how much time that card had left.
- Only for recent customers. A wash needs a card that fuelled recently, and its daily time is used in turns.
- A pump to switch. A small computer at each bay drives the pump and the lights the customer sees.
- A copy on every Pi. The first version ran the whole system on each Raspberry Pi, with its own data and code.
The solution
Checks before every start. The server asks the company’s card system when the card last fuelled, and keeps the answer for next time. Every run of the pump is logged, so it always knows how much of the day’s time is left.
A circuit at every bay. A Raspberry Pi drives a relay that switches the pump, and three status lights.
One server for all stations. I moved the system to one server that sends each bay’s Pi its commands over the network, so the data, the settings and every update live in one place.
What I did
I built this project on my own.
- Designed and built it end to end: the bay screen, the server, the staff dashboard and the circuit at each bay.
- Wrote the first version on each Raspberry Pi, then moved it to one server that drives every bay.
- Connected it to the company’s card system, and kept its answers so repeat customers aren’t slowed down.
- Built the wash sessions: daily time, pause and carry on, extra time from staff, and a queued stop job.
- Built the dashboard for every wash, the stations, the bays and their pins, and the settings behind the rules.
What it offers
- Scan to startCustomers scan their Faris card at the bay, or type its number.
- For customers who fuelOnly a card that fuelled recently starts the pump.
- A wash time for the dayEach card’s daily time is used in turns, then the pump stops.
- Pause and carry onScanning again pauses the wash, and the next scan carries on.
- Every wash on recordStaff see each wash by station, bay, card and customer.
- Control from the dashboardStaff add extra time, switch a bay on or off and change the rules.
System design
One server runs every station. A bay’s screen sends it the card number, and the server checks the bay, the card and the time left before it tells that bay’s Pi to start the pump.
From a scan to a running pump
The checks run in a fixed order: the bay, the card, then the time left. Every start queues a job that switches the pump off at the end of the turn, even if nobody scans again.
The circuit at every bay
The relay switches the pump’s power, and the lights tell the customer whether it is running. The pins are set per bay in the dashboard, so a bay wired differently needs no change to the code.
One server for all stations
Each bay’s Pi is recognised by its network address, so the server knows which pump to switch. The result: one copy of the data, one place to update, and every wash in one dashboard.
In the product
