Saturday, 15 February 2014

Power consumption - A issue to deal with in hand held units

Compared to embedded designs few years back, the stress on power savings has been more these days. May it be the increase in hand held products or whatever your circuit consuming lowest power is a very important feature. And this power saving is very critical in battery driven applications. As we know, most of these hand held devices are driven by batteries. With the Li-ion battery becoming prominent because of it's advantages over Ni-Cd battery it is being used in the hand held units. So, for any designer of a handheld unit first he has to justify his battery usage. More the power consumption lesser the battery life and also it is the other way. 

To a no-voice in embedded designs, the power consumption may be confusing. Consider a battery which has a rating of 1000mAh, this rating means that  a battery can supply an amount of 1A continuously over an hour. So, if your circuit draws for example 1A, then your battery lasts for only 1 hour. In designs, let us assume if you can vary your circuit current consumption, as per the need of the hour then there is always a chance that you give your battery more life before next recharge.

So, stressing the battery as per the need always helps battery to last long. To understand more, let us take the example of your mobile, you have a setting in your mobile to power off the back light after some specified amount of idle time. The lesser you make the idle time before the back light goes off the more it is helpful to increase battery backup. This is very high level from a user point of few. But from the designer end, he has to take to care of many things in his design before an end user can start getting the benefits like the ones we mentioned above.

Let us take a design into consideration, where we have a processor and it's associate circuitry on the board which are powered by battery. The below list indicates the opportunities a designer has to reduce power consumption.
  • Use different states of processor efficiently: Sleep, idle, standby, normal, run
    • The more you keep the processor in idle state the more you save power. You can observe some of your gadgets sudden having a back light enabled when you press a key or because of some other action. What happens in this case is that your processor will be in idle state with only some peripherals working. So, when you press a key, the processor gets an interrupt and comes to normal mode.
  • Try to optimize system clocks and processor clocks. Clocks are one of the major contributors in the circuit in terms of power consumption and using them efficiently can help you in reducing power consumption.
  • We see these days inter ic communications being operated at a low signalling levels which helps reduce power (Ex: LVDS)
  • Reduce the capacitance on your board as much as possible
  • Take care that your circuit doesn't draw excessive power during start ups.
  • Isolate the logic from processor and use other circuitry which consume low power (Like implementing digital logic in low power device like CPLD)
  • Wherever possible implement your logic in interrupt mode rather than polling.
  • Understand the glue logic requirement on your board and implement it in a efficient way.

Sunday, 9 February 2014

Braking resistors

Most of us must be familiar with the normal resistors like the Chip type, MFR type, etc. There are some of these applications where we have to handle high power. In such cases you use power resistors. There are many applications in which we use a molded power resistors in high power applications. We have to remember that most of these resistors are metal clad and mainly aluminium housing. Aluminium is most preferred as it is economical and also environmental friendly. Some companies even make custom resistors, shape and value desired as per the end user application. 

There are some applications where the braking of the device generates electrical energy which can be absorbed at that instant or it flows back into the supply system. We call it regenerative braking or rheostat braking. Braking resistors are one kind which find application in motors. the main purpose of the braking resistors is to slow down the motor and drain out excess voltage. This helps the motor to be within safe tolerances. Under normal operating conditions of motor, it converts electrical to mechanical energy, but when motor is powered off, the magnetic field generates back emf which must be controlled for smooth power off of motor and keep it within safe tolerances. The braking resistor is used for the purpose. As we know, DC motors have permanent magnets which creates this electrical energy. In a AC motor, the generated magnetic field creates this effect.



Selection of braking resistor is a design challenge. The heat generated by the resistor on power dissipation is high and requires heat sink arrangement. this adds up to the cost. If the requirement is to stop the motor quickly, the resistor value must be less and dissipates more heat as it allows large current to flow through.

General ratings:
  • Resistance (in ohms)
  • Power dissipation (kW)
  • Wire wound resistors

Saturday, 1 February 2014

Understanding Ethernet terminology - Part 1

Most of us must be familiar with terminologies like switchers, routers, LAN, WAN, VAN, etc., and most of us might be in this domain trying to understand the network topology, switch designs, router usage, IP addresses, MAC addresses and others. Let us try to understand the basic terminologies used in Ethernet in this series of articles:

Before going to other terminologies, we have to  understand the OSI layer stack. OSI is nothing but open system interconnect defines the system architecture. The 7 layers are Application, Presentation, Transport, Session, network, Data link and physical layer. If you are hardware engineer you must be familiar with physical layer which defines the electrical characteristics. Firmware engineers will be more familiar with the Data Link, network and other higher layers. The transmission happens in packets and protocol is defined by TCP/IP. The layer naming convention is as follows:

Layer 1: Physical Layer
Layer 2: Data Link
Layer 3: Network
Layer 4: Transport
Layer 5: Session
Layer 6: Presentation
Layer 7: Application

The layer 1 receives packet from the medium and hands it over to layer 2. In other words Layer N+1 requests data from Layer N and data flow happens in that sequence.

For example, Switch is basically a Layer 2 device and Router is basically a Layer 3 device.

Sunday, 5 January 2014

Cortex-M0 vs Cortex-M4

Cortex-M is a 32-bit RISC core from ARM. Cortex-M0 and Cortex-M4 cores among them are very popular for microcontrollers. You see lot of microcontrollers in market with these cores. Now a days you see lot of mixed signal designs with digital integration using this core. Take the case of ADSP from analog devices. Everyone knows that ARM are the front runners in terms of power consumption. Even though Intel is competing in the high end market, ARM has advantages when it comes to low end applications like microcontrollers. There are cores like Cortex A8, A9, M0, M4, etc.. We will list their differences in the coming articles and for now we will a few differences listed between M0 and M4.

Observe, the low end processors with high end and the design will be in such a way that low end processor will be running most of the time where as the end high end processor will be in sleep mode and operational only when required. This is true in case of designs with M0 and M4.

1. For a given code size, M4 can execute at a higher speed than M0.
2. Energy efficiency of M4 is much better compared to M0. The average power consumption of M4 is always better than M0.

Wednesday, 18 December 2013

DDR memory interfacing - Part 1

DDR memory short form for Dual Data Rate memory is a type of RAM. As we know, RAM is a volatile memory. There are several types of random access memories like SRAM, DRAM, SDRAM. DDR comes under SDRAM category. The main difference between other types of RAM and DDR is that data is transmitted on rising and falling edge of clock and hence it's name. There are several types of DDR namely DDR, DDR2, DDR3, LPDDR2, LPDDR3, DDR3L, DDR3U. We shall go into details of each types of memory later. We shall have a look into the differences also in later parts. For now, let us discuss some of the terminologies used in DDR and techniques used in DDR interfacing which helps to achieve throughput, bandwidth, power consumption, etc.


Memory interleaving:

DRAM is arranged as banks internally and each bank is selectable using a BANK ADDRESS signal. Each bank in turn is accessed as rows and columns. Option is that memory address can be assigned bank after another which is the normal way of doing. While accessing a memory bank, it takes time to respond and this effects the throughput of DDR. One way of increasing throughput is to assign addresses to banks in an alternate manner. This is nothing but addressing memory in a interleaved manner. For example, for a byte addressable memory, 0-7 address will be assigned to first bank, 8-15 to second bank and so on. This helps to increase throughput of RAM. But one question arises for a designer and he wants to where he should use this type of interleaving. Interleaving is used when there is a slow DRAM interfaced to core.

Channel count:

We generally see datasheets of processors mentioning support for single channel, dual channel. This means that it can support up to two independent DRAM parts. For example let us assume that a processor supports 64-bit DDR memory. In this case, dual channel means a 64-bit DDR can be connected to one channel and another 64-bit DDR to another channel. Or as per design needs user can use only one channel and connect 4 16-bit or 2 32-bit devices to one channel. This again depends on support from processor and for this you have to refer processor datasheet. But one may raise a question, why should i use 4 16-bit devices instead of 1 64-bit device? As cost wise also, it doesn't help. The main reason is that my throughput is much higher in the case of 4 devices compared to 1 device. It is almost x4 times. So, it is always the case of trade-off between speed and cost. Make your choice!!!

Monday, 9 December 2013

Validation Devices - Oscillioscope

