Nope, not that MCU.
So by MCU, I mean(uh..uh?) The microcontroller unit.
A microcontroller is a small and low-cost microcomputer, which is designed to perform the specific tasks of embedded systems like displaying microwave information, receiving remote signals, etc.
The general microcontroller consists of theprocessor, the memory (RAM,ROM,EPROM),Serial ports, peripherals (timers,counters), etc.
Where can you find them?
They are almost everywhere, from simple devices like washing machines, traffic lights, microwave ovens to highly sophisticated satellite systems. A 1999 BMW 7-series has 65 microcontrollers. Although the microcontrollers in PCs are the most visible, they account for just 6% of the microcontroller market.
Microcontrollers are used in applications requiring repetitive operations such as running the traffic light at an intersection. In traffic lights, the microcontroller's sole function is to turn lights on and off at predetermined times.
Another example is a microwave oven. Let's examine how a microcontroller functions while cooking a bag of popcorn in a microwave oven.
You open the door and put the bag of popcorn inside. You close the door and push the button labeled "Popcorn." A few minutes later, a tone announces the popcorn is done. What happened behind the scenes?
When you opened the door, the microcontroller sensed the door switch, turned on the light, and disabled the magnetron. The microcontroller continually scans the keyboard. When you pushed the "Popcorn" button, the microcontroller confirmed that the door was closed and began to count timing pulses, started the motor for the turntable, set the power level of the magnetron, and controlled the display. When the timer reaches zero, the microcontroller shuts down the magnetron, stops the turntable, and signals you.
Controller board of a washing machine which controls the time of motor rotation, speed, buzzer control, 8-segment display control, etc. The board has a microcontrollerST7LITE49M.
After data gets processed according to the instructions, the processed data in digital form is again needed to be converted into analog signals as most of the output devices need analog signals to show output. So, a digital to analog converter is also embedded inside a microcontroller for this purpose. Remember, there are external converters also available.
Microcontrollers are classified into various categories based on memory, architecture, bits, and instruction sets. Following is the list of their types −
Based on the number of bits microcontroller can process in one clock cycle, the microcontroller is further classified into three categories:
Based on the memory configuration, the microcontroller is further divided into two categories:
Based on the memory architecture on which microcontroller is created, they can be classified into two categories:
These Microcontrollers have common memory for storage of data as well as programs.
These Microcontrollers have separate memory units (and separatebuses.) for storage of data as well as programs.
Some of the examples of microcontrollers are ATmega328, ATtiny85, ESP8266, etc.
You’ll see the use of some of the microcontrollers mentioned above in the blog of Development boards.
Microcontrollers are used for specified tasks where the tasks are predefined. They are used in different devices such as −
What is the need for Microcontrollers if we already had Microprocessors or vice versa A simple difference chart will surely clarify all such doubts.
Hello everyone! Here we are with another fascinating topic for you to learn - Development Boards, more specifically, Arduino Uno
What is a Development Board?
A development board is a printed circuit board with circuitry and hardware designed to facilitate experimentation with a certain microcontroller. Some everyday development boards are- Arduino Boards like Uno, Nano, Mega, and many more non-arduino boards like ESP32.
Imagine you have a microcontroller, and you wish to do some cool projects, say a maze solver bot or a burglar alarm. Now, every time you would have to set up the elementary circuit on a breadboard, and you know that some of the electric circuits would be the same each time, like power circuits. That makes it redundant and frustrating. Imagine a PCB containing all this basic circuitry. That’s the reason why we use a Development Board.
Regarding Arduino boards:
Arduino boards are the pivotal components for thousands of ongoing projects in the field of robotics. With Arduino boards, you can convert input, like light, temperature, etc., from the sensors and govern an output, like activating an arm, a motor, or even sending information online.
This is done by sending a set of instructions to the Arduino board using Arduino Programming Language, using Arduino Integrated Development Environment (ArduinoIDE). The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it is based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
Wondering what exactly is an Arduino and what’s with this new term AVR? Hold on! Let’s see what they mean.
Arduino is an open-source hardware and software company which helps us build exciting electronics projects with easy-to-use hardware and software. All Arduino boards have one thing in common - a MICROCONTROLLER. The microcontroller is a comp...but you know what a microcontroller is?
AVR is a microcontroller family developed by Atmel. Some of the examples are the ATmega series, ATtiny, ATxmega.
Some sample projects that you could do using Arduino as brain include building aburglar alarm,line follower bot,obstacle avoiding robot,temperature monitoring systems,RC car, or evenhome automation.. or, you could also make some 'useless machines' like the one shown inthisvideo.
Now you know how interesting and important it is to learn about Arduino. As per requirements, Arduino CC manufactures many boards, (you can see them here: Arduino - Products).
Why are we studying Arduino boards, and why are they so popular?Arduino development boards are so popular because of their simple IDE, straightforward code, and lots of Open-source libraries. But this is not it. Arduino Hardware is also Open-source, which means several other companies make Arduino compatible boards programmable with Arduino IDE. Some of the common arduino boards are Arduino Nano, Arduino Uno, Arduino Mega, etc
In this tutorial, we will study an everyday Arduino board - Arduino Uno. We will also do some simulations on Arduino Uno but let’s go through the hardware part first.
This is how an Arduino Uno looks like.
Some numbers have been marked on the image corresponding to components on the board. Let’s know about these components in detail
Pulse Width Modulation is a method of reducing the average power delivered by an electrical signal, by effectively chopping it up into discrete parts. The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on. When a digital signal is on half of the time and off the other half of the time, the digital signal has a duty cycle of 50% and resembles a "square" wave.
That was pretty much all about the Uno board. But it's not over yet. In the next blog, we will do some simulations on an Arduino Uno board online on tinkercad. Till then, complete the given assignment.
Assignment Questions (mail them to puneet@zine.co.in):
Hello there! In the previous blog, we introduced you to Arduino. Now, it is time to try your hand at programming.
Generally, we code in Arduino IDE, compile it and upload it to the Arduino. And the Arduino mostly behaves as expected. Simple? The programming language we use for programming the Arduino devices is Arduino Programming Language. But this is nothing to be scared of, it is just a framework built on top of C++, which means most syntax is the same.
But there are quite a few differences too. One of the main differences is that unlike C++, it doesn’t have a main() function, but it does require two main functions: setup() and loop(). A program written in Arduino Programming Language is called Sketch.
Now let’s start programming our Arduino board. If you’ve been following the blogs so far, you must know what we are going to use for simulation.
Select Circuits from the left panel and then create new circuit.
But you didn’t program it to do so. How did it happen? Let’s figure that out. First, Stop Simulation. Click on that little code button near the Start Simulation button. Open the Blocks menu and click on Text. You should see this:
This is the default program that is causing the led to blink.
Let’s try to understand how this program is doing so.
void setup()
void setup() { pinMode(13, OUTPUT); }
void loop() {
digitalWrite(13, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(13, LOW);
delay(1000); // Wait for 1000 millisecond(s) }
The first thing is you can see two functions: setup() and loop().
setup(): This function is called at the very beginning and only once, when the program starts, and when the Arduino is shut down and restarted. So, for example, if you wanted something to be done only once, you will include those tasks in the setup.
loop(): This function is repeatedly called while the program is running, this function governs the regular functioning of the Arduino board. So, if you want a task to be done repeatedly by an Arduino board then those tasks must reside in a loop().
Line 3: pinMode(13, OUTPUT);
This sets pin 13 on the Arduino board as an output pin.
Lines 8, 10: digitalWrite(13, HIGH); and digitalWrite(13, LOW);
These lines are used to set pin 13 high and low respectively.
Lines 9, 12: delay(1000);
These lines are giving a delay of 1000 milliseconds between setting pin HIGH and LOW.
As the loop() is called repeatedly, the led starts blinking.
Isn’t it amazing? Congratulations! You learned the “Hello World” of Arduino today. For more information on Arduino programming language you can refer to the following link:
https://flaviocopes.com/arduino-programming-language/#:~:text=The%20Arduino%20Programming%20Language%20is,Programming%20Language%20is%20called%20sketch.Now it's the time for you to do a small assignment (Submission through Google form):
Write a program such that the led lights up when the push button is pressed and turns off when we release the push button. Submit the code below.
Aight! It is time to learn about sensors now. Let’s cut to the chase!
What is a sensor?
Any device that measures physical input from its environment and converts it into data that can be interpreted by us or a machine.
Let’s make it simpler with the example of an eye.
The eye is a sensor of sight for us and the electronic counterpart of it is a camera. Both gather visual information from the surrounding environment and convert it into data that can be interpreted by their respective data processing units, i.e., brain for us and microcontroller or microprocessor for machines.
Fact: The average resolution of a human eye is approximated to be 576 megapixels (you can refer thisvideo) meanwhile the highest resolution camera devices ever created has a resolution of 108 megapixel created byXiomi) andSamsung).
Now, we know what are sensors, but why do we need sensors in robotics?
To answer this question, let’s take an example- You want your device to function according to the light, say a light follower bot. So, the bot you built must act to detect where the light is. As the intensity of light falling on the bot increases, then it can be concluded that the distance between the light source and bot is decreasing (assuming that light source emits at constant power). But how will you give the intensity of light as input to the microcontroller directly as the visual data can’t be directly interpreted by a microcontroller? We need an intermediate to bridge this gap.
There exists a need to convert light intensity into signals to feed them into our ICs or a microcontroller so the data can be interpreted and output can be obtained. We need a device that can sense the intensity of light in the surroundings and provide that information in the form of electrical signals to make a robot that acts on the intensity of light. Sensors, come to the rescue. Just like you have your senses to interact with the surroundings, such as
Similarly, fields of electronics also have several sensors so that the ICs and microcontrollers can interact with their surroundings. Although most of the sensors provide output in the form of electrical signals, some sensors provide data in some other form too.
For example, a thermometer is a sensor or a temperature sensor that senses the temperature and provides data in the form of visual information. In our case, we are going to use an LDR(sensor) to detect the intensity of light which in return feeds that data into our device to process further.
In a nutshell, sensors are the devices that detect the alteration in electrical or physical, or other quantities and provide the compatible data to the devices you are using to process the information. For a robot utilizing electronic circuitry or system to perform any useful task or function, it needs to be able to communicate with the “real world” whether this is by reading an input signal from an “ON/OFF” switch or by activating some form of the output device to illuminate a single light.
Now, we’ve mentioned some sensors. We need you to think which electronic sensors are associated directly with our sense organs and how. This is an assignment to help you understand the relation between sensors in humans and machines.
In the next blog, we’ll learn about how to choose sensors. We’ll also classify a wide range of sensors on different bases, and how they work.
Till then, try to think about more sensors that provide the data but not in the form of electric signals.
Robotics &
Research
Group
GROUP
Home
Team
Alumni
PROJECTS
Achievements
Projects
Contribute
ACTIVITIES
Workshops
Blogs
Gallery
COPYRIGHT 2023, ZINE
zine.nitj@gmail.com