Friday, July 5, 2013

Mini Project: ZigBee based Wireless Temperature Sensor + Data Logger


Posting after a long long time. Hopefully this time the gaps will be lesser.

I had to give a guest lecture to 3rd and final year students of EEE stream in MNM Jain Engineering College on July 3, 2013. Normally I just give a lecture and share my thoughts about Embedded Systems. This time I wanted to show them a demo of a project that evolves from a simple idea to a standalone product, or even a system. 

So I decided to take the example of Digital Thermometer based on 8051, which is a simple project for beginners to Embedded System development.

A small project on converting a simple digital thermometer into a wireless temperature sensor node. The temperature sensor is converted into a wireless node by interfacing the MCU's UART to a ZigBee node. The companion ZigBee node is connected to an ARM Cortex M3 based board's UART that receives the temperature data and sends it to the data logger (the laptop here) through another UART port

Here's the demo video of the Wireless Temperature Sensor


This is just a proof of concept. Adding more wireless nodes with additional features can convert this into a wireless network to manage a building or factory or such large areas.

Slides of my lecture on the project prototype are here:

















If you have any questions or queries, do contact me on my email.

Thursday, July 26, 2012

Generating HEX files in Keil uVision IDE




If you are new to Keil uVision IDE, you may have noticed that whether you use ASM code or C code, the HEX files are not generated when you compile your programs. This is because Keil does not generate the HEX file by default. In case you are wondering what HEX file is, HEX file is the output of Keil that is generated after compilation and linking of your application and this is the file that is 'burned' or programmed into your microcontroller or microprocessor.

So, to enable generation of the HEX file follow these steps:

Step 1) Create the Keil project by adding your ASM and/or C source files

Step 2) Open the project options. Use any of the three methods given below:

- Click on Project->Options for Target  (Fig. 1) 
OR 
- Right-click on the Target 1 in the project window on the left side of the IDE   (Fig. 2) 
OR 
- Simply press ALT-F7 to open the project options:

Fig. 1



 Fig. 2


Step 3) Once the project options window is visible, first click on the Output tab and then click on the empty check box next to Create HEX File. The Output tab should look like Fig. 3. Click on OK and then click on Files->Save All.
  
Fig. 3


Step 4) Now if you build your target, you will see the associated HEX file in the output directory.

IMPORTANT - You must repeat this process for each new project that you create.

Friday, May 18, 2012

Summer Trainings - Embedded Systems and Linux

I am planning to offer summer training on the following topics in June-July 2012. 

Each training program will end with a mini-project and best projects in a given batch will be showcased in my website.

Certificate of participation will be provided to all those who complete the training successfully

Placement assistance would be provided to those who do exceptionally well in the training and mini-project.

Foundation of Embedded Systems 
Topics - C refresher, Embedded Systems, 8051 Architecture, Assembly and Embedded C, Design of Embedded Systems (50 hours)
Pre-requisites - Any programming language and Digital Design basics

Advanced Embedded Systems
Topics - Basic and advanced C, Embedded Systems, OS & RTOS basics, ARM7 Assembly and Embedded C, FreeRTOS (90 hours)
Pre-requisites - C, Embedded System Basics, Data structures and Digital Design basics

Linux Systems Programming
Topics -  Linux basics, Shell programming, C application development on Linux, System programming, Socket programming (120 hours)
Pre-requisites - C, Data structures and Digital Design basics

Multiple batches will be there, so you can prefer for morning or evening classes.
Small batches for a better learning and understanding for everyone. 

Limited persons per batch so register soon. Call: +91 98402 61709. Email: mailrupam@gmail.com.

Thursday, December 15, 2011

Weekend batch of Embedded Systems Design training starting in January 2012

I am starting a new batch for Embedded Systems Design training. It will start on January 1/8, 2012. This is going to be weekend-only batch. Classes will be held on Sundays and also on Saturdays (if feasible for the trainees).
 
The syllabus includes Basic and Advanced C, 8051 microcontroller, Assembly and Embedded C programming. Interfacing 8051 with LEDs, 7-segment LEDs, LCD, DC Motor, and ADC will be covered. The program ends with a mini-project that will be designed and implemented by the trainees with my guidance. Stress in the entire training would be on the trainees learning to do everything on their own, instead of running existing codes.

I have 2 trainees in the batch right now and looking for 2-3 more trainees. Those who are willing can email me - mailrupam AT gmail DOT com.

A free 8051 microcontroller development kit will be provided to each trainee.

More details can be found on my webpage, http://rupamdas.com/student-training.html

