You are on page 1of 13

Chapter 6

Project Implementation and Coding


6.1 Overview of Project Modules
In this system, a simple prototype of power generation using wind and solar and wireless
charging lane will present and through the experiment, it is showing that this lane can provide a
scale-down model with wireless power transmission for EVs, which makes the idea of charging-
on-the-way into reality preliminarily. Because of low transfer efficiency, future work focuses on
the optimization of the wireless charging lane. We also included an IOT and Embedded system
to monitor system from locally as well as from remote location.

 Energy generation: We are using vertical wind turbine and Solar panels to generate
electricity without any air pollution.

Wind and Solar Batteries Controller

 wireless and wired charging: We have developed a wireless power transmission module
using copper coil and T5336 IC. User can charge vehicle using wired adapter as well as
wirelessly during driving.

Power
Batteries Copper Coil
distribution

 Android App: The Android app is used to find the nearest charging lane and monitor the
available charging at charging station.

Charging
Android App Cloud
infrastructure
6.2 Tools and Technologies Used
 Micro- Python - MicroPython is a software implementation of a programming language
largely compatible with Python 3, written in C, that is optimized to run on a
microcontroller. MicroPython is a full Python compiler and runtime that runs on the
micro-controller hardware. The user is presented with an interactive prompt (the REPL)
to execute supported commands immediately. Included are a selection of core Python
libraries; MicroPython includes modules which give the programmer access to low-level
hardware. The source code for the project is available on GitHub under the MIT License.
MicroPython was originally created by the Australian programmer and physicist Damien
George, after a successful Kickstarter backed campaign in 2013. While the original
Kickstarter campaign released MicroPython with an STM32F4-powered development
board "pyboard", MicroPython supports a number of ARM based architectures. The ports
supported in the mainline are ARM Cortex-M (many STM32 boards, TI CC3200/WiPy,
Teensy boards, Nordic nRF series, SAMD21 and SAMD51), ESP8266, ESP32, 16bit
PIC, Unix, Windows, Zephyr, and JavaScript. Also, there are many forks for a variety of
systems and hardware platforms not supported in the mainline.

 MQTT:

MQTT (Message Queuing Telemetry Transport) is a publish/subscribe messaging protocol that


works on top of the TCP/IP protocol. The first version of the protocol was developed by Andy
Stanford-Clark of IBM and Arlen Nipper of Cirrus Link in 1999. What makes MQTT faster than
say sending HTTP requests with your IoT device is MQTT messages can be as small as 2 bytes,
whereas HTTP requires headers which contains a lot of information that other devices might not
care about. Also, if you have multiple devices waiting for a request with HTTP, you'll need to
send a POST action to each client. With MQTT, when a server receives information from one
client, it will automatically distribute that information to each of the interested clients.

Why MQTT?
MQTT has unique features you can hardly find in other protocols, like:
 It’s a lightweight protocol. So, it’s easy to implement in software and fast in data
transmission.
 It’s based on a messaging technique. Of course, you know how fast your
messenger/WhatsApp message delivery is. Likewise, the MQTT protocol.
 Minimized data packets. Hence, low network usage.
 Low power usage. As a result, it saves the connected device’s battery.
 It’s real time! That’s is specifically what makes it perfect for IoT applications.

Why not HTTP


 Slower: because it uses bigger data packets to communicate with the server.
 Overhead: HTTP request opens and closes the connection at each request, while MQTT
stays online to make the channel always open between the broker “server” and clients.
 Power consuming: since it takes a longer time and more data packets, therefore it uses
much power.
 Web Technologies:
Internet of things (IoT) was experienced by everyone who has mobile phones, laptops,
wearables, washing machine, smart speaker, and electronic gadgets connected with the
Internet. Many areas that IoT will make changes, which includes Web Design and
Development. It can help us to develop the future effectively. Internet of Things is a
technology that connects the digital world by transforming the UI interactions between
the man and machine. Now IoT entered into the realm of Web Development and make
users more interactive with the websites. And create a smart & significant role in the
development world. It’s immense power of connectivity and computerized sensibility
feature to help to understand the client features and build the right strategies. IoT edge in
web development will make change the front-end interface and user interactions etc. All
users will use this front-end interface to communicate with cameras, sensors, and other
devices on the Internet.

