To Study about the Embedded Systems.
AIM : To Study about the Embedded Systems.
OBJECTIVES :
-
What is the need for communication within the charger, battery pack, and motor drive ?
-
Write a pseudo code for displaying speed on the digital dashboard as per below conditions.
Update displayed speed every second, Turn on high efficiency indicator between 50 to 60 kmph, Turn on safe drive indicator above 80 kmph.
-
a.) What are the factors affecting the selection of microprocessors / microcontrollers ?
b.) Explain the architecture of an 8-bit microcontroller (8051 or any other type can be considered). List the applications for the same.
c.) Explain the different types of transmission mode with the help of real-time examples.
STUDY - 1 :
The Need for Communication within the Charger, Battery Pack, and Motor Drive :
CAN Bus : Taking a Larger Role in EVs and HEVs -
- CAN bus technologies already play a key role in coordinating the dozens of intelligent subsystems in today’s fossil-fueled cars and trucks, but they will be even more critical to the success of tomorrow’s electric vehicles (EVs), plug-in hybrid EVs (HEVs), and other energy-efficient transportation systems.
- The functional requirements imposed by the vehicles’ batteries, charging systems, and electric drivetrains raise new challenges for both CAN bus technology and the designers who use it. This article will examine these challenges as well as a look at the next generation of CAN bus products emerging to meet them.
- Communication is one of the most important part of the Battery Management System (BMS). BMS is designed to monitor the parameters associated with the battery pack and its individual cells, apply the collected data to eliminate the safety risks and optimize the battery performance.
- With the help of communication between devices BMS continuously monitors parameters such as temperature, voltage, current in and out of the pack to ensure it is being operated in safe conditions the entire time.
- Electric vehicles run on very high voltage lithium-ion battery packs. Lithium-ion batteries have higher energy density (100-265 Wh/kg) than other battery chemistries. These batteries come with the risk of catching fire under unusual circumstances. It is imperative to operate the EV batteries in a pre-defined safe limits to ensure the safety of the user as well as the vehicle.

- With the help of communication BMS is responsible for thermal management of the battery and monitors its temperature continuously. If required, BMS can adjust cooling and trigger other safety mechanisms to seize operations and minimize risk. For e.g. Hyundai Kona Electric, if overheating of the battery pack is detected by the BMS, the vehicle’s power is automatically limited and the car is put in full-safe mode.
- Overcharging of lithium-ion cells can also lead to thermal runaway and potentially an explosion. BMS continuously monitors the voltage of the pack as well as individual battery cells and controls the supply of the current to avoid overcharging. BMS can enforce the limits of the maximum charge or discharge according to temperature.
- Through communication BMS is responsible for optimising the performance of the battery pack. Lithium-ion batteries perform best when their State of Charge (SOC) is maintained between minimum and maximum charge limits defined in the battery profile. Overcharging as well as deep discharging degrades the capacity of the battery, thereby shortening its life.
- At the time of charging BMS determines how much current can safely go in & communicates the same to the EVSE (Electric Vehicle Supply Equipment or the charger). During discharge of the battery, BMS would communicate to the motor controller to avoid cell voltages reaching too low. Vehicles can show corresponding alert to the user to charge the battery pack. The BMS also controls the recharging of the battery pack by generated energy through regenerative braking.
- Individual cells in the battery pack can develop differences in capacity with time, which amplify with each charge/discharge cycle. This imbalance limits the amount of energy that can be derived from the battery also how much the battery pack can be charged. Cell balancing is needed to maintain the cells at equal voltage levels and maximize the capacity utilisation of the battery pack.

