Modulation in communication systems analogy to paper and stone example


What is a Modulation?

Definition:  Translation of Low Frequency signal to high frequency signal is generally referred as modulation. By doing so, we transfer the low frequency message signal to longer distances. This can be illustrated with paper and stone example as discussed below.

Take a paper of some size and try to through it to 5-10meter distance. It is impossible to through a plain paper to such longer distance, because the weight of that paper is very less. Now take a stone of some size and place the stone in the paper and enclose the stone. Now through the paper enclosed stone and then observe the distance travel by it. Obviously, the paper enclosed stone travels long distance than a plain paper because, the weight of the plain paper translated to higher weight of stone.


Modulation analogy with paper throw



The same analogy can be applied to our communication systems, where message signal of lower frequency can be sent to longer distance by translating the message signal frequency to higher frequencies. This technique is called “frequency translation or modulation”.

If f1(t) is the message signal (paper) contains information to be transmitted and f2(t) as carrier signal (stone), then the modulated signal will be given as f1(t) X f2(t). The carrier signal is enclosed by the message signal.

What is an IoT? How it effect the future Embedded Systems

What is IoT?

    IoT means Internet of things. It is a technology which connects different things (devices) all over the world through internet. So the devices which are located at different locations can be monitored and controlled from anywhere at any time, and devices can also communicate with each other. By the 2020, the electronic industry people are expecting that 50 billion devices are going to connect all over the world. IoT is huge and mass technology, connectivity of things, huge storage of information, retrieve of information ineffective and secure manner. But because of the cloud connectivity and Big data solution come together to make reality of the IoT emerging.

Figure 1: Internet Of Things all over the world



How this IoT technology is evolved?

Due to globalization, everything is changing, culture, tradition, interest, hobbies and technology in every country and in all aspects. Change in technology is very drastic because this change is diversifying to all fields (electronics, robotics, automobile, bio-medical, agriculture, artificial intelligence etc.,) of science. Internet is one of the wonderful global connecting technologies which brought the mankind life busy by engaging with a lot of things around the world. This emerging technology (IoT) will bring a great change in the lifestyle of the mankind. When discussing such huge and mass technologies, there will be a question arises in our mind “how and when this IoT technology is evolve”.

We can discuss the evolution of Internet of Things in two aspects
1.       Considering generations of Internet world
2.       SCADA

Generations of Internet World:

·         First generation of Internet: Internet of Information (IoI):

In this generation, the internet is mainly used to share the information all over the world, so that people was developed so many different type of software applications to access the data from the different computer systems. Any can share any one can download, if they have proper permissions Ex: Worldwide Web, file transfer protocol, download applications, etc.,

·         Second generation of Internet: Internet of People (IoP):


In this generation, the internet connects different people all around the world through social media websites like Facebook, Twitter, Orkut, Whatsapp, etc., We make friends through any one and anywhere in the world.

·         Third generation of Internet: Internet of things (IoT):


In this generation, a lot of things are going to be connecting all around the world. Here things may be mobile phone, Wifi-printer, vehicle control systems, house hold fans, lights, energy meters, etc., Machines are going to communicate with each other, machines can be monitor and control from remote locations at any time.

Supervisory Control and Data Acquisition (SCADA):

                Data Acquisition is the key term used in sensor interfacing devices, if a system has ability to collect or acquire the pieces of information from different sensor interfaced devices located at remote locations. For example, consider a power plant industry, where the people continuously acquire and monitor the parameters like temperature, pressure, power and displayed them on a monitor.
Supervisor control in SCADA is a control system through which we can take control actions on the entire systems based on the acquired data. For example, switch ON the cooling fan in an industry when the temperature recorded on the display is higher than the threshold value.
SCADA most often finds in industries like power, gas pipelines, oil purification, water distribution, etc. so that SCADA mostly specific industry automation by following specific protocols in industry standards.
Whereas coming to IoT, here also we connect, monitor and control the devices over long distances through internet. Unlike SCADA, IoT is not limited to industries or not limited to four wall rooms, but it extends and connects different fields of science. For example a driver in a car can monitor the traffic status on the highway throughout his journey and take actions according to that data. Another example, a user can monitor his house hold power usage and can control from remote location.

IoT Security Issues:

