Jump to content
roadrunner84

[43oh_101] Low power

Recommended Posts

In this topic we've been brainstorming about doing video tutorials for the 43oh community. One topic brought up was low power programming. In this post I'd like to invite you all to submit questions for the video tutorial about low power.

 

Some pointers:

  • Try to formulate your question in a general way, so it can be part of a tutorial.
  • Try to avoid submitting a question that has been submitted already (you might like a post to underline its importance).
  • Avoid answering questions to specific problems, instead ask the question in a separate topic; this topic is specifically to gather questions for the video tutorial.

I'll be focusing on the Launchpad G2 (so the MSP430G2553 controller), so no high end processors or Tivas.

I'll be using Energia all over, but I'll use it mainly as a simple GCC IDE, which it is perfectly capable of. This saves newbies the trouble of installing CCS, IAR or Eclipse+GCC.

 

I hope I set the angle right this way to start helping folks get a better grasp of low power. Fire away :smile:

Share this post


Link to post
Share on other sites

One question I have been wondering about and would like to see presented:

 

What can be (and what cannot be) done in each power mode, using general terms?

 

I have reviewed TI's info about power modes, but they pretty much use acronyms. For those of us who do not ALREADY know the meaning and significance of these acronyms, their explanation of power modes is about as clear as Mississippi River mud. Trying to look-up and then assimilate the acronyms when I am already focused on trying to do something specific - well, it just hasn't worked out for me. Too much cross-reference chasing (usually a minimum of 3 PDF files, each in excess of 50 pages) has been the barrier to my comprehension of low power modes. I have not found any general material regarding low power modes that brings it all together in one place.

 

If my question would be better understood by including a bit of context, I'll pose one example scenario:

 

I have an LASER beam (not powered by the MCU) directed at a receiving sensor. If and when the beam is interrupted, I would like an actuator to be triggered. While the beam is intact, there isn't much for the MCU to do, and shouldn't need to be in a fully awake state. What would be the lowest power mode for the MCU to recognize an interruption to the LASER beam at the sensor? What would be the lowest power mode for the MCU to send a trigger signal to the actuator? If I wanted to log the event to non-volatile RAM, what is the lowest power mode that allows the MCU to perform the write? For this scenario, assume that the LASER is powered independent of the MCU and focused on a passive IR receiver which outputs a varying voltage into an analog pin on the MCU to sense the presence or absence of the beam - assume that the actuator is a 9g micro-servo powered independent of the MCU - assume that the non-volatile RAM is MCU onboard.

 

Being able to determine what can be done in each power mode vs what can not be done - well, then I would be able to switch to the appropriate power mode required while using the least amount of battery.

Share this post


Link to post
Share on other sites

In my experience, most people simply do not know enough about designing low power systems with MCUs in order to ask intelligent questions.  If you want to do a tutorial on designing low power systems you should start with first principles and work from there.

 

Another option is to start with a "typical" circuit and keep re-working it to reduce power consumption.  There is an excellent video on how to do with with the AVR, and I am really surprised that nobody has ever done something similar with the MSP430.

Share this post


Link to post
Share on other sites

Great thread! By the way, have you checked out the ULP Advisor wiki? It might be a good starting point for beginners. The wiki references a software tool that comes with CCS/IAR/gcc, but the wiki by itself is a knowledge portal that covers the fundamental low power software techniques on MSP430.  The SW tool just helps you automatically check for non low-power practice in the code.

Share this post


Link to post
Share on other sites

Everything the ULP Advisor checks for should be completely obvious.  If you don't understand why you shouldn't be using anything the ULP advisor checks for you are in need of some pretty basic education.  It doesn't even begin to touch proper low power design.

Share this post


Link to post
Share on other sites

The ULP is built into TI's C compiler, cl430.

 

Seriously, read up the the cases ULP is capable of detecting (it isn't many) and learn how to code properly.

Perhaps you'd be interested in doing a [43oh_101] topic?

Share this post


Link to post
Share on other sites

Guys, thank you for the tips and pointers. But I want to underline once again that this topic is meant to gather questions to build a video tutorial upon, not to start a discussion about low power!

If you feel the need to discuss low power, reply in a topic about how to approach it or start a new topic. I don't want those interested in low power to be baffled by some (sorry to be rough) know-it-all that states you should start out with the basic knowledge or wisdom, because that's exactly what the result (but the starting point) of this topic should be.

Share this post


Link to post
Share on other sites

i'm looking forward to this.  I think it's a great idea.

I think just covering the basic stuff will take you some time.  unused pin termination, clock selection, interrupt strategy.

would also be nice to see the results.  if you could put an o-scope on a shunt resistor it would be worth 1000 words.

Share this post


Link to post
Share on other sites

There was a neat video from AVR, I think, which I can't seem to find now where the guy ran it from a super-cap and had it count up over UART. The first time it only got to about 8 before running out of power but he then adds different tweaks like turning off outputs and using low-power modes and shows how far it gets each time. At the end it was over 200 IIRC. Something like that could be really neat if you went into as much detail as possible.

Share this post


Link to post
Share on other sites

Hey people, this Friday (Dec 6th) this topic will be opened for two weeks. I think I'll put a (not so strict) submission stop on posts here then. Anyone who wants a certain topic covered should mention so before then, so I can start compiling a sketch-up for the 43oh 101 video on low power then.

So far these topics have been named and shall be (directly or implied) be included in the video:

  • Using Energia with low-power on the Launchpad G2.
  • Using Energia's GCC back-end compiler with low-power; reclaiming the watchdog timer from Energia.
  • Acronyms and terms used by TI for low-power modes.
  • Hinting on approaching low-power as @@vicvelcro asked; "what can and cannot be done in which low-power modes?"
  • Thinking in low-power; low-power design strategies.
  • Maybe a quick glance on the ULP advisor.
  • A summary on how to use low-power modes.

You'll be using these things for the tutorial

  1. A Launchpad G2 rev.1.5, including USB cable
  2. The MSP430G2553 that came with the Launchpad
  3. The MSP430G2452 that came with the Launchpad
  4. Energia (vesion 0101E0010)
  5. You may use any measurement equipment you like

Share this post


Link to post
Share on other sites

If you can squeeze this into the video:

 

What is gained or lost by using the 32KHz crystal or a Real Time Clock? Are the lowest power modes only available if they are NOT present?

 

I am under the impression that the internal oscillator applies to all of the power modes. I do not know if the crystal or an RTC have anything to do with how LPM works. It that can be covered, even vaguely, it would be helpful knowledge.

Share this post


Link to post
Share on other sites

 

Hey people, this Friday (Dec 6th) this topic will be opened for two weeks. I think I'll put a (not so strict) submission stop on posts here then. Anyone who wants a certain topic covered should mention so before then, so I can start compiling a sketch-up for the 43oh 101 video on low power then.

So far these topics have been named and shall be (directly or implied) be included in the video:

  • Using Energia with low-power on the Launchpad G2.
  • Using Energia's GCC back-end compiler with low-power; reclaiming the watchdog timer from Energia.
  • Acronyms and terms used by TI for low-power modes.
  • Hinting on approaching low-power as @@vicvelcro asked;
    • What can and cannot be done in which low-power modes?
    • When to use an external 32kiHz crystal or RTC?
  • Thinking in low-power; low-power design strategies.
  • Maybe a quick glance on the ULP advisor.
  • A summary on how to use low-power modes.

You'll be using these things for the tutorial

  1. A Launchpad G2 rev.1.5, including USB cable
  2. The MSP430G2553 that came with the Launchpad
  3. The MSP430G2452 that came with the Launchpad
  4. Energia (vesion 0101E0010)
  5. You may use any measurement equipment you like (I'll be using a single DMM)

It's Friday, any questions pending should be asked now, I'll start fiddling with a little code and prepare a lesson overview.

My target is to fit all in one youtube video (10 minutes), but I might need to split it in two parts.

If anyone wants to make a nice "splash screen", be welcome, my design skills are awful. (I was thinking the 43oh silkscreen design appearing to be milled onto the screen, and then 0b00000101 written in some digitalish font beneath that)

post-29838-0-62630600-1387554960_thumb.png How do you like this? Then below I'd display a two line LCD with the subject on it. Maybe the educational booster? :)

post-29838-0-62630600-1387554960_thumb.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×