Training content and syllabus is available - http://rupamdas.com/docs/EmbeddedSystems-8051-2011.pdf



Saturday, November 19, 2011

New batch of Embedded Systems Design Training - December 2011

I am starting a new batch for Embedded Systems Design training. It will start on December 1, 2011. It will be full day batch, 5-6 hours of classes per day. The syllabus includes Basic and Advanced C, 8051 microcontroller, Assembly and Embedded C programming. The program ends with a mini-project that will be done by the trainees with my guidance. 

I have 3 trainees in the batch and looking for 2-3 more trainees. Those who are willing can email me - mailrupam AT gmail DOT com.

A free 8051 microcontroller development kit will be provided to each trainee.





Friday, September 23, 2011

Embedded Systems - How to learn?

This is a very common question that I am asked every time I speak to engineering college students. It is a valid question because there is too much confusion regarding what is Embedded Systems.

From what I understand of Embedded Systems, it is an area of application of principles and learning from several disciplines across multiple streams of engineering disciplines. There are disciplines from Computer Science and Engineering, Electrical Engineering, Electronics & Communication Engineering and Mechanical Engineering. But the thing to remember is that it is mostly an "application" of knowledge from multiple streams. See the figure below.



Fig. 1

If you are writing an application for your desktop/laptop/hand-held/server, mostly you would worry about interfacing your application with the OS running on the target system and then design and development. That would entail good knowledge of algorithms, data structures and programming languages. In case its a UI-based application, then knowledge of front-end/UI design and development is needed. Again this has got more to do with knowledge of programming languages, data structures, algorithms and SDKs.

Now, if you were designing a stand-alone device using a microcontroller, you would need to know hardware design in addition to software design. You would need to understand the architecture of the microcontroller and various features it has. How much power it needs (voltage and current), what interfaces it provides, how to connect it to other peripherals, how to access the connected peripherals and many more questions like these. Only when all these hardware design questions have been resolved, then only one can think of the software design.

In fact, a lot of effort goes into decision making about hardware and software depending on the application of the device being developed. If you want to make a line-following robot, then you have to know how to sense where the line is and how to move the wheels of the robot. Definitely the software would decide on the logic based on which the line will be sensed and accordingly how to move the wheels. But you need to know "how to sense" the line and how to control the speed and rotation of the wheels of the robot. Wheels would need motors to move them, so what motor would be used? Depending on what type of motor, you would need the control system for the motor. Only when you have the controlling system of the motor in place, you can think of writing the logic to control the motors and implement it.

Similarly, the "line sensing" would be implemented using some sensor. If its a sensor that gives digital output, then interfacing should not be an issue. But if its a analog sensor, then it has to be connected to an ADC which then would be connected to the microcontroller. So, now the software application has to read data from the sensor through the ADC. This means that your application should be capable of configuring and then reading from the ADC at regular intervals. Also the sampled data from the ADC now has to be converted into actual data using some correlation logic.

If a peripheral connected to the microcontroller is on a standard protocol, then knowledge of that protocol is also necessary. Standard protocols RS232, SPI, I2C, CAN, Ethernet, Bluetooth, ZigBee and WiFi are quite popular. This means that Communication and Networking protocols knowledge is required for design and developing such devices.

Different kind of devices would need different kind of knowledge. Here's a brief list of some devices and the domain knowledge that would be required to design and develop such devices:

Portable Media player - Audio/Video/Image processing algorithms, CODECs, ADC/DAC, Sound/Image/Video formats (MPEG1, MPEG4, AAC, WAV, JPEG, GIF, TIFF and more), File storage protocols

Robots - Control systems (feedback systems), ADC/DAC, DC and Servo Motor control, Audio/Video/Image processing algorithms, Sensors and Transducers

Automotive systems - Control systems (feedback systems), ADC/DAC, DC and Servo Motor control, Sensors and Transducers

The above list is just for illustration. The actual devices can be much more complicated and hence may require more knowledge that what I have mentioned here. For example, a self-driving car's system would be much more complicated than a normal passenger driven car. In fact, a self-driven car would be a mix of robotics and automotive systems.

To conclude do note that Embedded Systems are highly application centric. Each application and its required solution will decide how powerful or feature loaded the final result is. There is no single and generic solution for all problems in Embedded Systems.

Friday, September 16, 2011

After a long time...

This blog has been static for quite some time now. I have been busy with various other things in my professional and personal life. But now I have decided to make this blog more active. Starting this month, I will make effort to add more posts and at regular intervals.

In case anyone has any specific topic or query, do let me know.