Because of every new emerging technology, there will be good things and bad things for mankind. Generally some people misuse the technology, and they can steal or modify others information. In IoT technology concern about Security issues will be a big deal, because hackers may breach the security levels and may control the devices without any proper permission. Someone can hack into my television, refrigerator, CCTV cameras and can control these. Along with IoT, other sectors of technology are going to connect to internet and make the IoT huge and Strong. For example, vehicle to vehicle communication is next generation transportation for safe driving, traffic monitoring, etc., but because of IoT, hacker may hack into my car and controlled, which will put me into danger. Another example for IoT merging other technology is smart meter and smart grid solutions, what happens when some hack into the power grid control system and shut it down and makes the city black out for days until the problem is resolved. Which in turn a big revenue loss and disturb the regular human life. So that the people who develop and use IoT must have some safeguard solutions, to answer such questions.

Embedded Systems with IoT Connectivity:

IoT Is mainly concern about the device connectivity through internet. So every embedded device should be capable to support of internet connectivity, this may be achieved by providing add on support to Ethernet and wifi connection. In this direction, different chip design companies (like Texas instruments, Intel, Renesas, Infineon, Freescale semiconductors, etc.,) are trying to integrate these (Ethernet, Wifi, etc.,) features in their chips. A lot of new protocols and standards are introducing for developing Embedded IoT applications. MQTT (stand for MQ Telemetry Transport) is one of the protocols used for Internet of Things connectivity, which is developed by IBM Company. It is a publish/ subscribe messaging protocol for IoT.
 Texas Instruments Company who developed the first successful microcontroller with integrated Wifi Subsystem with ultra low power capability called ‘CC3200’ with 9mmX9mm size. Designing such chip with mix of analog, and digital and RF is a big challenging task, but the Texas Instruments make it real. Building IoT Application using CC3200 is easy and can be readily applied to our applications. CC3200 contains ARM cortex –M4 core with 80MHz clock and also in-built wifi along with integrated hardware crypto engine for fast security implementation on Embedded IoT applications. This chip also got product of the year award in 2014 from electronics products magazine.

Figure 2: Texas Instruments CC3200 IC

Edison is another MCU with integrated wifi subsystem which is developed by Intel Company, the SoC includes a dual core, and dual threaded Intel Atom CPU at 500MHz and Intel Quark microcontroller at 100MHz. But for simple embedded systems like controller house hold applications, this will be a big and costly product. It suits for high speed and real time applications like V2V communications. This SoC comes along with in-built Bluetooth for sensor networks.
Figure 3: Intel Edison for IoT



Product
Edison (MCU with in-built wifi)
CC3200 (MCU with in-built wifi)
Company
INTEL
Texas Instruments
Core
Dual core Atom processor at 500MHz and Quark MCU at 100Mhz
ARM cortex- M4 processor at 80Mhz
Cost
~$75
<$15
Performance
Very high, best suits for high speed embedded IoT applications (ex:V2V communications)
Suits for Embedded IoT Applications
Power
Standby (WiFi): 35mW
Ultra low power
Hardware Crypto engine
No
yes
Wifi Speed (application through pu)
-
13-16Mbps

Effect of IoT on future Embedded Systems:

                 Almost the today’s world is covered with full of different embedded systems but no connectivity between them. IoT brings the connectivity between the embedded systems in different fields of technology (medical, house hold, power sector, consumer goods, etc). IoT brings a new era in embedded systems and because of IoT a massive demand will gain by the embedded systems, Chip design technology (VLSI) and software industry for web application developments, online data base management, etc., A huge market will be going on embedded systems design and intelligent systems all over the world.

 Introduction of MCU with inbuilt-wifi chips make the IoT stronger and massive connectivity. Now all the over the world the wifi is common thing and is readily available in everywhere, so the embedded devices should be capable to have these wifi connectivity support systems as inbuilt-system or Off the shelf components. These wifi Embedded systems instead Wired (LAN) provides the easy connectivity to IoT and portability. One of the main factors that mostly the embedded systems concern about is power, so low power embedded wifi device are preferable to support battery devices. 

Embedded C program to interface 16x2 Character LCD in 4-bit mode with ARM Cortex M processor LPC17xx

                In this tutorial, we are going to see how to write an Embedded C program to drive the 16x2 character LCD display. Here we are not going to use any processor supporting header files, everything is written,  developed, tested using LPC1768-Xplorer base board (from NGX technologies) along with Mbed –Xpresso base board as  development board. The entire code for LCD is developed in embedded c without using processor header files.

Step1: look into Schematic for hardware connections to 16x2 LCD


LPC1768-Xplorer is a ARM CORTEX-M3 processor based stamp board which is attached on the Mbed-Xpresso base Board. The Stamp board itself provides some connections to 16x2 Character LCD interface. From the Schematic diagram, there are eight LCD pins are given, LCD_D4 to LCD_D7 as data lines of LCD from Port 0 pins (P0.19 to P0.22) of LPC1768 respectively. LCD control lines (LCD_RS, LCD_RW, LCD_EN) are taken from Port2 pins (P2.5, P2.6, P2.7) and lastly P4.29 is given as LCD back light LCD_BL, but in this tutorial it is not used. Download the LPC1768 schematic diagram here. Once the hardware connections are completed, we will readily jump to the Embedded C program to drive the hardware.

