Archive for April, 2012

Embedded Control or PLC?

This is a hot topic in every services based company. Often the manager question the engineers about what the solution should be based upon. Here are a few things which we need to consider before deciding what to propose:

  • The time: Time is probably the most important deciding factor to decide. Embedded systems need some considerable time on R&D. They often need revision both in firmware as well as hardware. This may cause to miss the opportunity window. And the opportunity is missed, R&D and expertise aren’t going to buy investment returns and the very continuation of business is endangered.
  • The application: Often the application itself defines what to use. A small wrist watch like device for patient pulse monitoring can never use a PLC. Similarly PLCs are preferred in industrial applications. This reduces the dependency on a particular control developer and the industrialist can choose from the pool of control engineers readily available in the market.
  • The quantity: Small quantities favor PLC as the investment in R&D does not worth small quantity. PLC is ready-made product and with right application development skills you can save some investment on time hence the profit is better. When the quantity is huge, Embedded control systems are preferred choice.
  • Your expertise: You are a PLC expert and have never taken a commercial project based on embedded systems, go with PLC. If you confident on your embedded skills then try to en-cash that.
  • Development budget: Who will invest in R&D when the customer is only willing to pay which hardly covers the equipment and installation costs? Embedded controls need special investment during the development process. If there are available modules which need to be integrated, even then there is development cost which can not be over-sighted or ignored.
  • End solution price per unit: Price per unit decreases with increase in quantity and Embedded controls favor this.
Share

FPGAs vs Microcontrollers

There has always been hot discussion between what to choose, an FPGA or a conventional hard IP microcontroller. It seems that FPGAs are going to rule in the future because of their flexibility, increasingly better power efficiency and decreasing prices. Often a soft processor is added in the FPGA design to get microcontroller like functionality along-with other concurrent processing.

  • FPGAs are concurrent. You can take sequential functionality like adding soft processor core. While the microcontroller as always sequential. This makes FPGAs better suited for real-time applications such as executing DSP algorithms.
  • FPGA are flexible, you can add subtract the functionality as required. This can not be done in microcontroller.
  • FPGAs are liked in military applications. There are two main reasons of that. The first is that FPGAs are hard-wired and the random attack of alpha rays can not destroy/corrupt the memory areas hence collapse the device functionality. The second reason is that the life time of FPGA based development is longer. It can be adopted for advanced chip is required. Microcontrollers change too often and there is lots re-work required to do in order to keep pace with changing technology. This is necessary to save the design from being obsolete.
  • The development time in case of conventional microcontroller is, I think, shorter and that of FPGA takes time because you need to glue-up different modules yourself and test them to perfection before doing anything. In case of a microcontroller, the peripherals are readily available and you can choose the microcontroller with your desire peripherals. These peripherals are pre-tested thoroughly by vendor and you need not to worry about their functionality, just need to use them. You will find ready made open source soft-peripherals for FPGAs as well but still “gluing” them up and testing is as task.
  • Microcontroller, up-til now, are power efficient.
  • Microcontroller are low-cost, much lower than FPGAs. This is specially true for small applications and large quantities.
  • Microcontrollers are available in easy to solder SOIC and QFP package like one of the 32 bit Stellaris microcntroller from TI is available in SOIC28. Many vendors have TQFP48/64 packages with enriched peripheral options. You have limited choice in case of FPGAs. Those of the class of Spartan4/5 and above need to outsource the PCB/PCBA services which is expensive, difficult to debug and out of the reach an entry level professional or hobbyist.

What if we use microcontrollers and FPGAs are used simultaneously?

It happens! Infact some vendors like Altera, Xilinx, Atmel provide configurable logic along-with processor core as well. But for an electronics engineer (or the embedded systems developer) working on both the niches is really difficult. I remember that I had taken an FPGA course back in 2008 but could not fully utilize my training even now. This is because the expertise in microcontrollers are rarely going to help you in the field of FPGA unless you only do the embedded development and no advanced digital logic design. Also the HDL like Verilog may look similar to C in syntax, it’s very different in use and often confuses just after a session of C coding. The very mechanism of sequential microcontrollers and concurrent FPGAs is very different.

There are many other factors which decide what you choose. Like your company is a pure R&D or a services based company. You educational upbringing, some universities teach heavy FPGAs and DSP while other emphasize on microcontrollers. Your own personal interest and the level of your comfort. The nature of project, small volume cost insensitive or large volume cost sensitive. And, may be, most importantly the end application or customer requirement.

There would many other pro and cons which you can search further on internet but, I think that, if your field demands heavy DLD work and lots of DSP is involved, use FPGAs, otherwise, use microcontrollers; although only you are the right person to decide what to do keeping all the above mentioned circumstances in view.

