Introduction to BC557

Hi Guys! Hope you’re well. I welcome you on board. Thank you for viewing this read. In this post today, I’ll walk you through the Introduction to BC557. BC557 is a bipolar junction transistor with DC current gain 300. It falls under the category of PNP transistors where one N-doped layer stands between the two P-doped layers. The continuous collector current is 100mA means it can drive load under 100mA. BC557 comes in the TO-92 package and is mainly used for switching and amplification purpose. Before I bore you to tears, let’s dive in and read the complete introduction to BC557 covering datasheet, pinout, working principle, power ratings, physical dimensions, and applications. Continue reading.

Introduction to BC557

  • BC557 is a bipolar junction transistor that falls under the family of PNP transistors.
  • As this is a PNP transistor, there will be no current at the base terminal when the transistor is turned ON and in that case, both emitter and collector will be forward biased.
  • And when voltage is applied at the base terminal, the transistor is turned OFF and both emitter and collector will be reverse biased.
  • It carries three terminals called collector, base, and emitter that are commonly used for external connection with the electronic circuit.
  • All these terminals are different in terms of their size and doping concentration. The emitter is highly doped against both collector and emitter terminals.
  • BC557 contains there layers i.e. two p-doped layers and one n-doped layer. The n-doped layer lies between the two p-doped layers. Here the base terminal is negative while emitter and collector will be positive.
  • The maximum collector current is 100mA indicating we cannot drive loads through the transistor that utilizes more than 100mA current.
  • It is mainly used for amplification purposes. Amplification is the process by which transistor boosts the small input voltage into a large output voltage i.e. small audio signal will be amplified into a large audio signal.

BC557 Datasheet

If you want to download the BC557 datasheet, click the link given below. This will help you understand the main characteristics of the BC557 transistor.

BC557 Pinout

BC557 contains three terminals that are known as:
  • 1: Collector
  • 2: Base
  • 3: Emitter
The following figure shows the pinout of BC557. As this is a PNP transistor, here current flows from emitter to collector and base controls the amount of current. And you may know already, in PNP transistor current flows in through the collector terminal and it drains out through emitter terminal.

BC557 Working Principle

  • In PNP transistor holes are majority carriers as opposed to NPN transistors where electrons are majority carriers. Although holes are majority carriers, the base terminal still plays a key role in the overall action of the transistor.
  • Now holes are emitted from the emitter instead of electrons in the NPN case, and they are collectors by collector terminal.
  • BC557 is called the current controlled device where small current present at the base side is used to control the large current at the remaining terminals.
  • Recall, when the transistor is turned OFF there is a current at the base side and when the transistor is turned ON there is no current present at the base terminal.

BC557 Power Ratings

The following table represents the absolute maximum ratings of BC557.
Absolute Maximum Ratings BC557
No. Rating Symbol Value Unit
1 Collector-Emitter Voltage Vce 45 V
2 Collector-Base Voltage Vcb 50 V
3 Emitter-Base Voltage Veb 5 V
4 Collector Current Ic 100 mA
5 Power Dissipation Ptot 500 mW
6 Peak Collector Current Icm 200 mA
7 Junction Temperature Tstg 150 C
  • The transistor’s amplification capacity is determined by the amplification factor that is a ratio between collector current and emitter current. It exhibits the actual value of the current or input audio signal that the transistor can amplify.
  • Make sure, these ratings remain under control and don’t exceed the recommended values.
  • If values surpass the standard values, they can affect the overall performance of the component, and thus damage the project you’re working on.
  • Also, if these ratings are applied with maximum time, they can ultimately affect device reliability.

Difference between PNP and NPN Transistors

  • Though both transistors are used for amplification and switching purposes, there are few exceptions.
  • In PNP transistor, the current flows from the emitter side to the collector side and in case of NPN transistor current flows from collector to emitter, however, in both cases, the base is the main terminal that controls the amount of current.
  • In PNP transistors, base controls the number of holes and in NPN it controls the number of electrons. As conductivity is carried out by electrons in NPN transistors, they prove handier for amplification purposes compared to PNP transistors because the mobility of electrons is far better and quicker than the movement of holes in PNP transistors.
  • In PNP transistor the base side is negative compared to both emitter and collector while in case of NPN transistor base side is positive compared to remaining terminals.
  • The emitter terminal is both cases is highly doped and carries the 100% current of the transistor.
  • Both NPN and PNP transistors are different in terms of the applied source voltage.
In PNP transistor source voltage is applied across the emitter terminal and in case of NPN transistor it is applied at the collector side.

BC557 Alternatives

BC557 equivalent alternatives are:
  • BC558
  • BD140
  • TIP42
  • BC157
  • S8550
  • 2N3906
  • 2SA1943
  • TIP127
It’s wise to check the pinout of the alternatives before installing them into your electrical project as it’s likely the pinout of the alternatives may differ from the pinout of the BC557. Better do your due diligence beforehand.

BC557 Applications

BC557 is used in the following application:
  • Used for switching and amplification purpose
  • Used to drive load under 100mA
  • Employed in robotics and instrumentation projects
  • Used in motors for controlling current

BC557 Physical dimensions

The following figure shows the physical dimensions of BC557 to help you evaluate the desired space of your electronic project. That’s all about Introduction to BC557. I hope you like this post. If you have anything to add, you can share your insight in the section below. And if you need my technical help regarding the usage of this component in your project, I’m available to help you the best way I can. Thank you for reading this post.

Introduction to BC337

Hi Friends! Hope you’re well today. I welcome you on board. In this post today, I’ll walk you through the Introduction to BC337. BC337 is a general-purpose transistor mainly used for lower power audio amplification and switching purposes. It belongs to the NPN transistor family and comes with a maximum gain of 630. The continuous collector current is 800mA indicating it can drive loads under 800mA. I’ll be discussing the complete introduction to BC337 in this post covering pinout, working, power ratings, alternatives, applications, and physical dimensions of BC337. Stay tuned.