Figure 1: LPC17xx Schematic showing LCD pins


Step 2 : Enable the GPIO hardware using PCONP register.

We start the Embedded C program by identifying the appropriate special function registers and configuring them.
The PCONP is referred as power control for peripherals and is used to ON or OFF the power or clock of different hardware subsections of the processor to reduce the power consumption and PCONP is located address 0x400FC0C4 of the LPC17xx Memory map. PCGPIO bit in PCONP register is used to enable the GPIO hardware in the processor. Enabling 15th bit in the PCONP register will activate the GPIO hardware, through which we can make LCD connections.

Figure 2: PCONP register Configuration


Step 3: Configure the GPIO Port0 Pins as digital pins

16x2 Character LCD is a simple output device which can easily driven with GPIO pins of the ARM cortex processor, but in ARM Cortex M Processor LPC17xx each I/O pin has multiple functionalities. By using Pin Function Select registers (PINSEL0 – PINSEL10), we can select the LCD pins as simple GPIO pins. In this tutorial Port0, Port2, and Port4 are used to interface.

Embedded C program to blink an LED using ARM cortex M processor LPC17xx without using any Header Files

In this tutorial, we are going to look and understand how to write an Embedded C program to blink LED using ARM Cortex M3 processor (LPC1768) without using any processor header files. Here I am using LPC1768-Xplorer base board (from NGX technologies) along with Mbed –Xpresso base board as development board.

Step1: look into Schematic for hardware connection to the LED

In this tutorial, we are going to look and understand how to write an Embedded C program to blink LED using ARM Cortex M3 processor (LPC1768) without using any processor header files. Here I am using LPC1768-Xplorer base board (from NGX technologies) along with Mbed –Xpresso base board as development board.
Figure 1 Schematic Diagram showing LED connection to LPC1768

Step2: Enable GPIO port hardware

Generally, in advanced Microcontrollers (like ARM) there is a possibility to turn ON or OFF different hardware sub sections in it to reduce the power consumption of the processor. This can be done by stopping the power/clock source to that particular hardware section off and this technique is most popularly referred as ‘Clock Gating’. In LPC1768 ARM processor, there is a special function register (SFR) called Power control for Peripheral register (PCONP). Each bit in this PCONP enables or disables one peripheral. i.e., if a peripheral control bit 1, then its corresponding peripheral is enabled otherwise disable. All such SFR are explained in the user guide of LPC17xx. In this tutorial, we need to enable the GPIO hardware in the LPC1768 ARM cortex processor. By looking the user guide of the LPC1768, 15th bit of the PCONP should be 1 in order to enable the GPIO hardware. The below figure2 shows PCONP register configuration according to our requirement.

Figure 2 PCONP register with address
This memory mapped register can be define in embedded c as follows

Embedded C Syntax to define PCONP register:
#define PCONP  (*((volatile unsigned long *)0x400FC0C4))

The above preprocessor instruction requires in some explanation for the beginners. To read a memory mapped special function register content of a Microcontroller in Embedded C, we should take the address of that register (in this case, the PCONP is located at address 0x400FC0C4).

Read_data = 0x400FC0C4;
The above instruction will take the 0x400FC0C4 as data and stores in the variable ‘Read_data’. To read the content of that register, we need to dereference the address as shown below.

Read_data = *(0x400FC0C4);
The above instruction is similar to Read_data = *p, which is a pointer value assigned into the Read_data variable. All ARM cortex registers are 32-bit wide, so we need to type cast the address as ‘unsigned long’.

Read_data = *((unsigned long *) 0x400FC0C4);
The volatile qualifier indicates the compiler that the object pointed by pointer might change even though no instructions in the program appear to change it. This doesn’t make sense for this PCONP register, but this volatile keyword will find its importance when you read the data from a GPIO port data register. Because sometimes you may connect the GPIO data port pin to a push button then the GPIO port data register bits may change when the user presses or release the push button, even though there is no related instructions are executed.


Read_data = *((volatile unsigned long *) 0x400FC0C4);

Step 3: Configure the GPIO Port0 Pins as digital pins

