Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Telegram P10 Scrolling Board Report

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 58

TABLE CONTENTS

CHAPTER NAME PAGE-NO

1. INTRODUCTION TO PROJECT
1.1 Abstract
1.2 Introduction
1.3 Block Diagram
1.4 Hardware
1.5 Software

2. LITERATURE REVIEW
2.1 Smart rolling LED Display using Arduino and Bluetooth
2.2 A paper on IOT based digital notice board
using Arduino ATMega 328

3. INTRODUCTION TO EMBEDDED SYSTEM

3.1 INTRODUCTION:
3.2 HISTORY
3.2.1 Embedded System Classification
3.3. SYSTEM ARCHITECTURE

4. HARDWARE DESCRIPTION
4.1 Regulator Power Supply
4.1.1 Operation of Regulated Power Supply

4.2 P10 LED MATRIX DISPLAY MODULE


4.3 FLAT RIBBON CABLE
4.4 NODEMCU

1
5. SOFTWARE DESCRIPTION
5.1 Arduino IDE
5.1.1 Opening Arduino IDE
5.1.2 Select the COM Port from tools
5.1.3 Select the required Arduino board from Tools
5.1.4 Write the sketch in Arduino IDE
5.1.5 Compile and upload the Sketch to Arduino board
5.1.6 Node-MCU Using Arduino Ide
5.1.7 Introduction to Telegram
5.2 PCB Layout Design with Proteus

6. TESTING AND DEBUGING


6.1 Installing with software
6.2. Connecting a battery
6.3. Moving on
6.4 Trouble shooting
6.5 Flashing an LED
6.6 Debugging

7. APPLICATIONS, ADVANTAGES AND FUTURE SCOPE

RESULT AND DISCUSSION

CONCLUSION
REFERENCES

2
FIGURES
LIST OF FIGURES PAGE NO.

Figure 1.1: Magic matrix with dimensions 5 x 5 1


Figure 1.2: MATLAB version 6.5 4
Figure 2.2: A desktop with a MATLAB icon 4

Figure 1.3: A desktop with a MATLAB icon 4

Figure 1.4: MATLAB developing environment 4

Figure 1.5: Two different types of Help 5


Figure 1.6: MATLAB’s help for function log 6
Figure 1.7: MATLAB’s help for function log10 6
Figure 1.8: Typing the number »10« in MATLAB Command window 7

Figure 1.9: Typing the different types of numbers in the MATLAB C-W 8

Figure 1.9: Calculation with rational numbers 9

Figure 1.10: Format long presentation of numbers in MATLAB 10

Figure 1.11: Format short e and format long e commands 11

3
Figure 1.12: The simple RC circuit 12

Figure 1.13: Format loose and format compact 15

Figure 1.14: Basic mathematical calculations 16


Figure 1.14: Priority of calculating execution 17
Figure 1.15: Changing the operator execution priority by round brackets 17
Figure 1.16: The execution priority of the operators with the same priority 18
Figure 1.17: The error writing the above expression 18
Figure 1.18: Correctly written example 19
Figure 1.19: Calculating mathematical functions in MATLAB 20

Figure 1.20: The priority of sin function is higher than priority of power operator 21
Figure 2.1- A Defected image and real image after applying filtering 32
Figure 2.2.median filter to improve an image corrupted by defective pixels 32
Figure 2.3 Image of sunflower-Histogram of sunflower image 36
Figure 4.1 Lossless Image Compression Technique Using Bit plane 43
Figure 4.2 Lossy Image Compression Technique Using SVD 43
Figure 5.1 Result of Lossless Image Compression Technique Using Bit plane 52
Figure 5.2 Lossy Image Compression Technique Using SVD 52

4
CHAPTER 1
INTRODUCTION TO PROJECT

ABSTRACT:

Everything around us is becoming smart such as smart phones, smart televisions, smart
refrigerators, so why not smart displays boards for advertisements and notices. Display boards are
primary thing in any institute, organization, public utility places like bus stops, railway stations,
parks, shopping malls to display information regarding platforms, various advertisements about
the products, or important notices. People are now adapted to the idea of the world at its fingertips.
The old-wired display boards are controlled by microcontroller. To change message, we need to
change the microcontroller program code again and again. By adding IOT wireless
communication interface, we can overcome these limitations. It is a start to the era of smart and
real–time displaying of messages on display boards. This paper explains the development of “IOT
Based Real Time Digital Led Notification Display Board Using NodeMCU via Telegram
Messenger”.

INTRODUCTION:

Notice Board is primary thing in any institution or public utility places like bus stations,
railway stations, colleges, malls, etc. But sticking various notices day to day is a difficult process.
A separate person is required to take care of this notices display. This project is about advanced
wireless notice board. The project is built around NodeMCU which is heart of the system. Display
is obtained on project tor. A Wi-Fi is using for Data transmission. At any time we can add or re-
move or alter the text according to our requirement. At transmitter authorized PC is used for
sending notices. At receiving end Wi-Fi is connected to raspberry pi. When an authorized user
sends a notice from his system, it is received by receiver. Wireless is a popular technology that
allows an electronic device to exchange data wirelessly over a computer network, including high
speed wireless connections.

5
BLOCK DIAGRAM:

Fig :1. Block diagram

HARDWARE:

1. NodeMCU Microcontroller

2. 3 Feet LED Scrolling Board Display

3. 5V/20A SMPS Power Supply

SOFTWARE:

1. Embedded C Programming Language

2. Arduino IDE

6
CHAPTER 2
LITERATURE REVIEW

