Categories
COMPUTER HARDWARE ELECTRICAL SCIENCE ELECTRONICS EMBEDDED HARDWARE PROGRAMMING TUTORIALS

Shift Register Modes, Use, Advantages & Disadvantages

So in this article, we will look at a piece of hardware called the shift register and their modes of operation. But we wont stop there. Because we will also look at their use case, advantages & disadvantages.

So if you are new to computer hardware or learning about what goes inside a microprocessor, then brace yourself. As this is going to be an eye opener for you on how computer works!

So are you ready? Great! Then let us go!

To start with, let us ask ourselves the basic question – What is a shift register? Because only when we know what it is, does it make sense to learn about shift register modes of operation. Right? Let us answer that first!

What Is A Shift Register?

A shift register is a piece of circuit that you will find inside a microprocessor. It is used to store and modify data. Now this is one of the simplest explanation I can give for a 2nd grade student.

But if you are some one who is studying about computers, this is just not sufficient. So I will have to explain it in a bit more detail. Alright? I will be getting a bit technical here. But it is how you will get a solid understanding of shift register. So you will have to bare it. Okay?

Technical Explanation

Technically, a shift register is made up of a bunch of Flip Flops. So as you know, a flip flop is a circuit that can store information. It can store data that is in one of the two states – 0 or 1. Right? So what happens when you connect a bunch of these flip flops together? You get a “register“.

So a register is a circuit made up of a bunch of flip flops that can store data having values in 0s or 1s. Now, if that is the definition of a register, then what is a shift register?

A shift register is a type of register where data is shifted from one flip flop to another within the register. But this shift of data does not happen by itself. Instead, it needs a clock signal to do so. So for every input clock cycle, the data get shifted from one flip flop to another. Hence the name “Shift Registers”. Aha! That name now makes so much sense. Right?

How Shift Register Works
How Shift Register Works

The above pic shows how it works. So as you can see here, for every clock cycle, a new input bit enters Bit0. But at the same time, existing Bit0 value shifts to Bit1, Bit1 to Bit2 and so on. But what happens to current value of Bit7? The register will just throw it out! Removed forever!

Now there is one thing for you to notice in the above pic. It is that the bit value here is shifting left. Right? Because of this, we call it a “Left Shift Register“.

But does that mean we also have a “Right Shift Register”? You bet! We do have a right shift register where input is fed to Bit7 & Bit0 will thrown out for every clock cycle!

Where Do We Use A Shift Register?

So now that we know how a Shift register works, let us see where we can use it.

Using Shift Register For Multiplication

When you shift bits in a byte to the left, the value of the byte is multiplied by 2! So we can use a left shift register whenever we want to multiply a byte by 2.

Using Shift Register For Division

When you shift a byte to the right, you are dividing it’s value by 2. So we can use a right shift register whenever we want to divide a byte by 2!

So with that, let us now look at the different modes of operation of a shift register.

Shift Register Modes Of Operation

A shift register will work in one these four modes:

  • Serial In Serial Out (SISO) Mode
  • Serial In Parallel Out (SIPO) Mode
  • Parallel In Serial Out (PISO) Mode
  • Parallel In Parallel Out (PIPO) Mode

So let us take a look at each of these modes one by one. Alright? Here we go!

Serial In Serial Out (SISO) Mode

In this mode of operation, the data is fed into the shift register serially for every clock cycle. That is, for every clock cycle, the data is shifted either to the right or left serially. The output is also taken out one bit at a time. So both inputs and outputs are serial here. Hence the name SISO. So then how does the Flip Flop connection look like? Take a look at it below:

SISO Mode Of Operation
Shift Register In SISO Mode Of Operation

Serial In Parallel Out (SIPO) Mode

When we use the shift register in SIPO mode, we feed the input data serially but take the output data out in parallel. But again, this happens at every clock cycle. So how does that look like? Take a look at it yourself!

SIPO Mode Of Operation
Shift Register In SIPO Mode Of Operation

So as you can see here, we are still feeding the input data serially. But the output is no more serial. We are taking all the output bits at the same time, in parallel. So what this means is that we will get full 4 bit output every clock cycle!

Parallel In Serial Out (PISO) Mode

In the case of shift register in PISO mode, we feed the input data in parallel but take the output data serially. So what this means is that we will be feeding multiple data bits as inputs for every clock cycle. But will be taking only one output bit for each clock cycle.

So then what will happen to the output of each flip flop? Well, even that will be fed as an input! So, we will be feeding two inputs after multiplexing them together. So how does that connection look like? Take a look at it below:

PISO Mode Of Operation
Shift Register In PISO Mode Of Operation

Parallel In Parallel Out (PIPO) Mode

