Tuesday, 14 August 2018

Basics of Embedded C Program and Programming Structure for Beginners


Embedded C Programming is the soul of the processor functioning inside each and every embedded system we come across in our daily life, such as mobile phone, washing machine, and digital camera.
Each processor is associated with an embedded software. The first and foremost thing is the embedded software that decides the functioning of the embedded system. Embedded C language is most frequently used to program the microcontroller.
Embedded C Programming
Embedded C Programming


Earlier, many embedded applications were developed using assembly level programming. However, they did not provide portability. This disadvantage was overcome by the advent of various high levels languages like C, Pascal, and COBOL. However, it was the C language that got extensive acceptance for embedded systems, and it continues to do so. The C code written is more reliable, scalable, and portable; and in fact, much easier to understand.

About C Language

C language was developed by Dennis Ritchie in 1969. It is a collection of one or more functions, and every function is a collection of statements performing a specific task.
C language is a middle-level language as it supports high-level applications and low-level applications. Before going into the details of embedded C programming, we should know about RAM memory organization.

Salient features of the language

  • C language is software designed with different keywords, data types, variables, constants, etc.
  • Embedded C is a generic term given to a programming language written in C, which is associated with a particular hardware architecture.
  • Embedded C is an extension to the C language with some additional header files. These header files may change from controller to controller.
  • The microcontroller 8051 #include<reg51.h> is used.
The embedded system designers must know about the hardware architecture to write programs. These programs play the prominent role in monitoring and controlling external devices. They also directly operate and use the internal architecture of the microcontroller, such as interrupt handling, timers, serial communication and other available features.

Differences between C and Embedded C

Differences between C and Embedded C
Differences between C and Embedded C

The basic additional features of the embedded software

Data types
The data type refers to an extensive system for declaring variables of different types like integer, character, float, etc. The embedded C software uses four data types that are used to store data in the memory.
The ‘char’ is used to store any single character; ‘int’ is used to store an integer value, and ‘float’ is used to store any precision floating point value.
The size and range of different data types on a 32-bit machine is given in the following table. The size and range may vary on machines with different word sizes.
Data types
Data types
Keywords
There are certain words that are reserved for doing specific tasks. These words are known as keywords. They are standard and predefined in the Embedded C.
Keywords are always written in lowercase. These keywords must be defined before writing the main program. The basic keywords of an embedded software are given below:
Keywords
Keywords
sbit: This data type is used in case of accessing a single bit of SFR register.
  • Syntax: bit variable name = SFR bit ;
  • Ex: bit a=P2^1;
  • Explanation: If we assign p2.1 as ‘a’ variable, then we can use ‘a’ instead of p2.1 anywhere in the program, which reduces the complexity of the program.
Bit: This data type is used for accessing the bit addressable memory of RAM (20h-2fh).
  • Syntax: bit variable name;
  • Ex: bit c;
  • Explanation: It is a bit sequence set in a small data area that is used by a program to remember something.
SFR: This data type is used for accessing an SFR register by another name. All the SFR registers must be declared with capital letters.
  • Syntax: SFR variable name = SFR address of SFR register;
  • Ex: SFR port0=0x80;
  • Explanation: If we assign 0x80 as ‘port0’, then we can use 0x80 instead of port0 anywhere in the program, which reduces the complexity of the program.
SFR Register: The SFR stands for ‘Special Function Register’. Microcontroller 8051 has 256 bytes of RAM memory. This RAM is divided into two parts: the first part of 128 bytes is used for data storage, and the other of 128 bytes is used for SFR registers. All peripheral devices like I/O ports, timers and counters are stored in the SFR register, and each element has a unique address.

The Structure of an Embedded C Program

  • comments
  • preprocessor directives
  • global variables
  • main() function
{
  • local variables
  • statements
  • …………..
  • …………..
}
  • fun(1)
{
  • local variables
  • statements
  • …………..
  • …………..
}
Comments: In embedded C programming language, we can place comments in our code which helps the reader to understand the code easily.
C=a+b; /* add two variables whose value is stored in another variable C*/
Preprocessor directives: All the functions of the embedded C software are included in the preprocessor library like “#includes<reg51.h>, #defines”. These functions are executed at the time of running the program.
Global variable
A global variable is a variable that is declared before the main function, and can be accessed on any function in the program.
Global variable
Global variable
Local variable
A local variable is a variable declared within a function, and it is valid only to be used within that function.
Local variable
Local variable
Main () function
The execution of a program starts with the main function. Every program uses only one main () function.

