Engineering Blog

Learn it. Build it. Simulate it.

2,781 step-by-step tutorials and projects on Arduino, ESP32, Raspberry Pi and Proteus.

2781 articles found.

How to use Data Types in MATLAB?

datatypes in matlab, matlab datatypes, datatypes matlab, how to use datatypes in matlab, data types matlab, matlab data types, data types in matlab

Hey geeks, welcome to the next tutorial about MATLAB software and language. In this series, we have been working on MATLAB with the basic information and in the previous lecture, we worked deeply with the workspace window and learned about the functions and variables that are commonly used when we are dealing with the data in the command prompt. In the present lecture, we are dealing with the data types in MATLAB. This is related to the command prompt window but the reason why I have arranged this lecture after the workspace practice is, there will be different steps where the usage of the workspace will be included. Other details will be cleared when you will take this lecture yet, have a look at the list of content that will be included in this tutorial: In almost every programming language, the data types are the important topics and these do not end with a single lecture, but knowingly or unknowingly, you have been using these data types in the practice of your MATLAB codes. So, first of all, I am going to provide you with the proper definition of data types: In programming, a data type is a classification that specifies what type of value a variable has and what mathematical, relational, or logical operations can be performed on it without causing an error. If this definition seems difficult to you then do not worry, all the details will be clear to you when you will see the example of each of its types. When you use any type of data in your programming language, it is ...

How to use MATLAB Workspace?

How to use MATLAB Workspace, Detail of Workspace in MATLAB, workspace matlab, matlab workspace, workspace in matlab

Hello, readers. Welcome to the MATLAB tutorial, where you are learning the basics to advance information about MATLAB without discussing unnecessary concepts. In the last lecture, there was a discussion about variables and their declaration, usage, and types in detail using the MATLAB command prompt. This time, you are learning the workspace window of MATLAB. Usually, people while learning ignores this window because they do not bother about what is happening in it, but the experts know that by applying the simple rules in the workspace window, they can easily get better results. At the end of this lecture, you will be able to answer the following questions: The workspace window is a type of window that appears in the upper right corner of the MATLAB window. At first, the focus of the user is usually on the command prompt, and hardly anyone observes the presence of the list of variables in the workspace window that they are declaring. So, the user is not required to store the variables separately in this particular window. Keep in mind, the variables in this window can lose their existence when the environment is closed, the same as in other windows. Yet, the reason why I am mentioning this point here is, the variables are saved in this window on their own, and even after we clear the screen of the command prompt, the variables are still shown in the workspace. So, we can say, even if the command prompt does not show the values of the variables, you can find them in the ...

Variables and Arrays in MATLAB

Variables and Arrays in MATLAB, matlab variables, variables matlab, variables in matlab, variables of matlab, arrays in matlab, matlab arrays, arrays matlab, matlab arrays variables

Hello peeps! Welcome to another tutorial on MATLAB where we are starting the code learning and its procedures in this lecture. In the previous sessions, we have seen the windows through which you can work in different ways for specific tasks. The focus of that lecture was on the figure window and editor window. Now, we are coding in these windows. You will see the implementation of these tasks in the command prompt because we are dealing with arrays as well. So, have a look at the topics that will be cleared in your mind after having the knowledge of this lecture. We’ll try to get the example fo each case and make sure to provide you with the easiest but accurate information. In the prerequisites of this course, we have told you that one must have a basic knowledge of programming language. So, I am assuming that you know what actually variables are. Yet, for the sake of revision, I am discussing the concept of variables. The structural unit of the programming in MATLAB is the array. As you know, MATLAB work very closely with arrays and variables are also saved in the form of arrays in MATLAB. We have a detailed series about the matrices in MATLAB and you will see the implementation of the arrays in the command prompt window. If you are confused that how MATLAB do all its task in the form of arrays, then have a look at the description of the procedure that we are giving you now. The assignment statement can be elaborated well with the help of this statement: var = expression; ...

Interface PCF8591 ADC/DAC Analog Digital Converter Module with Raspberry Pi 4

Interface PCF8591 with Raspberry Pi 4, ADC/DAC Analog Digital Converter Module with Raspberry Pi 4, PCF8591 with RPi4 Rpi4 with PCF8591, RPi4 PCF8591, PCF8591 RPi4, RPI4 ADC, Rpi4 DAC

