Thursday, November 25, 2010

What can a microcontroller do?

Well this is a BIG question. I will start with what I get them to do. First, I use an Arduino Mega to control my robot. It receives input from an ultrasonic sensor and then makes a decision whether or to turn the robot based on the distance to the nearest obstacle. Another thing I am using my microntrollers for is to build a control system for my OWI Edge Robot Arm. The microcontroller receives input from potentiometers on a control system mounted on a user's arm an then mirrors the user's arm position to the robot arm. I also use microcontrollers to drive random LED projects, I can have a cool pattern displaying on an LED matrix or bar graph in no time. 

Microcontrollers have many capabilities and can be used in many applications. There are some simple guidelines you should follow when deciding if a microcontroller is right for the job. You should use a microcontroller if your project:

  • Involves interfacing with the physical world
You should not use a microcontroller if your project:
  • Involves advanced peripherals like USB devices
  • Involves graphics or image processing
  • Requires a lot of memory
  • Requires a lot of CPU speed
If you find you need to interface with the physical word and need all the advanced things then you will need to use a combination of a computer and a microcontroller. This is how a lot of your computer works, instead of your main CPU controlling the rotation of your hard disk, moving the disk head, and reading the data off the disk, it simply sends a request for data to the microcontroller in your hard drive and it sends the data back. You can do this with your projects, you could have your microcontroller recognize commands from your computer and then move a servo. Likewise your computer could recognize data from your microcontroller, you could have your microcontroller send data it processes from a sensor like a accelerometer and the your program running on your computer could react by flipping the screen (iPhone!). 

So to conclude, use a microcontroller to interface the digital world to the physical world! Of course if you need a lot of advanced processing then add a computer! 

No comments:

Post a Comment