Friday, 13 June 2014

Basics of Microcontrollers

A microcontroller is a small computer on a single IC containing a processor core, memory, and programmable input/output peripherals.


Like all good things, this powerful component is basically very simple. It is made by mixing tested and high- quality "ingredients" (components) as per following receipt:


  1. The simplest computer processor is used as the "brain" of the future system.
  2. Depending on the taste of the manufacturer, a bit of memory, a few A/D convertors,               timers,input/output lines are added.
  3. All that is placed in some of the standard packages.
  4. A simple software able to control it all and which everyone can easily learn about                                                 has been developed.
On the basis of these rules, numerous types of microcontrollers were designed and they quickly became man's invisible companion. Their incredible simplicity and flexibility conquered us a long time ago and if you try to invent something about them, you should know that you are probably late, someone before you has either done it or at least has tried to do it.
There are different families of microcontrollers availaible like AVR , ARM, PIC etc

Block diagram of a micro controller


Difference between microcontroller and microprocessor :-

Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers such as Intel’s Pentium 1,2,3,4, core 2 duo, i3, i5 etc. These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system designer has to add them externally to make them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc.

Intel Microprocessors

But this is not the case with Microcontrollers. Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other peripherals all embedded on a single chip. At times it is also termed as a mini computer or a computer on a single chip. Today different manufacturers produce microcontrollers with a wide range of features available in different versions. Some manufacturers are ATMEL, Microchip, TI, Freescale, Philips, Motorola etc.


Types of Instruction sets for microcontrollers:


1. RISC :-


RISC, or Reduced Instruction Set Computer. is a type of microprocessor instruction set that utilizes a small, highly-optimized set of instructions, rather than a more specialized set of instructions often found in other types of architectures.

The first RISC projects came from IBM, Stanford, and UC-Berkeley in the late 70s and early 80s. The IBM 801, Stanford MIPS, and Berkeley RISC 1 and 2 were all designed with a similar philosophy which has become known as RISC. Certain design features have been characteristic of most RISC processors:
  • One cycle execution time: RISC processors have a CPI (clock per instruction) of one cycle. This is due to the optimization of each instruction on the CPU and a simple technique. 
  • Pipelining: A techique that allows for simultaneous execution of parts, or stages, of instructions to more efficiently process instructions;
  • Large number of registers: The RISC design philosophy generally incorporates a larger number of registers to prevent in large amounts of interactions with memory


2. CISC :-


