Help pick best microcontroller for project

Thread Starter

scheban

Joined Oct 14, 2012
12
Hi, I am very new to working with microcontrollers. I need advice on a best microcontroller to use for my project.

I am trying to work on a medical device that will have a few sensors (force sensor, accelerometer, flexion sensor) and you would pull data from them 50 times a second. The data will then be displayed in a form of a graph on a WIRELESS display. You will also need to set some parameters using the touchscreen diplay. Hopefully this will give you enough info on the project. I am trying to stay away from Assembly though :) Basically I am just looking for any advice on picking the best microcontroller for the project. Any help is appreciated
 

takao21203

Joined Apr 28, 2012
3,702
Hi, I am very new to working with microcontrollers. I need advice on a best microcontroller to use for my project.

I am trying to work on a medical device that will have a few sensors (force sensor, accelerometer, flexion sensor) and you would pull data from them 50 times a second. The data will then be displayed in a form of a graph on a WIRELESS display. You will also need to set some parameters using the touchscreen diplay. Hopefully this will give you enough info on the project. I am trying to stay away from Assembly though :) Basically I am just looking for any advice on picking the best microcontroller for the project. Any help is appreciated
For touchscreen (usually a small color TFT), the 24F PIC microcontroller class is appreciate. They have sufficient integrated Flash memory to contain bitmaps. There might be some appnotes on the microchip website.

There are other controller brands as well.

How you plan to implement the wireless interface? Do you hope for a controller with integrated wireless functionality? Or do you use a module?
 

John P

Joined Oct 14, 2008
2,026
My favorite processor right now is the PIC16F690 and it could do all of that, though if there's a need to store a lot of graphical data, there might be a lack of memory. You can get free compilers that are good enough for simple projects, so there's no need to wallow around in assembly.
 

takao21203

Joined Apr 28, 2012
3,702
My favorite processor right now is the PIC16F690 and it could do all of that, though if there's a need to store a lot of graphical data, there might be a lack of memory. You can get free compilers that are good enough for simple projects, so there's no need to wallow around in assembly.
Might be too small if you deal with float point. Yes you can work a small color TFT using an 18F, but even that has it's limits. Many TFTs have 16-bit interface, tough some have serial interface.

If you have to deal with 16bit data, it is a good idea to use a 16bit MCU. Otherwise, code size will increase considerably.
 

John P

Joined Oct 14, 2008
2,026
You are right. If the information to be processed involves math that can't be faked with some kind of trick, it may be better to use a more powerful processor. But if the need is to prepare data to display for human eyes, maybe there's time to do the math between updates.
 

Thread Starter

scheban

Joined Oct 14, 2012
12
For touchscreen (usually a small color TFT), the 24F PIC microcontroller class is appreciate. They have sufficient integrated Flash memory to contain bitmaps. There might be some appnotes on the microchip website.

There are other controller brands as well.

How you plan to implement the wireless interface? Do you hope for a controller with integrated wireless functionality? Or do you use a module?
I was looking at something that is integrated into the controller, just because I think it would be easier, but I don't really know much about that. I was looking at some TI MSP430's to use with the ZigBee protocol/standard. What do you think?
 

Thread Starter

scheban

Joined Oct 14, 2012
12
For touchscreen (usually a small color TFT), the 24F PIC microcontroller class is appreciate. They have sufficient integrated Flash memory to contain bitmaps. There might be some appnotes on the microchip website.

There are other controller brands as well.

How you plan to implement the wireless interface? Do you hope for a controller with integrated wireless functionality? Or do you use a module?
I was thinking about MSP430F5438A?
 

takao21203

Joined Apr 28, 2012
3,702
I was looking at something that is integrated into the controller, just because I think it would be easier, but I don't really know much about that. I was looking at some TI MSP430's to use with the ZigBee protocol/standard. What do you think?
Hmm. From my experience using small TFT displays, you need at least:

16K FLASH
2K RAM (considering you also use some pheripherals)
16 MHz

Initialization for these TFT is lengthy so this already takes 1K or so, plus the code to do primitive graphics plus fonts, consider 4K to 6K for that, and only for very small TFTs. You can also use external serial FLASH for the data.

