
π Automotive Β· State Machine
Every state of an electric vehicle charging session at a public charger, from plug-in to payment, including faults and idle fees.
Drawing diagramβ¦
State machine for an EV charging session (OCPP style): Available, Preparing when the cable is plugged in, Authorising via app or RFID card, Charging, Suspended by the car or the charger, Finishing, then Payment and back to Available. A fault moves to Faulted. If the car stays plugged in after charging, it goes to Idle with an idle fee.
stateDiagram-v2 [*] --> Available Available --> Preparing: Cable plugged in Preparing --> Authorising: App or RFID tap Authorising --> Charging: Authorised Authorising --> Available: Rejected Charging --> Suspended: Car or grid pauses Suspended --> Charging: Resume Charging --> Finishing: Battery full or driver stops Charging --> Faulted: Charger fault Faulted --> Finishing: Bill energy delivered Finishing --> Idle: Car still plugged in Idle --> Payment: Unplugged (idle fee) Finishing --> Payment: Unplugged Payment --> Available
A connected vehicle platform: the telematics unit in the car, the cloud services that collect data and send commands, and the owner's mobile app.
How a carmaker updates vehicle software over the air: campaign targeting, owner consent, download, safe installation and reporting.
A charge point operator's platform: chargers speaking OCPP, a central management system, driver app, payments and roaming.
Where each part of a fleet management system runs: GPS devices in trucks, cloud services for tracking and analytics, and apps for managers and drivers.
What happens when a rider books a cab: fare estimate, driver matching, pickup, the trip and payment.
A database schema for a car dealership: vehicles in stock, customers, test drives, bookings, sales and service jobs.