Introduction to BC337

  • BC337 is an NPN transistor mainly used for lower power audio amplification and switching purposes.
  • It contains three terminals known as emitter, base, and collector. The small current chance at the base side is used to produce large current change at the remaining terminals. This phenomenon is used for amplification purposes.
  • BC337 comes with three layers i.e. one p-doped layer and two n-doped layers. The p-doped layer is sandwiched between two n-doped layers. The base terminal is positive and the remaining two terminals are negative.
  • As this is an NPN transistor the main charge carriers would be electrons. Although both electrons and holes take part in conductivity, electrons are major carries in this case as opposed to PNP transistors where holes are major carriers.
  • It is important to note that NPN transistors are preferred over PNP transistors because the mobility of electrons is far better and quicker than the mobility of holes. In some cases, a combination of both NPN and PNP transistors is used in an electrical project.
  • In this NPN transistor current flows from collector to emitter in contrast to PNP transistor where current flows from emitter to collector. In both cases, however, the base terminal is the main component responsible for the overall transistor action.
  • When voltage is applied at the base terminal it gets biased and the emitter terminal starts emitting the electrons which are then controlled by the base terminals and thus collected by the collector terminal.

BC337 Datasheet

Before employing any component into your project, it’s always wise to scan the datasheet that helps you better understand the characteristics of the component. Click below to download the datasheet of BC337.

BC337 Pinout

The following figure shows the BC337 pinout diagram. BC337 comes with three terminals called: 1: Collector 2: Base 3: Emitter
  • All these terminals are mainly used for external connection with the electronic circuit. All these terminals are different in terms of their functionality and doping concentration.
  • The emitter terminal is highly doped as compared to the remaining two terminals. And the emitter terminal encompasses the entire current of the transistor. The emitter current is a sum of collector current and base current.

BC337 Pin Configuration

BC337 is mainly used in three configurations as follow: 1: Common emitter configuration 2: Common collector configuration 3: Common base configuration
  • Common emitter configuration carries the suitable voltage and current ratings needed for amplification purposes. This configuration is used for amplification purposes.
  • The amplification factor demonstrates the nature of amplification. It is a ratio between collector current and base current and is denoted by ß.
  • The current gain is another important factor that is a ratio between collector current and emitter current. It is denoted by a and is known as alpha. The alpha value lies from 0.95 to 0.99 but mostly its value is taken as unity.

BC337 Working Principle

  • The base terminal plays a key role in starting the overall transistor action. When the voltage is applied at the base side, it gets biased and starts the electron action in the transistor. The base side actually acts like a control value that controls the electrons emitting from the emitter terminal which are then collected by the collector side.
  • The small current at the base terminal is used to control large current at the remaining two terminals. This process is used in amplification purposes.
  • BC337 also acts as a switch. When it acts as a switch, it converts the small current present at the one terminal side into a much larger current across the remaining transistor terminals.
  • The base pin is positive with respect to both emitter and collector terminals. While the voltage at the collector side is always positive with respect to the emitter pin.
  • The resistor is employed at the collector side to control the flow of current.
 

BC337 Power Ratings

The following table represents the absolute maximum ratings of the component BC337.
Absolute Maximum Ratings BC337
No. Rating Symbol Value Unit
1 Collector-Emitter Voltage Vce 45 V
2 Collector-Base Voltage Vcb 50 V
3 Emitter-Base Voltage Veb 5 V
4 Collector Current Ic 800 mA
5 Current Gain hfe 100 to 630
6 Transition Frequency ft 100 MHz
7 Storage Temperature Tstg -55 to 150 C
  • The collector-emitter voltage is 45V and the collector-base voltage is 50V. While the emitter-base voltage is 5V. The transition frequency is 100MHz.
  • These are the stress ratings. Make sure these ratings don’t surpass the absolute maximum ratings, else they can damage the component and thus the entire project.
  • Also, if these ratings are applied more than the required time, they can damage the device reliability.

BC337 Alternatives

The following transistors can be used as a replacement to BC337. The SMD alternatives of the BC337 are
  • 2SC3912 (SOT-23)
  • 2SC3914 (SOT-23)
  • BCX19 (SOT-23).
  • 2SC3913 (SOT-23)
  • BC817 (SOT-23)
  • 2SC3915 (SOT-23)
It is wise to evaluate the pinout of the alternatives used for the project because it’s likely the pinout of the BC337 may differ from the pinout of the alternatives. Do your due diligence to avoid any hassle later.
  • The PNP complementary to BC337 is BC327.

BC337 Applications

The following are some applications of the transistor BC337.
  • Used for switching and amplification purpose.
  • Employed in electronic motors to control current.
  • Used in the push button.
  • Employed in robotics and instrumentation.
  • Used in Darlington pair circuits.
  • Employed in Astable and Bistable multivibrators.
 

BC337 Physical dimensions

The following figure shows the physical dimensions of the component BC337. It will help you audit the space required for the component before incorporating it into your project. This is it. I hope you’ve got a clear insight into the component BC337. If you have any question regarding BC337, you can pop your question in the comment below, I’d love to help you the best way I can. You are most welcome to share your valuable suggestions and feedback in the section below, they assist us to create quality content. Thank you for reading this post.

Variables In JavaScripts

Hello everyone, I hope you are having a good day. In today's tutorial, I am going to tell you about "Variables in JavaScript". The topic, I am going to highlight today, is how to declare variables in JavaScript and types of Variable? JavaScript has variables too as many other programming languages, so let's get started with it:

What are Variables In JavaScript