The primary goal of CISC instruction set is to complete a task in as few lines of assembly as possible. This is achieved by building processor hardware that is capable of understanding and executing a series of operations. For this particular task, a CISC processor would come prepared with a specific instruction (we'll call it "MULT"). When executed, this instruction loads the two values into separate registers, multiplies the operands in the execution unit, and then stores the product in the appropriate register. Thus, the entire task of multiplying two numbers can be completed with one instruction:
MULT 2:3, 5:2
MULT is what is known as a "complex instruction." It operates directly on the computer's memory banks and does not require the programmer to explicitly call any loading or storing functions. It closely resembles a command in a higher level language. For instance, if we let "a" represent the value of 2:3 and "b" represent the value of 5:2, then this command is identical to the C statement "a = a * b."

One of the primary advantages of this system is that the compiler has to do very little work to translate a high-level language statement into assembly. Because the length of the code is relatively short, very little RAM is required to store instructions. The emphasis is put on building complex instructions directly into the hardware

CISC systems date to the early 1960s and the early development of computers. IBM created a range of computers based around a set of standards called System/360. This was the first CISC machine. Earlier computers expected programmers to issue low-level instructions to the computer. 


Microcontroller Architectures  :-


The microcontrollers are availaible in different architectures. These different architectures are :

1. Harward:

Harward Architecture block diagram
The term originated from the Harvard Mark 1 relay-based computer, which stored instructions on punched tape and data in relay latches.
Harvard Architecture: The Harvard architecture uses physically separate memories for their instructions and data, requiring dedicated buses for each of them. Instructions and operands can therefore be fetched simultaneously.
Different program and data bus widths are possible, allowing program and data memory to be better optimized to the architectural requirements. E.g.: If the instruction format requires 14 bits then program bus and memory can be made 14-bit wide, while the data bus and data memory remain 8-bit wide.


2.Von Neumann

The von Neumann architecture is a design model for a stored-program digital computer that uses a processing unit and a single separate storage structure to hold both instructions and data. It is named after mathematician and early computer scientist John von Neumann. Such a computer implements a universal Turing machine, and the common "referential model" of specifying sequential architectures, in contrast with parallel architectures.

The von Neumann architecture is a design model for a stored-program digital computer that uses a processing unit and a single separate storage structure to hold both instructions and data. It is named after mathematician and early computer scientist John von Neumann. Such a computer implements a universal Turing machine, and the common "referential model" of specifying sequential architectures, in contrast with parallel architectures.

Block Diagram of Von neumann architecture

One shared memory for instructions (program) and data with one data bus and one address bus between processor and memory. Instructions and data have to be fetched in sequential order (known as the Von Neuman Bottleneck), limiting the operation bandwidth. Its design is simpler than that of the Harvard architecture. It is mostly used to interface to external memory.


IMPORTANT NOTE : There is no relationship (e.g., RISC = Harvard / CISC = von Neumann). You can build either of them either way. ThePowerPC, SPARC, and ARM are RISC and von Neumann. Seymour Cray's machines were RISC (although the term had not yet been invented when he designed most of them) and von Neumann. I don't believe the Harvard Mark I was RISC as it had some rather complex instructions (e.g., interpolate value from function tape) and it was clearly Harvard.


In the next topic we will be discussing about the basic working of sensors with their circuits explained.
Comments and views will be appreciated.

Thursday, 12 June 2014

The basics of working of a simple robot

We learnt about the different types of robots , their uses and their possible disadvantages as well. Now the important thing is what are the important components of a robot?

As this blog is made for tutorial purposes ,  we will start from the basics and tell you about the components a most basic robot should have.


To start with , let us consider these points :-

A. To work a robot needs an electronic brain which decides what to do and when to do ? for this purpose a robot has a microcontroller. The microcontrollers availaible are of different type and memory sizes. In our tutorials we will be using AVR microcontrollers namely Atmega8/16/32.

B. To get the data from the nearby surrounding , the robot needs to sense them first. Similar to the sensing ability our body has , after the microcontroller the sensors are the most important component.
A robot can have several type of sensors : IR sensors , ultrasonic sensors , thermal sensors , light sensors etc.

C. After the data recieved from the sensors have been processed an output component is required so as the robot does the desired output functions.For this purposes we connect motors etc with the robot. The motors available are of different types namely stepper motor , geared motor , servo motors etc. In case of robots like mechanical hand the output is achieved by use of actuators ( a type of motor itself ).

D. The power source . No doubt if your robot has high grade above mentioned components but the robot is completely useless if it doesnt have a power source.


 Now we will discuss a bit in detail about the several components used :


  • Microcontroller :-


A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in PCs or other general purpose applications.
Block diagram of Microcontroller

Even though there is a large number of different types of microcontrollers and even more programs created for their use only, all of them have many things in common. Thus, if you learn to handle one of them you will be able to handle them all. A typical scenario on the basis of which it all functions is as follows:

  1. Power supply is turned off and everything is still…the program is loaded into the microcontroller, nothing indicates what is about to come…
  2. Power supply is turned on and everything starts to happen at high speed! The control logic unit keeps everything under control. It disables all other circuits except quartz crystal to operate. While the preparations are in progress, the first milliseconds go by.
  3. Power supply voltage reaches its maximum and oscillator frequency becomes stable. SFRs are being filled with bits reflecting the state of all circuits within the microcontroller. All pins are configured as inputs. The overall electronis starts operation in rhythm with pulse sequence. From now on the time is measured in micro and nanoseconds.
  4. Program Counter is set to zero. Instruction from that address is sent to instruction decoder which recognizes it, after which it is executed with immediate effect.
  5. The value of the Program Counter is incremented by 1 and the whole process is repeated...several million times per second.

  • Sensors :

A sensor is a converter that measures a physical quantity and converts it into a signal which can be read by an observer or by an (today mostly electronic) instrument. For example, a mercury in glass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube. A  thermocouple converts temperature to an output voltage which can be read by a voltmeter. For accuracy, most sensors are calibrated against known standards.
The different type of sensors availaible to us are: 

1. IR sensors ( Infrared sensors)
2. Thermal sensors
3.Proximity sensors
4. Light sensors
5. Moisture sensors
6. smoke sensors
7. ultrasonic sensors etc.

For the beginner purposes , we will talk only about the IR sensors.

Working Principle

Working of an IR sensor
A typical system for detecting infrared radiation using infrared sensors includes the infrared source such as blackbody radiators, tungsten lamps, and silicon carbide. In case of active IR sensors, the sources are infrared lasers and LEDs of specific IR wavelengths. Next is the transmission medium used for infrared transmission, which includes vacuum, the atmosphere, and optical fibers.

Thirdly, optical components such as optical lenses made from quartz, CaF2, Ge and Si, polyethylene Fresnel lenses, and Al or Au mirrors, are used to converge or focus infrared radiation. Likewise, to limit spectral response, band-pass filters are ideal.

Finally, the infrared detector completes the system for detecting infrared radiation. The output from the detector is usually very small, and hence pre-amplifiers coupled with circuitry are added to further process the received signals.

  • Motors :-
A motor is an electric machine that converts electrical energy into mechanical energy.In robotics several type of motors are used for various purposes.For instance the geared motor is what we commonly use for robot's locomotion.

The 3 main types of motors that are commonly used for robotic purposes are :-



DC geated motor
1. DC geared motors :- Geared DC motors can be defined as an extension of DC motor which already had its . A geared DC Motor has a gear assembly attached to the motor. The speed of motor is counted in terms of rotations of the shaft per minute and is termed as RPM .The gear assembly helps in increasing the torque and reducing the speed. Using the correct combination of gears in a gear motor, its speed can be reduced to any desirable figure. This concept where gears reduce the speed of the vehicle but increase its torque is known as gear reduction.  This Insight will explore all the minor and major details that make the gear head and hence the working of geared DC motor.



2. Stepper motor :- 

A stepper motor  is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any feedback sensor (an open loop controller), as long as the motor is carefully sized to the application. DC brushed motors rotate continuously when voltage is applied to their terminals.


Stepper motor
The stepper motor is known by its important property to convert a train of input pulses (typically square wave pulses) into a precisely defined increment in the shaft position. Each pulse moves the shaft through a fixed angle. Stepper motors effectively have multiple "toothed" electromagnets arranged around a central gear-shaped piece of iron. The electromagnets are energized by an external control circuit, such as a microcontroller. To make the motor shaft turn, first, one electromagnet is given power, which magnetically attracts the gear's teeth. When the gear's teeth are aligned to the first electromagnet, they are slightly offset from the next electromagnet. So when the next electromagnet is turned on and the first is turned off, the gear rotates slightly to align with the next one, and from there the process is repeated. Each of those rotations is called a "step", with an integer number of steps making a full rotation. In that way, the motor can be turned by a precise angle.

Servo motor

3. Servomotor : A servomotor is a rotor actuator that allows for precise control of angular position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.

Servomotors are not a specific class of motor although the term servomotor is often used to refer to a motor suitable for use in a closed-loop control system.




In our next post we will be discussing in detail about the microcontrollers , their types and their architectures.


Comments and views will be appreciated.

Tuesday, 10 June 2014

The disadvantages of advancements in AI for human civilisation.

In the previous post we discussed about how robots have been involved in our daily life . But such involvment may lead to certain problems for the human civilisations itself. The excessive involvment of the robots in daily services which is currently being provided by humans( labour ) will lead to certain problems like unemployment and risk of AI take over ( as depicted in the terminator series).

The possible rebellion of the robots against human civilisation has already been depicted in many fictious stories. Have you ever thought what if the robot challengme its own creators (i.e the humans). Such  a problem was depicted in Asimov's short story "Reason".


Some of the problems that can be faced due to the excessive involvment of robots in the daily works are listed below :


Revolts due to unemployment
1. Unemployment : 

With increase in advancement in the capabilities of robots , it might post a threat to the common labour. It's been predicted that due to heavy  involvment of the artificial intelligence in industrial works , the daily labour may be severly hit due to low productional costs and high precision of the robots. Thus the heavy involvment of robo's in industrial work has lead to widespread revolts due to loss of people's job.In developing countries like India where unemployment is a major social issue , the excessive involvment of the robots in industrial applications might further worsen the situation.


2. Terrorist Threat : 

The advancement in the field of robotics may act as a potential terrorist weapon. The advanced humanoids may be designed to carry widespread attacks by terror outfits. Plus the robots may be designed to self destruct after carrying out the attacks , thus eliminating any evidence. 
Robots : Potential terror threats


Apart from the unemployment and the terrorist threats  the major issue that could arise if the robots stop following the 3 Laws is :


3. Defiance of orders and the laws : 

2070 : Robots vs Humans ??
Imagine a robot , who denies the fact that he is bided by certain laws and goes ramapant against the human civilisation , killing them all considering them inferior. Catastrophic yet? This is called the Frankestein effect , where the creation goes against its creators , threatning their existence in this world. This is a major issue that many scientists have talked about regarding advancement in Artificial  technology . If  a robot is made capable to have emotions & to think like a human being , do you think will he prefer serving you and not instead try rule you? An army of such rampant robots againt the human race will surely bring an end to our civilisation. Though one might argue that the 3 laws have been created to have such a situation under check , but nothing is fool proof! What if things go wrong. Theses and experiments will fail and humans would be on war with its own creation. Making a robot more similar like a human may sound fascinating and an achievement to us , but human will never agree to do the work we make a robot do.

    The word robot was coined by artist Josef Čapek , initially coining the term ‘laboři’, from the Latin ‘labor’.  He discussed this with his brother, Josef, and Josef suggested ‘roboti’, which gave rise to the English ‘robot’.  ‘Roboti’ derives from the Old Church Slavanic ‘rabota’, meaning ‘servitude’, which in turn comes from ‘rabu’, meaning ‘slave’.
History is itself a proof that slavery among humans lead to widespread revolts , independence struggles. Some took the voilent way , some achieved it by peacefat to similar to Humans? And it being more superior to the human race would surely lead to D - Day. If the "Robot" is made capable enough to think and realise everything , won't his actions be somehow similar to a human?




Well the talk about the advancement in robotics can have many theses . Different people would have different suggestions. Though true that a robot does help us by making our lives easy in many aspects , but when we consider the above mentioned points we realise maybe AI has major drawbacks and the steps towards growth should be taken one at at a time.


In the next topic we will be covering about : The basics of working of a simple robot . 

        

Monday, 9 June 2014

Robotics in Our Daily life

So in the previous post , we already mentioned about what exactly a robot is. But for those viewing this for the first time , let us mention it again.


"A robot is a mechanical or virtual artificial agent, usually an electro mechanical machine that is guided by a computer program or electronic circuit "

So where do such mechanical agents come in use? Look around yourself , do you see any robo around you? Of course not much , if you are in some developing country. But the growth of robotics in people's daily need hasn't been much rapid. We , Neurobotics India keeping the above mentioned factor in mind are working to diminish this gap between the Humans and the AI.

Though not well known , there are a lot of robots that have been made to assist us in our daily Life.



Autom : The Healthcare coach

1. Healthcare Robots :


A number of robots have been designed , keeping health issues in mind. These robots act as your daily assistance and helps you to be fit. 


Autom is a well known healthcare robot that keeps you motivated.The more you tell it about yourself, the more customised its responses will be, as it learns over time and gets to know you.




HAL : Hybrid assisted Limb
HAL is another robotic technology meant for the handicapped.HAL stands for Hybrid Assisted Limb, and is made by the Japanese firm Cyberdene. It responds to bio-signals detected on the wearer’s skin that are sent to the muscles, which make the robotic limbs move.

 



2. House Hold Help:


Navibot CornerClean:  
Samsung has launched a new robot called Samsung Navibot CornerClean.There have been robot vacuum cleaners before, but this is the most advanced yet. It features a pop-out brush, for getting into those difficult-to-clean corners.It’s smart, too. Using a built-in camera, it captures 15 images per second of its surroundings, effectively mapping your home. It’ll use this to calculate the most efficient cleaning path for each room, as well as avoid bumping into obstacles or falling down stairs.


Wheel Me : Everybody needs a massage after a tiresome day. Imagine having a robot who gives you a perfect one? DreamBot’s WheeMe fits in the palm of your hand, and drives over your back and shoulders, massaging you with its serrated rubber wheels and rotor finger. It won’t fall off thanks to its sensors letting it know where it is, so you can just lie there and relax. It’ll turn itself off after 15 minutes, or if you want to stop it, just sit up, and WheeMe will switch off.





3. Humanoids :

Many of us have heard about humanoids. The word itself explains us about it , A droid which is an almost perfect replica of human intelligence.

The term first appeared in 1912 to refer to fossils which were morpho-logically similar to, but not identical with, those of the human skeleton.
Some of the world famous Humanoids are :

Honda's ASIMO

  • ASIMO

   ASIMO , which stands for Advanced Step in Innovative Mobility is a humanoid designed by the Honda Corp ,which says it is the “world’s most advanced humanoid robot.” Honda’s website explains that ASIMO can run and walk — even on uneven slopes and surfaces. It can climb stairs, reach for and grasp objects and it also has facial recognition.With its camera eyes, the robot “maps its environment” and can register objects, avoiding collisions with both stationary and moving objects.The current version of ASIMO is more than 20 years in the making, with 11 robotic predecessors. Honda first started working on creating a walking robot in 1986.                                                                           

  • iCub

iCub is a 1 metre high humanoid robot testbeds for research into the field of  artificial intelligence.It was designed by the RobotClub Consortium of several European universities and built by Italian Institute of Technology, and is now supported by other projects such as iTALK..


iCub: It's not just a kid.
       

Dimensionally, the iCub looks like a 3 -5 year old child.The iCub has the ability of crawling, using visual guidance with optic marker on the floor. It can even solve various complex 3D mazes. The robot has already showed the capabality of playing sports like archery , darts . It can be trained to hit the centre of the target.The robot using its biometric fingures can also grasp objects like balls,plastic bottles etc.


  • TOPIO :

TOPIO : Taking sports to the next level
Ever thought of a robot playing Ping pong? Welcome to the 21st century , where artificial intelligence is doing the impossible. TOPIO ("TOSY Ping Pong Playing Robot") is a bipedal humanoid robot designed to play table tennis against a human being. It has been developed since 2005 by TOSY, a robotics firm in Vietnam. It can easily recognise fast moving objects , and has a fast and accurate moment control.



So isnt it amazing how Artificial Intelligence is taking over everyhwhere? But as the legend says excess of everything is bad for you , the advancement in robotics may itself be a threat to the human civilisation.
In our next post we will be covering : The possible downsides of advancements in AI on human civilisation.


Do you want us to post tutorials for making basic autonomous robots? Views and Comments will be appreciated.















Sunday, 8 June 2014

Robotics and its laws



We hear the term robot many times in our life. But none of us knows what "actually" a robot is. The most basic remote controlled car is also a robot and the complex machinery being used in the industries are themselves a special class of robots.

If we go by the actual definition , Robotics is the branch of technology that deals with the design, construction, operation, and application of robots as well as computer systems for their control, sensory feedback, and information processing. These technologies deal with automated machines that can take the place of humans in dangerous environments or manufacturing processes, or resemble humans in appearance, behavior, and/or cognition. Many of today's robots are inspired by nature contributing to the field of bio-inspired robots.

So that was about the term "Robotics". But what about a Robot?

A robot is a mechanical or virtual artificial agent, usually an electro mechanical machine that is guided by a computer program or electronic circuit. Robots can be autonomous or semi-autonomous and range from humanoids such as Honda's Advanced Step in Innovative Mobility (ASIMO)


Terminators :  Fictious example of AI gone wrong

But if we talk about robots or robotics , we should know about the basic laws that governs there existence among us. Of course an out of control robot can pose a serious threat to the human civilization ( You may have watched the terminator series already for example).

Coming to the laws , there are three laws of robotics. These three laws were not written by any scientist or a researcher but surprisingly by a fiction writer named "Isac Asimov" ( Honda's ASIMO's ??) . These rules were introduced by him in the year 1942 in "Runaround". Since then these rules have been widely accepted by the scientists in the real world itself.

The three laws are :


Isaac Asimov
  1. A robot may not injure a human being or, through inaction, allow a human being to come to harm
  2. A robot must obey the orders given to it by human beings, except where such orders would conflict with the First Law.
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law


Over the years the original laws have been altered and elaborated on by Asimov and other authors. Asimov himself made slight modifications to the first three in various books and short stories to further develop how robots would interact with humans and each other. Later Asimov also added the law called   "Zeroth Law" which precedes the above mentioned 3 laws. The law states the following :

    " A robot may not harm humanity, or, by inaction, allow humanity to come to harm."


Thus these laws have now been adopted by various scientists in the world and the various robots we see around us are governed by these laws .


In the next post we will be covering the Topic : Introduction to application of robotics in our day to day life.


Comments regarding the posts will be appreciated.




Introduction

Who are we?

Welcome to the world of Neurobotics Solutions , where we aim to clone the Human Intelligence into embedded systems a.k.a Robots.We are a bunch of college students pursing B.tech  from some of the reputed institutes around the country .Though not experienced with the bookish knowledge , but we still have some knowledge in the practical field. We have been finalists and semi finalists in some of the national level robotic competitons held in India in the recent years.

The team members and the admin of this blog who will be here to help you are :

1. Prakul Pandit
2. Akanshu Mahajan
3 .Pranav Mishra

Why are we here?

If speaking in terms of knowledge and interest , we have gained enough of both over the years . With the vision of conveying our ideas to the world and to help other beginners we are here so as to make people aware about the basics ,scope and application of Artificial intelligence.


What do you expect to see posted?

Being a Robotic related blog , our team would focus on the following points :


1.  Basics for Beginners :

Having experience in this field , we are here looking to teach the beginners on how to do things on the basic level. Step by Step procedures for basic robot constructions will be given , many basic tutorials will be provided ( Right from the basics) so as to help the newbies.Not to forget , we are always here to listen to your doubts . Bless the internet .

2. Scope and Application of Robotics :

As the field itself fascinates us , we have been already working on the possible application of Artificial Intelligence in our day to day works( Research projects mentioned below). Through our blog , we will convey these ideas to people all over the world so as the ideas get globally accepted and initiate such comparable projects by others. Growth of robotics in our day to day life is our basic mission.


3. Completed projects and Related research  :

Over the years , we have completed several projects the most prominent of being them being our project named "Industrial Fire fighting robot" . Currently we are working on designing the robot on an industrial scale and also providing extra features viz CCTV etc.

One of our major project except the ongoing work on the Industrial Fire Fighting robot is the work on the technology "Neural Networks based controllers for Robots". In simpler words we are trying to use this technology to make Robots of various types to increase their accuracy and work precision. This technology can be applied in any field of robotics , be it mechanical hands or even the Industrial fire fighting robot itself.

The details and the theory of the project will be discussed in later posts.