Share

I Need to Hire an Electronics Engineer

If you are out to find out an electronics engineer to translate your idea into a working product, you need to ask a few things before hiring him. Sometimes the employer is non technical and just does not know what qualities his employee should have. Here is a brief list of things you should ask your engineer.

  • Experience: For how many years he has been in this field. What part of his work he has spent on hand-on experience. What skills he possesses and what is the level of expertise related to those skills. You may also ask his qualifications.
  • Design Methodology: You may need to know what design methodology the engineer follows. There are some smart ways to develop product quickly.
  • Portfolio: You may ask to present some example projects to see their quality and level of complexity.
  • Technologies: What technologies he is familiar with? If your product needs wireless communication and needs to talk to other nodes in the same environment, is he familiar with Zigbee or other wireless technology. If your product needs to do some sort of user authentication, is he familiar with magstripe, RFID or biometric technology?
  • Industries: Has the developer some experience of the industry in which you are working? For example the access control industry needs to special knowledge of copyrights which need the person be aware of the industry.
  • Hourly rates: The rate per hour. Also how many hours can he give to your project weekly?
  • Work efficiency: How much time he took or takes to do a certain job. This is very important to know because it gives you an estimate of time required to complete your job. Also the estimated cost may be calculated.
  • Long term commitment: An electronic product development is lengthy procedure and takes many steps to come up with something which can be marketed. Your engineer must be with you to help out in detailed technical aspects. Also the basic idea of a product takes several revisions to reach the actual shape of product to be marketed. So you will need several software and/or hardware revisions to come up to the customer expectations.
  • Other skills: Protocols, languages, processor cores, tools, software etc. are all those things which you may go through to further consolidate your trust on the newly hired engineer.

In a nutshell, finding the right electronics engineer which can meet most of your requirements is very important for your product to succeed. So hire wisely!

Share

Check Yourself First!

Often we come up to the situations where our newly design prototype is not working or malfunctioning. This situation becomes more interesting when hardware and software guys are working together on their respective parts of a  design.

Often our embedded boards are resource-limited and they doing something unexpected. Recently one of my software colleague was sending printing information to a handheld printer. My job was to translate the information on TCP to serial port through a small hardware designed by me. Everything was working on my side but when his data arrived, the printer could not print it properly. When I used to send the data through a little TCP client application running on my PC, the printer worked fine. Suddenly a thought flashed in my mind.  I had experienced such situation earlier when I was receiving a response from a remote TCP server which my TCP client could not understand properly. This time the situation was different but the problem seemed to me the same limited buffer space in my microcontroller’s tiny RAM. I told the software guy to send data with little time delays. The printer worked correctly this time. The reason was TCP port is a fast port and the serial port is a slow port, much slower than Ethernet. My embedded device’s buffer overflown before it could serve the previous packet. This has not been for the first time with me. In the early days of my professional life, I used to complain more. But experience has taught me to always remember “check yourself first”. So in the world of embedded systems, always be ready for something unexpected. And the fault usually lies within our designs.

Before complaining to the software guy, make sure that everything is working fine at your end. There are hardware, software debugging and sniffing tools available which greatly help to investigate the problem. For example if you are communicating on TCP, use Wireshark or similar tools to sniff the data and see if it follows desired packet structure. Similar are tools like TCP Toolkit for TCP, COMPort Toolkit for serial port and many other useful tools. Take advantage of free online tools to verify your design and only after then call your colleague to look into the matter.

Share

Embedded Systems for Electronics Engineers

Embedded systems is a very interesting field which needs to deal with software as well as hardware at the same time. To write proper software it is necessary to understand the underlying hardware. Also software knowledge is a must to actually perform useful tasks. Often software engineers only write the software for embedded devices which we call firmware. They do it because they are taught and trained to do so. On the other hand, hardware or electronics engineers are more inclined towards the “hardware” which include analog and digital circuit design, PCB design, troubleshooting, hardware installation and support. Writing code is not their primary job as taught in university courses. However, they have a great advantage over software engineers that they understand the hardware architecture better. They know how the processor has to interact with the analog circuitry and how it will affect the overall performance. Often there are things that can be done either through hardware or software. For example an application requires a trigger over a certain voltage input. Now is it feasible to use a fixed voltage comparator in the hardware or to read the analog value and define the threshold in the software? Only a person familiar with the actual analog signal and its behavior can decide what to do. That is why electronic engineers with strong firmware/software skills are preferred.

