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.