Advantages of embedded C program

  • Its takes less time to develop application program.
  • It reduces complexity of the program.
  • It is easy to verify and understand.
  • It is portable in nature from one controller to another.

Examples of a few Embedded C Programs

The following are a few simple Embedded C programs used for microcontroller-based projects.
Example-1
Example-1
Example-2
Example-2
Example-3
Example-3
Example-4
Example-4
We hope that we have been successful in providing an easy and approachable way for the beginners of Embedded C programming. The better understanding of the Embedded C programming is the most essential prerequisite for designing embedded based projects. In addition to this, a better understanding and proper knowledge about embedded C programming help students immensely in the selection of a rewarding career.
We encourage and welcome queries, suggestions and comments from our readers. Therefore, you can post your queries and feedback about this article in the comments section given below. Follow the below link for Solderless projects

Monday, 13 August 2018

Different Types of Sensors with their Applications


Different Types Of Sensors



What is a Sensor?

A device that detects the changes in electrical or physical or other quantities and thereby produces an output as an acknowledgement of change in the quantity is called as a Sensor. Generally, this sensor output will be in the form of an electrical or optical signal.

Different types of Sensors

The most frequently used different types of sensors are classified based on the quantities such as Electric current or Potential or Magnetic or Radio sensors, Humidity sensor, Fluid velocity or Flow sensors, Pressure sensors, Thermal or Heat or Temperature sensors, Proximity sensors, Optical sensors, Position sensors, Chemical sensor, Environment sensor, Magnetic switch sensor , etc.
Different types of Sensors
Different types of Sensors

Different Types Of Sensors With Their Applications

Typical applications of different types of sensors such as the application of Speed sensor for synchronizing the speed of multiple motors, Temperature sensor application for industrial temperature control, application of the PIR sensor for the automatic-door-opening system Ultrasonic sensor application for distance measurement, etc., are discussed below with their block diagrams.

Speed Sensor

Sensors used for detecting the speed of an object or vehicle is called as the Speed Sensor. There are different types of sensors to detect the speed such as Wheel speed sensors, speedometers, LIDAR, ground speed radar, Doppler radar, airspeed indicators, pitot tubes and so on.
Speed Sensor
Speed Sensor

Application of Speed Sensor

PIC microcontroller based project for speed synchronization of multiple motors in industries using wireless technology is a typical application of the speed sensor. One of the multiple motors in the industry is considered as the main motor which acts as transmitter and remaining motors acting as receivers, will follow the speed of the main motor. The main motor and receiver motors used in this project are BLDC motors that are controlled using PWM control with the radio frequency wireless communication mode.
Application of Speed Sensor by Edgefxkits.com
Application of Speed Sensor by Edgefxkits.com
Reference RPM is given to each motor shaft which has an IR sensor mounted and a closed loop is obtained by feeding this output to the controller in the circuit. Full speed will be displayed on the display unit and required speed of all motors can be obtained by entering the desired percentage using the keypad. This entered percentage is matched with running RPM by maintaining appropriate DC power to the motor with automatic adjustment of pulse width output of microcontroller.
Thus, by varying speed of transmitting motor, we can change the speed of all motors using this technology.

Temperature Sensor

A device which gives temperature measurement as an electrical signal is called as Temperature sensor. This electrical signal will be in the form of electrical voltage and is proportional to the temperature measurement.
Temperature Sensor
Temperature Sensor
There are different types of sensors used for measuring temperature, such as Contact type temperature sensors, Non-contact type temperature sensors. These are again subdivided as Mechanical temperature sensors like Thermometer and Bimetal. Electrical temperature sensors like Thermistor, Thermocouple, Resistance thermometer and Silicon band gap temperature sensor.

Application of Temperature Sensor

Design of Industrial Temperature Controller for controlling the temperature of devices used in industrial applications is one of the frequently used practical applications of the temperature sensor. In this circuit IC DS1621, a digital thermometer is used as a temperature sensor, thermostat, which provides 9-bit temperature readings. The circuit mainly consists of 8051 microcontrollers, EEPROM, temperature sensor, LCD display and other components.
Temperature Sensor Application by Edgefxkits.com
Temperature Sensor Application by Edgefxkits.com
LCD is used to display temperature in the range of -55degress to +125degrees. EEPROM is used to store predefined temperature settings by the user through the 8051 series microcontroller. The relay whose contact is used for load, is driven by the microcontroller using a transistor driver.

PIR Sensor

An electronic sensor used for measuring the infrared light radiation emitted from objects in its field of view is called as a PIR sensor or Pyroelectric sensor. Every object that has a temperature above absolute zero emit heat energy in the form of radiation radiating at infrared wavelengths which is invisible to the human eye, but can be detected by special purpose electronic devices such as PIR motion detectors.
Passive Infrared Sensor
Passive Infrared Sensor
PIR sensor itself is split into two halves, which are sensitive to IR and whenever the object comes in the field of view of the sensor, then positive differential change will be produced between two halves with the interception of the first half of the PIR sensor. Similarly, if the object leaves the field of view, then negative differential change will be produced. PIR or Passive Infrared sensor is named as passive because it doesn’t emit any energy or radiation for detecting the radiation. There are different types of sensors used for detecting the motion and these PIR sensors are classified based on an angle (wide area) over which they can detect motion of the objects like 110degrees, 180degrees and 360degress angles.

Application of PIR Sensor

Automatic Door Opening System is a typical application of PIR sensors which is intended for automatic door closing and opening operations based on body movement near the door. PIR-sensor-based-automatic-door- opening system circuit mainly consists of a PIR sensor, an 8051 micrcontroller, a driver IC, a door motor.
PIR Sensor Application by Edgefxkits.com
PIR Sensor Application by Edgefxkits.com
If a body movement is present near the door, then infrared radiation emitted from the body will cause the sensor to produce a sensing signal which is fed to the microcontroller. The door motor is then controlled and operated by the microcontroller through driver IC. Thus, if anybody comes near to the door, then a command will be sent by the microcontroller for opening door and a time delay is set for closing door automatically. This project is intended for operating doors of shopping malls, theatres and hotels.

Ultrasonic Sensor

The principle of the ultrasonic sensor is similar to sonar or radar in which interpretation of echoes from radio or sound waves to evaluate the attributes of a target by generating the high-frequency-sound waves (around 40kHz). The transducer used for converting energy into ultrasound or sound waves with ranges above human hearing range is called an ultrasonic transducer.
Ultrasonic Sensor

Application of Ultrasonic Sensor

The distance measurement at inaccessible areas is a typical application of ultrasonic sensors. The circuit consists of an ultrasonic module, LCD display and microcontroller. The ultrasonic module is interfaced with the microcontroller and this ultrasonic transducer consists of a transmitter and receiver.
Ultrasonic Sensor Application by Edgefxkits.com
Ultrasonic Sensor Application by Edgefxkits.com
The waves transmitted by the transducer are received back again after the waves are reflected back from the object. The velocity of sound is considered for calculating the time taken for sending and receiving waves. The distance is calculated by executing a program on the microcontroller, and then it is displayed on the LCD display.
There are many sensors such as humidity sensor, gas sensor, pressure sensor, water sensor, leaf sensor, rain sensor, tilt sensor, a rate sensor and so on, which are being used in many applications. If you are interested to know in detail about sensors, then you can approach us for any technical help regarding different types of sensors and their applications and also develop sensor-based projects by posting your queries in the comments section below.

Sensor Technologies Will Drive the Next Digital Age

