Search This Blog

Using MCU in your project

Section A

If you have decided to use a Micro-controller (MCU) in your project - you may skip this section and directly go to Section B
what are the benefits of using Micro-controllers?
  1. You will have flexibility in adding features to your project by changing software.
  2. You can change the functioning by just changing the program, example varying a time delay is just a simple code change.
  3. Faster modifications, debugging and product building
  4. Low cost of hardware - you can get MCU for as low as Rs. 50
  5. Short product development time.
I would like to start with an example - say you have a requirement for a "square wave generation" what would you like to use. An immediate idea that strikes our mind is use a 555 timer IC. If you use a 555 timer IC following are the points to note
  1. It is easy to build a circuit and generate square wave of  a fixed shape [pulse width and frequency].
  2. Changing frequency and duty cycle needs a variable resistor.
  3. To know what is the pulse width you need a oscilloscope.
  4. Duty cycle or frequency cannot be set to zero or have a dynamic range say from 0 - 1 MHz.
  5. Cannot be used to generate frequency for a small time interval and stop further. 
But if you were to use a micro-controller you would be easily able to program for variety of requirement of frequency, duty cycle and custom features.

Section B

There are 100's of micro-controllers (MCU) in the market with varying features and premium debugging and development features; but I will be showing only the micro-controller module that will be cheaper, easily available in the market and also easy to write code.
Arduino is the most popular micro-controller board available in our eco-system, these boards are supported with free development platform, libraries, sensors, ready to use sensor and plug-in boards. Arduino is an development ecosystem, not just a development board - means you will get number of Arduino development boards with variety of MCU's, IDE, compiler, programmer, code examples, code libraries and more. 
The concept of Arduino is to provide opensource hardware and software - this means free to copy hardware and free to use software with probably General public licensing (GPL)

There are plenty of tutorials you can google to learn Arduino development, but still for simplicity i will list out the points here.
  1. You may purchase a Arduino nano from a local market or online [click the image]
  2. You will also need a mini USB cable to connect the board to PC.
  3. Download the software from Arduino website.
  4. Install on your PC.
  5. Open the Arduino software from your start menu or from desktop icon.
  6. On the TAB at the top; click on Tools -> board -> select Arduino Nano
  7. On the TAB at the top; Click on Tools -> port -> the COM port to which Arduino is connected.
  8. On TAB at the top; click File  -> Examples -> Basics -> 1. Blink
  9. Click on the upload button - 
  10. See the LED blink, Save this program as "Save as" - do modification and enjoy programming.
  11. for complete reference 


 


No comments:

Post a Comment