- Measurement of the individual cell voltages by BMS indicates their relative balance and acts as a pointer to how much charge equalization is required. The BMS performs cell balancing by draining excess energy from cells that are more charged than others, through active and passive balancing techniques.
- With the help of communication technology BMS uses the collected data points (temperature, voltage, current) to estimate the State of Charge (SOC) & State of Health (SOH) of the battery pack. The SOC refers to the available energy in the battery & determines how far the vehicle can go before needing to charge. The SOH determines the current condition of the battery as compared to its original capacity and indicates the battery’s suitability for the application.
- Both SOC & SOH are presented as percentages. It also checks for anomalies in the parameters and behaviour of the cells and the battery pack. It stores the error codes and logs diagnostic information that helps fix any issues with the battery. BMS can either take necessary corrective actions or trigger failsafe mechanisms to preserve the health of the pack.
- With the help of communication techniques BMS is responsible for communicating with other ECUs in the vehicle. It relays the necessary data about the battery parameters to the motor controller to ensure the smooth running of the vehicle.
- In case of AC charging the BMS communicates with the on board charger to monitor and control the charging of the battery pack. For DC charging the communication link is directly established between the EVSE and the BMS. BMS communicates the required output voltage and current levels to the EVSE. & sends instructions to start and stop the charging process.
STUDY - 2 :
A Pseudo Code for Displaying Speed on the Digital Dashboard as Per Below Conditions :
Update displayed speed every second, Turn on high efficiency indicator between 50 to 60 kmph, Turn on safe drive indicator above 80 kmph -
There are some important terms while writing Pseudo code -
Procedure - A Procedure is a finite sequence of well-defined instructions, each of which can be carried out in a finite amount of time.
Algorithm - An Algorithm is a step by step procedure to solve a given problem.
Flowchart - Flowchart is a type of diagram that represents an algorithm or process.
Pseudo Code - A Pseudo Code is a compact and informal high level description of a program. It is a step by step written outline of your code that you can gradually transcribe into the programming language.

STUDY - 3 :
a.) The Factors Affecting the selection of Microprocessors / Microcontrollers :
The brain of an embedded device, which is the processing unit, is a key determinant of the success or failure of the device in accomplishing the task(s) for which it is designed. The processing unit is responsible for every process involving from input to the system, to the final output, thus selecting the right platform for the brain becomes very important during the device design as every other thing will depend on the accuracy of that decision.
Microcontroller and Microprocessor -
The processing components used for embedded devices can be divided into two broad categories - Microcontrollers and Microprocessors.
Microcontrollers are small computing devices on a single chip that contain one or more processing cores, with memory devices embedded alongside programmable special and general purpose input and output (I/O) ports. They are used especially in applications where only specific repetitive tasks need to be performed. We already discussed about selecting the Right Microcontroller for your embedded projects.
Microprocessors on the other hand are general purpose computing devices which incorporate all the functions of the central processing unit on a chip but do not include peripherals like memory and input and output pins like the microcontroller.

Although manufacturers are now changing a lot of things that are blurring the line between microcontrollers and microprocessors like the use of memory on chips for microprocessors and the ability of microcontrollers to connect to an external memory, key differences still exist between these components and the designer will need to choose the best between them for a particular project.
Factors to Consider when Selecting a MPU or MCU -
Before making any decision on the direction to go as regards the processing device to use for the design of an embedded product, it is important to develop the design specifications.
Developing the design specifications provide an avenue for device pre-design which helps identify in details, the problem to be solved, how it is to be solved, highlights the components to be used and much more. This helps the designer make informed general decisions about the project and helps determine which direction to travel for the processing unit.
Some of the factors in the design specification that needs to be considered before choosing between a microcontroller and a microprocessor are described below.
Processing Power :
- Processing power is one of the main (if not the main) things to consider when selecting between a microcontroller and a microprocessor. It’s one of the main factors that tilt use to microprocessors. It is measured in DMIPS (Dhrystone Million of Instructions Per Seconds) and represents the number of instructions a microcontroller or microprocessor can process in a second. It is essentially an indication of how fast a device can complete a task assigned to it.

