How to build an IoT-based EV Charging app using AWS IoT?

build ev charging app

 

 

With the increase in electric vehicles (EV), the demand for fast charging facilities has increased. The global market size of EV charging stations is expected to grow from 2,115 thousand units in 2020 to 30,758 thousand units in 2027 at a CAGR of 46.6%.

Information systems based on advances in IoT, communication platforms and associated sensing devices are being developed to facilitate fast EV charging. These innovative technologies can bring revolutionary fast-charging solutions that are flexible enough to support the charging of all EVs and provide maximum uptime.

In this article, the key components and the process of building an IoT solution for EV charging has been discussed, covering all the following essential points in detail:

  • What are electric vehicles?
  • What are the significant features of an EV charging app?
  • What are the technology components used to build an EV Charging app?
  • How does the OCPP protocol work for an EV charging station?
  • IoT Cloud design
  • How does EV Charging work?
  • Implementing AWS IoT Core on EV Charging App
  • What are the use-cases of EV charging in different environments?

What are electric vehicles?

Electric vehicles operate on electric motors instead of gasoline engines like in ICE (Internal Combustion Engine) vehicles. Charging of EVs happens from AC to DC power source using hone outlet or installed EVSE (Electric Vehicle Supply Equipment).

There are different types of EVs:

  • Battery Electric Vehicle (BEV): It is an EV that runs entirely on electricity. Its electric functionality helps in zero-emission of gas fumes and other polluting gases.
  • Plug-in Hybrid Electric Vehicle (PHEV): It has both an ICE and an electric motor. It works with both engines but performs better with ICE.
  • Fuel Cell Electric Vehicle (FCEV): FCEV requires a fuel cell stack to use hydrogen to generate an electric charge. Cells are not rechargeables like PHEV and BEV batteries, but it is refueled with hydrogen in the same way as gasoline.

What are the significant features of an EV charging app?

An EV charging app must provide the following essential features:

  • Real-time location detection and providing information about available charging stations
  • Scheduling charging date and time, setting reminders, getting notifications and tracking usage
  • Real-time updates of the charging status
  • Feedback from users about charging station
  • Payment directly through the app
  • Finding all stations along the road trip route
  • Checking station ratings and description
  • Notification to alert when there’s a charging station nearby

What are the technology components used to build an EV charging app?

The most significant technological components required to build an EV charging app include:

  • Cloud environment: AWS, Google, Azure
  • Database: MongoDB, Hbase, MySQL, Cassandra, Mail Chimp Integration, Postgress and Redis
  • Communication Protocol: OCPP
  • Real-time analytics: Big Data, Hadoop, Spark, Apache Flink, Cisco.
  • Server: NGINX
  • Framework: Laravel
  • Find user location: Google Places API, Google Maps, Core Location Framework
  • Payments: Paypal, Braintree, Stripe, EWallets
  • Push Notifications: Push, Twilio, Amazon SNS, Urban Airship, Firebase Cloud Messaging.
  • MS, Voice and Phone verification: Twilio, Nexmo
  • Front-end: ReactJS, HTML, Bootstrap and CSS for web application. Kotlin, Swift, Objective C for mobile applications.
  • Back-end: Node JS for new microservices and review for existing services, Python and JS

How does the OCPP protocol work for an EV charging station?

Infographic for OCPP for EV charging 2

OCPP stands for Open Charge Point Protocol. It is an application protocol that allows communication between charging stations and their management systems.

When the charging station is turned on, the OCPP tries to connect with the management software. The software verifies the identity of the charging station. After successful verification, the IT backend sends a signal to the EV charging station management system to identify its availability. The station responds by providing its current status with the date and time.

The authorization process begins when a user requests to start the charging. In response to the request, the power supply nozzle is unlocked and plugged into the e-vehicle to start charging. At this stage, OCPP sends another transaction message denoting that the charging process has begun.

When the user wants to stop charging, identification verification is required again at the charging station through the mobile app. When the StopTransaction message is sent to the station, the charging is stopped and the user is ready to leave.

The OCPP protocol benefits the EV charging system in many ways:

  • Reservation: The drivers or the owners of EV have the advantage of reserving the place using the app.
  • Remote features: Station partners can remotely manage the functionalities of charging stations.
  • Smart charging: The charging station automatically increases or decreases the power supply to optimize its performance.
  • Data transmission: OCPP supports data transfer between different mobile apps, management software and EV charging stations.
  • Diagnosis: It anticipates issues beforehand and gives warnings in advance. It also provides the capability to diagnose and solve problems remotely.
  • Reporting: OCPP gathers complete information about the charging station’s current state and reports it to system administrators.

IoT Cloud design

Cloud is one of the most significant components used to build an IoT solution for EV charging. Depending on the services required in the project, the design plan for the cloud is usually structured.