o HTML
Hypertext Markup Language (HTML) is the standard markup language used to
create web pages. A markup language is your way of making notes in a digital
document that can be distinguished from regular text. It’s the most basic building
block you’ll need for developing websites.
o CSS
CSS (Cascading Style Sheets) is the language used to present the document you
create with HTML. Where HTML comes first and creates the foundation for your
page, CSS comes along next and is used to create the page’s layout, color, fonts,
and…well, the style!
o JavaScript
Another MAJOR tool in your front-end developer toolbox is going to be
JavaScript (JS). Where HTML is a markup language and CSS is a style sheet
language, JS is the first language I’ve mentioned that’s a Bonafede programming
language. What’s the difference? Where HTML and CSS determine the
presentation of a page, JS determines the function.
 Arduino Ide
Arduino IDE is an open source software that is mainly used for writing and compiling the
code into the Arduino Module. It is an official Arduino software, making code
compilation too easy that even a common person with no prior technical knowledge can
get their feet wet with the learning process. It is easily available for operating systems
like MAC, Windows, Linux and runs on the Java Platform that comes with inbuilt
functions and commands that play a vital role for debugging, editing and compiling the
code in the environment. A range of Arduino modules available including Arduino Uno,
Arduino Mega, Arduino Leonardo, Arduino Micro and many more.

 Android Studio
Android Studio is the official integrated development environment (IDE) for Google's
Android operating system, built on JetBrains' IntelliJ IDEA software and designed
specifically for Android development. It is available for download on Windows, macOS
and Linux based operating systems. It is a replacement for the Eclipse Android
Development Tools (ADT) as the primary IDE for native Android application
development.
Android Studio was announced on May 16, 2013 at the Google I/O conference. It was in
early access preview stage starting from version 0.1 in May 2013, then entered beta stage
starting from version 0.8 which was released in June 2014. The first stable build was
released in December 2014, starting from version 1.0.
6.3 Project Code
#include "FirebaseESP8266.h"
#include <ESP8266WiFi.h>
#include <Wire.h>
#include "SSD1306Wire.h"

#define FIREBASE_HOST "demostorage-b3240.firebaseio.com"


#define FIREBASE_AUTH "zgZgLMvZqLesvRYZ7BaOWzNJu2id4CPnTb7M6m8g"
#define WIFI_SSID "iot"
#define WIFI_PASSWORD "12345678"
FirebaseData firebaseData;
SSD1306Wire display(0x3c, D2, D1);

void setup()
{
Serial.begin(115200);
display.init();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_16);
display.drawString(0, 0, "Wireless");
display.setFont(ArialMT_Plain_24);
display.drawString(0, 16, "Charging");
display.setFont(ArialMT_Plain_16);
display.drawString(0, 46, "Lane");
display.display();
delay(5000);
display.clear();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_16);
display.drawString(0, 0, "Please Wait");
display.setFont(ArialMT_Plain_24);
display.drawString(0, 16, "Connecting");
display.setFont(ArialMT_Plain_16);
display.drawString(0, 46, "to Network...");
display.display();
delay(5000);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
display.clear();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_16);
display.drawString(0, 0, "Successfully");
display.setFont(ArialMT_Plain_24);
display.drawString(0, 16, "Connected");
display.setFont(ArialMT_Plain_16);
display.drawString(0, 46, "to Network.");
display.display();
delay(5000);
display.clear();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_16);
display.drawString(0, 0, "Please Wait");
display.setFont(ArialMT_Plain_24);
display.drawString(0, 16, "Sensors are");
display.setFont(ArialMT_Plain_16);
display.drawString(0, 46, "Initializing ...");
display.display();
delay(5000);
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Firebase.reconnectWiFi(true);
}

void loop()
{
int a = analogRead(0);
int val = map(a, 0, 900, 0, 100);
int b =(Firebase.getInt(firebaseData, "data"));
Serial.print("Updated :");
Serial.println(firebaseData.intData());

if (Firebase.setInt(firebaseData, "data",val))
{
Serial.println("PASSED");
Serial.println("PATH: " + firebaseData.dataPath());
Serial.println("TYPE: " + firebaseData.dataType());
Serial.println("ETag: " + firebaseData.ETag());
Serial.print("VALUE: ");
Serial.println("------------------------------------");
Serial.println();
}
else
{
Serial.println("FAILED");
Serial.println("REASON: " + firebaseData.errorReason());
Serial.println("------------------------------------");
Serial.println();
}
display.clear();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_16);
display.drawString(10, 0, "Charging:");
display.setFont(ArialMT_Plain_24);
display.drawString(40, 16,String(val)+"%");
display.setFont(ArialMT_Plain_24);
display.drawString(10, 40,"Available");
display.display();
delay(20000);
}
Chapter 7
Software Testing
6.1 Types of Testing
Testing is the process of evaluating a system or its component(s) with the intent to find whether
it satisfies the specified requirements or not. Testing is executing a system in order to identify
any gaps, errors, or missing requirements in contrary to the actual requirements.