Till now we understand, how to power up individual hardware section in the ARM processor (LPC17xx) using PCONP register. And also we got the coding syntax to declare a memory mapped register. As stated above the ARM cortex M processor is advanced processor in which each port pin may have multiple functionalities. For example, P0.10 in LPC1768 can be used as GPIO, TXD2 for serial communication, SDA2 for I2C communication, and as MAT3.0. To select a particular functionality of a pin, the LPC17xx ARM cortex M processor provides a special multiplexed hardware called “Pin Connect Block”. The pin connect block allows to select a particular function on the pin using some set of SFR registers.

There are three set of special function registers are available to configure the functionality of the pin as shown in the below figure. 
Figure 3 PIN CONNECT BLOCK REGISTERS
1.       Pin Function Select Registers – These registers are used to configure the single functionality of a pin from multiple functionalities. These registers range from PINSEL0 to PINSEL10, and to configure PORT 0 lower half (0-15) pins PINSEL0 register is used. Similarly, to configure upper half (16-31 pins) of the PORT 0 pins, PINSEL1 register is used. For further ports configuration look into the datasheet.
2.       Pin Mode Select Registers – These registers are used to control the input mode of all ports. i.e., these registers are used to configure the pull up/ pull down resistors of all ports and these registers ranges from PINMODE0-PINMODE9. The on-chip pull-up/ pull-down resistor can be selected for every port regardless of the pin functionality except when I2C and USB configuration. PINMODE0 and PINMODE1 registers are used to control pull-up/ pull-down resister for lower and upper half of the GPIO Port respectively.
3.       Open Drain Pin Mode Selection Registers – These are five registers (ranges from PINMODE_OD0 to PINMODE_OD4) used to control the open drain mode of all ports.


In this simple LED blinking tutorial, the LED pin of LPC17xx (P0.10) is to be configured as simple GPIO pin. To do so, we need to configure the PINSEL0 register 20 and 21 bits as ‘00’ combination and its value become ‘0x00000000’. In LPC17xx, the PINSEL0 register is located at address 0x4002C000. I am not using any Pull-up/Pull-down and open drain configurations here, so PINMODE_OD1 and PINMODE_OD0 registers are not used in this tutorial. 
Figure 5 PINSEL0 register


Embedded C Syntax to define PINSEL0 register:
#define PINSEL0  (*((volatile unsigned long *)0x4002C000))

To load a value 0x00000000 in to PINSEL0, Syntax as follows
PINSEL0 = (unsigned long)0x00000000;

Step4: Configure GPIO Port registers

There are five separate registers available for each port in LPC17xx ARM Cortex processor. These registers will allow operations like read, write and set direction of the data on the GPIO port.
1.       FIODIR – Fast GPIO Port Direction control register: used to control the data direction (‘0’ for Input or ‘1’ for Output) of each port pin.
2.       FIOMASK – Fast MASK register for port: used to mask the GPIO operation (read, write) on particular port pin.
3.       FIOPIN – Fast Port PIN value register: used to read the current state of digital port pins.
4.       FIOSET – Fast Port Output Set register: used to produce high state at output.  Writing 1 produces logic high at output and writing 0 has no effect.
5.       FIOCLR – Fast Port Output Clear Register: used to produce low state at output. Writing 1 produces logic high at output and writing 0 has no effect.

Why the name ‘Fast’ comes to every register in this LPC17xx processor?
All the GPIO in LPC17xx ARM cortex processor connected to Advanced High Speed bus (AHB) for faster access. Hence GPIO registers uses ‘fast’ keyword in their register name.


Now we will configure the GPIO registers for Port0. Firstly, Configuring Port Direction register FIODIR, setting a bit in this register will make that particular pin as output otherwise input as shown below.  Since our LED is an output device which is connected to P0.10 pin of LPC17xx, so we need to set 10th bit as 1 in the FIODIR register as shown below. It is located at address 0x2009C000.

Figure 6  FIODIR REGISTER FOR PORT0


Embedded C Syntax to define FIODIR register:
#define FIODIR (*(volatile unsigned long *) 0x2009C000)

To set a particular bit in the FIODIR register, we can use bitwise operators in Embedded C as follows. The below embedded c syntax (using OR operation) will enable the 10th bit without effecting the other bits.

FIODIR = FIODIR |((unsigned long)1 << 10);  or simply use compound assignment statements - FIODIR|=((unsigned long)1 << 10);

(Unsigned long)1 – the type casting of (unsigned long) will tell the compiler to make the 1 as 32-bit number.

Configuring Port Mask register, a zero in mask register will allow the GPIO operations (read, write), otherwise the operations are not allowed.
Figure 7 FIOMASK REGISTER FOR PORT0


Embedded C Syntax to define FIOMASK register:
#define FIODIR (*(volatile unsigned long *) 0x2009C010)