Infographic for IoT solution for EV charging

  1. EVSE sends data to the cloud.
  2. MQTT (Message Queuing Telemetry Transport) is the lightweight communication protocol used for data transfer between IoT devices and Cloud IoT.
  3. The message is then sent to the MQTT broker, which response to the designated database according to the settings made in IoT Communication.
  4. The cloud provider services extract the data to different data processes, mainly for storage and data analytics. Data analysis helps contribute more insight into other charging behavior, processes happening in the background and maintaining the entire infrastructure.Data storage is done for long-term documentation and additional versioning.
  5. Databases also transfer the data to API.
  6. API receives the data in JSON format, which is used in developing the mobile app. The mobile app allows users to gain administrative views.However, most of the data is visible after the charging process is validated with a token. Once the token authenticates the user, the mobile app then acts as a portal to operate EVSE, charge EV, handle billing and get charging information.

IoT devices use M2M and MQTT protocols to execute their operations. The connected M2M devices exchange the collected data to the end-point within a single network. Each packet over the MQTT protocol consists of three parts: payload, variable header and fixed header. The QoS value determines the quality of transportation over MQTT. Three QoS options are used for transporting a message:

  • QoS 0: It provides the fastest delivery as it either transmits the message at most once or not at all. If the connection is interrupted, the message is lost as it is not stored anywhere.
  • QoS 1: It ensures the message is delivered at least once. However, the chances are that the same message is received multiple times in case of failure before the acknowledgment.
  • QoS 2: It is the slowest and safest Quality of Service. It uses handshaking and acknowledgment sequences for message transmission.

The EVSE must support both CAN and CCS’s PLC communication to cover the market’s EV base. IoT devices are designed in a way to carry smooth interaction with customer’s EV and IoT Cloud. Cloud providers provide the SDK for building IoT applications. EV customers can plug their vehicle into EVSE and start charging. According to the plug type, the IoT device will do the charging process. The device acts as an MQTT client and communicates with IoT Cloud MQTT Broker with an X.509 certificate.

Step into the NFT world with our robust NFT development solutions.

LeewayHertz NFT development company

How does EV charging work?

The charging process of EVs is explained under regular charging and advanced charging processes.

Normal Charging Process

It is a five-step process.

  1. Customers decide to charge their EVs and visit the fast-charging station for this purpose.
  2. The customer selects the charging station from the mobile app to proceed with charging the EV.
  3. The customer selects CHAdeMO or CCS standard based on the type of EV. CCS enables AC/DC charging through the same port, while CHAdeMO equipped vehicles have separate AC and DC charging ports.
  4. After completing the charging process, the customer selects the payment option through the mobile app.
  5. After completing the payment, the customer receives the receipt of charging on the mobile phone.

Advanced Secure Charging Process

The standard charging process is elaborated from the customer’s POV. On the other hand, the advanced charging process is described with background activities and keeping the normal charging process running.

Infographic for EV charging process

  1. The customer selects the charging station using the mobile app. The map on the application allows users to locate and check the status of charging stations. Available stations display the details, including Charging standards (CCS or CHAdeMO), price per minute, location, address, and charging station power. The mobile application also allows reserving the available charger for a specific duration.
  2. At the station, the customer plugs the charging pistol into the EV. Once it recognizes the app interaction, it begins to communicate the next steps through the cloud service back end. The user needs to log in using their credentials to get the receipt of charging.
  3. Charging stations may offer either one or both CCS and CHAdeMO standards. The users can select the desired charging standard pistol using the mobile app. Besides, if the station provides only one charging standard, the app indicates the available port by app visualization or environment coloring.
  4. Payment options depend on the service provider; however, it must support the most common debit, credit cards and UPIs. The payment service provider uses a tokenization procedure to grant the token to accomplish payment. A valid Token provides customers temporary time-based access to start and stop actions of the app. The app sends the action over API to the cloud and then the updated information is displayed to the customer.
  5. It takes approximately 10 to 40 minutes to complete the charging process using fast charging technology. Meanwhile, regular updates are provided to the customer. The charging station sends data to the cloud and forwards it to APIs. The mobile application reads the RESTful API Json data and updates the user interface.
  6. When charging is complete, or the stop button has been pressed, the mobile app will send an HTTP API request to the cloud back end apply changes to the controller. The controller will lower the current and voltage and indicate to remove it from the EV safely.
  7. Once the charging is complete, the user will receive a receipt of the charging. It includes energy displayed in kW/h, price per minute, total amount and duration of charging. The start and stop time of charging is recorded and kept for at least ten years due to law regulations. The authentication token is deleted after the charging process is complete.

Implementing AWS Core on EV Charging App

AWS IoT Core is Amazon’s cloud service that enables connected devices to securely and efficiently interact with cloud applications and other devices. It supports MQTT, MQTT over WSS, HTTPS and LoRaWAN communication protocols.