6.1.1 Manual Testing


Manual testing includes testing a software manually, i.e., without using any automated tool or
any script. In this type, the tester takes over the role of an end-user and tests the software to
identify any unexpected behavior or bug. There are different stages for manual testing such as
unit testing, integration testing, system testing, and user acceptance testing. Testers use test
plans, test cases, or test scenarios to test a software to ensure the completeness of testing. Manual
testing also includes exploratory testing, as testers explore the software to identify errors in it.

6.1.2 Automation Testing


Automation testing, which is also known as Test Automation, is when the tester writes scripts
and uses another software to test the product. This process involves automation of a manual
process. Automation Testing is used to re-run the test scenarios that were performed manually,
quickly, and repeatedly.
6.2 Methods of Software Testing
There are different methods that can be used for software testing. This chapter briefly describes
the methods available.
6.2.1 Black-Box Testing
The technique of testing without having any knowledge of the interior workings of the
application is called black-box testing. The tester is oblivious to the system architecture and does
not have access to the source code. Typically, while performing a black-box test, a tester will
interact with the system's user interface by providing inputs and examining outputs without
knowing how and where the inputs are worked upon.

6.2.2 White-Box Testing


White-box testing is the detailed investigation of internal logic and structure of the code. White-
box testing is also called glass testing or open-box testing. In order to perform white box testing
on an application, a tester needs to know the internal workings of the code. The tester needs to
have a look inside the source code and find out which unit/chunk of the code is behaving
inappropriately.

6.2.3 Grey-Box Testing


Grey-box testing is a technique to test the application with having a limited knowledge of the
internal workings of an application. In software testing, the phrase the more you know, the better
carries a lot of weight while testing an application.

Mastering the domain of a system always gives the tester an edge over someone with limited
domain knowledge. Unlike black-box testing, where the tester only tests the application's user
interface; in grey-box testing, the tester has access to design documents and the database. Having
this knowledge, a tester can prepare better test data and test scenarios while making a test plan.
6.3 Test Cases
6.3.1 Test Cases for Hardware
No. Module Expected Result Actual Result Status
1. Energy generation Enough energy should Wind turbine and solar Success
be generate using wind panel generating
and solar panel. enough energy.
2. Power storage Batteries should store Batteries are storing Success
the power generated by require amount of
wind and solar panel. energy.
3. Current sensor Current sensor should Current sensor is Success
measure current measuring current
accurately. accurately.
4. Voltage sensor voltage sensor should voltage sensor is Success
measure voltage measuring voltage
accurately. accurately.
5. Wired charging User can charge Users can charge Success
vehicle using adapter. vehicle using adapter
6. Wireless charging. Users shold charge Users can charge Success
vehicle wirelessly. vehicle wirelessly.

6.3.2 Test Cases for Software


No. Module Expected Result Actual Result Status
1. Signup After entering correct User can create an Success
details user can create account.
an account
2. Login User should login an User can login an Success
account after entering account using
username and username and
password. password.
3. Dashboard All data related to User can view all the Success
charging station should data from dashboard.
be shown on
dashboard.
4. Alert After any fault activity Alert section can show Success
alert section should alerts
show an alert.
5. Graph All info data should be All info data can be Success
shown on dashboard in shown on dashboard in
the form of graph and the form of graph and
chart. chart.
6. Logs All logs should be Log Section is Success
shown in logs section. showing all logs.
Chapter 8
Result
8.1 Outcomes and Results
Chapter 9
Conclusion
9.1 Conclusion

In this system, a simple prototype of wireless charging lane will present and through the
experiment, it is showing that this lane can provide a scale-down model with wireless power
transmission for EVs, which makes the idea of charging-on-the-way into reality preliminarily.
Because of low transfer efficiency, future work focuses on the optimization of the wireless
charging lane. In addition, some control strategy can also be introduced into the proposed
system. For instance, coils will not be powered until the vehicle is detected by position sensors.

9.2 Future enhancement


 We will increase the size of copper coil to improve the charging speed.
 We will use various sensor to detect the vehicle and automatically start the transmission
of power to reduce the consumption of electricity.
 We will also use human-less authentication for charging lane using image processing
techniques.

9.3 Applications and advantages


 Contribute to an Improvement in Air Quality
 Reduce the emissions that contribute to climate change and smog, improving public
health and reducing ecological damage.
 Wireless vehicle charging while driving; hence, reduced waiting time.
 Non-renewable energies are that they are abundant and affordable.

You might also like