- While determining the exact computational power your design requires can be a very difficult task, an educated guess can be made, by examining the task(s), the device is being created to perform and what the computational requirements of those tasks might be. For instance the development of a device that requires the use of a full operating system either embedded Linux, windows CE or any of the other OS would require a processing power as high as 500 DMIPS, sounding like a processor? Yes. To add to it, running an operating system on a device will require a memory management unit (MMU) which will increase the required processing power. Device applications that involve a lot of arithmetic also require very high DMIPS values and the more the maths/numeric computations the device is to perform, the more the design requirements tilt towards the use of a microprocessor due to the processing power required.
- One other main implication of processing power that affects the choice between microprocessors and microcontrollers is the complexity or simplicity of things like User interfaces. It is a desirable thing these days to have colourful and interactive GUIs even for the most basic of applications. Most libraries used in creating user interfaces like QT require processing power as much as 80 – 100 DMIPS and the more animations, images and other multimedia contents to be displayed, the more the required processing power.
- Asides some of the core functions mentioned above, it is important to reserve some processing power for communications and other peripherals. Although most examples given above tend to support the use of a microprocessors, they are generally more expensive compared to microcontrollers and will be an overkill when used in certain solutions, for example using a 500 DMIPS microprocessor to automate a light bulb will make the overall cost of the product higher than normal and could ultimately lead to its failure in market.
Interfaces :
- The interface to be used to connect different elements of the product is one of the factors to be considered before choosing between a microcontroller and a microprocessor. It is important to ensure the processing unit to be used has the interfaces required by the other components.
- From connectivity and communications stand point for instance, Most microcontrollers and Microprocessors possess the interfaces required to connect to communication devices but when high speed communication peripherals like the super speed USB 3.0 interface, multiple 10/100 Ethernet ports or Gigabit Ethernet port are required, things tilt in the direction of the Microprocessor as the interface required to support these are generally only found on them because they are more capable of handling and processing the large amounts of data and the speed at which those data are transferred.
- The Impact of the protocols used for these interfaces on the amount of memory required for the firmware should be confirmed as they tend to increase memory requirements. It’s a general rule of thumb that a microprocessor-based design, be adopted for applications that require high-speed connectivity with large amount of data being exchanged especially when the system involves the use of an operating system.
Memory :
- These two data processing devices handle memory and data storage differently. Microcontrollers for instance come with embedded, fixed memory devices while microprocessors come with interfaces to which memory devices can be connected.
Cost :
- The microcontroller becomes a cheaper solution, since it does not require the use of an additional memory device while the microprocessor becomes an expensive solution to be adopted due to these additional requirements.
Limited Memory :
- The fixed memory on the microcontroller makes the amount of data which can be stored on it limited. This is a situation not applicable to processors since they are usually connected to external memory devices. A good example of when this limitation can be a problem is when developing firmware for the device. Adding Additional kilobytes to the code size may require a change in the microcontroller to be used but if the design were based on a processor, we will only need to change the memory device. Thus Microprocessors offer more flexibility with memory.
- There are several other factors based on the memory to be considered, one of them is the start-up (boot) time. The Microprocessors for instance stores the firmware on an external memory (Usually an external NAND or Serial Flash memory) and on boot, the firmware is loaded into the DRAM of the processor. While this takes place within a couple of seconds, it might not be Ideal for certain applications. The microcontroller on the other takes less time.