However, sometimes hardware skills are relatively irrelevant; for instance embedded Linux development. In this case software engineers have clear advantage as the very knowledge of every register and flag bits is not necessary. However, as I learned through my experience, if you are learning embedded Linux for the first time, it does not make you very different from the software guys as even they come up to a newer field except somebody is a Linux guru. An electronics engineer still has great chance to learn Linux during his course of career.

As the time is passing by, more and more products carry intelligence deeply embedded in them. Small, low-cost, power efficient microcontrollers are widely used to make things smarter. Every household product carries a small electronics running a little RTOS or pseudo code carrying that “little intelligence” to make them so. Therefore electronics engineers with strong background of hardware development must also invest some time and effort to learn writing firmware and should master C language as it is de-facto standard in embedded world. I remember when I was at University and used to pay special attention to the my C language course. This was because I liked coding. This effort paid me back in my professional career as I have been coding in C for more than seven years now. All in all, embedded systems is a great career for electronics engineers. However, they need to pay special attention to firmware as well as getting familiar with embedded Linux.

Share

Getting Started with Stellaris Microcontrollers

Stellaris is micro-controller series by TI. It was first introduced by LuminaryMicro, an independent company which was later acquired by TI. It was the first Cortex-M3 based MCU offering which caught-up the attention. Here is a brief tutorial to get started and creating the very first project in Keil uV4 and using StellarisWare library suite. Following is the step by step procedure. You can download the source code at the end of this post. In my case, am using EKK-LM3S8962 demo kit.

Step-1: Create new project

Getting started with stellaris

Step-2: Select the device

Getting started with stellaris

Step-3: Add startup code

Getting started with stellaris

Step-4: Add a file to source group

Getting started with stellaris

Step-5: Select the c source file this time

Getting started with stellaris

Step-6: Goto project options

Getting started with stellaris

Step-7: Check the crystal frequency from target tab

Getting started with stellaris

Step-8: Choose the debugger from debug tab

Getting started with stellaris

Step-9: Choose driver for flash programming from utilities tab

Getting started with stellaris

Step-10: Choose preprocessor for the part and include path from the c/c++ tab
I have created the new project in the same directory as the stellariware example code i.e, “C:\StellarisWare\boards\ek-lm3s8962″
Getting started with stellaris

Step-11: Linker settings

Getting started with stellaris

Step-12: Add some more files

Getting started with stellaris

Step-13: This time the library files

Getting started with stellaris

Step-14: Write the code in the *.c file

Getting started with stellaris

Download Files:

Share

PIC32MX2 Breakout Board

The PIC32MX2 series has at least one advantage over PIC32MX1 series that it has built-in USB. This makes it perfect for small DAQ projects and peripheral interfaces to the standard PC. The breakout board is similar to the previous PIC32MX1 Breakout Board and Stellaris LM3S811 Breakout Board. Gerbers and complete design (CAD) files are available for download.

PIC32MX2 Breakout Board

         

               PIC32MX2 Breakout Board

 

Download Files:

Share

Using Third Party Tools

Case Study:

I was assigned to design an Ethernet and WiFi enabled device for hospitality industry. I was looking for TCP/IP client functionality in my hardware so that I could talk to a remote server to fetch a key to write into an RFID tag. At that time I was used to Microchip and MikroC tools. This was somewhere in 2008. At that time only baseline of PIC32 was offered and no PIC32 with Ethernet was there. The only offering was En28J60 standalone chip and PIC18F97J60 families. I chose PIC18F97J60 because it had everything built-in. To my surprise, there was no TCP client library available in mikroC compiler (in mikroC world, everything including IDE, compiler and libraries used to come together in a single installation). When I looked at MIcrochip TCP/IP stack, plenty of libraries were available. At that point, I thought I should had put my “time and effort investment” in MCC18 rather than mikroC (BTW mikroC is a great start for newbies).

Advantages

  • Getting started early.
  • Sometimes you get same or better functionality in lesser price.

Disadvantages

  • Always behind the features offered by official tools
  • Usually incompatible with official tools debugger/programmers

Make sure that..

The hardware tools offered by third-party compatible with those of original vendor. Like the official IDE can debug the third-party development board  as well.

However, I think that if the official tools are free, then first party tools should be used. Like MPLAB for PIC, Keil for ARM etc.

Share

  • Follow

  • Just a Moment Please

    About You
    What defines you the best...
  • Disclaimer

    The information on this website is based on my personal views which may differ from my employer(s). The free material here to download is the work I have done in my free time and, though may seem resembling, does not belong to my current or previous employer(s). It is solely my own intellectual property.
  • Copyright © Electrodesigns.net 2011-12
    iDream theme by Templates Next | Powered by WordPress