The setup required to develop an IoT solution for EV charging include:

  • An entire data pipeline that can store the raw data such as signals of devices, voltage, current, power and temperature figures
  • Sample the data per hour and store it
  • Calculate the overall combined power load across all devices and store it
  • Invoke an ML model and monitor the power to see if it has reached the threshold. If capacity exceeds the threshold, an MQTT message is sent to the device to turn it off.

The data collected from the devices contain power in Watts and a timestamp. Besides, sometimes a situation may arise when the cables of these chargers deteriorate and the current shorts to the vehicle’s chassis, which eventually may lead to some severe hazard. In such a case, the stakeholders are notified immediately.

Infographic for Cloud Data Pipeline

The data captured, filtered and aggregated at IoT Core is then transmitted to AWS IoT Analytics and Lambda function. AWS IoT Analytics operationalizes analysis and scales automatically to support a massive volume of IoT data.

It helps developers to analyze the data and build fast and responsive IoT applications. Lambda function is used to run code without provisioning or managing servers. Lambda allows to:

  • Build data processing triggers for AWS services, including Amazon DynamoDB and Amazon S3
  • Process the streaming data stored in Amazon Kinesis
  • Create Lambda applications that are secure, scalable and easily extensible

The machine learning models are implemented using Amazon Sage Maker, enabling developers and data scientists to prepare, develop, train, and deploy ML models. The predicted data is stored in the database and simultaneously sent to IoT Events.

IoT Events makes it easy to detect and respond to events from IoT devices, sensors and applications. The developers need to define a simple logic for each event using “if-then-else” statements and select the alert or custom actions to trigger when an event occurs.

IoT Events can trigger a range of actions:

  • Insert a message into a DynamoDB table
  • Split message into multiple columns of DynamoDB table
  • Send an alert as an SNS push notification
  • Send a message to a Lambda function
  • Send a signal to an Amazon Kinesis Stream
  • Store a statement in an Amazon S3 bucket
  • Send message data to CloudWatch metric
  • Send an alert to an Amazon Kinesis Firehose stream
  • Send message data to asset properties in AWS IoT SiteWise
  • Write a message into a Timestream table

IoT Events continuously monitors data from devices and integrates with IoT Core and AWS Analytics to enable early detection and generate unique insights into the events.

What are the use-cases of EV charging in different environments?

With a compact design and interfaces, EV charging solutions offers robust connectivity in diverse environments. Some of the business use-cases of EV charging solutions are as stated below.

  • Residential Charging
    EV charging solutions are integrated with easy-to-install and safety features for housing societies and residential areas. These solutions exhibit more than 95% conversion efficiency and lower the total cost of ownership of battery-powered vehicles.
  • Public Charging
    Public charging stations prefer AC type 2 chargers, especially for workplaces, businesses, malls and public, commercial charging. With high durability and robustness, these systems are managed by centralized software. When installed in public places, these EV charging solutions provide plug-and-play compatibility for all vehicles. RFID tags assist the admin in authenticating users and handle the applications associated with these chargers.
  • Fleet Charging 
    EV Fleet charging solutions support all types of vehicles and charging needs through a DC charger. These charges are based on cutting-edge technologies in hardware design and application software. They provide 30KW-300 KW of EVs along with the capability of firmware and software upgrading over the air. It is also possible to integrate these chargers seamlessly with multiple payment platforms.

Conclusion

The article’s purpose was to provide an overview of creating an IoT solution for EV charging used for commercial and private purposes. With IoT, EV charging systems have become more efficient and convenient for EV owners and service providers. AWS IoT Core helps to configure, develop and manage the things objects, jobs, certificates, rules, policies and other elements of an IoT solution.

If you look forward to creating and implementing IoT solutions for your business, there’s no better technology partner than us. We have already served various clients by providing custom IoT solutions. Our team of IoT experts has extensive experience and excels in developing and deploying IoT solutions efficiently. We can offer you world-class development facilities and help you take your business to the pinnacle. So, grab the opportunity to grow your business and experience your dreams coming to reality.

Author’s Bio

Akash Takyar
Akash Takyar
CEO LeewayHertz
Akash Takyar is the founder and CEO at LeewayHertz. With the experience of building over 100+ platforms for startups and enterprise allows Akash to rapidly architect and design solutions that are scalable and beautiful.
Akash's ability to build enterprise-grade technology solutions has attracted over 30 Fortune 500 companies, including Siemens, 3M, P&G and Hershey’s. Akash is an early adopter of new technology, a passionate technology enthusiast, and an investor in AI and IoT startups.
Start a conversation by filling the form
Once you let us know your requirement, our technical expert will schedule a call and discuss your idea in detail post sign of an NDA.

All information will be kept confidential.

 Send me the signed Non-Disclosure Agreement (NDA)