2.1 IJSR-CSEIT, 17 May 2017: - Smart rolling LED Display using Arduino and Bluetooth
By Diptanuprasad Chakraborty, Shubham Yadav, Sonal Rathore, Sunil Kumar, Ruchita Agarwal,
Pallavi Chandrakar.

Arduino:

Arduino being open-source hardware is widely used for development of various projects
and models. Arduino boards consist of Atmel AVR microcontroller of 8-bit with variations in the
number of pins and different flash memories, features and pins. These boards are used to
incorporate into circuits and make connections for programming. These microcontrollers are
already programmed with the help of a boot loader that makes uploading programs, on the flash
memory chip, easy.

Bluetooth:

This is a wireless technology that facilitates easy data exchange between devices or
mobiles over short span of distances which uses short wavelength radio waves and to build
personal area networks (PANs). Bluetooth has made communication between devices easier and
hassle free due to its wireless technology features. It has a low range. [1]

2.2 IRJET, 3 March 2019- A paper on IOT based digital notice board using Arduino
ATMega 328 by Pooja Pawar, Suvarna Langade, Mohini Bandgar.

Arduino:

ATMega This is an 8-bit microcontroller variant with Reduced Instruction Set (RISC)
based architecture. AT stands for Atmel and Mega stands for mega AVR with flash-memory. [2]

7
CHAPTER 3
INTRODUCTION TO EMBEDDED SYSTEM

3.1. INTRODUCTION:

An embedded system is a computer system with a dedicated function within a larger, often
with, real-time mechanical or electrical system constraints. It is incorporated as part of a complete
device that often includes hardware and mechanical parts. Integrated systems today control many
commonly used devices. 92% of all microprocessors are produced as embedded system
components.

Fig 2: Embedded Systems Design

Examples of typically incorporated computer properties, compared to general-purpose


counterparts, are low power consumption, small size, varying performance and low-cost unit cost.
This is at the expense of limited processing resources, which makes them much harder to program
and interact. However, by building intelligence mechanisms at the top of the hardware, taking
advantage of any existing sensors and the existence of a built-in network can best manage the

8
available network and unit resources. For example, intelligent techniques can be designed to
manage the energy consumption of embedded systems.

Modern embedded systems often incorporate microcontrollers (i.e. CPUs with memory or
peripheral interfaces) but common microprocessors are also commonly used (using external
memory chips and peripheral circuitry interfaces), especially in more complex systems. In any
case, the processor or processors can be used typed ranging from general-purpose specialized in
some kind of calculations, or even designed for the application. A common standard of dedicated
processors is the digital signal processor (DSP).

Fig 3: Embedded System Hardware

Since the integrated system is dedicated to specific tasks, designers can optimize in order
to reduce the size and cost of the product and increase reliability and performance. Some
embedded systems are serially produced, benefiting from economies of scale.

Integrated systems range from portable devices, such as digital clocks and MP3 players, to
large stationary systems such as traffic lights, factory controllers and large complex systems such
as hybrid vehicles, magnetic resonances, and avionics. The complexity varies from low to high,
with a single microcontroller chip, with the highest number of units, peripherals, and networks
mounted within a large frame or enclosure.

9
3.2. HISTORY:

One of the very first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At the
project's inception, the Apollo guidance computer was considered the riskiest item in the Apollo
project as it employed the then newly developed monolithic integrated circuits to reduce the size
and weight. An early mass-produced embedded system was the Automatics D-17 guidance
computer for the Minuteman missile, released in 1961. When the Minuteman II went into
production in 1966, the D-17 was replaced with a new computer that was the first high-volume use
of integrated circuits.

Since these early applications in the 1960s, embedded systems have come down in price
and there has been a dramatic rise in processing power and functionality. An
early microprocessor for example, the Intel 4004, was designed for calculators and other small
systems but still required external memory and support chips. In 1978 National Engineering
Manufacturers Association released a "standard" for programmable microcontrollers, including
almost any computer-based controllers, such as single board computers, numerical, and event-
based controllers.

As the cost of microprocessors and microcontrollers fell it became feasible to replace


expensive knob-based analog components such as potentiometers and variable capacitors with
up/down buttons or knobs read out by a microprocessor even in consumer products. By the early
1980s, memory, input and output system components had been integrated into the same chip as the
processor forming a microcontroller. Microcontrollers find applications where a general-purpose
computer would be too costly.

A comparatively low-cost microcontroller may be programmed to fulfill the same role as a


large number of separate components. Although in this context an embedded system is usually
more complex than a traditional solution, most of the complexity is contained within the
microcontroller itself. Very few additional components may be needed and most of the design
effort is in the software. Software prototype and test can be quicker compared with the design and
construction of a new circuit not using an embedded processor.

10
3.2.1. Embedded System Classification:

Fig. 4 Classification of Embedded Systems

Embedded systems are primarily classified into different types based on complexity of
hardware & software and microcontroller (8 or 16 or 32-bit). Thus, based on the performance of
the microcontroller, embedded systems are classified into three types such as:

 Small scale embedded systems

 Medium scale embedded systems

 Sophisticated embedded systems

Further, based on performance and functional requirements of the system embedded system
classified into four types such as:

 Real time embedded systems


 Standalone embedded systems
 Networked embedded systems
 Mobile embedded systems

APPLICATIONS:

Embedded systems are commonly found in consumer, cooking, industrial, automotive,


medical, commercial and military applications.

11
Telecommunications systems employ numerous embedded systems from telephone
switches for the network to cell phones at the end user. Computer networking uses
dedicated routers and network bridges to route data.

Fig 5: Real-life examples of Embedded System