Variable means anything that can vary(change). In JavaScript, Variable holds the data value, in simple words, JavaScript variables are containers and can store the data value. Variable in JavaScript are declared with var (reserved keyword).
  • It is the basic unit for holding or storing the data.
  • A variable value can change at any time.
  • Variable must have a unique name.
Syntax

var (Variable-Name) = value;

Variable declaration
  • var number = 5; // variable store numeric value
  • var string = "Hello" // variable store string value
In this example, we have declared two variables using var: number, string. we have assigned each variable a different value. The data value of the number is '5' and string data value is 'Hello". Let's have a look at few other examples: In this  picture, you can see that
  1. x store the value of 9
  2. y store the value of 2
  3. z store the value of 7
  • JavaScript is a dynamically typed language. In simple words, Its data types are converted automatically as needed during script execution.
  • For example in c# language, we have to create an integer variable to use for numerics.
int X = 5;
  • To create a string variable we use string keywords
String str = "Learning"
But in JavaScript, Variable will be automatically detected and you don't have to define their data type that if they are integer or string etc.
var myVarname = 10; alert(myVarname); myVarname = "This is a string value"; alert(myVarname)
Look in this above example, in the beginning, myVarname variable is treated as int numeric type and with alert. Following that, we have worked on myVarname again as a string and showed it. May you have noticed that we have not defined their data types.

How to Declare A Variable in JavaScript

Storing the value of a variable is called variable initialization. You can store the value of the variable at the time of variable creation(in other word declare) or later when you need to call that variable. Example:
var name = "Justin"; var salary; salary = 10,000;
You can create a variable or declare the value of the variable later as you can see in the example. Although you can also do variable initialization too. You can declare multiple variables with the single var keyword without storing the value.
var age, height, class, name;
How you can declare a variable in JavaScript with examples
// initializing variable var x = 5; var name = "Adam";
// declaring single variable var name; // declaring multiple variables var age, height, class, name;

Types of Variables

These are two types of JavaScript variables.
  • Local Variables - Local variable will be visible in the only function or block where you have defined it. Function parameters are local to that function and can't define anywhere in the JavaScript.
  • Global Variables - Global variables are variables that will be only visible in a function where it is defined and can be defined anywhere in the javascript.

Things That You Should Keep In Mind

  • Variables can only store a single value of data that can change later.
  • All the variables can only be defined using a var keyword. Variables declared without var keywords becomes global variables.
  • Multiple variables can be declared in a single line like var age = 10; name = "ali"; class = 3;
   JavaScript Reserved Word
These are all the reserved words of JavaScript. All of them can not use as JavaScript Variable, function, loop labels, method or any other objects name.

  JavaScript Reserved Word

abstract

throws catch var implements
Else native final protected delete
instanceof false new function volatile
switch case transient continue return
boolean throw char typeof if
enum long finally private default
int extends null for void
synchronized byte true const public
break this class try goto
export interface float package debugger
goto public void default if
return volatile delete implements short
while do import static with
double in super
  I have explained every point in detail. We hope you understand it clearly. But if you have any question related this topic you can comment below. We will reply to your message. Thank you so much for reading this article and we are looking forward to share the best content with you. Keep reading JavaScript tutorial. We have covered every topic in this  series.

Basic Syntax And Rules In JavaScript

Welcome back, guys! I hope you are well and having a great day. In today's tutorial, I will discuss the new topic "Basic Syntax and Rules in JavaScript". Learning grammar for a spoken language is necessary before you start writing it. There are rules and regulations you have to follow to write. Similarly, all programming languages have their grammar/syntax and rules which you have to follow in order to execute.

JavaScript Is Case Sensitive

  • JavaScript is case sensitive programing language. Therefore variables, function names, language keywords and any other identifiers must have written with a consistent capitalization of letters.     
Let me show you an example. 
  • In this statement "alert" is case sensitive and if I change the first letter of "alert"  "A".
Alert(“I am learning JavaScript”);
This code sample has uppercase "A" and instead of printing the expected "I am learning JavaScript". The error will appear (alert is not defined) and code would not run. So it is important to be careful with syntax.  Here are some rules you should keep in mind. 
  • JavaScript keywords such as if, for and alert are always lowercase.
  • Built-in objects such as math and date are uppercase or capitalized.
  • DOM(Document Object Model)  are usually lowercase but the methods are often a combination of lowercase and uppercase.
Variable, Function & Objects Name
  • You can define or name your own variable, function and objects.
  • There is no limit in choosing their name you can use uppercase, lowercase and underscore(_) or Numbers.
  • The name must begin with letters or underscore and it can't start with a number i.e getAgeBy_Name,  getHeightUnder_2
  • There is no limit for you in choosing a variable name with uppercase or lowercase, as I told before JavaScript is case sensitive: age, Age, AGE will be considered as three different variables.
  • So make sure to use the same variable when calling it or referring.
  • Most of the code in JavaScript is a statement. Like, this is a statement of JavaScript.