- For general speed considerations, the MCU usually wins due to its ability to address the most time critical applications because of the processor core used in them, the fact that the memory is embedded and the firmware used with them is always either an RTOS or bare metal C.
Power :
- A final point to consider is power consumption. While Microprocessors have low power modes, these modes are not as many as the ones available on a typical MCU and with the external components required by a microprocessor based design, it is slightly more complex to achieve low power modes. Asides from the low power modes, the actual amount of power consumed by an MCU is a whole lot lower than what a microprocessor consumes, because the larger the processing capability, the more the amount of power required to keep the processor up and running.
- Microcontrollers therefore tend to find applications where ultra-low power processing units are required such as remote controls, consumer electronics and several smart devices where the design emphasis is on the longevity of battery life. They are also used where a highly deterministic behaviour is needed.
- Microprocessors on the other hand are ideal for industrial and consumer applications that require an operating system, are computation intensive and require high-speed connectivity or a user interface with lots of media information.
b.) The Architecture of an 8-bit Microcontroller (8051 or any other type can be considered) and Its Applications :
- The 8051 Microcontroller is one of the basic type of microcontroller, designed by Intel in 1980’s. This microcontroller was based on Harvard Architecture and developed primarily for use in embedded system technology. Normally, this microcontroller was developed using NMOS technology, which requires more power to operate.
- Therefore, Intel redesigned Microcontroller 8051 using CMOS technology and their updated versions came with a letter C in their name, for instance an 80C51 it is an 8 bit microcontroller. These latest Microcontrollers requires less power to operate as compared to their previous versions.
- The 8051 Microcontroller has two buses and two memory spaces of 64K X 8 size for program and data units. It has an 8 bit processing unit and 8 bit accumulator units.
8051 Microcontroller Architecture -
Following diagram is 8051 Microcontroller architecture. Let us have a look at each part or block of this Architecture of microcontroller.

Central Processor Unit (CPU) :
- As we know that the CPU is the brain of any processing device of the microcontroller. It monitors and controls all operations that are performed on the Microcontroller units. The User has no control over the work of the CPU directly . It reads program written in ROM memory and executes them and do the expected task of that application.
Interrupts :
- As its name suggests, Interrupt is a subroutine call that interrupts of the microcontrollers main operations or work and causes it to execute any other program, which is more important at the time of operation. The feature of Interrupt is very useful as it helps in case of emergency operations. An Interrupts gives us a mechanism to put on hold the ongoing operations, execute a subroutine and then again resumes to another type of operations.
- The Microcontroller 8051 can be configured in such a way that it temporarily terminates or pause the main program at the occurrence of interrupts. When a subroutine is completed, Then the execution of main program starts. Generally five interrupt sources are there in 8051 Microcontroller. There are 5 vectored interrupts are shown in below -
- INTO
- TFO
- INT1
- TF1
- R1/T1
- Out of these, (INT0) ̅ and (INT1) ̅ are external interrupts that could be negative edge triggered or low level triggered. When All these interrupts are activated, set the corresponding flogs except for serial interrupt,.The interrupt flags are cleared when the processor branches to the interrupt service routine (ISR). The external interrupt flags are cleared when the processor branches to the interrupt service routine, provides the interrupt is a negative edge triggered whereas the timers and serial port interrupts two of them are external interrupts, two of them are timer interrupts and one serial port interrupt terminal in general.
Memory :
- Microcontroller requires a program which is a collection of instructions. This program tells microcontroller to do specific tasks. These programs require a memory on which these can be saved and read by Microcontroller to perform specific operations of a particular task. The memory which is used to store the program of the microcontroller is known as code memory or Program memory of applications.
- It is known as ROM memory of microcontroller also requires a memory to store data or operands temporarily of the micro controller. The data memory of the 8051 is used to store data temporarily for operation is known RAM memory. 8051 microcontroller has 4K of code memory or program memory,that has 4KB ROM and also 128 bytes of data memory of RAM.
BUS :
Basically Bus is a collection of wires which work as a communication channel or medium for transfer of Data. These buses consists of 8, 16 or more wires of the microcontroller. Thus, these can carry 8 bits,16 bits simultaneously. Hire two types of buses that are shown in below -
- Address Bus
- Data Bus
- Address Bus : Microcontroller 8051 has a 16 bit address bus for transferring the data. It is used to address memory locations and to transfer the address from CPU to Memory of the microcontroller. It has four addressing modes that are -
- Immediate addressing modes.
- Bank address (or) Register addressing mode.
- Direct Addressing mode.
- Register indirect addressing mode.
- Data Bus : Microcontroller 8051 has 8 bits of the data bus, which is used to carry data of particular applications.
Oscillator :
- Generally, we know that the microcontroller is a device, therefore it requires clock pulses for its operation of microcontroller applications. For this purpose, microcontroller 8051 has an on-chip oscillator which works as a clock source for Central Processing Unit of the microcontroller. The output pulses of oscillator are stable. Therefore, it enables synchronized work of all parts of the 8051 Microcontroller.
Input / Output Port :
- Normally microcontroller is used in embedded systems to control the operation of machines in the microcontroller. Therefore, to connect it to other machines, devices or peripherals we require I/O interfacing ports in the microcontroller interface. For this purpose microcontroller 8051 has 4 input, output ports to connect it to the other peripherals.
Timers / Counters :
- 8051 microcontroller has two 16 bit timers and counters. These counters are again divided into a 8 bit register. The timers are used for measurement of intervals to determine the pulse width of pulses.
Applications of 8051 Microcontroller :
Some of the applications of 8051 is mainly used in daily life & industrial applications also some of that applications are shown below -
- Light sensing and controlling devices
- Temperature sensing and controlling devices
- Fire detections and safety devices
- Automobile applications
- Defense applications
Some industrial applications of micro controller and its applications -
- Industrial instrumentation devices
- Process control devices
Some of 8051 microcontroller devices are used in measurement applications -
- Voltmeter applications
- Measuring and revolving objects
- Current meter objects
- Hand held metering system
8051 Microcontroller Applications in Embedded Systems :
The applications of 8051 microcontroller involves in 8051 based projects. The list of 8051 projects is listed below -
- Arduino Managed High Sensitive LDR based Power Saver for Street Light Control System
- The Temperature Humidity Monitoring System of Soil Based on Wireless Sensor Networks using Arduino
- RFID based Electronic Passport System for Easy Governance using Arduino
- Arduino based RFID Sensed Device Access
- Arduino based DC Motor Speed Control
- Arduino Based Line Following Robot
- Zigbee based Automatic Meter Reading System
- GSM based Electricity Energy Meter Billing with Onsite Display
- Android Phone Speech Recognition Sensed Voice Command based Notice Board Display
- Parking Availability Indication System
- Voice Controlled Home Appliances
- Remote Control Home Appliances
- PC Mouse operated Electrical Load Control Using VB Application
- Solar Highway Lighting System with Auto Turn Off in Daytime
- 8051 Microcontroller based Wireless Energy Meter
- Farmer Friendly Solar Based Electric Fence for Deterring Cattles
- Vehicle Movement Sensed Streetlight with Daytime auto off Features
c.) The Different Types of Transmission Mode with the help of Real-Time Examples :
Data Transmission Modes in Computer Network -
- Transmission mode defines the direction of the flow of data between two communication devices connected over a network. Simplex, Half Duplex, and Full Duplex are major types of data transmission modes. It is also known as data communication mode or directional mode.
- The data transmission mode is a method of specifying the direction of data flow between two devices connected over a network for data and information sharing. A data transmission mode identifies the direction of data flow from one device to another in a network.
- The method of transferring data from one device to a different one is called transfer mode. The transmission mode is additionally referred to as the communication mode.
- Each channel features a direction with which it communicates and provides the transmitting media. Therefore, the transfer mode is additionally referred to as the directional mode. The transmission mode is defined within the physical layer.
Types of Data Transmission Modes in Computer Networks -
The physical layer of the Open System Interconnection (OSI) Layer Model decides how the data is transmitted in a network. Its main function is to specify the direction of data flow through which the data travel to reach the receiver or node. Three main types of data transmission modes are :
- Simplex Mode
- Half-Duplex Mode
- Full-Duplex Mode
Simplex Mode :
- Simplex is the data transmission mode in which the data transmission is unidirectional, only in one direction. When two devices are linked in simplex mode only the sender device can send data while the receiver only receives data. It cannot be transmitted in both directions.

