A self-service dispenser for windscreen-washer fluid, in a summer and a winter version. The customer pays with coins or a payment terminal, presses start, and the machine pumps the paid amount. This is the software that runs it, on a Raspberry Pi with a 1024×600 touchscreen. It succeeds the ATmega-based avr_flow.
How it works#
- The Pi reads three coin acceptors, a card terminal, a flow meter and the service buttons through GPIO. It drives two pumps and a status LED.
- The flow meter gives a fixed number of pulses per litre. The controller counts them, knows how much has been pumped and stops at the paid amount.
- A service menu sets pulses per litre for calibration, price per litre, product type (summer or winter) and a counter reset.
- Money taken and litres dispensed are saved to disk, in total and since the last reset, so they survive restarts.
- A full-screen tkinter interface shows the credit and the dispensed amount. The controller also publishes its state over a local WebSocket.
supervisordkeeps the program running. The Pi boots into a read-only kiosk mode, and the GPIO pins get their initial states at boot through the device tree, before the program starts.