alert(“I am learning JavaScript on https://www.theengineeringprojects.com/”); 

  • Statement can be used to change the color of webpage, background or position of picture etc
  • Always put a semicolon at the end of the statement because each statement in JavaScript ends with a semicolon.
  • White space is not sensitive. You can add spaces and line-breaks as much as you want.

Syntax of JavaScript Comment

The syntax of comment is similar to CSS. JavaScripts comments are used to explain or understand the code, and to make it more readable. Suggestions or warnings can help the end-user too.  With the help of comment, you can stop code from execution while running or testing alternative code. There are two types of comment in JavaScript.
  1. Single Line Comment
  2. Multi-Line Comments
Single Line Comment
Single line comment represents double slash forward (//). You can use it before and after the code.  When you add these two forward slashes (//), all of the code/text to right of them will be ignored. You can see an example in the below picture.
Multi-Line Comment
The multi-line comment is more convenient than single-line comment, you can use it as a single line comment and multi-line too. Multi-line comment represents forward slash with stearic /* and end with a stearic forward slash */.
/* Your comment here */
You can out a segment of code by adding multi-line comment in it. You can look in the image for more detail. These are so helpful in coding.  You can add any comment at any time as you want for your preference. Look in the below image for a more clear example. It is really important for a JavaScript developer to know how JavaScript program executes internally. The code in JavaScript executes from top to bottom. If you want some particular statement to perform in order then you have to write it with a specific order.
Data Types in JavaScript
There are three data types in JavaScript.
  • Number: Number represents all the integer, decimal  and float type etc. i.e 4, 4.345
  • Boolean: Boolean is going to store if the statement is true or false. True/false
  • String: String should be either in a single quote or double-quotes. "I am learning Js" 'Mystring'

Google Chrome Development Tool

  • Google developer tool is available in the google chrome browser. Since you all know the google chrome browser already. So move forward.
  • Hence, all you have to do is press f12 in your google chrome browser.  It will bring a tab like this as you can see on the right side of the Image.
It will take you to the element bar, you can go to the console bar by clicking on it.
  • Element tab shows the HTML of the page.
  • You can open the Javascript file further by right-clicking on it and go down the “open link in resources panel”
  • In the resources panel, you can see the javascript file.
In console Panel, you can type live Javascript in the browser and test it. I will show you with example.
  • Open a new tab in your browser and press f12.
  • Now go in console tab and type this code:
    alert("I am doing this alert form in console");
    And press enter. Then the dialogue box will appear instantly. Don’t worry about this “undefined message”.
  • You can type different numbers in here and get your result, addition, multiplication, subtraction and more. See in the image.
  • Now go back in element tab and you can see the console panel in the last. Look in image:
  I hope you have understood the basic syntax and structure of JavaScript. In the next tutorial, I am going to share more detail of JavaScript. If you have any question related to this topic, comment below. I will answer you immediately.  Thank you so much for reading it and keep reading more article and grow your knowledge in coding. If you want to learn any other language comment below. We will make sure to share those languages with you too.

Analog Vibration Sensor Library for Proteus

Hi Guys! Glad to see you here. I welcome you on board. In this post today, I’ll be discussing Analog Vibration Sensor Library for Proteus. I have already shared the digital Vibration Sensor Library for Proteus, you should check that as well. I’ve been adding brand new libraries for proteus covering sensors and Arduino boards. I’ve recently discussed Analog PIR Sensor Library for Proteus and Analog Flex Sensor Library for Proteus. You may be stuck into thinking I’ve previously shared those libraries but they were libraries covering digital PIR and digital Flex sensors, here we discussed analog libraries for both PIR and Flex sensors. Before I pen down how to download and simulate Analog Vibration Sensor Library for Proteus, let’s discuss what is vibration sensor first. A vibration sensor is mainly used to monitor the vibration of industrial machines. It is also called a piezoelectric that plays a crucial role in the proper working of industrial machinery. If vibration values increase from the industry standards, they can severely affect the overall working of the machine and in the worst case can put the machine at a grinding halt. To avoid this, we use vibration sensors that give the warning signal if vibration exceeds the desired values. These sensors are attached to the alarm system that produces audible sound indicating the machine is in danger, thus results in the deactivation of the entire machine. Vibration sensors are based on the piezoelectric effect to observe the small changes in pressure, acceleration, force, and temperature. These changes are converted into an electrical signal. Air fragrance can also be monitored by vibration sensors. They monitor the air fragrance and detect its capacitance and quality. I hope you’ve got a clear idea about the vibration sensor now we’ll download and run the Analog Vibration Library for Proteus. I’ve added both a simple simulation of the vibration sensor and a simulation with the Arduino Board. Let’s get started.

Analog Vibration Sensor Library for Proteus

  • Click the link given below to download the Analog Vibration Sensor Library for Proteus.
  • As you download this file, it returns further two files named Proteus Library and Proteus Simulations.
Analog Vibration Sensor Library for Proteus Click the Proteus Library folder that contains four files as follow:
  • VibrationSensorAnalogTEP.HEX
  • VibrationSensorTEP.HEX
  • VibrationSensorTEP.IDX
  • VibrationSensorTEP
Now copy all files given above and place them into the library folder of your Proteus software.  
  • In case you don’t have proteus software in your system, you can read this post covering how to download and install proteus software.
  • After adding the above files, start the proteus software and if it’s already running, close the software and restart again.
  • Now click the ‘P’ button to search for the ‘analog vibration sensor’ libraries that you’ve recently placed.
  • As you search it, it will return the figure as given below:
  • Select the sensor and click OK. Now you’ll see your cursor has now started blinking with the sensor that shows you can place your analog vibration sensor anywhere in the workspace available on the proteus software.
  • As you place your sensor, it will show the figure below:
Now we'll look into the analog vibration sensor pinout.

Vibration Sensor Pinout

The vibration analog sensor contains 4 pins as follows.
  • OUT = First is an OUT pin that is connected with a voltmeter that represents the output voltage against the variable resistor attached to the TestPin.
  • GND = Second is a ground pin that is attached to ground voltage.
  • Vcc = Third is the voltage supply pin that gets 5V to power the vibration sensor.
  • TestPin = Forth is the TestPin. This pin is only available in the proteus simulation. You don’t find it on the analog vibration sensor in real. When this pin is LOW, it shows no vibration and when this pin is HIGH it represents the vibration on the machine.

Adding HEX File

Now we’ll add the HEX file to run our vibration sensor simulation. Right-click the sensor and reach the ‘edit properties’ option and double-click the sensor it will pop up the same edit properties panel. Browse the Sensor’s HEX file option and look for the HEX file. You can find the HEX file in the library folder. Same HEX file that we have recently placed in the library folder. Select this HEX file and click OK. Now we’ll attach a simple circuit with the vibration sensor to run our simulation.

LC Circuit

  • We need to design a simple circuit to run this sensor in the proteus workspace. We’ve designed and attached the LC circuit with the OUT pin of the vibration sensor.
  • And TestPin is connected with a variable resistor. Both variable resistance and voltage we get on the voltmeter attached with the OUT pin are inversely proportional to each other.
  • When variable resistance is set to the maximum value the voltage on the voltmeter will be zero and when variable resistance is set to the minimum value (zero) it shows the maximum voltage i.e. 4.98V on the voltmeter.
When you run the simulation it will return the result below:
  • You can see the voltage appearing on the left vibration sensor placed on the proteus workspace is 2.56V because TestPin attached with the variable resistor is set to almost half of the resistance value.
  • I told you earlier I’ll show you both simple simulation and the vibration sensor simulation with the Arduino Board. If you are interested in the Arduino Library for Proteus, check this post where I have added six Arduino Boards Libraries for Proteus.
Now connect the voltage on the OUT pin with the analog pin i.e. A0 of the Arduino Board: When variable resistance is maximum the voltage on the voltmeter will be zero and its equivalent analog value across LCD attached with the Arduino Board will be 0019 and when the resistance on the variable resistor is minimum the voltage will be 4.98V and its equivalent analog value on the LCD will be 1019. This is it. I hope, you’ve got a clear insight into how to download Analog Vibration Sensor Library for Proteus. If you have any questions, you can ask me in the comment section below. I’d love to help you with the best of my expertise. Feel free to pop your suggestions about the libraries you think should be included in the proteus library database, I’ll design and add them to the database. Thank you for reading this article.

How to Include Javascript Code in HTML Page

Hello, I hope you all are doing well. In the previous tutorial, I shared a detailed introduction to JavaScript, where we discussed the basics. Today, I am going to tell you in detail How to Include Javascript Code in HTML Page and many more things that can help you understand JavaScript easily.

All right guys let's revise what we have learned in the past article, you saw me adding script & /script code at the bottom of the tags. Today, I will show you in detail what was the reason for adding the tags at the bottom and how can you add an external JS file. If you want to be an expert programmer, you should have a look at this Oracle Java Certification , it will surely excel your programming skills.

How to Include Javascript Code in HTML Page

We have two methods to include the JS code in the HTML file.

  • Put the script tag in the HTML head or body with the Javascript code

script type="text/javascript"

alert("I am learning JavaScript");

  • Put the script tag in the HTML head or bottom of the body with the src attribute to the JavaScript file location.

script type="text/javascript" src="Test.js" /script

Best way to include JavaScript Code in HTML

  • You can add a script tag in the head section of your HTML file, at the start of the body tag and also at the bottom of the body tag.
  • But I would advise you to add it at the end of the body tag. I will show you, why it should be at the bottom of the body tag.
  • The HTML page always loads from top to bottom & if your JS file is present in the head or opening of the body tag, then the browser will run JavaScript first, before loading any of the content and it will leave a negative impact on your webpage.
  • As you can see in the below image, I have added a script tag at the start of the body tag and added a new tag of h1 and p to know how the code works.
  • Save these files and press ALT + B to execute this code.
  • You will notice that only the script tag alert comes up first without loading the rest of the page.
  • But once I click on ok then it has loaded the rest of the page now, as indicated in the image here:
  • If I put the script at the bottom of the body tag and you can see image down:
  • Now save it go again to the browser and reload the page.
  • Content will appear first and then we will have the alert form.
  • So, placing JavaScript code at the end of the body tag is the best way.

Where To Add Your JavaScript File

So, short scripts like this can be added at the bottom of the body content in HTML pages. In case, your JS content is large, has more than 10 lines of code and is full of links here and there.

  1. It would not mess up your HTML file content page.
  2. You have to update it once if you are using multiple pages.
  3. It would make your code easy to read and clear.

It's time to show you how to do this. 

Create a new file by pressing Ctrl + N and add your script alert("I am learning JavaScript"); content in this file. Save it with the name "Test.Js". All JavaScript files have a JS ending.

Now go back to the "index.html" file and add the code as you see down. When you refresh the web browser then it will automatically reload and JS file through the source code. Look down the image.

Here is a little preview of what we have done. If you have a small script then you should definitely include it in the HTML file at the bottom of the body tag. Otherwise, externalize it and add it in a separate file as I have shown you before in images. 

That’s it for today. I hope you understand it and if you have any questions related to this topic. Let me ask in the comment section and I will answer you. Take good care of yourself and see you in my next tutorial. Have a nice day!

Introduction to TIP3055

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed Introduction to TIP3055.  TIP3055 is a silicon epitaxial-ignoble NPN transistor, which is assembled in TO-218 malleable parcels. It is the best device for power swapping circuits, parallel and series controllers (regulators), output phases and high power amplifiers. Its corresponding PNP transistor is TIP2955. It is a universal device used in many industrial projects where audio amplification is required. Its structures are attractive much the identical excluding for the maximum power indulgence that is a slightly lesser. In today’s post, we will have a look at its fortification, smashup, prominence, proposals, etc. I will also share some links where I have correlated it with other microcontrollers. You can also get more material about it in comments, I will guide you more about it. So, let’s get started with a basic Introduction to TIP3055. 

Introduction to TIP3055

  • TIP3055 is a silicon epitaxial-ignoble NPN transistor, which is assembled in TO-218 malleable parcels. It is the best device for power swapping circuits, parallel and series controllers (regulators), output phases and high power amplifiers.
  • It is prevailing in TO-247 pouring and it frequently used varied amplifiers initiatives.
  • This module uses moderate power during its working, it uses 70 voltage across emitter and collector. It consumes fifteen amperes of current at the collector.
  • It is the finest option for advanced steadfastness audile amplifier output point.
  • This component has termination voltage Vceo  (IB =0) 60 volts.
  • It has a unique extensive liability and particular excellence formation.
  • Its Stowage temperature is -65 to 150 C and maximum working intersection temperature is 150 C.

Pinout of TIP3055

  • These are the main pinout TIP3055 which are well-defined beneath.
  • Pin# Type                                         Parameters
    Pin#1 Emitter The emitter is for an external drive of current.
    Pin#2 Base The base administers the biasing of the transistor. It vagaries the state of the transistor.
    Pin#3 Collector The collector is for the current inside drive. It is related to the load.
    Lest see a diagram of the pinout.

Entire Maximum Ratings of TIP3055

Now we discuss the rating parameters of TIP3055.
Symbols Value                                         Parameters
VCBO 100 V The voltage across collector and emitter (I= 0).
VCER 70 V The voltage across emitter and collector (RBE = 100 ?).
VCEO 60 V The voltage across emitter and collector at (I= 0).
VEBO 7 V The voltage across the collector and base (I= 0).
IC 15 A The current value at the collector.
IB 7 A The value of current at the base terminal.
Ptot 90W Dissipation power at T=25°C.
Tstg -65 to 150 C Storing temperature.
TJ 150 C Maximum Working intersection temperature.
Now we discuss the electrical characteristics of TIP3055.

Electrical characteristics

These are some important electrical characteristics.
Symbols Test Conditions                                         Parameters
ICEX VCE = 100 V T= 150 C The value of collector cut-off current (VBE = -1.5 V).
ICEO VCE = 30 V The value of collector cut-off current (I= 0).
IEBO VEB = 7 V The value of emitter cut-off current (I= 0).
VCEO IC = 200 mA Collector-emitter supporting voltage (I= 0).
VCER I= 200 mA Collector-emitter supporting  voltage (RBE = 100 ?)
VCE I= 4 A IB = 400mA I= 10 A I= 3.3 A Collector-emitter permeation voltage.  
VBE Ic=4A VCE = 4 V It is the voltage across base and emitter.
hFE I= 4 A I= 10 A VCE = 4 V 20 VCE = 4 V 5 It is DC current gain.

Working of TIP3055

  • Now we discuss the working of TIP3055 by a circuit. The corresponding circuit components and its connection are explained below let's discuss them with the details.
  • This is the circuit of amplification of power in which I used TIP3055 and TIP2955 transistors as amplifiers which provides power up to 140RMS.
  • This circuit is manufactured miniature and very modest, the bulwark portion is prepared by using IC ua741 or LM741 as op-amp.
  • The ultimate transistor I have stated using TIP3055 and TIP2955 transistors, or you can elevate by adding some transistors or also swap with higher output power, for example using 2SC5200 and 2SA1943.
  • We can power this circuit by balanced 45V voltage, power circuit arrangement and also PCB Layout are shown in the given diagram.
Circuit Component Description
  • The components which I used in this circuit is explained below with their rating values.
  • R1=100K, R2=1k, R3=1K, R4=15K, R5=15K, R6=1K, R7=47R, R8=47R, R9=47R, R10=470R, R11=470R, R12=47R, R13=0, 22 - 0, 5R/5W,  R14=0, 22 - 0, 5R/5W R15=56K, C1=220N, C2=100u/25V, C3=220u/25V, C4=220u/25V, C5=33p, C6=22p, RV1=TRIMMER 500R RV2=POTENTIOMETER 50K U1=LM741 / UA741 Q1=TIP41 Q2=TIP42 Q3=TIP2955/2N2955 Q4=TIP3055/2N3055
Circuit Troubleshooting
  • If this  amplifer circuit is not working properly then you should check input voltage.
  • Output speaker has DC voltage whining, please regulate the trimmer RV1 till the DC Voltage comes out.

    Applications of TIP3055

  • These are some important applications of TIP3055.
    • It is universal persistence transistor it can be used in different industrial projects.
    •  It is used as an Acoustic Amplifier.
So, it was all about TIP3055, If you have any question about it ask in comments. Take care until the next tutorial.

Introduction to HC-12

Hello friends, I hope you all are doing great. In today’s tutorial, we will have a look at a detailed Introduction to HC-12. It is a wireless data transmitter and receiver module, that uses 433 megahertz frequency and can communicate to one thousand meter distance. It can communicate with more than one microcontroller. This module operates from 3.2 volts to 5.5 volts.

This Bluetooth module is installed in industries to control different processes and machines. It is also used in the circuitry of different security systems. This module uses silicons LABs Si4463 for (radio-frequency) RF data transmission. In today's post, we will look at its working, features, pinout and applications in detail. So let's get started with Introduction to HC-12.

Introduction to HC-12

  •  HC-12 is an RF module, used for wireless data transmission.
  • Its operating frequency range is from 433.4 to 473 megahertz, large no of channels can be tuned on this frequency range.
  • The maximum sending information power of this module is one hundred megawatts or twenty-decibel milliwatts.
  • The data receiving strength is -117 decibel milliwatts with a baud rate of five thousand bytes per second in the air.
  • This device uses stamp hole packaging for patch soldering, having a dimension of 27.8-millimeter x 14.4-millimeter x 4 millimeters, consisting of an antenna cap that makes it easier to install in different circuitry.
  • This module also consists of a printed circuit board (PCB) antenna socket and an external antenna can be connected by coaxial wire.
  • This data transmission module also consists of the microcontroller, used to generate the data protocol.

HC-12 Pinout

  • Now we discuss the pinouts of HC-05.
 
Pin# Type                                         Parameters
Pin#1 Vcc At this pin input supply is provided to this module, the range of direct current source is 3.2 volts to 5.5 volts, and the load connected with it should be two hundred milliamperes. One thing you should keep in mind that when this module sending data tries to connect 1N4007 diode in series voltage source if its value is larger than 4.5 volts for reduction of heating.
Pin#2 GND This pinout is connected with the ground.
Pin#3 RXD   It is UART (Universal Asynchronous Receiver/Transmitter) input data and TTL (Transistor-Transistor Logic) pinout. The resistance of one kilo is linked in series within the module.
Pin#4 TXD it is UART (Universal Asynchronous Receiver/Transmitter) output data and TTL (Transistor-Transistor Logic) pinout. With this pinout, one-kilo ohm resistance is connected in series.
Pin#5 SET This pinout is for the setting of different parameters at active low level. One kilo ohm resistance is also connected with it in series.
Pin#6 ANT This pinout is for 433 megahertz antenna.
Pin#7 GND it is the ground pinout.
Pin#8 GND This pinout is also connected with the ground.
Pin#9 NC It is not used for any connection.
ANT1 ANT It is IPEX20279-001E-03 antenna socket.
ANT2 ANT 433MHz spring antenna solder eyelet.
 
  • The pinout from one to six consists of 2 bonding pads, with exterior half- holes bondings pads are manufactured for soldering.
  • When the interior bonding pad antenna (ANT2) of pinout six is employed for linking, then the antenna connected with spring can be soldered with the hand.
  • Let’s see a diagram of the pinout.

Features of HC-12

  • This module can send and receive data to almost one thousand kilometers with a baud rate of five thousand bps.
  • Its operating frequency range is from 433.4 to 473 megaHertz, to the hundreds of communication channels.
  • Its data transmission power is almost a hundred megawatts or twenty decibels.
  • It operates at 3 different modes according to the circuitry in which it is employed.
  • A microcontroller is configured on this module so there is no need for a special programming device.
  • It transmits a large number of bytes bits to the receiving module.
  • It used a serial port for data transmission.
  • Its operating voltage range is from 3.2 volts to 5.5 volts.
  • It used the UART and TTL protocols for interfacing with other devices.
  • It operates at minus forty degrees Celsius to plus eighty-five degrees Celsius.

Where to use HC-12

  • These devices are used in pairs only and simple transmission of data is done by this device. That means its transmitter is used only for sending of data and its receiver for receiving data.
  • With sending information to one thousand meter distance it is also used for short-range almost three meters of data transmission.

HC-12 Applications

  • These are some important applications of HC-12 that are described here in detail.
  •  Different wireless sensors consist of this module.
  • For the control of robotic instruments, it is used in these modules.
  • In industries, different machines are controlled from a larger distance.
  •  POS (point of sale) systems also used this module.
  • It is also used in the keyless automobile entry system.

That is a complete article on HC-12 I have mentioned each and everything related to HC-12 in this post if you have any questions ask in the comments. Thanks for reading.

What is Bistable Multivibrator

Hello friends, I hope you all are doing great. In today’s tutorial, we will have a look at What is Bistable Multivibrator and how it can be used in different circuits. In this type of multivibrator, the circuitry can operate in any state according to a signal provided at its input while it does not happen in a monostable multivibrator. This arrangement is also defined as a flip flop because flip flop also operates at more than one condition. It also has the ability to store a single bit of information so it is mostly used in logic circuits and in computer data storage part.

This vibrator like other vibrators is used for the production of square waves with providing some delay. These circuits are constructed with numerous kinds of semiconductor components. The most used semiconductor device circuits are operational amplifiers. In today's post, we will have a look at its working, construction, applications and different parameters related to it. So let's get started with What is Bistable Multivibrator.

What is Bistable Multivibrator

  • Bistable Multivibrator has 2 operating conditions so it is called bistable, it is also known as a 2-shot multivibrator.
  • Due to working at two different modes it needs 2 input signal for shifting from one operating mode to others.
  • When first input signal is provided it shifts its operation to second state when second signal provided it come back to previous state.
  • Its another name is flip-flop multivibrator because like flip flops its changes its operation state and regain it after some interval.
  • In the given figure, its structure is shown that consists of 2 NPN transistors that is denoted as Q1 and Q2.
  • At both of these transistors collector 2 loads resistors, RL1 and RL2 are attached.
  • The output terminal of the first transistor is connected with the input of the second transistor through resistor R1 and output of the second transistor is provided at input of first transistor through the resistor R2.
  • Both of the resistance R1 and R2 are connected with a capacitor in parallel. The purpose of these two capacitors is to enhance the switching feature of circuitry so they are also known as commutating capacitors.

Bistable Multivibrator Working

  • Now we discuss the working of this vibrator, for this, we discuss the circuitry that given below figure its construction and components we already discuss so now we the working of these components.
  • When input power is provided to the input terminals of first transistor-transistor starts its operation due to a difference in its feature than the other transistor.
  • When it first transistor starts its operation it goes into saturation state. Due to this value of voltage decreases at the collector terminals.
  • As we know the collector of Q1 is connected with the base terminal of a second transistor due to this it goes into the cutt-off region.
  • Then the voltage at the collector increases to Vcc, this increment in voltage causes to further saturate the first transistor as this voltage is connected with base of Q1 through the resistance R2.
  • It is the first operating condition of bistable multivibrator in which first transistor Q1 is in working state while Q2 is off.
  • This first condition continuous to that point we do not provide the negative signal to first transistor Q1 and positive polarity to transistor Q2.
  • Now if we provide the positive polarity signal to the second transistor Q2 by the capacitor C2 connected with it.
  • This Process will change the second transistor Q2 from saturation mode to cut-off mode, and voltage will decrease at a collector of Q2.
  • As the collector of transistor Q2 is attached with the base of transistor Q1 with the decrement in the voltage at the collector of causes to decrease voltage at transistor Q1 base.
  • This cause to the second transistor obtain saturation state and it is the second operation mode of this module in which the first transistor is off and second is in an operating state.

Bistable Multivibrator Waveform

  • The output waveform generated by the has smaller wavelength or larger according to circuit requirement in rectangle shape.
  • The first end of the rectangle waveform depends on the first input signal and vary according to it and second relies on the second input signal, the resultant waveform is drawn in a given figure.
  • Switching variation among these 2 modes can create bistable circuitry but in some cases it is possible.

TTL Bistable Multivibrators

  • As we above constructed this circuitry by using 2 different transistors now we use integrated circuits for the production this vibrator.
  • The given circuitry explains the circuitry of a bistable vibrator having two NAND gates.
  • This kind of circuits arrangments is known as the Bistable Flip-Flop, in this circuitry, there is a switch that is single pole through a switch (it is such switch that takes one input and can regulate 2 different output). This switch provides logic one and zero to this circuitry.

Application of Bistable Multivibrator

  • These are some applications of the bistable multivibrator.
  • It used in different storage devices and for counting of binary numbers.
  • For frequency division in different circuits.
  • It used for the production of different clock pulses.
  • It used for different relay controller.
  • It used in the different circuit as a toggle switch.

That is complete post on bistable multivibrator I have mentioned each and everything related to this module in this tutorial.

What is Monostable Multivibrator

Hello fellows, I hope you all are doing great. In today’s tutorial, we will have a look at What is Monostable Multivibrator. It is a simple electronic circuit, used to produce a pulse at its output also known as one shot. It generates output pulses according to corresponding circuitry requirements. Its main feature is that after the generation of the output pulse, it regains its stable state and does not produce any further output pulse till not triggers again.

This circuitry can be considered as a biased form of multivibrator (such circuitry that is used for implementation of 2-state modules like timers) that is (on) operating in the starting condition till the triggered point and then becomes unstable on its own. In today's post, we will have a look at its circuitry, construction, working and related parameters. So let's get started with What is Monostable Multivibrator.

What is Monostable Multivibrator

  • Monostable Multivibrator is used for the generation of a square waveform in electronic circuitry.
  • This wave generator belongs to a group of wave generators known as Relaxation Oscillators.
  • It has a simple circuit where 2 switching circuits are designed using transistors(acting as a switch).
  • The transistors are assembled in a way that the output of one transistor is the input of the second transistor.
  • This circuitry also consists of a capacitor and resistor network to create feed-back tank circuitry.
  • There are 2 different working conditions in any multivibrator circuit but monostable has only one 'on' state.
  • This vibration generator comes back to its original condition after a set time of resistor-capacitor circuitry.
 

Construction of Monostable Multivibrator

  • In its construction, 2 transistors are connected in such a configuration that both of these operate as input and output providers to each other.
  • The collector (c) of the first transistor is linked with the base (b) of the second through a capacitor denoted as C1 and base terminal of first transistor that denoted as Q1 is attached with a collector of second transistor by the resistance R2 and capacitor.
  • A direct current source is connected with base (b) point of first transistor by the resistance R3. The input pulse is provided to base (b) of first transistor with the capacitor denoted as C2.
  • In figure resistance, (RL1) and resistance (RL2) is the load connected with these two transistors.
  • When any transistor goes into stable state, then at input pulse is provided to vary its condition. With variation in condition, transistor stays in this condition for time interval set by the resistance-capacitor time constant then get the earlier condition.

Monostable Multivibrator Waveform

  • This wave generator produces a waveform of rectangle shape having low and higher amplitude, the first end of this wave generates with the input trigger signal and the second end generates resistor-capacitor time constant.
  • This resistance-capacitor time constant changes its value to generates large no of pulses that have a specific time interval between them by following the trigger signal provided at input. This assembly is shown in a given figure.
  • The resistor-capacitor time of this vibrator can be change by changing the capacitance of capacitor or resistance value of both.
  • The circuits also have the ability to do increment in the dimensions of a wave as the frequency of output wave remains similar to input signal the difference between them is the width of the waves.

TTL Monostable Multivibrators

  • Above we discussed that this vibration generator can be constructed from individual elements like a transistor, but it can also be manufactured by different ICs.
  • This given circuitry explains how the using only two NOR gates we can construct monostable vibrator.
  • As we are familiar with the operation of NOR gate that its input is low than output will be high and if input is high then the output will be low (0).
  • So at the start, the input is 0 then the output will be higher mean '1'.
  • The resistance Rt linked with the input is also at a high level '1' it means that the quantity of charge at the plates of capacitor is similar.
  • The voltage (V1)  is equivalent to this voltage so the output of NOR is at level 0.
  • If the positive signal is provided to the input at a time (t=0) then the output of NOR gate will be '0' due to this the capacitor will get a discharge.
  • Due to the discharging of the capacitor, the input of second NOR gate is '0'  that converts into high output '1'. This condition is called second condition of circuitry, in which output voltage is equivalent to (+Vcc).
  • This condition continuous on second NOR gate until the capacitor does not get charged again.

Applications of Monostable Multivibrator

  • These are some important applications of Monostable Multivibrator that are described here.
  • Due to time delay capability, it is mostly used in different timer circuits.
  • It also used in different storage circuits.
  • It also used to provide input to other pluse generator circuits.
  • It also has ability to reproduce damage pulses again.

Advantage of Monostable Multivibrator

  • These are some benefits of this pulse generator over other pulse generation modules.
  • It needs only one single pulse to start its operation there is no need of extra pulse for its operation.
  • Its construction is very simple and can be constructed easily.
  • Due to simple construction its price is also less.

So, this is the complete article on  Monostable Multivibrator if you have any questions about it ask in the comments. I will solve your problems. Thanks for reading.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir