Jump to content
43oh

MSP430 capabilities


Recommended Posts

(Specifically MSP430FR5739)

 

Hii All,

 

Newb question here.

 

I have a project i'm working on which I have currently designed around the Parallax Propeller with which i'm familiar.

For this application it is very overkill and uses a ton of power (~30mA at the freq im running it at), but i'm familiar with it and its very fast/flexible to develop for.

 

This project is battery operated and at a point in its use will be powered by a supercap for some seconds. Obviously if I can reduce consumption in any area I should! The prop is ~60% of the consumption so reducing this to just a few % of total consumption would double the time the supercargo can hold it up. On top of that i can save some board space by removing an external EEPROM, ADC and crystal (?), which I am truly pressed for.

 

Before i get carried away, I am just wondering if an MSP device would be capable of the following, I have never used one but am pretty keen to give it a go IF the MSP will work for my application (using the right tools for the job and all).

If not, I guess ill use it for the next project :)

 

Every 2.5ms (loop freq is 400Hz) I need to do the following:

 

-Read 3 i2c sensors, combined 36 bytes data plus overhead (addr, cmd, ack etc)

-Read 5x ADC inputs

-Perform some fixed point math. Say 10 mult/div and 2 Sin/Cos plus a few dozen addition/subtraction

-Write 256 bytes to SPI Dataflash

-Send 64 bytes over UART (RN-42 bluetooth)

-Perform some basic if/then logic, mostly if statements (about 40 of them).

-Toggle a few outputs

 

My main points of concern are the math and secondly the i2c/SPI routines and the time they will take...

 

Now this might be well within the capabilities of the MSP430, in which case just laugh at me and say 'what a stupid question', but i've always been taught there are no stupid questions ;)

 

I also need to write to SD (FAT16, human readable txt file), but this happens after the main task has been performed so is not time critical and all the other tasks will have stopped.

 
Link to post
Share on other sites

2.5ms is a long time, even at 1MHz, much less at 16 to 25MHz.

 

There are probably a bunch of the MSP products that could do this. Without knowing more about the math, can't say for sure. I think you will want a device with hardware mult/div unless the arithmetic is all done with constants. Most of the devices provide support for the communication.

 

What precision for the sine and cosine? Is the arithmetic using fixed constants or arbitrary values? What precision do you need for the ADC, as this is a big part in determining the power and time required. at 2000 samples per sec, you will not be pushing even the value lineMSP430  products.

 

The logic isn't likely to be deciding factor in speed, presuming that the data are available and basic types (ints, bytes, boolean values etc).

 

Writing to an SD card is also not a big deal. There are card devices available and toolchains to help. I haven't dealt with this, but a quick search of the forums will find a number of threads.

Link to post
Share on other sites

Hi!

 

Thanks for the info :) that will come in useful for another project I'm thinking of :)

For this application, even using no power saving tricks the MSP will be low enough :) I'm more concerned about whether or can so all the required tasks in the time allowed.

 

Sent from my GT-I9300 using Tapatalk

 

 

Link to post
Share on other sites

Sorry Enl, forgot to answer your questions! The majority of the math will be determining accurate vertical altitude and velocity from one axis of a 3 axis accelerometer, adjusted for tilt using data from a 3 axis gyro. I will also be calculating barometric altitude using data from a pressure sensor. (This project is a rocket altimeter) which I believe uses log...

 

With this in mind id like to be as precise as possible.

 

The adc readings are only for battery voltage and a few minor checks on various parts of the circuit so do not need to be as accurate.

 

At some point I hope to implement a kalman filter on the acceleration data but will leave that until ive proven the basic hardware works.

 

Sent from my GT-I9300 using Tapatalk

 

Link to post
Share on other sites

Hi Graham,

 

If altitude had a linear relationship to the barometer output, then no I wouldn't. Unfortunately I need to know actual altitude for a few flight events so it needs to be calculated in real time.

 

Edit.

I should note that the main altitude measurements will be done by the barometer, the inertial calculations will be secondary but I will be combining the results in certain cases.

Sent from my GT-I9300 using Tapatalk

 

Link to post
Share on other sites

If you're going to go from Propeller to MSP430, then I recommend using the 5-series.  There's a Launchpad 5529, which is overkill, but it's cheap and easy.

 

Alternatively, there are lots and lots of Cortex M parts now.  ARM Cortex M is like the Borg -- ultimately, resistance is futile.

Link to post
Share on other sites

I have planned on using the FR5739 which looks nice. I also considered a few cortex parts (ST parts mainly) but got lost when trying to find nice learning resources. Ultimately I turned to the MSP as they can operate with just a few capacitors and be happy and I love the integration. If the borg army also runs on minimal components I will reconsider them due to their strength in the math department, but as I say, I got lost searching :)

 

Sent from my GT-I9300 using Tapatalk

 

Link to post
Share on other sites

I might not expect the MSP430 to run off "a few capacitors" if its DCO is spinning at full speed nonstop doing math calculations.  It won't be too bad though.

 

Tiva-C ARM Cortex-M4F (a powerhouse for math stuff, in TI MCU land anyhow) draws I think ~45-50mA @ 3.3V when crunching numbers at 80MHz, for reference.  MSP430G2553 in active-mode @ 16MHz all the time draws around 4mA @ 3.3V I believe.  Tiva has native floating point hardware though, MSP430 would have to use lengthy software-simulation to simulate floating point operations (compiler provides these automatically).

 

It would probably be a good idea to have a switching boost converter to produce a clean 3.3V output for all the components in question, too, so you get maximal use out of the supercap (& some of the other components may require a >=2.7V level to work properly for all we know).  I've had good luck with the TI TPS61221, but I've not used it with a supercap yet (should work great though).

Link to post
Share on other sites

Hi Spirilis,

 

What I meant by 'operate with just a few capacitors' was I don't need an external EEPROM (like the Prop) or a crystal (with the obvious tradeoffs), just a few decoudpling capacitors and it will run quite nicely...well at least I assume so from what ive read! 

 

Hardware FP is nice, but at 40mA I might as well go back to the propeller.

 

Is there a way I can estimate the time required for certain calculations in CCS?

 

Regarding the power supply. The power supply ive planned is a 3.3v, 250mA LDO supplied by a 9V battery or 3.7V LiPo usually. 

The highest minimum voltage of the sensors I am using is 2.7V (dataflash memory), everything else is happy around 1.8V to 2.4V minimum.

 

I am REALLY stuck for board space, and using this 3pin SOT-23A with 2 external capacitors (plus the super cap) is about the smallest I can find, and about the largest I can fit!

If im reading you right, you're suggesting adding the DC-DC converter after my main power stage? If so, i'm afraid I wont have room for that :( I was hoping the LDO and external caps would keep the power clean enough...

 

If you know of a DC-DC converter which would be equally as compact as my LDO that would be fantastic as I prefer them over LDO's!

Link to post
Share on other sites

Oh yeah if you're always powering it from an LDO off a higher voltage source then that's fine.  The boost converter I mentioned, TPS61221, is actually pretty small, takes a small SMD inductor and decoupling caps and that's it... but the combination of pieces might not be "compact" enough for your tiny board.  It can accept up to 5.5V and regulate it down (or go as low as 0.7V while running, and regulate it up) to 3.3Vout.  I think it's generally spec'd at up to ~150-200mA but I use it in applications <100mA.  Low quiescent current too.

 

The IC itself is pretty thin, with 6 pins at 0.65mm spacing, package 2mm-by-2mm, really similar to a SOT-23 type of device (in fact TI's website refers to its package as a "SOT" type), but you need that inductor with 400+mA saturation current.  I use a 650mA rated inductor, and I think it fits in a 1210 size footprint.  Then add the input & output decoupling caps.  Still not bad though.

Anyway, link to that chip: http://www.ti.com/product/tps61221

Link to post
Share on other sites

I have planned on using the FR5739 which looks nice.

Relatively slow, but it sleeps at very low power and there's of course the FRAM.  You don't really have a lot of math to do, and certainly the trig can be table driven, so it should be OK.  That said, I bet you'll find that a low-power CM3 actually uses less power than the MSP does for this application, because there isn't much sleeping.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...