One of the most important validation devices is Oscilloscope. Raging from graduate to hobbyist and technical guy everyone must have oscilloscope. Oscilloscopes basically are analog or digital type. The age old CRT based scopes mostly used in educational institutions are analog type. The modern scopes are all digital type. The main difference between analog and digital scope is that in a analog oscilloscope measured analog signal is directly applied against a time base where as digital oscilloscopes sample the signal and process before displaying them. An analog  and it has vertical, horizontal amplifier and other circuitry where as digital oscilloscope has sampling circuitry, signal processor and advanced displays with good resolutions. Before going further let us define what an oscilloscope is, in few words. A oscilloscope is nothing but a measuring instrument which gives a visual representation of electrical signal. This visual representation helps in debugging the circuit. An oscilloscope measures signal in a graph of voltage vs time.

Want to buy a oscilloscope from market for your debugging purposes? then you have to consider following criteria:

1. Bandwidth
2. Channel count
3. Sampling Rate
4. Memory Depth
5. Triggering capability
6. Probes and their types
7. Resolution of display screen
8. Connectivity of scope like USB, GPIB, serial port, Ethernet, Etc
9. Analysis of signals
10. Memory Depth
11. Pricing
12. Oscilloscope type
13. Accuracy of measurement
14. Vendor ratings
15. Test suits available

Let us assume you want to measure a 1 MHz signal with scope then you must a scope of 5 MHz min. band-width. the rule of thumb is that bandwidth of the scope must be 5 times of the signal to be measured. The reason for this is that the energy of signal is distributed among it's harmonics and it needs minimum of 5 harmonics for the signal to be reconstructed properly. 

Sampling rate is inverse of the signal to be measured. If we want to measure the 1ns signal over a scope the sampling rate of that scope must be minimum 1Msps.

Channel count defines the number of signals that can be captured in parallel. Based on your requirement choose the scope. Note that if you are using a scope at maximum sampling rate, the rate will be divided as per the number of channels used.

Memory depth measured in Kpts, Mpts defines the amount of storage capability of oscilloscope.

You might have seen x1, x10 marking on the probes. this represents the attenuation. If you take a signal of 1 volt and measure with x1 setting, then the attenuation is 0 and you see a exact representation of 1 volt an the screen. If you use the same scope with x10 setting, then you see 0.1 volt on the screen.

Before buying a scope check the support for communication interfaces like USB, GPIB, ETHERNET, serial ports. Pricing always as per the interfaces available.

Vendors like Agilent, Tektronix, Lecroy, Fluke, Instek are leaders in market and choose a vendor as per your choice. Check the support and servicing facilities of these vendors before making a decision.

Sometimes, you may need special test suites for signal integrity analysis of high speed interfaces like USB, PCIe, etc. These are additions to the scope and if miss them on a buy, you may may have to shell out additional amount later. Also, check out if the vendor is providing free add on boards or on discounted price which are used for these analysis purposes.

Saturday, 7 December 2013

Selecting a microcontroller

Ask a beginner in embedded systems, he might probably have worked on microcontroller for sure if not an any other. Microcontroller is like a heart for any low end embedded system. Yes, high end systems are for sure dominated by microprocessor or FPGA whether it be because of high performance of microprocessor/FPGA or any other factors. 

So, while choosing a microcontroller, it is always important to know the selection criteria. From the project point of view, we do get the requirements based on which selection is done. Microcontrollers are available from various vendors and selecting the best one among them is the toughest decision for a designer.Here are the list of factors based on which we will be selecting a microcontroller.
  • Flash memory size
  • RAM size
  • GPIO availability
  • Package of microcontroller
  • Board size occupied by microcontroller/pin count
  • 8/16/32-bit 
  • Frequency of operation (DMIPS, DMIPS/MHz)
  • Power consumption (sleep current, standby current, peripheral consumption)
  • If pin compatibility among controllers from same vendor
  • Pricing of microcontroller
  • Development environment (IDE) availability
  • Debugging tools
  • Design support from microcontroller vendor
  • Functions available (UART, SPI, I2C, ADC, PWM, etc)
  • Availability Safety functions like Internal temperature sensor, watchdog timer, etc
While selecting a microcontroller, we make a list of microcontrollers and compare the controllers with the above features. some give ratings based on the differences and some based on visual inspection of differences tend to make a decision.