Newbie looking for advice

ctoczycki wrote on Wednesday, January 30, 2008:

I am interested in using FreeRTOS to develop a control panel prototype and had some questions.  I am new to embedded systems but have a software development background.   I am seeking a recommendation for a target controller platform to pursue.  The device I wish to develop requires 25 inputs (momentary buttons), 2 (LCD) clock displays, 40 individual LED’s , and audio capabilities to play and record via a microphone.  In addition to space for application logic, the application requires about 500KB of non-volatile RAM – used primarily to store audio files.

I realize that a prototyping board is not likely to have all of these interfaces but I want to start with a platform that has the ability to support my needs.

The application is a control panel that I have prototyped in Visual Basic and now I am considering FreeRTOS    My goal is to ultimately make it a free-standing battery driven device, so power consumption is also of concern.

Could you provide a recommendation for a target controller platform?  If you have multiple recommendations could you comment on some pros and cons?

Do the supported RTOS controllers include suitable platforms that could be used to develop a low-cost consumer device?

Do you have any other suggestions?

Thank you for your assistance,

Chris T

davedoors wrote on Thursday, January 31, 2008:

Until you mentioned the power consumption I was thinking maybe a cheap PC based system like a PC/104.

If you can use a matrix for the keys then you only need 3 or 4 inputs and 3 or 4 outputs to be able to scan all 40 values. Also you could use I2C IO extenders for the inputs and the LED’s, so I think you should concentrate on the microphone and speaker as your main requirement as the rest can fit around that.

I think the ARM9 and STM32 dev boards used by the demos have microphone inputs even though the demo does not use them. The STM32 might be a good choice considering the power consumption.

ben_fnr wrote on Thursday, January 31, 2008:

You are not very specific on some very important questions.

Firstly how are you storing the audio ? compressed ? sampling frequency ? If you are currently running your code on a PC you don’t have to worry about performance, but it will probably be an issue if you are compressing data, less so for decompressing.
You mention a microphone for input, but nothing about output ? Do you need to drive an external DAC ?

The I/O is not so much of a problem, for the keys you need at least 11 I/O pins (5x6 array) to digitally scan the keys. Alternatively you could use resistor chains connected to 1 or more ADC channels. This method would make it harder to work out multiple key presses, but would use less I/O

LED output again is simple, you can daisy chain some simple TTL shift registers and get as many bits as you like for about 4 I/O

As for the LCD displays, well that would depend on what type of displays you are using, most have 4bit,8bit & serial interfaces.

For external memory you have a choice. Does it need to be RAM ? have you thought about using an SD Card ? Ok you will run into the flash write limit at some point, but how often are you writing data ? Alternatively you could use some FRAM, these come with parallel and serial interfaces but I don’t think they are particularly cheap.

You need to sit down and try and work out some of the following before you start looking for a devboard/processor.

the amount of flash (code space)
the amount of ram required (for running code)
the amount of I/O and type required.

if you want it to run from battery, what sort of usage are you going to get ? will it be sitting idle most of the time or running. you will need to look at the power consumptions figures for the various chips. Be aware that some of the low power modes of these chips will have limitations in waking up.

Possibly the hardest will be working out how much processing power you need and if a processor is going to be fast enough. Most of the small ARM7/9/Cortex cores run at similar speeds.

When looking for a dev board, you probably won’t find one with everything you need so look for one with as much of the I/O as accessible as possible. Cost will also be an issue if you are on a tight budget, many dev kits are not cheap, then you also need to think about compilers( GCC is free and alot of the other ones do limited versions which may get you started, but you will probably need a full version which can be expensive) You will probably also need JTAG interface.

If you want to try something quickly and cheaply Luminary Micros do some very cheap dev boards with inbuilt JTAG interfaces. I have just got their CAN demo kit, which consists of 2 separate boards, one running at 25Mhz, with a couple of switches and a larger board with a 50Mhz processor and 128x64 pixel OLED display. Both boards have most of the I/O available, all for just 41 GBP which I thought was a very good deal, just need to find some time to play around with it.

Which ever processor you are thinking of using, I would suggest that you spend some time looking at the appropriate forums and see what level of support is offered and how many problems people have. Most of these chips have some problems in one form or another which may impact your design.



ctoczycki wrote on Friday, February 01, 2008:

Thank you for the help.  Here are some more specifics.

In total, the device needs the capacity to record and store a total of 1 minute of spoken audio - 10,000 samples per sec x 8 bit should be sufficient.  Additionally, there would be about 2 minutes of higher quality sounds (15,000 samples per second) that would be pre-loaded.  These could be compressed in advance.

Yes, a DAC (and amplifier?) would be required to playback the sounds.

2 x 8 bit LCD displays would be used.  One would display the current time.

Writes to flash would be infrequent - to store user settings (including the audio).  External memory sounds appealing since it may allow use of a lower-end processor.

I don’t know how much space the code will take.  Right now, the application is about 1,500 lines of VBA (basically a couple of event loops) and about 1K for application memory.  This doesn’t include the sound processing support.  The device has a couple of modes so perhaps the code for each mode can be transfered from external flash when it is needed.  The time to change modes should be under one second.

Regarding power consumption, I expect the device to be just displaying the current time w/o seconds in the first LCD for about 50% of the time.  The other 50% will have the second LCD refreshed every second, 2 LED’s on and 10 second audio played every 30 minutes.  The device would need to respond to a user input at all times.  I’m not sure to what extent a low power mode could be used.

Regarding processing power, the audio compression would be the most consuming but perhaps memory can be used instead.  This application is basically an event loop that monitors conditions and displays a few lights.  The current time is also used in the application.

My budget for prototyping this is under $1,000 US and I want to target something that would be close to a production solution so that I may also get a sense for the issues and cost of the target hardware.  I’m looking for a good starting point - perhaps these additional specifics may help.

Your assistance is greatly appreciated.

minimorph_com wrote on Tuesday, February 05, 2008:

Well I would look at something like this :-

If that is too thirsty on power then like others have said STM32 maybe with an SPI DAC for the audio and MicroSD card for storage.

Compression do not seem worth it at the bit rates/ storage times you are talking about.

Good Luck.