24 April 2010

Goals and Philosophy

Microcontrollers have become ubiquitous in the tools and gadgets we use every day.  There are a lot of fun and useful things that can be done with them, but for those without a strong background in electronics and electrical engineering, approaching a microcontroller project can be daunting at best.  I'll be using TI's MSP430 in a physics research project for my Ph.D.  While I have some technical background and a good, basic understanding of electronics, I've found that the information available to me from which I can learn to use microcontrollers only come from one of two camps: very simple (and practically useless) with the expectation that you learn by reading and using other people's code, or detailed (and incomprehensible) with the expectation that you already know how to work with microcontrollers.  This blog was established to record what I learn as I stumble through the available information and discover how to do control systems in digital electronics.  Hopefully it will also help to fill in the gap between the two types of help currently available.

TI's MSP430

There are a number of different types of microcontrollers and microprocessors on the market right now, and knowing which one is "best" to use is difficult, even for experienced designers.  In my case, the selection was simple as I was told the hardware I need to design would be based on the MSP430.  However, in researching the various types of chips, from PICs to AVRs to ARMs, I can see a great deal of benefit from the MSP430 design when approached from the perspective of a scientist wishing to develop instrumentation to help with both hobby and professional experiments and research.
  • Low power.  AVR fans sometimes argue about whether the MSP430 or some AVR models are better, but regardless it cannot be denied that one thing the MSP430 does well is manage power.  Especially for remote sensing capabilities, low power draw is a major advantage.
  • C programming.  I prefer C in this setting myself, and find it comfortable.  Other MCUs can also be done in C, so this is not a unique feature to the MSP430, but a benefit nonetheless.
  • 16 bit processing.  A lot of research situations require computation done on measurements.  If the computation is to be done in the hardware, 16 bit processing is much nicer than the 8 bits available in other common, low-cost MCUs.  It also simplifies the operation of the chip to an extent.
  • Built in peripherals.  For the scientist, it helps to not have to worry about connecting and interfacing lots of different components.  Consolidating ADC, DAC, memory, clocks, timers, comparators, and other useful tools into one chip makes design simpler, more compact, and more robust.
  • Simpler architecture.  The MSP430 uses a von Neumann architecture, which is easier to understand than the Harvard architecture used in PIC and AVR.  While outside the black box this makes little difference, for the scientist it's simpler to understand, leading to better designs over all.
  • Flash memory.  This is a feature commonly found in most modern MCUs, but is regardless an important feature, namely for its reusability.  A laboratory can become quite cluttered with old instruments and scrounged tools.  Careful design of MCU devices can make them reusable in ways and places not originally intended, and reprogramming the chip is easy.
TI has published a booklet describing the MSP430, its features and uses, as well as the types of chips available.  This document can be found on TI's website (slab034u.pdf, last tested 25 Nov 2011).  TI also has a great deal of useful documentation, examples, and tips.  Most of these can be found in pdf format with a filename similar to the one linked above.  Whenever possible, I will cite the document filename with a link to make it clear where the information is coming from.

First Project

With a clear path established, it helps to also set some clear goals and targets.  This blog will not detail the specific use of the MSP430 in my research, but rather the experiments and tests I do in learning how to use this microcontroller.  Many of the projects will likely be geared toward learning to use particular features or understanding particular characteristics.  With that background established, I'll move on to more specific uses and designs as I find things to do with the chip that would be fun, educational, and useful.

Keeping all of that in mind, the current goal is to use the MSP430 in an instrument that makes a simple measurement periodically and transmits the data to a computer via USB, where it is logged for analysis.  For simplicity, I think I will do something that requires a single voltage measurement, and examine the life of a standard consumer battery.  Some topics I expect to cover in the near future include:
  • powering the MCU
  • interfacing to USB
  • interfacing to transducers
  • crystals and clocks
If some of these terms are unfamiliar, don't worry; I plan to explain each clearly as I come to the different topics in later posts.  Beyond this list, I expect to eventually look into LAN and wireless interfaces, radio transmission and reception of data (telemetry), low power modes, interrupts, JTAG, memory usage, LCD/VFD interfaces, PCB design, and GPS and other various transducers as I develop other side projects.  If I get ambitious, I may even look into more advanced designs using a 32 bit processor such as the ARM Cortex.  But that's very much getting ahead of myself.

If you've found this blog looking for help, I hope you'll find some of what you need here.  If you have experience with this type of work, I hope you'll comment, correct, or suggest whatever comes to your mind freely.  TI has put together a very nice and fairly inexpensive chip for us, and I think we'll find that it's an ideal environment for developing new scientific tools.


Anonymous said...

thanks for the blog, i guess it contains really useful information. I only guess, because i just started reading.

The link in the page that contains msp family product information is broken or changed.
Here is the new one;

jvangorp said...

Looks like TI restructured their web site URLs again - here is the new link to the MSP430 booklet:


kush said...

I wasnt able to find from the above two links what they wanted to show Please give me a link

Ashen Randika said...

The link for the pdf is not working anymore. Btw I found this http://www.arrownac.com/offers/texas-instruments/mcu/pdf/ValueLineProductGuide.pdf pdf when searching for above pdf.

David said...

Fixed; thanks!

Ashen Randika said...

Thanks David!