Sign in to follow this  
Followers 0
Tieri

RTOS or not, thats the question.

2 posts in this topic

Hi everybody.

 

I am in process of designing a sensor network that includes several independent sensors managed by USB dongle. This USB dongle receives the data from the sensors, stores it in memory and sends the processed data by request to USB CDC for the PC side software.

The PC software is used only to send configure data to the dongle and to log the sensor data to a Database so the USB dongle is required to operate mainly independently from the PC software.

 

ATM I am planing to use the msp430f5529 for the dongle. Wireless interface is handled by nRF24L01+ SPI module. (cheap, available and two way) I probably have to use some kind of external flash chip for the sensor data storage if there is not enough flash left on the chip. My sensor data consist of two to four unsigned characters per sensor per measurement, so the data requirements aren't huge. Measuring interval is about one hour (this is going to be user specified, but there is rarely any need to increase the measuring interval.).

 

In future I would like to be able to develop an independent device to manage and store the data from the sensor network. So making the dongle code modular so it is easy to convert to this purpose, would probably make sense.

 

As I have been coding the prototype the code is getting quite big. I can't help wondering if implementing some sort RTOS would ease my task. So all you experience designer here, if you could give some advice to a beginner, it would be very much appreciated.

Share this post


Link to post
Share on other sites

If you really want to learn an RTOS and you have no time restrictions then, absolutely, learn an RTOS.

 

I am contemplating learning TI-RTOS. Before I do, I will be counting the cost of climbing the learning curve and comparing it to the potential rewards of using it.

 

 

So, in my opinion, No, I don't thing you should use one because it's overkill. You have no real time reporting mandate and it will add unnecessary complexity to this design. 

 

If your data reporting rate is once an hour then you would be better served with an event or timer triggered state machine main loop. 

 

 

Figure out your list of must haves and might haves first. This is my sequence of thinking:

1. Data structures i.e.: what does the important data look like?

2. What is the reporting interval?

3. What is the storage requirements?

4. How fast does the F5529 have to be running at?

5. Do I have enough power to run everything?

6. Do I have enough RF range for the nRF24L01+ modules?

7. How many RF modules will I be talking to?

8. Do these data sources have to run on batteries?

9. How can I optimize resources in the entire system?

 

And, this list is just for the embedded electronics! 

 

The list will continue on and on as you answer questions because the answers will provoke more questions to be asked.

 

Create the biggest picture you can of your intended system then break it down into functional modules i.e.: PC collection functions and remote data generation. Then break down the modules down into functional parts i.e.: software, firmware and hardware.

bluehash likes this

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
Sign in to follow this  
Followers 0