Welcome back to another Python tutorial for the Raspberry Pi 4! The previous tutorial showed us how to construct a Raspberry Pi-powered cell phone with a microphone and speaker for making and receiving calls and reading text messages (SMS). To make our Raspberry Pi 4 into a fully functional smartphone, we built software in Python. As we monitored text and phone calls being sent and received between the raspberry pi and our mobile phone, we experienced no technical difficulties. But in this tutorial, you'll learn how to hook up the PCF8591 ADC/DAC module to a Raspberry Pi 4. Since most sensors only output their data in analog values, converting them to binary values that a microcontroller can understand is a crucial part of any integrated electronics project. A microcontroller's ability to process analog data necessitates using an analog-to-digital converter. Some microcontrollers, including the Arduino, MSP430, and PIC16F877A, contain an onboard analog-to-digital converter (ADC), whereas others, like the 8051 and Raspberry Pi, do not. You are expected to have a Raspberry Pi 4 with the most recent version of Raspbian OS installed on it, and that you are familiar with using a terminal program like putty to connect to the Pi via the Internet and access its file system remotely. Those unfamiliar with Raspberry Pi can learn the basics by reading the articles below. Each of the ten pins on the PCF8591 module may read analog values as high as 256 on the PCF8591's digital side or ...

Control Project with Ladder Logic Programming

Control Project with Ladder Logic Programming, bottle filling with plc, Control Project with PLC Programming

Hey guys! hope you are all very well. Today I come to you with a new process to learn, program, and simulate for practicing ladder logic more and more. The process we are going to implement today is a very common process that could be there in many many industries which is a silo process that aims to automate the process of filling containers or bottles with a liquid. Figure 1 shows the complete scene of the process including the system components, switches, indicators, sensors, and actuators that are integrated to make the system operate. Briefly and before going into deep details, let’s state what the system does and how it operates. Well! The system automatically fills the boxes that are traveling on the conveyor which is driven by a motor. They are filled with a liquid stored in the silo shown in the middle of figure 1. The process operates continuously from the moment we hit the start button shown in the tail of the control panel on the left side of figure 1 until termination of the process is requested by pressing the stop push in the same panel. Many inputs and outputs are utilized to address the sensors, switches, push buttons, motors, and valves. So let’s get started on the project. As we have thought, the first step in the development of a control system is to sit with the operator or the client to get to comprehend how the system works including all details and scenarios. So the system starts by receiving the kickoff by hitting the start pushbutton. Unless there is ...

MATLAB Windows | Figure Window | Editor Window

MATLAB Windows, Figure Window, Editor Window, matlab editor, matlab figure, matlab fig

Hello learners, Welcome to another tutorial on MATLAB. In the previous tutorial, we learned a lot about MATLAB's command window, saw some exciting commands related to the system, and found guidance from the pre-defined data. In this lecture, you will learn a great deal about the other two types of windows we defined in the earlier sessions. Let me discuss the points that will be discussed today. We shall discuss all these questions during our session you are going to learn a lot of things because we have precise and interesting data for your learning and practice related to MALTAB. MATLAB provides us with various functionalities related to the mathematical operations and working of different theorems in the best way. When talking about graphics, we come to know that they provide the perfect way to facilitate the user in the best way. So, it provides the user with a high-quality graphic window that shows the results of different calculations in a pictorial way. This will be clear when you see the implementation of different commands while designing your own figure window in the command prompt. It is amazing to know that you can easily label your own figure window according to your task by using some simple commands. So, have a look at the following steps: Open your MATLAB software. Go to the command window. The syntax for creating a new figure window is as follows: figure (‘Name’, ‘Value’) Where the keyword “Name” tells MATLAB that you want to name your figure window according ...

Differential Analysis of Fluid Flow

Differential Analysis of Fluid Flow, what is Differential Analysis, mass continuity equation