For the TI MCUs, memory requirements might be a bit different, also depends if you use any bitmaps at all, or if you use parallel/serial TFT.

But I would say 16K is the minimum.

As for I/O I recommend at least 44 pins (TQFP44), more if you want to use a parallel TFT.

Actually I have looked at the TI website. As for the RF controllers, there are chips with 8K, 16K and 32K Flash, as well 2K or 4K RAM. But this correlation is random.

Don't take the 8K chip, this might not be enough if you use a TFT display.

Do you have used TFTs before? The one's I bought from eBay have some C examples provided, not for PIC, but it was not difficult to adapt it.

If you want to use small bitmaps via serial FLASH, you need a FLASH programmer as well (most GAL programmers can do this, but not all FLASH brands). It is at least the easiest way to program these serial FLASH chips.

Some people alternatively create long data tables as C source codes (this is OK for really small bitmaps).

This TI chip can be programmed for different RF frequencies but it is not clear to me how and/or if it can support the ZigBee standard. If for instance a RF stack exists for that, maybe provided by TI. Sorry I can't give advice for that, never used TI chips and/or RF wireless.
 

takao21203

Joined Apr 28, 2012
3,702
I was thinking about MSP430F5438A?
Hmm. I looked at the CC430F514X datasheet. This is the product line that contains an RF module. The MSP430F5438 does NOT contain a RF module as far as I understand. And it has 100 pins as well rather large FLASH memory.

The CC439F514X has much smaller FLASH, 64 pins only, and much smaller RAM. Depends on the size of the TFT, and the size of the RF communications stack you intend to use.

I did not yet find time to see if such a communications stack exists on the TI website but it is not unlikely.

Depending on the code you want to implement maybe you need more FLASH than 16K...
 

Attachments

takao21203

Joined Apr 28, 2012
3,702
So, reading the original post again, you want to build a two-controller system, one MCU for the sensors, having a small display to adjust some settings, and the second MCU receiving data via wireless link, and displaying them on a larger display?

Or do you want to adjust settings via wireless as well?

Maybe the base station is connected to a PC via USB.

This is really not entirely clear.

Maybe draw a symbolic schematic (not individual I/O pins).
 

Thread Starter

scheban

Joined Oct 14, 2012
12
So, reading the original post again, you want to build a two-controller system, one MCU for the sensors, having a small display to adjust some settings, and the second MCU receiving data via wireless link, and displaying them on a larger display?

Or do you want to adjust settings via wireless as well?

Maybe the base station is connected to a PC via USB.

This is really not entirely clear.

Maybe draw a symbolic schematic (not individual I/O pins).
I will only have one wireless display (minimum 4 inches). I am planning on adjusting some settings on the wireless display as well. There will be no PC involved. Hope this helps.
 

Thread Starter

scheban

Joined Oct 14, 2012
12

Thread Starter

scheban

Joined Oct 14, 2012
12
Hmm. From my experience using small TFT displays, you need at least:

16K FLASH
2K RAM (considering you also use some pheripherals)
16 MHz

Initialization for these TFT is lengthy so this already takes 1K or so, plus the code to do primitive graphics plus fonts, consider 4K to 6K for that, and only for very small TFTs. You can also use external serial FLASH for the data.

For the TI MCUs, memory requirements might be a bit different, also depends if you use any bitmaps at all, or if you use parallel/serial TFT.

But I would say 16K is the minimum.

As for I/O I recommend at least 44 pins (TQFP44), more if you want to use a parallel TFT.

Actually I have looked at the TI website. As for the RF controllers, there are chips with 8K, 16K and 32K Flash, as well 2K or 4K RAM. But this correlation is random.

Don't take the 8K chip, this might not be enough if you use a TFT display.

Do you have used TFTs before? The one's I bought from eBay have some C examples provided, not for PIC, but it was not difficult to adapt it.

If you want to use small bitmaps via serial FLASH, you need a FLASH programmer as well (most GAL programmers can do this, but not all FLASH brands). It is at least the easiest way to program these serial FLASH chips.

Some people alternatively create long data tables as C source codes (this is OK for really small bitmaps).

This TI chip can be programmed for different RF frequencies but it is not clear to me how and/or if it can support the ZigBee standard. If for instance a RF stack exists for that, maybe provided by TI. Sorry I can't give advice for that, never used TI chips and/or RF wireless.
What do you think about this TFT display?
http://www.ebay.com/itm/4-3-TFT-LCD...734?pt=LH_DefaultDomain_0&hash=item2eafe66d86
 

takao21203

Joined Apr 28, 2012
3,702
Hmm this is a larger TFT. These have 16bit interface.
If you intend to use bitmaps, you need much larger FLASH than 16K.

So the MCU you mentioned of course can be used!
It is a 100pin TQFP if I remember right.
You might be able to implement it with a smaller chip.

As I understand now, the sensors will use a MCU with integrated RF module, and no display. So you don't need a large chip.

The display PCB will contain the TFT, and a RF receiver!

Displays from this vendor include C sample code, however I don't think written for the TI MCU. You need to adapt it (that is not so difficult). The C source for display initialization is included.

So the next question is how will you receive the data from the sensor PCB?

The controller with integrated RF module that I mentioned is a little small for such a large display! So maybe, you need to use 3 MCUs after all.

Microchip also has controllers with integrated RF. They are a little smaller I think. So you could use 2 of these just for the RF transmission, and the TI MCU to prepare the data for the TFT display.

If you want to use the smaller RF controller also directly for the display, you can only use text, or you need to store bitmaps in external serial FLASH chip.

I don't know how many kBytes the RF stack will require. You need to figure out about that.

It's of course desireable only to use 2 controllers, not 3. Depends on the complexity of the menu, and how you want to display the data.

For the low voltage power supply, often dc/dc converter chips are used.
There is for instance the MCP1640 which is a very small SOT23 chip, which can work from one or two AA cells.

And for instance the older MC34063, which can be used for instance to step down from 5V (electronic transformer) to lower voltages. I have some experience with such DC/DC circuits.

You also need filtering for some kind of circuits, that's in many case done with just another additional coil.
 

John P

Joined Oct 14, 2008
2,026
Impressive display for the money. It doesn't seem as if there's any need to keep an off-board screen memory; you can calculate and load data to it as you need to. Whether a small processor can do that depends a lot on how complex the graphics are. Just creating axes for a graph and drawing the curve, with a small amount of text, doesn't seem too bad.
 

takao21203

Joined Apr 28, 2012
3,702
Impressive display for the money. It doesn't seem as if there's any need to keep an off-board screen memory; you can calculate and load data to it as you need to. Whether a small processor can do that depends a lot on how complex the graphics are. Just creating axes for a graph and drawing the curve, with a small amount of text, doesn't seem too bad.
A medical device very likely includes a company logo, and some medical symbols. This is not totally required for functionality but pretty standard if you use these types of displays.

There are ready-made .jpg code libraries, these are usually sold for a few 100 $. I don't know if they are available for the TI430 MCUs. Otherwise, you can use .BMP as well, just takes a lot more memory.

The MSP430F5438 can create a graph easily. The requirement is 50 updates per seconds however you won't see much difference beyond 25 updates (on the TFT) per second. Some MCUs have graphical libraries available already but usually you need to adapt them to a particular display.

For primitive graphics, you can code them yourself, using the information (and examples) that are supplied together with the display.

I think OP is looking for some advice about MCUs with integrated RF however this is a relatively new technology.

I have used/programmed smaller TFT some months ago, together with serial FLASH. I coded most of the graphics functions myself. Font data was supplied already.
 

Thread Starter

scheban

Joined Oct 14, 2012
12
Hmm this is a larger TFT. These have 16bit interface.
If you intend to use bitmaps, you need much larger FLASH than 16K.

So the MCU you mentioned of course can be used!
It is a 100pin TQFP if I remember right.
You might be able to implement it with a smaller chip.

As I understand now, the sensors will use a MCU with integrated RF module, and no display. So you don't need a large chip.

The display PCB will contain the TFT, and a RF receiver!

Displays from this vendor include C sample code, however I don't think written for the TI MCU. You need to adapt it (that is not so difficult). The C source for display initialization is included.

So the next question is how will you receive the data from the sensor PCB?

The controller with integrated RF module that I mentioned is a little small for such a large display! So maybe, you need to use 3 MCUs after all.

Microchip also has controllers with integrated RF. They are a little smaller I think. So you could use 2 of these just for the RF transmission, and the TI MCU to prepare the data for the TFT display.

If you want to use the smaller RF controller also directly for the display, you can only use text, or you need to store bitmaps in external serial FLASH chip.

I don't know how many kBytes the RF stack will require. You need to figure out about that.

It's of course desireable only to use 2 controllers, not 3. Depends on the complexity of the menu, and how you want to display the data.

For the low voltage power supply, often dc/dc converter chips are used.
There is for instance the MCP1640 which is a very small SOT23 chip, which can work from one or two AA cells.

And for instance the older MC34063, which can be used for instance to step down from 5V (electronic transformer) to lower voltages. I have some experience with such DC/DC circuits.

You also need filtering for some kind of circuits, that's in many case done with just another additional coil.
Thanks for your detailed responses, it does help a lot. Do you have any recommendations for another MCU other then the TI MCU that I mentioned that has an integrated RF module? I am really new at this and would like to make this as simple as possible from the hardware point and software/coding as well and of course keep the cost as low as possible (so less controllers is optimal). The menu on the screen will be something simple and maybe even completely removed, not sure on this one yet. When It comes to the graphics I wont have any logos, just the graphs from the sensors.
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
Thanks for your detailed responses, it does help a lot. Do you have any recommendations for another MCU other then the TI MCU that I mentioned that has an integrated RF module? I am really new at this and would like to make this as simple as possible from the hardware point and software/coding as well and of course keep the cost as low as possible (so less controllers is optimal). The menu on the screen will be something simple and maybe even completely removed, not sure on this one yet. When It comes to the graphics I wont have any logos, just the graphs from the sensors.
Easy. I use PIC Micro's for a number of years. I have flashed at least 100+ chips. Mostly 16F, recently also 18F.

Look up the Wireless sections on the Microchip website: http://www.microchip.com/
Products, and Applications/Markets

Among other things, maybe take a look at this RF transceiver module:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en535967

The PICs with integrated RF are rather small in terms of program memory.

These modules have 4-wire SPI interface. You could use it together with a smaller PIC on the sensor board, and together with ANY MCU on the display board.

Using .BMP files is not difficult, neither you'd require a large amount of source code. However what I have programmed is based on .BMPs that are 8-bit only. They are then remapped to a 16-bit palette.

What are the details for the sensors? It is required to know this for an estimate how much codespace you need.

Have you previously used any kind of IDE to program microcontrollers?

When you write "less controllers", sometimes it can make sense to use 2 smaller controllers, rather than one large chip. It depends for instance how much I/O you need for the sensors. The large TFT you mention has 16bit I/O, so it needs 16 I/O lines + control I/O. You would need at least a 64pin chip for that. Smaller TFTs sometimes have serial interface. But then it is difficult to update the TFT with fullspeed framerate.

If the TI 430 controllers are easy to use for you, why not use one for the TFT! If you just want a graph and only small graphics or no graphics at all, you can use an 18F chip instead of 24F. You can use MPLABX IDE for that.

Do you have any programming experience with SPI interface? Or linking two controllers together? If not you could practice this using smaller PIC controllers. I find them pretty easy to use. Some people use developement boards, it is also possible to build circuits using blank chips. The ICSP programming interface is the same.

Maybe the 100-pin TI 430 chip is overdimensionated. I believe you only need a 64pin chip, and 16 or 32K Flash memory (for the TFT display/receiver board).

If you run into difficulties writing the C firmware, I could also answer concrete questions about that. Just I have not (yet) used RF myself.

When I buy components for new technology, I often buy different chips, and 3 to 5 pieces each, and then I start off and see what is the easiest chip to work with. So I would order maybe some RF modules, and some controllers with integrated RF as well.

I don't really know but I believe if you use a DC/DC chip with batteries, you need additional filtering or the RF modules may not work correctly. Same for the sensors, and the TFT. This is not difficult as such but you need some small, blank ring cores, and some magnet wire. I have experienced this already, added some turns magnet wire to some kind of cores I had around here, and it was solved (without any math involved). This was rather good luck, as magnetic properties can be very different.
 
Top