And finally, we have the shift register working in PISO mode. So can you guess what in this mode? Yes. In this mode of operation, you have both input and output data running in parallel. So how does that work? Take a look at it first!

Shift Register In PIPO Mode Of Operation
Shift Register In PIPO Mode Of Operation

So as you can see above, there is a major change in the way we connect the flip flops. In that, you do not see them connected to each other at all. So each input bit goes to a flip flop and it’s output is directly taken out. The only connection that is common to all these flip flops are the clock and clear signal!

So there you have it. Those are the different modes in which we can design a shift register to work. In the next section let us take a look at different types of shift registers that we can use.

Types Of Shift Registers

Based on the way the data is shifted, we have 5 different types of shift registers. They are:

  • Left Shift Registers
  • Right Shift Registers
  • Bidirectional Shift Registers
  • Circular Shift Registers &
  • Linear Feedback Shift Registers

Now let explain what each of these registers work like:

Left Shift Registers

We have already talked about the left shift register. So I think you are familiar with it by now. If not, let me re-iterate. So in the case of a left shift register, the data is shifted to the left on each clock cycle.

Right Shift Registers

This is just like the left shift register. But here it is shifting the data to the right on each clock cycle.

Bidirectional Shift Registers

In the case of a bidirectional shift register, we can shift the data in both the directions. So you can shift the data either to it’s left or right!

Circular Shift Registers

In the case of a circular shift register, the last output is connected back as input. So your data will not be thrown out. Instead, will be shifted either left or right in a circular fashion!

Linear Feedback Shift Registers

In this type of shift register, the input of one flip flop will be linear output value of the previous flip flop.

Advantages & Disadvantages Of A Shift Register

It is now time to talk about the advantages & disadvantages of using a shift register. So what are they?

Advantages Of A Shift Register

  • They are very fast to use.
  • Very quick when you want to convert data from serial to parallel or vice versa. They are faster than normal serial to parallel converter circuits.
  • They are very simple in design. So you can easily rig up a circuit to create a shift register.
  • We can use them to encrypt or decrypt the data.
  • We can use them to a delay signal.
  • It is used in CDMA to generate Pseudo Noise Sequence Number.
  • We can use them to track our data!

Disadvantages Of A Shift Register

While we could see that it has major advantages, shift register has one major disadvantage. That is:

  • The strength of the output current coming from a shift register is not so strong!

So there you have it. Those where some of the advantages & disadvantages of using a shift register.

And with that, I will end this article now. But if you have any doubts, do let me know. Because I will be more than happy to answer them! Alright? So see you and take care until next time! 🙂

Categories
ELECTRONICS EMBEDDED HARDWARE PROGRAMMING TUTORIALS

What Are Hexadecimal Numbers & Why Do We Use It?

So in this article, we will take a look at what Hexadecimal numbers are. But we wont stop just there. We will also learn why we need to use them. We will take a look at few examples of hexadecimal numbers to know it better.

So does that sound like something you want to know more about? Great! Then strap yourself to your seat and read along. Because you are in for a treat with a world of numbers!

So first thing first, let us answer the basic question we have.

What Are Hexadecimal Numbers?

So to answer this, we first need to ask ourselves what a decimal number is. Alright? Because the numbers we use in our daily lives are based on decimal number system. So looking at hexadecimal numbers after analyzing decimal number will be so much easier. Right?

Alright then.

Decimal numbers

They are the number system that has the digits 0 to 9. Right? But what do we do when we want to go beyond the number 9?

What Are Hexadecimal Numbers?
What Are Hexadecimal Numbers?

We use 2 digits to represent the next number. And these digits will now start with a 1 followed by another digit between 0 to 9.

So the next set of numbers will be 10, 11, 12, 13, 14 …… Correct? But what happens when we reach the number 19? We again start with our next number 2 and repeat the process again.

So it will now be 20, 21, 22, 23 ….

So what we see here is that we can only use digits between 0 to 9. But they can be grouped together in to multiple digits to count any number we want. Right?

Alright. I can now hear you asking me what does this have to do with Hexadecimal number?

Well this concept is very much related to hexadecimal numbers as well. How, you ask? Let me explain!

Hexadecimal Numbers

So just like we have digits between 0 to 9 for decimal, we use digits between 0 to F in hexadecimal system!

What? So how does the digits look like? They look like below:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E & F

These are the digits we use in a hexadecimal number system!

So as you can see, the numbers between 0 & 9 are the same as decimal system. However after that, 10 is represented by A. 11 by B, 12 by C and so on. This goes on until the letter F which is used to represent the number 15.

So in hexadecimal system, we have symbols to count from 0 to 15!

Why Do We Use Hexadecimal System?

Now that we know what hexadecimal system is, let us learn why we need it.