In this article, I will explain the differential equations of fluid motion, i.e., conservation of mass (the continuity equation. So without wasting any time, let us start. As a part of this article, it is essential to know what differential analysis is and how we can apply it to explain continuity and Naiver Stroke’s theorem. Some of the essential key points related to the differential analysis are as follows: We are moving towards the first important part of our article, i.e., the Law of Conservation of Mass. Let us start. In one of my previous articles, I have extensively explained the conservation of mass. But now, here, I will explain the derivation in terms of the infinitesimal control volume by the divergence theorem. So let’s start. To explain the topic, I will divide it into essential critical points in the following way. 0=∫CV∂ρ∂t dV+∫CSV.n dA (a) The equation is for the fixed and control volumes. ∫CV∂ρ∂tdV=inm-outn (b) Now I will explain the derivation using the divergence theorem. Derivation Using the Divergence Theorem: The other name of the divergence theorem is called Gauss’s Theorem. The statement of the divergence theorem is as follows: The Divergence Theorem (Gauss’s Theorem) is used to transform a volume integral of the divergence of a vector into an area integral over the surface that defines the volume. Some of the essential key points related to the Divergence theorem are as follows: ∫vV.GdV=∮AG.n dA (c) G=ρV 0=∫cv∂ρ∂t dV+∫cvV. (ρV) dV ∫cv∂ρ∂t+V. VdV=0 ...

Drag and Lift in Fluids

drag in fluids, lift in fluids, fluids drag, fluids lift, drag and lift in fluids, parallel surface fluids

It is one of the most critical topics whenever. It is related to the resistance a fluid faces in motion. A fluid exerts a force on a body in a different direction. Now the main question is, what is drag? And what do we know about it? The definition of drag is as follows: The force exerted on a flowing fluid in the direction of fluid flow is called drag. Some of the essential key points related to the drag are as follows: In order to explain the lift in easy words, let us have a look at the definition. The component of pressure and the wall shear forces in the normal direction to the fluid flow that tends to move the body in that direction is called lift. Some of the important key points related to the lift is as follows: The lift and drag have the equations through we can find the accurate values theatrically and can compare them with the practical ones. dFD=-P dAcos +wdAsin dFL=-P dAsin -wdAcos FD=∫AdFD=∫A(-Pcos +wsin)dA FL=∫AdFL=-∫A(Psin +wcos)dA CD=FD12V2A CL=FL12V2A Here A is the ordinarily Frontal Area. The topic is related to drag and lift. In order to define the friction and pressure forces, I will explain in few key points: The part of due directly to wall shear stress called skin friction drag. It is the part that is due directly to the pressure P, called the pressure drag. CD, friction=FD, friction12V2A CD,pressure=FD,pressure12V2A CD=CD,friction+CD,pressure FD=FD,friction+FD,pressure It is also one of the important topics of drag. The following are some important ...

Types of Fluid Flows

Types of flow, types of fluid flow, Steady and Unsteady Flow, Uniform and Non-Uniform Flow, One, two and three-dimensional Flow, Rotational or Irrotational Flow, Laminar and Turbulent, Compressible and Incompressible Flow

Hello Friends. I hope you are doing great. Here I am with another exciting topic of fluid mechanics, i.e. flow over bodies. In this article, I will explain the flow of fluids, the flow rate, their nature, the flow in pipes and much more. Fluid mechanics is all related to the fluid and its nature. I will discuss the forces that are on the body that is immersed in a fluid and the flow that is over the body. As the title shows, the main emphasis will be on the lift and drag forces. Moreover, the external and the internal flow will also be discussed in this article. And I am sure that you will enjoy reading this article. So without wasting any time, let us start. I will start with an introduction to fluid flows. In this article, our focus will be the fluid flow over the bodies immersed in the fluid. There are six different types of flows, and they are named as follows: Before discussing them extensively, I will briefly explain the external flow. Let me explain the external flow in critical points: So now, these are two different scenarios, but the main thing that matters is the relative motion of the fluid and the body. So, such motions are analysed by fixing the coordinate system on the body, called External Flow or Flow over the body. Now moving towards the six types of flows, let us start explaining them one by one. The definition of the steady flow is as follows: The steady flow is where pressure, velocity, and cross-section differ from one point to another, and it does not ...

Sending SMS & Call with GSM Module and Raspberry Pi 4

Pi4 gsm module, raspberry pi 4 gsm, rpi4 sim900, sim900 rpi4, send sms with rpi4, send sms with sim900, call with rpi4, rpi4 calling

Greetings, and welcome to another tutorial in our series on the raspberry pi 4 Python programming. The previous guide covered the basics of transmitting data over the radio using the nrf24l01 chip in Pi 4. We also learned about interfacing Arduino and raspberry pi 4 and sending radio signals between the two devices. However, this tutorial will walk you through building a Raspberry Pi-based mobile phone with a microphone and speaker for making and receiving calls and reading text messages (SMS). This Project also serves as a proper GSM Module for the Raspberry Pi interface, with all the necessary Code to run the most fundamental features of any modern smartphone. First, we will understand what gsm is, its architecture and how it works, then we will learn how to program it in our pi 4; therefore, let us begin. The acronym "GSM" refers to the "global system for mobile communication" and is the name of a type of mobile communication modem (GSM). Bell Labs was responsible for conceptualizing GSM in the 1970s. It's one of the most common forms of mobile communication around the globe. The 850MegaHertz, 900MegaHertz, 1800 Megahertz, and 1900 Megahertz frequency bands are utilized by GSM networks, which are part of an open and digital mobile network used to carry voice and data services. Using the telecommunications method of multiple time division access (TDMA), GSM technology was created as a digital system. For transmission, a GSM converts analog signals to digital ones, ...