With nowadays’ technology, electric cars struggle to be consistent in the market share, mainly due to price limitations and limited battery life. Moreover, the charging process usually takes a considerable amount of time, typically at least half an hour in charging stations up to several hours in house systems. So why not switching batteries up? At the moment stations only charge the vehicles. Assuming stations also supplied fully-charged battery packs, swapping the batteries instead of charging them would drastically decrease the time for a stop, allowing for quicker trips and shorter queues at the charging points. Empty batteries, usually charged through the grid, will be charged through solar power when possible, contributing to create a greener and cleaner environment. Increasing EVs presence on the road may have a great impact in the pursuit of sustainability.
The Battery Drive-In also helps you to easily plan your journey: look for battery-swapping stations, reserve your swap, check out availability, and much more, whenever and wherever you are. Its smart assistant keeps you updated and gives you advices for your trip while you are on your way.

Purpose and scope

The goal of the system is to improve the usage and experience with electric cars in order to have greener transport system, while increasing battery life and making the trip more enjoyable. Instead of charging the EV at stations, the internal battery is swapped with a fully charged one, allowing for shorter stops. Users can reserve batteries, at home or even on their way, in order to make sure to find one when they approach the station.

The Steps of Ambient Intelligence Systems


Sensors – monitoring the charging progress of batteries inside stations, or the position of the user while booking a swap — provide useful data to the system, in order to allow a smart charging plan to take action.


Data are analyzed and the best charging policies are selected, establishing which and how many batteries should be charged. Regarding the user side: based on geolocalization data and time, the system evaluates when the user is approaching.


In each station a control system for battery recharging is implemented: it plugs and unplugs batteries from the power source based on the current charging policy. Moreover, the system may turn on lights to specify the selected battery, or sirens, to report a theft or a malfunction.


The driver can search for near swapping stations and book a battery if planning an upcoming trip. Moreover, the user is notified with suggestions in case he is approaching a station; for the duration of the swapping procedure, some textual help is provided to him.

Ambient Intelligence Features


Book your battery and check-in when you are there, forget about it for the rest of the trip.


Present and spread throughout the territory, distributed over different people and interoperating over different devices and places.


Using classification algorithms on the set of data coming from sensors and user necessities, it is able to achieve proactive responses.



User the driver of the EV
Station one of the swapping stations inside the network
Battery power supply of the EV, may refer also to a set of different battery cells, still swapped all together
Central server central processing unit of the system, performs computations and evaluates the potential needs of all users using the webapp or close to a battery swapping station
Web app accessible from the user for communicating its needs while planning or during the trip


User driver of an electric car or any person planning to drive it for a considerable amount of time, which however would require him or her to charge the vehicle at least once.

System Requirements

Functional Requirements

APP user access system, user notification system to PC and portable devices, communication user/central server for planification, geolocalization and booking management
STATION connects the correct batteries to the power supply charging them and guides the user during the battery swap.

FR ID Title Description Priority
APP.1 Login System it provides login/logout functionality for the user, accessing to the booking history of the user 1
APP.2 My Bookings it allows the user to review their bookings and cancel the future ones 2
APP.3 Interactive Map allows the user to find the stations based on his position, battery availability 2
APP.4 Battery Reservation dialog of the app where it is possible to reserve a battery for a future swap 1
APP.5 Notification it notifies the user when a swap is imminent based on position and current time 3
APP.6 Routing helper allows the user to find directions for the chosen station 4
APP.7 Instructions supplier it guides the user while the swapping procedure takes place at the station 3
STATION.1 Reads commands connects to the server and reads commands 1
STATION.2 Battery charging using the power grid charges the batteries on time for the swap to occur 1
STATION.3 LED indicator indicates the correct battery booked by the user 2
STATION.4 Alarm activates an alarm in case a battery is stolen or wrongly placed 3
STATION.5 Send message sends percentages or leds' status to the server 1
STATION.6 Read percentage reads batteries' voltages and compute the percentage 1
STATION.7 Default action allows the station to charge a battery even if no command is received 4
Non-Functional Requirements
NFR ID Description Area
1 Requires a system of interchangeable batteries among different car models portability
2 Requires a system of easily swappable batteries portability
3 Possibility for the user to access a web browser with internet connectivity, the web app supports all modern web browsers on all major desktop and mobile platforms usability
4 The service is availbale in English only usability
5 The user needs internet access to check-in at the swapping station usability
6 Bookings can be performed up to 48 hours before the requested time slot usability
7 The system accomodates up to one hour user delay usability
8 The user is allowed to book one battery per station every six hours usability



Nervous System

Distributed computational nodes made of microcontrollers to manage and implement voltage and current sensors applied to the batteries. One per each station and connected via the Internet to the central server, the brain of the system.

Sensory Organs

Sensors to measure voltage of the batteries connected to the microcontroller present in the station, or directly implemented by it.
LED to signal the user which battery he must take.
Buzzer to alert the user if the wrong battery is taken.

Muscle System

Switches enabled by the microcontrollers to charge the correct battery.
A controller to charge batteries from the grid.


Charging Station

Interfaces with sensors and switches via physical connections and connects to the main server via a socket connection to the microcontrollers.

Central Server

Calculates all the required replies for the end users while managing the charge status of the battery. Connects to the charging station via a socket connection to the microcontrollers and to the end user's devices.

User Interface

Runs on the web browser allowing the users to access it with whatever device they want, manages logins, accept request to the service and provides replies after having received a reply from the central server.

Hardware Components

  • Arduino (with power supply and Wi-Fi Board)
  • Raspberry Pi
  • Relay
  • Battery charge controller
  • Li-ion battery
  • Buzzer
  • LED

All components available at LADISPE.

Software Components

  • JavaScript with Velocity, MDL
  • Firebase Auth service v4
  • Python 3 v3.4
  • SQLite 3
  • Flask v0.12.2

Open Issues

  • EVs of different brands have different battery position and different charge time.
  • How to obtain information about the current state of charge of the battery? (Sensor communicating to the phone?)
  • Understanding when a battery is effectively bookable or not, based on its current charge state and its future swapping reservations.