Configuring PORT 0 MASK register 10th bit to zero. The below embedded c syntax (using AND operation) will make the 10th bit zero without effecting the other bits. The tiled operator makes the bit to zero.

FIOMASK &= ~((unsigned long)1 << 10);

The embedded C syntax for FIOSET and FIOCLR are similar to above register declaration.
Now it times to write the complete Embedded C program
1.       Declare any Header files required
2.       Define any preprocessing directives (for SFR register address)
3.       Define any Function Prototypes
4.       Define any Global Variables

/*********Program**********/
/*Preprocessor Declaration for ARM registers*/

#define PCONP    (*((volatile unsigned long *) 0x400FC0C4)) // Power control register
#define PINSEL0  (*((volatile unsigned long *) 0x400FC0C4)) // PORT0 Special Funciton Select Register
#define FIO0DIR  (*((volatile unsigned long *) 0x400FC0C4)) // PORT0 Data Direction register
#define FIOMASK  (*((volatile unsigned long *) 0x400FC0C4)) // PORT0 MASK register
#define FIOSET   (*((volatile unsigned long *) 0x400FC0C4)) // PORT0 BIT SET register
#define FIOCLR   (*((volatile unsigned long *) 0x400FC0C4)) // PORT0 BIT CLR register

/*Function Prototype*/
void delay(unsigned long);

/*Global Vaiablr Declarations*/

/*main function*/

void main()
{
                // Enable the Clock to Port0 using PCONP register
                PCONP |= ((unsigned long)1<<15);

                // Select simple GPIO functionality of PORT0.10 pin using PINSEL0
                PINSEL0 |= ~((unsigned long)1<<10);

                // Set the PORT0.10 pin to output using FIODIR
                FIODIR |= ((unsigned long)1<<10);

                // Make the mask bit of PORT0.10 to zero
                FIOMASK |= ~((unsigned long)1<<10);

                // super loop to blink LED
                while(1)
                {
                                FIOSET |= ((unsigned long)1<<10);          // LED ON
                                delay(1000000);
                                FIOSET |= (~(unsigned long)1<<10);        // LED OFF
                                delay(1000000);
}             
)
}

void delay (unsigned long value)
{
                unsigned long i;
                for(i=0;i<value;i++);
                return;

}

Types of Networks in Artificial Neural Networks

Based on the connection pattern between the neurons, the artificial neural networks are classified in to two types.
1. Feed-forward networks.
2. Feedback or recurrent networks.

Artificial Neurons and its activation function - Tutorial Part3

Artificial Neurons and its activation function
Just like bio-logical neuron cell, the artificial neuron contains several inputs, output terminals and a computation unit (nucleus) at the center, as shown in the below figure. Each input connected to the neuron cell has its own weight represents the strength of the input signal.

Artificial Neuron


X1, X2, X3, …. Xn are the inputs of artificial neuron and these are multiplied with corresponding weights (W1, W2, W3, … Wn) before entering in to the nucleus. The nucleus will sum up all these weighted input values which produce “activation”.

The activation is given as       

Where Wj is the weight associated with the jth input (Xj).

McCulloch and Pitts were proposed a binary threshold unit as a computational model for an artificial neuron cell.
i.e., if the sum of the weighted inputs of the neuron cell is greater than threshold value gives a output ‘1’ otherwise is gives ‘0’ as output.

McCulloch-Pitts model of a artificial neuron cell






Applications and Importance of Artificial Neural Networks – Tutorial Part2

In the last tutorial of artificial neural networks we specified that human brain is big massive complex non-linear network. From this the Artificial Neuron should be designed with a non-linear function. Ok we will discuss about the non-linear function in the next tutorial.

Now we will some application and importance of Artificial Neural Networks

What is the importance of the Artificial Neural Networks (ANNs):
1.       Human brain is very good at pattern recognition (like handwriting recognition, etc.,) and can interpret noisy and incomplete data.
2.       Human brain is itself responsible for parallel processing and distributed representation.
3.       Human brain is very excellent in Learning.
All the human brain activities can be achieved by using Artificial Neural Networks in the computer technologies.

Applications of Artificial Neural Network (ANN):
1.       System identification
2.       Gamming and decision making (Ex: Chess game)
3.       Pattern recognition (like face recognition, voice recognition, handwritten recognition)
4.       Medical diagnosis – ex: ANN used to diagnosis various cancer.
5.       Financial applications
6.       Email-spam filtering
7.       Robotics

8.       Data processing, etc,

If you really like this tutorial, Don't forget to give the comment or please subscribe to the RSS feed by submitting your E-mail or like our Facebook page.
Related Posts Plugin for WordPress, Blogger...

 
Powered by Blogger