If you take a look at a computer, we know that it works in binary right? So the only numbers it can understand is 1s & 0s. Because of this, a large number like 10 is represented in binary as 1010b right?

But as you can see, it is not so readable. Correct? So there is a very good chance that we can read or write a binary number wrong! So to avoid that, we use hexadecimal numbers when working with computers!

Hexadecimal Number Examples

Decimal NumberHexadecimal Number
1000x64
120xC
2120xD4

Example Of Hexadecimal Numbers

So you can see few examples of hexadecimal numbers in the above table. Right? But did you notice something? We have prefixed hexadecimal numbers with “0x”. Why? Because that is a convention that will tell anyone to treat it as a hexadecimal number!

Categories
ELECTRONICS EMBEDDED TUTORIALS

What Is A Light Dependent Resistor (LDR) & How Does It Work?

So in this article, we will take a look at what a Light Dependent Resistor (LDR) is. But we will not stop just at that. Because we will also learn how an LDR works.

Now if you are some one who is getting into electronics, this will be very helpful for you. But if you are someone who has already worked with electronics, this will still be helpful to read. Why? Because we will be going through this sensor step by step. In detail.

So give yourself some time to read it all. Because this will get you to know everything there is to know about LDR. Alright? Cool, then let us get started!

What Is A Light Dependent Resistor (LDR) Sensor?

To answer this, we must first take a look at what a sensor is and what it does. Because only when we know why we use them in general, can we look at LDR in particular. Does that make sense? Great! So let us start with that.

What is a sensor?

A sensor is a device that we use in our electronics to measure a physical quantity. But why do we need to use these sensors? Because they can sense any change in these physical quantity and convert it into electrical signal.

What Is A Light Dependent Resistor
What Is A Light Dependent Resistor

Wait, that was quite a mouthful to read. Right? But what does it really mean?

So to put it in simple words, a sensor is a type of device that can convert a physical quantity to an electrical signal. It is as simple as that!

Okay. Now that makes sense. But why do we need them in our circuits?

Why do we use sensors?

So here is why we need them – Just think about some sensual thing you can feel. Can you tell me some of them that you feel on a daily basis? Yes, there are these things like smell, sound, weather etc. that our body can feel, right? But what if we wanted our electronics to sense that too? How can we make that happen?

So that is when these sensors will come into picture!

We can use sensors for smell, sound etc. And one such sensor is the Light Dependent Resistor (LDR) sensor! But what does an LDR sensor do?

What Is A Light Dependent Resistor and What Does It Do?

A Light Dependent Resistor (LDR) is a sensor whose resistance will change with the changing temperature. It is as simple as that!

So how does this LDR work? What is it made up of? Let us answer these queries now.

How Does A Light Dependent Resistor Work?

A light Dependent Resistor (LDR) is made of those materials which has these unique properties – In darkness, these materials do not conduct electricity but will do so when there is light falling on them!

So as a result, you can say that they have high resistance when it is dark but have low resistance when light falls on them!

Alright! So that is the principle behind the working of an LDR. But then this begs us to ask our next question:

What is the range of resistance of an LDR?

So as you know by now, the resistance of an LDR changes between darkness & when in light. But what is this range? How much of a resistance change is happening here?

So the answer is, it fluctuates between 100 Ohms to 1M Ohm!

So that is quite a big change, isn’t it? And that is why we can use this sensor for increasing or decreasing the flow of current to a circuit based on light!

So there you go! That is all there is for you to know about a Light Dependent Resistor. But if you have any more questions about it, do let me know in the comments below. I will be more than happy to help!

With that being said, I will end this article now! I hope you have a great day! 🙂

Categories
ELECTRONICS EMBEDDED TUTORIALS

PT100 Temperature Sensor Table & How To Use It

In this article, we will be taking a look at the PT100 Temperature Sensor Table. So using this table, we can see how the resistance of PT100 changes with temperature.

But before we do that, we first need to know what a PT100 temperature sensor is and how it works. Right? Because having a clear idea about what this sensor is will help us know how to use it. Does that make sense? Great! Then let us start from there!

What Is PT100 Temperature Sensor?

PT100 temperature sensor is a sensor that that is made from Platinum. But what does it do? Well, we can use PT100 sensor to measure the temperature around it. So in a way, it can act like a thermometer!

Wait a second. How does a sensor made of Platinum work as a thermometer?

How does it work?

So here is the thing. A pure metal like platinum has a unique feature in that it’s resistance increases with an increase in temperature. So by just measuring the resistance across it, we can map it to it’s corresponding temperature!

Now that sounds great right? Because now just my checking the resistance of this sensor, we can tell what the temperature is. How cool is that!