The explosive growth of interconnected devices makes sensors indispensable and integral in digital ecosystems
The next phase of digital transformation has arrived, and it reaches to the far edges of the networks, with connections to billions of devices and objects collecting and transmitting data from ever-evolving sensors.
This new wave of innovation extends digital intelligence beyond dedicated devices such PCs, tablets, and smartphones. If an object has some kind of electrical power, it can be a smart, connected node in the Internet of Things (IoT) or within any number of autonomous systems such as connected cars, wearable technologies, and smart buildings and cities.
Many consider this phenomenon to be fundamentally digital. After all, the IoT is a network that enables billions of data points to be aggregated in the cloud, then processed and analyzed by sophisticated software. But at the very core of these changes are sensors—the ubiquitous devices that measure and represent physical phenomena such as light, heat, motion, and sound, and anchoring the 1s and 0s of the digital network in the real world.
While sensors have existed in one form or another since before the silicon chip was invented, today’s sensors are evolving at a faster rate than ever to support the proliferation of billions of new devices. New sensing technology is enabling innovative applications, such as 3D optical-sensing technology for consumer and mobile applications, time-of-flight (ToF) measurement for reliable camera autofocusing and image correction, high-end machine vision for Industry 4.0 operations, high-resolution imaging for medical diagnostics, self-regulating buildings, autonomous vehicles, and always-on personal health monitors.
Mastering the Implementation of the Entire Sensor System
With sensor technology quickly evolving for deployment in everything from lighting fixtures, clothing, food packaging, and even inside the human body or embedded in the skin, they must meet some challenging new requirements:
  • Extreme miniaturization
  • Ultra-low power consumption
  • Capability to interface with networks
  • Application-ready signal or data outputs
Furthermore, these next-generation sensors must be suited for use by manufacturers of “things” of all types, including light bulbs, drug-delivery devices, door locks, meters, as well as traditionally electronic devices. In many cases, manufacturers are seeking more than a basic sensor’s varying capacitance, resistance, or output voltage. They want application-ready sensor systems that can easily be connected to networks and interfaced to processors or a paired host such as a smartphone.
These high-performance sensors designed for digital transformation typically are comprised of three separate technology layers:
  • The core sensor layer provides an electrical representation of a real-world phenomenon, such as domains including imaging, optical, environmental, or audio.
  • The miniaturization and integration layer provides a chip-scale or modular (multichip package) implementation in silicon of the core sensing technology. This layer also provides the algorithms that convert raw sensor measurements into a linear signal streams for use by a processor.
  • The system technology layer is software embedded in the sensor that provides a connection to common networks like Bluetooth Low Energy and Wi-Fi technologies. Sensor system software also supports end-user applications, such as converting optical sensor signals in a smart wristband into a measurement of heartbeats-per-minute.
In next-generation sensor systems, each of the layers includes hardware and software elements and is provided in a single packaged device shipped to end-product manufacturers. These tiny, connected sensors, which are easy to integrate into applications, are critical for the continued proliferation of these devices.
Breaking Performance Boundaries
The digital transformation is not simply a question of embedding more sensors into more types of devices. Transformation is also occurring because sensor manufacturers such as ams are breaking the boundaries of sensor performance. These breakthroughs are enabling product manufacturers to dramatically improve the user experience, or even to create wholly new and previously impossible experiences.
Below are examples of how the radical changes in sensor operation are enabling new applications:
New XYZ color sensor chips for mobile phones, tablets, and laptops “see” the color of light in exactly the same way as does the human eye, mimicking the response curve of the eye’s red, green, and blue “tri-stimulus” light receptors. With color sensor chips, a new generation of paper-like displays, which have a much more natural appearance than existing mobile device displays, are possible. Alongside these color sensors, ultra-high sensitivity proximity (infrared) sensors enable the display to be built with no aperture on the front surface.
Multi-spectral and hyper-spectral sensor ICs are a laboratory-grade spectrometer-on-chip. Using them, accurate food-color inspection and harvest analysis will be possible for the first time in the field. Mobile color analysis will also transform inspection and quality processes in factories and hospitals, thanks to spectral sensor chips. CMOS image sensors are also finding important uses in industrial applications, including machine vision.
Active noise cancellation (ANC) is being implemented in innovative audio headset designs with integrated sensor/amplifier solutions. Headset manufacturers for the first time are building ANC capability into in-ear headphones and wireless headphones thanks to the small size and low-power consumption of ANC devices.
3D imaging systems-on-a-chip promise to transform virtual- and augmented-reality applications, as well as enable much-improved gesture sensing, face scanning, and 3D modelling. New solutions draw on innovations in laser emitter design, optical packaging, and structured light sensing.
Sustainability and the environment are important applications for advanced sensing technology, ranging from ultra-accurate flow sensors for metering, to gas sensors-on-a-chip for indoor air-quality monitoring, to high-resolution angular position sensors used in new high-efficiency electric motors.
Medical diagnostics and monitoring are enabled by ultra-accurate digital imaging devices for computed tomography for hospitals, and equally by miniature optical sensing systems-on-a-chip—small enough for a fitness wristband—for measuring heart rate and blood oxygen levels.
Sensors at the Heart of the Digital Transformation
In the PC era, the major innovations in electronics products were largely driven by advances in digital- and graphics-processing technology. Today, though, sensor systems are at least as important in enabling new use cases of existing product types, improved user experiences, and even wholly new device types.
Only in very recent times has it been possible to place a heart monitor in a wristband that a person can wear 24/7, to enable color analysis 60X more sensitive than the human eye in a small, handheld instrument, or to provide ambient noise cancellation in a device so tiny that it fits in the ear. All of these breakthroughs are the result of new implementations of sensor technology.
What comes next? The next phase involves shaping the world with sensor solutions, by creating new core sensing technologies, developing algorithms that make sense of sensor data, and building application-ready devices that OEMs can implement easily in end products. Today’s digital transformation is only just beginning—and sensors will be at the heart of the coming waves of change.
Intel® Core™ i5 Processors

6th Generation Intel® Core™ i5 Processors

Filter: View All | Desktop | Embedded | Mobile
Product NameStatusLaunch Date# of CoresMax Turbo FrequencyProcessor Base FrequencyCacheCompare
All | None
Intel® Core™ i5-6600 ProcessorLaunchedQ3'1543.90 GHz3.30 GHz6 MB SmartCache
Intel® Core™ i5-6685R ProcessorDiscontinuedQ2'1643.80 GHz3.20 GHz6 MB
Intel® Core™ i5-6600K ProcessorDiscontinuedQ3'1543.90 GHz3.50 GHz6 MB SmartCache
Intel® Core™ i5-6600T ProcessorLaunchedQ3'1543.50 GHz2.70 GHz6 MB SmartCache
Intel® Core™ i5-6585R ProcessorDiscontinuedQ2'1643.60 GHz2.80 GHz6 MB
Intel® Core™ i5-6500 ProcessorLaunchedQ3'1543.60 GHz3.20 GHz6 MB SmartCache
Intel® Core™ i5-6500T ProcessorLaunchedQ3'1543.10 GHz2.50 GHz6 MB SmartCache
Intel® Core™ i5-6500TE ProcessorLaunchedQ4'1543.30 GHz2.30 GHz6 MB SmartCache
Intel® Core™ i5-6402P ProcessorDiscontinuedQ4'1543.40 GHz2.80 GHz6 MB
Intel® Core™ i5-6400 ProcessorLaunchedQ3'1543.30 GHz2.70 GHz6 MB SmartCache
Intel® Core™ i5-6400T ProcessorLaunchedQ3'1542.80 GHz2.20 GHz6 MB SmartCache
Intel® Core™ i5-6440EQ ProcessorLaunchedQ4'1543.40 GHz2.70 GHz6 MB SmartCache
Intel® Core™ i5-6440HQ ProcessorLaunchedQ3'1543.50 GHz2.60 GHz6 MB SmartCache
Intel® Core™ i5-6442EQ ProcessorLaunchedQ4'1542.70 GHz1.90 GHz6 MB SmartCache
Intel® Core™ i5-6360U ProcessorLaunchedQ3'1523.10 GHz2.00 GHz4 MB SmartCache
Intel® Core™ i5-6350HQ ProcessorLaunchedQ1'1643.20 GHz2.30 GHz6 MB SmartCache
Intel® Core™ i5-6300HQ ProcessorLaunchedQ3'1543.20 GHz2.30 GHz6 MB SmartCache
Intel® Core™ i5-6300U ProcessorLaunchedQ3'1523.00 GHz2.40 GHz3 MB SmartCache
Intel® Core™ i5-6200U ProcessorLaunchedQ3'1522.80 GHz2.30 GHz3 MB SmartCache
Intel® Core™ i5-6260U ProcessorLaunchedQ3'1522.90 GHz1.80 GHz4 MB SmartCache
Intel® Core™ i5-6267U ProcessorLaunchedQ3'1523.30 GHz2.90 GHz4 MB SmartCache
Intel® Core™ i5-6287U ProcessorLaunchedQ3'1523.50 GHz3.10 GHz4 MB SmartCache