Saturday, November 28, 2015

Non Contact Temperature Measurement using MLX90614         

               
                   IR thermography is the one of the concept ,that is used for monitoring temperature value without attach on the substance .So it is having more advantageous .By using MLX90614,we can monitoring oil, fruits and food temperature also .Here I have attached one of my prototype concept while working on it.



Functional diagram:

       The sensor is having inbuilt DSP FIR filter algorithm.So output of the sensor is very stable and good accuracy .But based on the distance the accuracy will be changed.And then it supports SMBus protocol. SMBus protocol seems to be same as I2C protocol but clock rate varied.

If you know about SMBus, go through the following site



Step 1: Check it out device address for MLX90614


Device address with write  - 0xB4
Device address with read   - 0xB5

Device address without read and write bit -0x5A


Step 2: Check it out fclk or sclk



Step 3: Voltage rating




Step 4: Write down the driver code as per the following clock and protocol format






Step 5: Write down the application layer



Step 6: Calibration and data conversion code






Step 7: Testing your code

You can get my sample code from my github account.


While monitoring on the cooling water battle



While monitoring on the boiled egg


Friday, November 27, 2015

         Getting started with RTOS for Low End MCU
           At my earlier stage, I started with RTOS application, that time I got so much confusion .Because of that time, I was hearing about the lot of RTOS names (Vxworks, FreeRTOS, RTLinux ,Windows Embedded and so on).So I got confusion. Because how I am going to start with, and which one is suitable for my microcontroller. I don’t know clearly.
           Finally I got it the Salvo RTOS by thegoogle on the net and also great introduction about RTOS from my teacher Mr.Christy Mano Raj,Assistant Professor at Government College of Engineering, Salem. These RTOSsuitable for 8051 architecture based controller and also other lower end architecture microcontrollers. So I can easy to start my own RTOS application. But depend on the reliability, you can choose other RTOS. But the fundamental of the RTOS is common. So this RTOS very suitable for startup peoples. And another specialty is that, it can support 8051 MCU series and PIC 16F series BSP support. That means, if the guys who have knowledge on 8051 and PIC 16F series, they can able to start RTOS. So we don’t feel about 16 bit or 32 bit architecture controllers.
         The following link redirected you to getting details about the list of the micro controllers those are supported by SALVO.
           Here I am sharing one of my experience, when I started my RTOS development.
What is meant by RTOS and Kernel?
            The operating system (OS) contains the kernel, the timer and the remaining software (called services) to handle tasks and events (e.g. task creation, signaling of an event). One chooses a real-time operating system (RTOS) when certain operations are critical and must be completed correctly and within a certain amount of time. An RTOS-enabled application or program is the end product of combining your tasks, ISRs, data structures, etc, with an RTOS to form single program.
Reference : Salvo User Manual
First of all you have to know the following details (RTOS fundamental tools),
1) Task states
2) Tasks
3) Multitasking
4) Scheduling and types of the scheduling
        a) Round robin scheduling
        b) Preemtive scheduling
 5) Inter task communication tools
         a) Message
         b) Queues
         c) Event flags
 6) Deadlock
 7) Priority inversion
          Here I have added a web link. By the way, you can download the Salvo RTOS user manual.
          It contains that full details about RTOS fundamentals (See Chapter 2, Page No:11). These fundamentals are common for the all kind of RTOS. All of them having same characteristics.But the declaration and structure only different .
For example,
The task declaration for Salvo is,
OSCreateTask(TaskA, OSTCBP(1), 10);
 But the task declaration for FreeRTOS is,
// Create the task, storing the handle.
xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY,&xHandle );
         The above both statements are given as eligible(Salvo) or ready(FreeRTOS) to the corresponding task.So that kernel is able to running the corresponding task.

Salvo RTOS Task  State






FreeRTOS Task State

you can download my code through my github account:
https://github.com/msuresh168
Recently i have attached the following codes,
1.Multitasking for 8051 MCU using Salvo RTOS
2.LEDBlinking_AtMega128 by using FreeRTOS (Same way Multitasking concept)