But why does the Platinum behave this way? What makes it change its resistance based on the temperature?

Well, to answer this question, we need to know a little bit of the chemical structure of Platinum.

First thing first, we need to know that Platinum is a pure metal. Because of this, an electric current can flow easily through it. Alright?

So everything should work fine when you are passing current through it then, right? Well, not really!

Why? Because this free flow of electrons in Platinum is affected by the temperature around it.

You see, a metal like Platinum is made up of crystals. And these crystals starts vibrating as the temperature increases. So this increase in vibration in turn will slow down the flow of electrons!

So there you have it! This is the reason why Platinum will conduct less current as temperature increases.

So PT100 temperature sensor that is built using Platinum will take advantage of this feature. And hence, we can use it to measure resistance across it to determine the temperature!

Now that is a very nifty way to take advantage of this feature right? I mean you are measuring temperature around you by just checking resistance of a sensor. How cool is that!

So now that we know how a PT100 temperature sensor works, it is time for us to look at the PT100 Temperature Sensor Table.

What Is A PT100 Temperature Sensor Table

So as we learnt, PT100 temperature sensor’s resistance increases with increase in temperature. Right? So just by measuring the resistance across it, we can tell what the temperature around it is. Right?

But what is the formula we need to use to convert a resistance to temperature? That is when the temperature sensor table comes in handy!

So simply put, this PT100 temperature sensor table will help us map between a resistance value and it’s respective temperature. No formula required then! That is great right.

So how does this PT100 temperature sensor table look like then? Well, take a look at it for yourself:

Temperature (In Degree Celsius)Resistance (In Ohms)
-20018.52
-10060.26
0100
100138.5
200175.85
300212.05
400247.10
500281
600313.72
700345.29
800375.71
850390.49
PT100 Temperature Sensor Table

So as you can see, there is a simple mapping between the temperature and resistance. You can then use this table as a reference to measure the current temperature across a PT100 sensor.

But before we go, did you notice one important thing in the PT100 Temperature Sensor Table? Can you spot it?

PT100 Temperature Sensor Table
PT100 Temperature Sensor Table Image File

So if you did find that the resistance is at 100 Ohms when the temperature is at zero degree Celsius, then yes! You got hat right!

Now that is an important feature of the Pt100 temperature sensor. So its resistance is always at 100 Ohms when it is working at a temperature of 0 degree centigrade. It is a good thing to keep that in mind when working with this sensor!

Conclusion

So there you have it. Because that is all there is for you to know about PT100 sensor.

But if you still have any questions about it, do let me know in the comment section below and I will be happy to help!

So with that, I will end this article now. Have a great day you all! 🙂

Categories
ELECTRONICS EMBEDDED TUTORIALS

Difference Between UFS 2.1 & UFS 3 – Explained

Before we take a look at the difference between UFS 2.1 & UFS 3, let us do this first. Let us first understand what UFS is, where did it come from & how is it useful. Because once we get some background, we will be able to appreciate UFS better. That makes sense. Right?

We will start asking ourselves some questions and try to answer them as we go. So by doing so, we will get a clear picture of UFS. We will know everything there is to know about UFS. Only then we will be able to tell the difference between UFS 2.1 & UFS 3. So here we go!

UFS Frequently Asked Questions (FAQ)

What does UFS stand for?

Difference between UFS 2.1 and UFS 3

UFS stands for Universal Flash Storage, which is a standard for removable flash memory cards. It was created by the JEDEC Solid State Technology Association and published in August 2011.

What is UFS 2.1 flash memory?

UFS 2.1 flash memory is the latest standard of Universal Flash Storage (UFS) flash memory. So it is the standard for the next generation of memory cards and mobile devices. But we should know that it is also an evolution of the previous standard UFS 2.0.

What does a UFS 2.1 flash memory do?

UFS 2.1 flash memory is a storage device that uses a memory card interface, but with much higher performance. So at the fundamental level, we can use it to store data.

What is so great about UFS 2.1?

The storage solution is one of the most important parts of the mobile phone. Why do we say that? Because it has a huge impact on the overall experience of the user. So here is the good news! Handsets equipped with a UFS 2.1 storage solution is faster than the traditional eMMC 5.1 storage solution.

What is the difference between UFS 2.1 and eMMC 5.1?

UFS 2.1 is a newer flash technology. So it has a higher bandwidth and therefore much faster than eMMC 5.1.

What is the bandwidth of UFS 2.1?

UFS 2.1 has a maximum bandwidth of 800MB/s, which is 4 times faster than the eMMC 5.1, and 10 times faster than the eMMC 5.0. But not just that! It can also reach the sequential read and write speeds of up to 624MB/s and 154MB/s respectively.

What is the storage capacity of UFS 2.1?

The storage capacity of UFS 2.1 chip is usually 128GB.

So now that we got some idea of what an UFS storage is, it is time to answer our actual question. And you already know what the question is.

What is the difference between UFS 2.1 and UFS 3?

What is the bandwidth of UFS 2.1?

UFS2.1 is the previous version of Universal Flash Storage (UFS) and it is backward compatible with UFS2.0. UFS2.1 can reach a maximum of 800MB/s. So it is mainly used in high-end mobile devices.

What is the bandwidth of UFS 3?

UFS3 is the latest version of Universal Flash Storage (UFS) and is backward compatible with UFS2.0. UFS3 can reach a maximum of 1.2GB/s and is mainly used in high end smartphones and other gadgets.

What is the transfer speed of UFS 2.1?

UFS2.1 is the second generation of Universal Flash Storage. It has a transfer speed of up to 600MB/s.

What is the transfer speed of UFS 3?

UFS3 is the third generation of Universal Flash Storage. It has a transfer speed of up to 1.6GB/s.

When was UFS 2.1 launched?

UFS 2.1 was launched in the first half of 2017.

When was UFS3 released?

UFS3 was released in January 2018.

Conclusion

So those were some of the differences we could think of, when talking about UFS. But this is still the tip of the ice berg. Because there is a lot more to it than just the speed and capacity of this flash memory.

However, these other differences are too technical and not something that really matters for end users or programmers. So we will skip on talking about those differences. Alright?

But other than that, I think we have discussed on all that is relevant. Also, if I find some more interesting differences beyond these, I will update this article. So do follow this blog for any updates on UFS. Alright?

In the next article, we will look at some more internal components of a smartphone. I would have loved to discuss about it here. But this article has already grown too big. So I will post it as a separate post.

So, until next time, take care! 🙂

Categories
ARM COMPUTER HARDWARE ELECTRONICS EMBEDDED TUTORIALS

What Is A Microprocessor?

Before I answer your question of what a microprocessor is, let me ask you this question first. Have you ever used an electronic gadget such as a mobile phone, a calculator or a computer?

If you answered yes to any of these, then you have already used a microprocessor! Because microprocessor is at the core of each one of these devices. It is what is running these devices!

So what is a microprocessor?

A microprocessor in simple terms can be seen as just a tiny little electrical circuit system. It takes in one or more electrical voltages as input and in turn produces one or more electrical voltage signals as output. You can then use these output electrical signals to control external devices.

Now that sounds like just about any other electrical circuits then, right? Well, not really! Because a microprocessor is not your ordinary electrical circuit. But instead, it is an electrical circuit that you can program to make it behave differently!

So what does that mean? It means that you can make a microprocessor do different thing at different times. And all you have to do to achieve this is to program it differently!

You cannot do that with any electrical circuit right? That is the main difference between a microprocessor and any other electrical circuit! That it is programmable!

So what does that mean? It means that you can take two or more microprocessors and program it to behave differently!

Alright, if you now got an idea of what a microprocessor does, let us now see how it looks like!

How does a microprocessor look like?

Thanks to advancing technology, a microprocessor circuit has been made so small that you can’t just connect it to external devices by hand. So to facilitate this, a microprocessor circuit is put inside a plastic case and pins are pulled out of its input and output connection points. So using these pins, you will be able to connect the microprocessor to external devices.

Here is how a microprocessor looks like with its plastic casing and connector pins.

A Texas Instruments Microprocessor IC chip
A Texas Instruments Microprocessor IC chip

So as you can see from the pic above of a TI microprocessor chip, there are a number of input and output pins present in it.

To know what each of these input does and what voltage it works at, we will need to take a look at it’s Datasheet.

So that’s it. That should give you a gist of what a microprocessor looks like. We will go more in depth on how a microprocessor works in the future articles. But this should hopefully be now be a good starting point for you to start exploring more about it.

But if there is something that is not clear or you have any more questions about it, do not hesitate to ask. I will be more than happy to help.

So with that I will end this article here. See you around! 🙂

Categories
ARM ARM ARCHITECTURE ELECTRONICS EMBEDDED TUTORIALS

What Is A System?

A system can be anything that has these 3 basic components built into it:

  • One or more number of Inputs
  • One or more number of Outputs
  • A process working on input to produce the output

So conceptually, we can can draw a system using the following block diagram:

A generic system that takes in input, processes it and produces an output.
A generic system that takes in input, processes it and produces an output.

But not all produced output by a system will be useful. Because many times, the output consists of both useful component along with additional side-effect components that may or may not be useful.

I know you may be confused at this point. But it will become very clear when we look at a system using an example.

So, the best example of a system can be an automobile like a car.

So if you look at a car, you will see that it takes in gasoline as its input and processes it to produce output in the form of movement. But giving us transportation is not the only thing a car does. Because, as a result of burning fuel, it also expels pollutants like smoke, heat etc. along with movement.

So in the case of a car we can say that – Gasoline is the input, engine is the system that processes the gasoline to produce output in the form our desired outcome – movement. But along with it, it also produces unwanted output such as smoke, heat, noise etc.

But it is not just an automobile that can be termed as a system. Because almost everything that we humans have built so far are all systems that takes in certain input and produces certain output.

So what other examples can you think of that is a system? I want you to think about it for some time to try and answer this question. Once you have thought enough, look at the next paragraph to see if you had anything matching to this list.

Here are a few examples of a system:

  • Computers
  • Electrical Stove
  • Fan
  • Heater
  • Aeroplanes
  • Trains etc.

So that is all there is to a system. I hope this made it clear for you. But if you still have some doubts regarding it, do let me know in the comment section below and I will be happy to answer!

Categories
ELECTRONICS EMBEDDED IOT TUTORIALS

What Is An Electrical Circuit – Explained For Dummies

Have you ever tried to look inside an electronic device? If you have, then we are sure that you have come across an electrical circuit. Right? But ever wonder what an electrical circuit is? What it does and why we use them?

No? Then this is an article you should read to get a some idea about it. Since you are new to an electrical circuit, we will try to keep it simple so that it is easy for you to understand. Sounds good? Great! Then let us get started, shall we?

Introduction To An Electrical Circuit

Definition Of An Electrical Circuit

The text book definition of an electrical circuit goes something like this:

It is an interconnection of electrical elements used to transmit power.

But I know that this will not help you understand much as it is quite vague. Right? So let me explain to you about it in simple words.

Electric Circuit Explained In Simple Terms

We know what an electricity is, right? It is the energy source to run many of our every day equipment like TV, Radio, Laptops, Fans, AC etc.

But here is the problem. We don’t normally generate electricity in our houses (Unless your house is solar powered). So where is it generated then? Usually in the Power generation units located in a far off place like water falls, Nuclear plants etc.

So then how do we get this electricity delivered to our houses? Well that is when we use the power lines, right?

But even after you get your electricity to your homes through power lines, it is still not good to run your electrical devices. Why, you ask?

Well that is because the power supplied to our homes are quite high – usually between 100V to 240V. But our electrical devices like laptops or fans dont really need that much of power. Then what do we do?

That is when we make use of an electrical circuit!

Using electrical circuits, we will transfer power to our devices at the right amount that it requires. So in other words, we make use of electrical circuits to transfer the electrical power to a device at the right level.

So what is an electrical circuit made of? Want to take a guess? I did tell you about it already once. Not sure?

Well look at the definition above and tell me. What do you see?

If you said “Electrical elements” then you go it right!

What Are Electrical Elements?

So an electrical circuit contains electrical elements in it. You are clear about that, right? But what are these elements? I never told you about it, isn’t it?

Well, we have many type of electrical in use. And each one of these elements have their own purpose in a circuit. But to give you an idea, here are some examples of electrical elements in use:

  • Resistors
  • Capacitors
  • Inductors
  • Diodes
  • Transistors
  • Transformers etc

So as you can see, we have a lot of elements to use in an electrical circuit. But why do we have so many of them? Well, it is because each of the element have their own set of functionalities. So depending on what we need, we will pick up the right element in our circuit.

Sounds good so far? Great. That is all there is to it. But, before I end this article, let me show you a simple electrical circuit as an example. By looking into it, you will get a good idea about what we are dealing with. Right?

So take a look at this simple circuit where we have an LED light connected through a resistor, capacitor and few other elements. Now I will not go in detail about how it works and all. That should be a separate article by itself in the future.

But this should give you a good mental picture of how an electrical circuit looks like. Take a look at it!

A Simple Electrical Circuit Example
A Simple Electrical Circuit Example

Conclusion

So that is how an electrical circuit looks like. By now, I hope you have got a good idea about what an electrical circuit is and why we need to use it.

If you still have any doubts about it, do let me know in the comments below. I will be more than happy to help you guys out!

So until next time, happy learning! 🙂

Learn the difference between a serial and parallel electrical circuit.

Categories
ELECTRONICS EMBEDDED EMBEDDED COMPUTERS EMBEDDED PROGRAMMING IOT PROGRAMMING RASPBERRY PI TUTORIALS

WS2811 Vs WS2812 Difference In LED Strip

Are you planning to connect LED strips to your board? Then you would want to know the difference between WS2811 Vs WS2812. So read below to know more!

Most of the articles on Arduino or Raspberry Pi asks you to hook up an WS2811 or WS2812 LED strip to your board. But have you ever tried to know why these LED strips? Why not any other LED strips? What makes them so special? And what about the WS2811 Vs WS2812 Difference?

WS2811 Vs WS2812 Difference In LED
WS2811 Vs WS2812 Difference In LED

Not many tutorials out there have tried to answer these questions. So in this article, we will do just that! So brace yourself. Sit tight and join the ride to learn all about these LED strips. Alright? Cool! Here we go!

What Is An LED Strip?

So before we dwell into learning the WS2811 Vs WS2812 Difference, let us try to answer this question first.

What is an LED?

An LED is a simple semiconductor device that will emit light when electric current flows through it. Now notice how I used the term “semiconductor device“. But what type of device is it? Well to be precise, it is a semiconductor diode.

So in short, LED stands for Light Emitting Diode. So what do we mean by that? It means that when electricity passes through this diode, it emits light!

So now that we know what an LED is, it is time to answer our next question.

What Is WS2811 LED Strip?

A WS2811 LED strip uses WS2811 LED driver chip to control the LED strip. Uhh… Got confused by what I just said?

Well, let me clear that for you by answering this question.

What is an LED strip?

You see, an LED strip is just a fancy way of connecting a bunch of LED lights together along a strip of wire. So an LED strip will have more than one LED lights in them.

But what makes them great is that you can address each of these LED lights separately.

Wait what? How can we do that, you ask?

Well that is where LED driver IC like WS8211 comes into picture. It is these chips that will help us connecting to each of the LED and controlling them to turn then ON or OFF.

Are you with me until here? Great! Then let us find answer to the next question

How Does WS8211 Chip Control LED?

So here is the thing. To control individual LEDs in a strip, LED driver chips like WS8211 is used. These chips sit alongside the LED and control their light intensity.

So by makes use of serial protocol in your microcontroller and assigning unique addresses to each of the LED driver chip you can control each of the LEDs.

So this way, when you want to control an LED, your board’s microcontroller will send out the address of the LED driver chip to be controlled. This will make the respective LED chip accept the next set of commands to be sent for itself.

And this way, your board will be able to control every LED to be turned ON or OFF!

Pretty neat, isn’t it? 😉

So now that we know what an LED driver chip like WS8211 does, it is finally time to ask the important question of this article.

WS2811 Vs WS2812 Difference

While both WS2811 & WS2812 are LED controller ICs, there are a few notable differences between them. Here are few of them that we listed out for you:

WS2811 Vs WS2812 Difference In Power

WS2811 LED chip uses 12V to work. Where as a WS2812 chip which uses only 5V. But then how will this impact you?

Well you see, if you are going to use along LED strip with many LEDs in them, you are going to see quite a bit of voltage drop along the strip.

Which means that the last few LEDs that is present at the far end of the strip from the board will get lower voltage. Now, if this drop is significant, your last few LEDs might not be glowing as well as its should be.

You do not want that. Right?

So for example you have 30 LEDs in your strip and the voltage drop is 2V towards the end of the strip. Well in that case, if you are using a WS2811 chip, the last few LEDs will get around 10V. This is still reasonably OK for an LED supposed to operate at 12V.

But on the other hand, if you are using WS2812 that works at 5V. the same voltage drop will be down to 3V from the supposed 5V. Now that is quite a significant voltage drop there. Right?

So you need to keep this in mind while choosing between WS2811 Vs WS2812.

WS2811 Vs WS2812 Difference In LEDs Controlled

WS2811 actually do not control one LED. But instead it controls a cluster of 3 LEDs together. So that means that you cannot go below a granularity level of 3 LEDs to control them.

But on the other hand, WS2812 can control 1 LED each. So, if you need a control granularity of 1 LED, you should be going for WS2812 instead of WS2811.

WS2811 Vs WS2812 Difference In Power Consumption

As WS8211 operates at 12V, the amount of power consumed by it is significantly more. On the other hand, as WS8212 uses 5V, it can operate at a much lower power consumption.

WS2811 Vs WS2812 – Pros & Cons Of Each

WS8211 Pros

  • Operates at 12V. So it can control more number of LEDs in a strip.
  • Ease of use when dealing with mass LED controls.

WS8211 Cons

  • It cannot control lower than 3 LEDs at a time. So its lower granularity level of control lies at 3 LEDs.
  • Consumes significantly higher power because of 12V of operation.

WS8212 Pros

  • Can control single indiviudal LEDs.
  • LED control graularity lies at 1 LED.
  • Lower power consumption.

WS8212 Cons

  • As it operates at 5V, its voltage drop becomes significant as the number of LEDs in the strip increases.

Conclusion