Consumer electronics include MP3 players, mobile phones, videogame consoles, digital


cameras, GPS receivers, and printers. Household appliances, such as microwave ovens, washing
machines and dishwashers, include embedded systems to provide flexibility, efficiency and
features. Advanced HVAC systems use networked thermostats to more accurately and efficiently
control temperature that can change by time of day and season. Home automation uses wired- and
wireless-networking that can be used to control lights, climate, security, audio/visual, surveillance,
etc., all of which use embedded devices for sensing and controlling.

Transportation systems from flight to automobiles increasingly use embedded systems.


New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers that
also have considerable safety requirements. Various electric motors brushless DC
motors, induction motors and DC motors use electric/electronic motor
controllers. Automobiles, electric vehicles, and hybrid vehicles increasingly use embedded
systems to maximize efficiency and reduce pollution. Other automotive safety systems

12
include anti-lock braking system (ABS), Electronic Stability Control (ESC/ESP), traction
control (TCS) and automatic four-wheel drive.

Medical equipment uses embedded systems for vital signs monitoring, electronic


stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT, and MRI)
for non-invasive internal inspections. Embedded systems within medical equipment are often
powered by industrial computers.

Embedded systems are used in transportation, fire safety, safety and security, medical
applications and life critical systems, as these systems can be isolated from hacking and thus, be
more reliable. For fire safety, the systems can be designed to have greater ability to handle higher
temperatures and continue to operate. In dealing with security, the embedded systems can be self-
sufficient and be able to deal with cut electrical and communication systems.

A new class of miniature wireless devices called motes is networked wireless sensors.


Wireless sensor networking, WSN, makes use of miniaturization made possible by advanced IC
design to couple full wireless subsystems to sophisticated sensors, enabling people and companies
to measure a myriad of things in the physical world and act on this information through IT
monitoring and control systems. These motes are completely self-contained, and will typically run
off a battery source for years before the batteries need to be changed or charged.

Embedded Wi-Fi modules provide a simple means of wirelessly enabling any device which
communicates via a serial port.

Characteristics:

Embedded systems are designed to do some specific task, rather than be a general-purpose
computer for multiple tasks. Some also have real-time performance constraints that must be met,
for reasons such as safety and usability; others may have low or no performance requirements,
allowing the system hardware to be simplified to reduce costs.

Embedded systems are not always standalone devices. Many embedded systems consist of
small parts within a larger device that serves a more general purpose. For example, the Gibson
Robot Guitar features an embedded system for tuning the strings, but the overall purpose of the
Robot Guitar is, of course, to play music. Similarly, an embedded system in
an automobile provides a specific function as a subsystem of the car itself.

13
The program instructions written for embedded systems are referred to as firmware, and
are stored in read-only memory or flash memory chips. They run with limited computer hardware
resources: little memory, small or non-existent keyboard or screen.

User interface:

Embedded systems range from no user interface at all, in systems dedicated only to one
task, to complex graphical user interfaces that resemble modern computer desktop operating
systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (HD44780
LCD for example) with a simple menu system.

More sophisticated devices which use a graphical screen with touch sensing or screen-edge


buttons provide flexibility while minimizing space used: the meaning of the buttons can change
with the screen, and selection involves the natural behavior of pointing at what is
desired. Handheld systems often have a screen with a "joystick button" for a pointing device.

Some systems provide user interface remotely with the help of a serial (e.g. RS-
232, USB, I²C, etc.) or network (e.g. Ethernet) connection. This approach gives several
advantages: extends the capabilities of embedded system, avoids the cost of a display,
simplifies BSP and allows one to build a rich user interface on the PC. A good example of this is
the combination of an embedded web server running on an embedded device (such as an IP
camera) or a network router. The user interface is displayed in a web browser on a PC connected
to the device, therefore needing no software to be installed.

Processors in Embedded Systems:

Embedded processors can be broken into two broad categories. Ordinary microprocessors
(μP) use separate integrated circuits for memory and peripherals. Microcontrollers (μC) have on-
chip peripherals, thus reducing power consumption, size and cost. In contrast to the personal
computer market, many different basic CPU architectures are used, since software is custom-
developed for an application and is not a commodity product installed by the end user. Both Von
Neumann as well as various degrees of Harvard architectures are used. RISC as well as non-RISC
processors are found. Word lengths vary from 4-bit to 64-bits and beyond, although the most
typical remain 8/16-bit. Most architecture comes in a large number of different variants and
shapes, many of which are also manufactured by several different companies.

14
Numerous microcontrollers have been developed for embedded systems use. General-
purpose microprocessors are also used in embedded systems, but generally require more support
circuitry than microcontrollers.

Peripherals:

Embedded systems talk with the outside world via peripherals, such as:

 Serial Communication Interfaces (SCI): RS-232, RS-422, RS-485, etc.


 Synchronous Serial Communication Interface: I2C, SPI, SSC and ESSI (Enhanced
Synchronous Serial Interface)
 Universal Serial Bus (USB)
 Multi Media Cards (SD cards, Compact Flash, etc.)
 Networks: Ethernet, Lon Works, etc.
 Fieldbuses: CAN-Bus, LIN-Bus, PROFIBUS, etc.
 Timers: PLL(s), Capture/Compare and Time Processing Units
 Discrete IO: aka General Purpose Input/Output (GPIO)
 Analog to Digital/Digital to Analog (ADC/DAC)
 Debugging: JTAG, ISP, ICSP, BDM Port, BITP, and DB9 ports.

15
CHAPTER 3
DESIGN AND ANALYSIS

3.3 SYSTEM ARCHITECTURE:

Existing System:

In the current scenario the notice/advertisement boards are being managed manually. This
is a time -consuming task to put up notices on the notice board. This wastes a lot of resources like
paper, printer ink, man power and also brings about loss of time. The existing system is based on
GSM technology so it requires SIM card to send the messages on notice board. In the existing

16
system is also supports international roaming capability of GSM, so we can send message to
receiver from any part of the world that’s why extra charges are required.

Proposed System:

The proposed system E-Circular is to overcome the existing problems. It is to display the
circulars from Transmitter unit to respective receiver unit using wireless transfer. The transmitter
unit consists of the microcontroller, Wi-Fi transceiver combined as shown in Fig.1. If we type any
matter in the web server it will transfer from Telegram Mobile App transmitter unit to receiver
unit. The receiver unit receives the transmitted data and it displays in LED board.

17
CHAPTER 4

HARDWARE DESCRIPTION

4.1. REGULATOR POWER SUPPLY:


A regulated power supply is an embedded circuit; it converts unregulated AC into a
constant DC. With the help of a rectifier it converts AC supply into DC. Its function is to supply a
stable voltage (or less often current), to a circuit or device that must be operated within certain
power supply limits. The output from the regulated power supply may be alternating or
unidirectional, but is nearly always DC.

A regulated DC power supply is also called as a linear power supply; it is an embedded


circuit and consists of various blocks.

18
fig :6 .Components of a typical linear power supply

The basic building blocks of a regulated DC power supply are as follows:

1. A step down transformer


2. A rectifier
3. A DC filter
4. A regulator

4.1.1. Operation of Regulated Power Supply:

Step Down Transformer:


A step down transformer will step down the voltage from the ac mains to the required
voltage level. The turn’s ratio of the transformer is so adjusted such as to obtain the required
voltage value. The output of the transformer is given as an input to the rectifier circuit.

Rectification:
Rectifier is an electronic circuit consisting of diodes which carries out the rectification
process. Rectification is the process of converting an alternating voltage or current into
corresponding direct (DC) quantity. The input to a rectifier is ac whereas its output is
unidirectional pulsating DC. Usually a full wave rectifier or a bridge rectifier is used to rectify
both the half cycles of the ac supply (full wave rectification). Figure below shows a full wave
bridge rectifier.

19
Fig :7. Full wave Rectifier Bridge
A bridge rectifier consists of four p-n junction diodes connected in the above shown
manner. In the positive half cycle of the supply the voltage induced across the secondary of the
electrical transformer i.e. VMN is positive. Therefore point E is positive with respect to F. Hence,
diodes D3 and D2 are reversed biased and diodes D1 and D4 are forward biased. The diode D3 and
D2 will act as open switches (practically there is some voltage drop) and diodes D1 andD4 will act
as closed switches and will start conducting. Hence a rectified waveform appears at the output of
the rectifier as shown in the first figure. When voltage induced in secondary i.e. VMN is negative
than D3 and D2 are forward biased with the other two reversed biased and a positive voltage
appears at the input of the filter.

DC Filtration:
The rectified voltage from the rectifier is a pulsating DC voltage having very high ripple
content. But this is not we want, we want a pure ripple free DC waveform. Hence a filter is used.
Different types of filters are used such as capacitor filter, LC filter, Choke input filter, π type filter.
Figure below shows a capacitor filter connected along the output of the rectifier and the resultant
output waveform.

20
Fig.8 : Bridge rectifier resultant output Waveform
As the instantaneous voltage starts increasing the capacitor charges, it charges till the
waveform reaches its peak value. When the instantaneous value starts reducing the capacitor starts
discharging exponentially and slowly through the load (input of the regulator in this case). Hence,
an almost constant DC value having very less ripple content is obtained.

Regulation:

This is the last block in a regulated DC power supply. The output voltage or current will
change or fluctuate when there is change in the input from ac mains or due to change in load
current at the output of the regulated power supply or due to other factors like temperature
changes. This problem can be eliminated by using a regulator. A regulator will maintain the output
constant even when changes at the input or any other changes occur. Transistor series regulator,
Fixed and variable IC regulators or a Zener diode operated in the zener region can be used
depending on their applications. IC’s like 78XX and 79XX are used to obtained fixed values of
voltages at the output.

3.2. P10 LED MATRIX DISPLAY MODULE:

P10 LED display screen is made up of the modules whose pixel pitch is 10mm. The P10
full colour LED display screen is widely applicable for advertisement, gymnasium, factory and
mining enterprises, transportation, station, wharf, airport, building, educational system and other
public occasions. The function of P10 full color LED display screen.

 It can display several of fonts, font sizes and different languages.

 It can connect scanner from exterior, to input several of images and patterns.

 It can input video signal (Television, Camera, Laser Disc), real-time to display dynamic
video picture, and it can display other graphic and animation at the same time.

 It can input computer signal, real time to display the content which is supervised by
computer monitor, such as various of charts, curve, image which is processed by computer,

21
at the same time, it also can display weather forecast, various of news, current affairs, etc.
The display mode and retention time can be controlled.

 There are many ways for animation display, such as up and down, left to right, etc.

 The display time of each frame picture can be controlled, and being able to switch
automatically.

 The programming can be changed at any time, including its content, playing direction,
playing time, etc. The amendment programming can be displayed timely.

 It can take computer control as network station, to read data from designated server, to
display on screen. In a word, P10 LED display screen is widely applicable for most of
outdoor occasions; it can connect with exterior video devices, such as television, VCD,
camera, and computer, etc., which has wide compatibility to digital devices.