- This mode of transmission isn’t very fashionable because communications require two-way data exchange. Simplex mode is employed in commercial contexts like sales that don’t require a corresponding response.
- The station may be a Simplex channel because it transmits the signal to the listeners but never allows them to return. The keyboard and monitor are samples of simplex mode because the keyboard can only accept data from the user and therefore the monitor is merely wont to display data on the screen.
- The main advantage of the Simplex mode is that you simply can use the complete capacity of the channel during transmission.
- In simplex mode, data moves only in one direction similar to a one-way street. The direction of flow never changes. In simplex mode, a device just only sends or receives data. It cannot be able to perform both actions. Examples of Simplex modes are Radio and TV transmission, keyboard, etc.
Advantages and Disadvantages of Simplex Data Transmission Modes -
| Advantages | Dis-Advantages |
| Enquire full capacity of the channel during data transmission | Don’t support two-way communication |
| Low chances of data traffic issues | No mechanism to transmit information back to the sender |
Half-Duplex Mode :
- The half-duplex mode enables the flow of data in both directions but not at the same time. Data can flow in one direction at one time. In other words, each device in a link can transmit and receive the data but not at the same time.
- The total bandwidth of the channel is employed directly in one direction. In Half-duplex mode, error detection is feasible, and within the event of a mistake, the receiver asks the sender to retransmit the info.

- The speed of the half-duplex mode is slow. An example of half-duplex communication is internet surfing where there is no need for communication in both directions at the same time. The user enters a command in order to request a web page. The web page is downloaded and displayed before the user.
- Police radios are an example of a half-duplex mode. On police radios, one person speaks, and another listens. After the pause, another speaks and therefore the first party listens. Talking at an equivalent time creates a distorted sound that’s not understood.
Advantages and Disadvantages of Half-Duplex Data Transmission Modes -
|
Advantages |
Dis-Advantages |
| It optimizes the full capacity of the transmission channel | May occur delay in transmission due to one-way communication at a time. |
| Enables two-way communication | Two-way communication but not at the same time |
Full-Duplex Mode :
- Full-Duplex is the data communication mode in which the data can travel in both directions simultaneously. The full-duplex mode is a faster way of data transmission as it is bi-directional in nature. Time is not wasted in changing the direction of data flow.
- Full-duplex mode has two Simplex channels. One channel has traffic following in one direction and another channel has traffic flowing within the other way. Full-duplex mode is that the fastest mode of communication between devices.

- The common example of Full-duplex mode is that the telephone network. When two people are communicating with one another over a telephone line, they will both talk and listen at an equivalent time.
- The bandwidth of the full-duplex mode is double as compared to the half-duplex. In this communication mode, the capacity of channels is divided between two directions. An example of full-duplex mode is a Telephone Network, in which both persons can talk and listen to each other at the same time.
Advantages and Disadvantages of Full-Duplex Data Transmission Modes -
| Advantages |
Dis-Advantages |
| Two-way communication at the same time | No dedicated path exists because the communication channel divided into two parts |
| Faster than Half-Duplex mode | Improper utilization of channel bandwidth as there exist two separate paths |
CONCLUSION :
-
Successfully discussed the need for communication within the charger, battery pack, and motor drive.
-
Successfully Make pseudo code for displaying speed on the digital dashboard as per conditions.
-
Discussed about the factors affecting the selection of microprocessors / microcontrollers.
-
Explained the architecture of an 8051 8-bit microcontroller and Also, Explained the different types of transmission modes with the help of real-time examples.
REFERENCES :
https://www.digikey.com/en/articles/can-bus-taking-a-larger-role-in-evs-and-phevs
https://circuitdigest.com/article/selecting-between-a-microcontroller-and-microprocessor
https://www.watelectronics.com/8051-microcontroller-architecture/