So in conclusion, whether to choose WS2811 or WS2812 entirely depends upon the type of use cases you are dealing with. If you want to control a long LED strip then WS2811 is the obvious choice for you.

But on the other hand, if you want to control LEDs at the granular level of a single LED, then WS2812 is the option for you to go for.

So hope this article was helpful for you in understanding the WS2811 Vs WS2812 difference. If you still have any more questions in your mind, do let me know in the comments below and I will try to give you my best help.

So with that, I will end this article here. Until next time, take care and happy learning! 🙂

Categories
ARDUINO ARM ARM ARCHITECTURE ARM PROGRAMMING COMPUTER HARDWARE ELECTRONICS EMBEDDED EMBEDDED COMPUTERS EMBEDDED PROGRAMMING HARDWARE IOT MACHINE LEARNING PROGRAMMING TUTORIALS

Buy Arduino Nano Online At A Low Price

In this article, we will learn how you can buy an Arduino Nano online. We will learn how to buy it online in India at a low price. But before we do that, let us first learn what an Arduino Nano is in the first place. So are you ready to dive in? Then let us go!

What Is An Arduino Nano Board?

If you are still a beginner in the embedded world, chances are you may have not heard about Arduino Nano until now. So what is it?

Well, the Arduino Nano is a small computer board that one can buy to learn more about computers. It is a computer on a single PCB board that contains all the circuitry needed to run the software code on it.

Oh wait a second here! So we are learning that it is a single board computer, right? Cool! But then you may be wondering how does this Arduino Nano look like?

I am glad you asked this question! Here is a picture of an Arduino Nano board I will share with you for your pleasure. Take a look at it.

Arduino Nano Board Available To Buy Online
Arduino Nano Board You Can Buy Online

Woah! That is one weird looking single board computer out there! But what are all those pins coming out of it?! Looks scary isn’t it?

But don’t worry. Even though the Arduino Nano board looks like that, it is actually easy to use. There are many tutorials we have that will teach how to use it. So learning how to work with it will never be a problem at all.

So with this introduction to Arduino Nano, it is time for us to move on to know how we can buy it online.

How To Buy Arduino Nano Online?

There are many sellers who are selling the Arduino Nano hardware board. They are selling these Arduino Nano boards in online stores as well as in the offline stores. However, when you try to buy the Arduino Nano board, you will realize that the price differs a lot from one seller to another!

Now this is happening because there they are all not original Arduino boards. You see, the thing is Arduino boards are all launched as open source hardware boards. So, their circuit as well as their board designs are all available for free for anyone to use.

So, what happened because of this is that there are many Arduino Nano clones as well. Since these Arduino clones are coming from China, they will be of cheaper cost.

So in that case, who is the original manufacturer of Arduino Nano?

Arduino is the company that designs and manufactures the original Arduino boards. But as this company is from Italy, the products it makes are costlier than their clones.

So now this begs us with our next question which is:

Who manufactures the Arduino clones?

Most of the Arduino clones manufacturers are from China. So since the manufacturing cost of these boards are cheaper in China as compared to Italy, the clones are always cheaper.

So here is the real reason then! This clearly tells us why we see so much difference in the price for the same Arduino Nano boards across different online websites!

So depending on how much you can spend, decide which Arduino Nano board you want to go for.

What is the difference between an original Arduino Nano Vs a Nano clone?

Now as I told earlier, both the original and the cloned Nano boards use the same circuit design. So nothing is different over here. But there is one difference between the two. And this difference is in terms of the quality of components used.

So if you want a higher quality board, you pay more and go for original Nano module. But on the other hand, if you want to spend less, just go for a Nano clone. It really doesn’t matter at all. Trust me!

What Is The Price Of Arduino Nano Online In India?

If you are from India, you can buy the original Arduino Nano online at a low price of Rs.1449. But if you are OK to buy a cheap Arduino Nano clone, you can buy it at a low cost of Rs.200!

What Is The Price Of Arduino Nano Online In The US?

In the US, you can buy an original Arduino Nano at a cost of $22.00. But on the other hand, a cloned Arduino Nano will only cost you around $9! It’s as cheap as that!

What Is The Online Price Of Arduino Nano In The UK?

But if you are in the UK, you can buy the Nano board at just GBP20!

Have you looked at the new Arduino Portenta?

Conclusion

So there you have it. We just looked into the price of an Arduino Nano in 3 different regions. I also explained to you why its price changes so much when you want to buy it online. It is because of the clones that has reduced the price of these boards.

I hope you have got what you were looking for in this article. If you still have any more questions on it, ask me right away and I will answer you.

I hope you will have fun working with them. These are the best things you can work on to gain good knowledge. It is also one the best hobby that will keep you busy for some time! So enjoy with your new toys! Until next time, ciao! 🙂