Fig.9 : P10 Matrix Display Board

22
3.3. FLAT RIBBON CABLE

FRC is also known as multi wire planar cable because they are the type of cables formed
by joining insulated wires in a flat plane forming the Ribbon shape. In other words, Ribbon cable
have many conducting wires running parallel to each other on the same flat plane. These wires are
commonly used for internal peripherals in computers, such as hard drives, CD drives, wired
robots, etc. The ribbon cable was invented in 1956 by Cicoil Corporation, California. This ribbon
cable then allowed major companies to replace bulky, stiff round cables with sleek, flexible ribbon
cables.

Fig.10: display board cables

This cable consists of 4,6,8,9,10,14,16,18,20,24, etc. upto 80 conducting wires stuck


together in parallel. FRC is an ideal way to connect two devices digitally. The resultant impedance
for any two adjacent wires within the cable is 120 Ohms. FRC also fold and bend readily,
conforming to the mounting area, and they fasten easily with clamps, adhesive, or double-faced
tape. Since the conductors are visible and in a fixed position within the dielectric coding,
inspection and circuit tracing are simplified.

3.4 NODEMCU:
NodeMCU is an open source IOT platform. It includes firmware which runs on
the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12
module. The term "NodeMCU" by default refers to the firmware rather than the development kits.

23
The firmware uses the Lua scripting language. It is based on the eLua project, and built on
the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-cjson,
and spiffs.

History:

NodeMCU was created shortly after the ESP8266 came out. On December 30,


2013, Express if Systems began production of the ESP8266. The ESP8266 is a Wi-Fi SoC
integrated with a Tensilica Xtensa LX106 core, widely used in IOT applications. NodeMCU
started on 13 Oct 2014, when Hong committed the first file of NodeMCU-firmware to GitHub.
Two months later, the project expanded to include an open-hardware platform when developer
Huang R committed the gerber file of an ESP8266 board, named devkit v0.9.  Later that month,
Tuan PM ported MQTT client library from Contiki to the ESP8266 SoC platform, and committed
to NodeMCU project, then NodeMCU was able to support the MQTT IOT protocol, using Lua to
access the MQTT broker. Another important update was made on 30 Jan 2015, when Devsaurus
ported the u8glib to NodeMCU project, enabling NodeMCU to easily drive LCD, Screen, OLED,
even VGA displays.

In summer 2015 the creators abandoned the firmware project and a group of independent
but dedicated contributors took over. By summer 2016 the NodeMCU included more than 40
different modules. Due to resource constraints users need to select the modules relevant for their
project and build a firmware tailored to their needs.

Specifications:

NodeMCU Dev Board is based on widely explored esp8266 System on Chip from Express
if. It combined features of WIFI access point and station + microcontroller and uses
simple LUA based programming language. ESP8266NodeMCU offers-

-- Arduino-like hardware IO

-- Event-driven API for network applications

--10 GPIOs D0-D10, PWM functionality, IIC and SPI communication, 1-Wire and ADC A0 etc.
all in one board

24
--Wi-Fi networking (can be uses as access point and/or station, host a webserver), connect to
internet to fetch or upload data.

--excellent few $ system on board for Internet of Things (IOT) projects.

Recently, there has been interest in programming ESP8266 systems using Arduino IDE.
Programming, of ESP8266 using Arduino IDE is not very straight forward, until it is properly
configured. Especially because, the Input and output pins have different mapping on NodeMCU
than those on actual ESP8266 chip.

I had request about showing how to program ESP-12E NodeMCU using Arduino IDE. I
struggled myself earlier in the beginning, so thought of making this Instruct able for beginners.

This is quick guide/tutorial for getting started with Arduino and ESP8266 NodeMCU V2
ESP-12Ewifi module. (I think, this method can be used for other NodeMCU boards too. (or only
ESP8266 boards, but with necessary hardware modifications and using FTDI modules for
programming- not covered in this tutorial because, this is only for NodeMCU development
boards).

This Instruct able gives quick intro to-

1) Installing Arduino core for ESP8266 Wi-Fi chip in Arduino IDE and Getting started with
sketches written using Latest stable Arduino IDE 1.6.7

2) Run/modify basic LED blink sketch to blink onboard LED and/or externally connected LED at
pin D0 or GPIO-16 as per the pin configuration mentioned here and here.

NOTE- To use NodeMCU V1 or V2 or V3 development boards using Arduino IDE, we do not


need to flash it with firmware using NodeMCU flasher. It is required only if we intend to program
NodeMCU using Lua script with esplorer etc.

First and foremost word of - CAUTION!

* The ESP8266 chip requires 3.3V power supply voltage. It should not be powered with 5 volts
like other Arduino boards.

* NodeMCU ESP-12E development board can be connected to 5Vusing micro USBconnector


or Vin pin available on board.

* The I/O pins of ESP8266 communicate or input/output max 3.3V only. The pins are NOT 5V
tolerant inputs.

25
Fig.11: Node-MCU Pin out

Node-MCU Pin out:

CHAPTER 5

SOFTWARE DESCRIPTION

26
5.1 Arduino IDE
The Arduino integrated development environment (IDE) is a cross-platform application
written in Java, and is derived from the IDE for the Processing programming language and the
Wiring projects. It includes a code editor which is capable of compiling and uploading programs
to the board with a single click. A program or code written for Arduino is called a "sketch”.
Following are the steps involved:
1. Open Arduino IDE as shown below

Arduino programs are written in C or C++. The Arduino IDE comes with a software
library called "Wiring" from the original Wiring project, which makes many common input/output
operations much efficient. Users only need define two functions to make a runnable cyclic
executive program:

setup(): a function run once at the start of a program that can initialize settings
loop(): a function called repeatedly until the board powers off

2. Select the COM Port from tools

27
3. Select the required Arduino board from Tools

4. Write the sketch in Arduino IDE

28
5. Compile and upload the Sketch to Arduino board

29
NodeMCU Using Arduino Ide:

Introduction:

NodeMCU is Lua based firmware of ESP8266. Generally, ESPlorer IDE is referred for
writing Lua scripts for NodeMCU. It requires to get familiar with ESPlorer IDE and Lua scripting
language.

There is another way of developing NodeMCU with a well-known IDE i.e. Arduino IDE.
We can also develop NodeMCU applications using Arduino development environment. This
makes things easy for Arduino developers than learning new language and IDE for NodeMCU.

Let’s see about setting up Arduino IDE with NodeMCU.

First Download Arduino IDE (version 1.6+) https://www.arduino.cc/en/Main/Software

 Open Arduino IDE and Go to File -> Preference.

 Now on Preference window, Enter below link in Additional Boards Manager URLs

         http://arduino.esp8266.com/stable/package_esp8266com_index.json

30
 Now close Preference window and go to Tools -> Board -> Boards Manager

 In Boards Manager window, Type esp in the search box, esp8266 will be listed there below.
Now select latest version of board and click on install.

31
 After installation of the board is complete,  open Tools->Board->and select NodeMCU 1.0
(ESP-12E Module).

32
 Now Your Arduino IDE is ready for NodeMCU

Example:
Let’s see how to write simple serial print sketch using Arduino IDE for NodeMCU.

First connect NodeMCU Development Kit with PC as shown in below figure.

33
Fig.12: Node-MCU connected with PC

Node-MCU connection with PC

 After setting up Arduino IDE for NodeMCU, open Arduino IDE and write simple sketch of
serial print as shown in below figure.

34
Arduino Sketch:

void setup() {

Serial.begin(9600); /* initialise serial communication */

void loop() {

Serial.println("Smart Shopping Cart System");

/* print Electronic Wings at new line per second */

delay(1000);

 Ensure that you have selected the correct board  as shown in below figure. Also make sure
that you have selected the appropriate COM port.

35
 Now compile & upload the written sketch directly to the NodeMCU Dev Kit by clicking on
upload button.

36
 Now Click on Serial Monitor (upper right corner) option  to check output on serial monitor
window of Arduino IDE.

 Serial monitor output window will pop up with output as shown in below figure.

INTRODUCING TELEGRAM

Telegram Messenger is a cloud-based instant messaging and voice over IP service. You


can easily install it in your smartphone (Android and iPhone) or computer (PC, Mac and Linux). It
is free and without any ads. Telegram allows you to create bots that you can interact with.
“Bots are third-party applications that run inside Telegram. Users can interact with bots by
sending those messages, commands and inline requests. You control your bots using HTTPS
requests to Telegram Bot API“.
The ESP32/ESP8266 will interact with the Telegram bot to receive and handle the
messages, and send responses. In this tutorial you’ll learn how to use Telegram to send messages

37
to your bot to control the ESP outputs from anywhere (you just need Telegram and access to the
internet).

Creating a Telegram Bot

Go to Google Play or App Store, download and install Telegram.

Fig.13: Telegram Application in mobile phone

Open Telegram and follow the next steps to create a Telegram Bot. First, search for
“botfather” and click the BotFather as shown below. Or open this link t.me/botfather in your
smartphone.

The following window should open and you’ll be prompted to click the start button.

38
Type /newbot and follow the instructions to create your bot. Give it a name and username.

39
If your bot is successfully created, you’ll receive a message with a link to access the bot
and the bot token. Save the bot token because you’ll need it so that the ESP32/ESP8266 can
interact with the bot.

40
Get Your Telegram User ID

Anyone that knows your bot username can interact with it. To make sure that we ignore
messages that are not from our Telegram account (or any authorized users), you can get your
Telegram User ID. Then, when your telegram bot receives a message, the ESP can check whether
the sender ID corresponds to your User ID and handle the message or ignore it.

In your Telegram account, search for “IDBot” or open this link t.me/myidbot in your
smartphone.

Start a conversation with that bot and type /getid. You will get a reply back with your user
ID. Save that user ID, because you’ll need it later in this tutorial.

41
5.2 PCB Layout Design with Proteus

Generally we are listening the words PCB’s, PCB layout, PCB designing, ect. But what


is PCB? Why we are using this PCB? We want to know about all these things as a electronic
engineer. PCB means Printed Circuit Board. This is a circuit board with printed copper layout
connections. These PCB’s are two types. One is dotted PCB and another one is layout PCB. The
two examples are shown in below.

Fig.14 : types of PCB’s


What is the main difference between the dotted PCB and layout PCB? 

In dotted PCB board only dots are available. According to our requirement we can place or
insert the components in those holes and attach the components with wires and soldering lid. In
this dotted PCB we can make the circuit as out wish but it is very hard to design. There are so
many difficulties are there. Those are connecting the proper pins, avoiding shot connections and
etc. Coming to the layout PCB this is simple to design. First we select the our circuit and by using
different PCB designing software’s, design the layout of the circuit and by itching process
preparing the copper layout of our circuit and solder the components in the correct places. It is
simple to design, take less time to design, no shortages, looking nice and perfect.
Up to now we have discussed about types of PCB’s and difference between the types. Now
we can discuss about PCB designing software. There are so many PCB designing software’s
available. Some are Express PCB, eagle PCB, PCB Elegance, and free PCB, open circuit
design, zenith PCB and Proteus etc. Apart from remaining Proteus is different. Proteus is design

42
suit and PCB layout designing software. In Proteus we can design any circuit and simulate the
circuit and make PCB layout for that circuit.
Introduction to Proteus:

Proteus professional is a software combination of ISIS schematic capture program and


ARES PCB layout program. This is a powerful and integrated development environment. Tools in
this suit are very easy to use and these tools are very useful in education and professional PCB
designing. As professional PCB designing software with integrated space based auto router, it
provides features such as fully featured schematic capture, highly configurable design rules,
interactive SPICE circuit simulator, extensive support for power planes, industry standard
CADCAM & ODB++ output and integrated 3D viewer.
Up to know we have discussed about the basics and software description. Now we are
entering into the designing section. Run the ISIS professional program by clicking the icon on the
desktop, then this splash screen will appear.
 

Next, a work space with interface buttons for designing circuit will appear as shown in figure
below. Note that there is a blue rectangular line in the workspace; make sure that whole circuit is
designed inside the rectangular space.

43
CHAPTER 7

TESTING AND DEBUGING

7.1. INSTALLING THE SOFTWARE:

Follow the instructions on the Getting Started section of the Arduino web site,
http://arduino.cc/en/Guide/HomePage. Go all the way through the steps to where you see the pin
13 LED blinking. This is the indication that you have all software and drivers successfully
installed and can start exploring with your own programs.

7.2. CONNECTING A BATTERY:

For stand-alone operation, the board is powered by a battery rather than through the USB
connection to the computer. While the external power can be anywhere in the range of 6 to 24 V
(for example, you could use a car battery), a standard 9 V battery is convenient. While you could
jam the leads of a battery snap into the Vin and Gnd connections on the board, it is better to
solder the battery snap leads to a DC power plug and connect to the power jack on the board. A
suitable plug is part number 28760 from. Here is what this looks like.

7.3. MOVING ON:

Connect your Arduino to the computer with the USB cable. You do not need the battery
for now. The green PWR LED will light. If there was already a program burned into the Arduino,
it will run. Start the Arduino development environment. In Arduino-speak, programs are called
“sketches”, but here we will just call them programs.

In the editing window that comes up, enter the following program, paying attention to
where semi-colons appear at the end of command lines.

void setup() {

Serial.begin(9600);

44
Serial.println("Hello World");

void loop() {

Your window will look something like this:

 Click the Upload button or Ctrl-U to compile the program and load on the Arduino
board.

 Click the Serial Monitor button . If all has gone well, the monitor window will show
your message and look something like this

45
7.4. TROUBLE SHOOTING:
If there is a syntax error in the program caused by a mistake in typing, an error message
will appear in the bottom of the program window. Generally, staring at the error will reveal the
problem. If you continue to have problems, try this idea

 Run the Arduino program again


 Check that the USB cable is secure at both ends.
 Reboot your PC because sometimes the serial port can lock up
 If a “Serial port…already in use” error appears when uploading
 Ask a friend for help.

46
7.5. FLASHING AN LED:
Light emitting diodes (LED's) are handy for checking out what the Arduino can do.. For this
task, you need an LED, a 330 ohm resistor, and some short pieces of 22 or 24 g wire. The figure to
the right is a sketch of an LED and its symbol used in electronic schematics Using 22 g solid wire,
connect the 5V power pin on the Arduino to the bottom red power bus on the breadboard and the
Gnd pin on the Arduino to the bottom blue power buss on the breadboard. Connect the notched or
flat side of the LED (the notch or flat is on the rim that surrounds the LED base; look carefully
because it can be hard to find) to the Gnd bus and the other side to a free hole in main area of the
breadboard Place the resistor so that one end is in the same column as the LED and the other end
is in a free column. From that column, connect a wire to digital pin 2 on the Arduino board. Your
setup will look something like this

void setup() {

pinMode(2,OUTPUT);

digitalWrite(2,HIGH);

delay(1000);

digitalWrite(2,LOW);

void loop() {

7.6. DEBUGGING:
Embedded debugging may be performed at different levels, depending on the facilities
available. From simplest to most sophisticate they can be roughly grouped into the following
areas:

 Interactive resident debugging, using the simple shell provided by the embedded operating
system (e.g. Forth and Basic)

47
 External debugging using logging or serial port output to trace operation using either a
monitor in flash or using a debug server like the Remedy Debugger which even works for
heterogeneous multi core systems.

 An in-circuit debugger (ICD), a hardware device that connects to the microprocessor via a
JTAG or Nexus interface. This allows the operation of the microprocessor to be controlled
externally, but is typically restricted to specific debugging capabilities in the processor.

 An in-circuit emulator replaces the microprocessor with a simulated equivalent, providing


full control over all aspects of the microprocessor.

 A complete emulator provides a simulation of all aspects of the hardware, allowing all of
it to be controlled and modified and allowing debugging on a normal PC.

 Unless restricted to external debugging, the programmer can typically load and run
software through the tools, view the code running in the processor, and start or stop its
operation. The view of the code may be as assembly code or source-code.

Because an embedded system is often composed of a wide variety of elements, the


debugging strategy may vary. For instance, debugging a software (and microprocessor) centric
embedded system is different from debugging an embedded system where most of the processing
is performed by peripherals (DSP, FPGA, and co-processor). An increasing number of embedded
systems today use more than one single processor core. A common problem with multi-core
development is the proper synchronization of software execution. In such a case, the embedded
system design may wish to check the data traffic on the busses between the processor cores,
which requires very low-level debugging, at signal/bus level, with a logic analyzer, for instance.

CHAPTER 7
APPLICATIONS, ADVANTAGES AND FUTURE SCOPE

48
ADVANTAGES:
 For transmitting wireless message system use Wi-Fi module.
 System uses mobile technology and wireless communication so cost of system is less.
 Use of system is easy, for delivering message or information mobile module is used and
displays it on LED matrix.
 Backup data can be stored in cloud.
 Real time communication is possible.
APPLICATIONS:
 Display Boards on Public Places.
 Smart Cities.
 Smart Colleges

 Railway Station

FUTURE SCOPE:

A commercial modal can be able to display one message at a time. By including priority
conditions we can enhance the project. Robots can be controlled in a similar fashion by sending
command to the robots. As this technology emerges, in may be new device and hence new markets
will evolve. The project itself can be modified to achieve a compete Home Automation All
paragraphs must be indented. All paragraphs must be justified, i.e. both left-justified and right-
justified.

RESULT AND DISCUSSION

49
This project explains how to control the display of characters on a 16x32 LED moving
message display using Arduino Microcontroller. It provides implementation of displaying
characters on an LED matrix without any time and place boundary. In which the scroll and blink
display modes are supported. It is easily accessible and more user friendly.

Project Photos:

CONCLUSION

50
The proposed system accepts the message, stores it, validates and displays it on the LED
board. LED boards are used to display messages in Railway stations, shopping malls for
displaying advertisement, Educational institution and organizations, managing traffic in smart
cities and other public utility places. Cost of printing and photocopying is also reduced because the
information can be delivered to a large number of people in a very short time. It provides faster
transfer of information and is easy to install and maintain. It provides an efficient way of
displaying messages on Notice Board and also get auto notifications using Wireless Technology. It
also provides user to easily receive the important information or message.

REFERENCES

51
[1] Neeraj Khera1, Divya Shukla2, Shambhavi Awasthi3 “Development of Simple and Low Cost
Android Based Wireless Notice Board” 2016 5th International Conference on Reliability, Infocom
Technologies and Optimization (ICRITO) (Trends and Future Directions), pp. 50-54.
[2] Yash Teckchandani , G. Siva Perumal, Radhika Mujumdar, Sridhar Lokanathan “Large Screen
Wireless Notice Display System” 2015 IEEE International Conference on Computational
Intelligence and Computing Research , 2015,pp. 1-5.
[3] Dharmendra Kumar Sharma, Vineet Tiwari, Krishan Kumar, B. A. Botre, S.A. Akbar, “Small
and Medium Range Wireless Electronic Notice Board using Bluetooth and ZigBee” CSIR Central
Electronic Engineering Research Institute, Pilani, 2015, pp. 1-5.

APENDEX

52
CODE:
#ifdef ESP32

#include <WiFi.h>

#else

#include <ESP8266WiFi.h>

#endif

#include <WiFiClientSecure.h>

#include <UniversalTelegramBot.h>

#include <ArduinoJson.h>

const char* ssid = "Airtel Fiber";

const char* password = "Fiber@1509";

const int nw = 2;

// Poojith Account Details

#define CHAT_ID "1523270351"

#define BOTtoken "5013576277:AAHRQCOt3tNJ0Z8KFbHxfLUekZnLhn9XDGA" // your


Bot Token (Get from Botfather)

//#define CHAT_ID "438381534"

//#define BOTtoken "664399626:AAGsy5y-AzQ3UaewVxz_cwXlJtUFy_wDI8w"


53
#ifdef ESP8266

X509List cert(TELEGRAM_CERTIFICATE_ROOT);

#endif

WiFiClientSecure client;

UniversalTelegramBot bot(BOTtoken, client);

int botRequestDelay = 1000;

unsigned long lastTimeBotRan;

void handleNewMessages(int numNewMessages) {

// Serial.println("handleNewMessages");

// Serial.println(String(numNewMessages));

for (int i = 0; i < numNewMessages; i++) {

String chat_id = String(bot.messages[i].chat_id);

if (chat_id != CHAT_ID) {

bot.sendMessage(chat_id, "Unauthorized user", "");

continue;

54
String text = bot.messages[i].text;

Serial.println(text);

String from_name = bot.messages[i].from_name;

delay(500);

void setup() {

Serial.begin(9600);

pinMode(nw, OUTPUT);

digitalWrite(nw, LOW);

#ifdef ESP8266

configTime(0, 0, "pool.ntp.org"); // get UTC time via NTP

client.setTrustAnchors(&cert); // Add root certificate for api.telegram.org

#endif

#ifdef ESP32

client.setCACert(TELEGRAM_CERTIFICATE_ROOT); // Add root certificate for


api.telegram.org

#endif

55
WiFi.mode(WIFI_STA);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {

delay(1000);

// Serial.println(".");

// Serial.println(WiFi.localIP());

delay(500);

digitalWrite(nw, HIGH);

delay(500);

digitalWrite(nw, LOW);

delay(500);

digitalWrite(nw, HIGH);

delay(500);

digitalWrite(nw, LOW);

delay(1000);

void loop() {

56
if (millis() > lastTimeBotRan + botRequestDelay) {

int numNewMessages = bot.getUpdates(bot.last_message_received + 1);

while (numNewMessages) {

// Serial.println("got response");

handleNewMessages(numNewMessages);

numNewMessages = bot.getUpdates(bot.last_message_received + 1);

lastTimeBotRan = millis();

SCHEMATIC DIAGRAM:

57
58

You might also like