What is Hardware Software Co-Design?

This design methodology exploits the synergy between hardware and software in the search for optimized solutions that use the best in the current eco-system, the availability of hardware components and software infrastructure. It is a methodology of piecing together modules on hardware and software to develop an optimized solution. This also involves integrating the design life cycles of hardware and software, in such a manner that they complement each other. As we will understand further this methodology offers high design flexibility and maneuverability.

By nature hardware software co-design is concurrent; this allows system designers to optimize individual design approaches to accommodate and realign as required. Most importantly, this allows early detection of errors in system architecture and course correction. Often hardware and software modules are developed in a staggered fashion to enable or unblock each other. For example, to make sure that the software modules are ready by the time hardware is manufactured, software needs to be enabled with an early development platform. Today silicon vendors provide many reference designs that can be used for enabling early software development. Finally, hardware software co-design is an integrated design approach which means at every stage the design artifacts are vetted against the other approach to look for synergy, incompatibility and design outcome as against the optimized solution offering.

Considerations for High Accuracy Measurement System Design

Improvements in sensors technology, warrants need for high accuracy analog measurement systems. Achieving high accuracy to make use of the state of the art sensors, requires in deep analysis & design skills.

To begin with, choosing an appropriate ADC for the design is a critical design decision. This requires analysis of accuracy requirements, to determine the minimum Effective Number of Bits (ENOB) of ADC. In addition to this, sampling frequency with which the analog inputs needs to be measured also plays an important role.

Further to this, Analog Front End (AFE) Circuit for the analog inputs needs to be selected carefully. AFE might be required to scale down the input voltage or converting current input to voltage type or for buffering. Any external component present in the AFE will affect the measurement accuracy. Thus all the AFE Components needs to be high precision components to reduce impact on accuracy.

Since the sensors are connected to the system from external sources, it is important to have protection against ESD, EFT, Surge etc. The leakage current of the protection circuits can be another factor which can lead to measurement errors. Architecture & components of the protection circuit needs to be selected with the aim of reducing the leakage current to minimum.

Once all the components are finalized, one of the easier analysis method is to prepare an error analysis sheet which includes all the individual errors introduced by the components. One component can have multiple error factors & all the factors from all contributing components needs to be considered for analysis. For example, an ADC can have multiple error inducing parameters such as INL, DNL, Offset Error, Gain Error, Offset Drift, Gain Drift etc.

If there is a scope for calibration, then errors which can be removed using calibration (such as offset drift, gain drift of ADC, Resistor tolerance, Reference Input accuracy) can be neglected during analysis. But the only way to remove these error parameters completely, is to calibrate each individual errors separately. If the calibration is performed as a system (which is the case generally), then these errors cannot be eliminated completely due to inherent limitations of the calibration algorithm.

Once the analysis sheet is prepared, Root Mean Square (RMS) method can be used to predict the system measurement accuracy. This process can be iterated multiple times to analyze the impact of each component or to improve the measurement accuracy.

In addition to this, careful design of board layout is mandatory for achieving good accuracy. Isolation of analog sections from high frequency digital sections, sufficient clearance between analog traces, maintaining uniform grounding are some of the general techniques used to make sure that board level noise doesn’t impact the accuracy.

Designing an analog system with high measurement accuracy requires multi-facet design skills. Selection of proper components, Accuracy analysis at design stage, Careful PCB Layout, Selection of suitable calibration method can help in realizing a high accuracy measurement system.

Radio for IoT deployments

IoT deployments need a strong network for effective functioning. The scale and meaning to IoT deployments come from the inter-operability based on a strong network. The life of the deployment depends on the reliability, coverage, real-time response and security of the network. Driven by the need for the sensor to be small, portable and many wireless networks are the most suitable.

Wireless networks are by far many WiFi, BT, BLE, GPRS, 6LoWPAN, LoRA, Sub-GHz networks etc. Each protocol brings its own positives and negatives. The important factors that need to be optimized are cost, coverage, power and importantly QoS. Based on whether the IoT deployment scale, area and portability we choose these constraints manifest differently. The manner in which RF cost is loaded onto a  deployment varies it could be chip cost like in Wifi/BT, it could be service cost in case of GPRS/3G/4G/LTE etc. When an IoT solution is fixed or stationery like a shop floor or a smart building power and coverage is not a concern as Wifi/BT/Zigbee can support good QoS. The challenge is when sensors are not stationery, they move between environments where not the same radio is optimized to the various cost and performance constraints.

In such a case what is the best strategy to provide the required QoS. We imagine a situation where the radio can sense the environment and adapt to the needs in order to provide good QoS at the optimized cost. This involves systems for sensing various radio protocols and optimizing algorithms for cost / coverage / power from context to context. This will ensure reliable RF/network connectivity and QoS. A “Radio Hub” shall ensure QoS by migrating to the correct network based on signal strength when connectivity is a priority or cost when cost is the priority. The network optimization cycle also varies based on the solution maintenance budget of the customer.

“Radio Hub” comes with its challenges on system design and implementation. Maintaining so many radio receivers and dynamically switching context based on RF strength is complex. However a seamless radio transitioning hub will improve the QoS and increase efficacy of every IoT solution.

Choice of battery for an embedded product

With electronics finding more mobile and remote applications, more designs now demand a wide range of batteries to be designed into the system. Even systems with constant wall power supplies often require backup power supplies to cater to occasional power outages and power spikes.

Below points should be considered while analyzing this battery specification:

What is the peak current draw of your design?

A battery is an enclosure with chemicals that react to produce electrons. When the design is not drawing current from the battery, the reaction builds up a certain number of electrons at the anode, awaiting an electrical path to reach the cathode. Faster the electrons drawn from anode, faster the battery drains, but this is not infinite. The chemical reaction inside the battery is also a process that takes a finite amount of time. When the electrons are emptied from the anode, the chemical reaction process puts a limit on how fast the anode can resupply the electrons. This limits peak current outflow of the battery.

If the battery doesn’t support the design’s peak current outflow, the battery voltage dips, shutting down or restarting the design.

This generally happens with designs that use sudden spurts of communication like GSM where a spurt of communication with the mobile tower demands peak current in terms of 1 or 2 Amps from the battery.

What is the battery life required on a single charge?

The battery life is generally driven by a market or a system level requirement. This most often also has a bearing on hardware and software design architectures, choice of processor and choice of operating system to optimize the design’s power requirement.

More on this in the blog titled “Calculating the design’s power requirement accurately”

What is the feasible mechanical size of the battery in your design?

Choosing a battery is a balance between the design’s power/capacity requirement and the battery’s mechanical dimensions. Higher the power capacity, higher is the battery dimension and ultimately the weight. A decision of battery size should involve back and forth between the estimated battery capacity requirement and battery size by fine tuning the power consumed by the design. This can be done in 2 stages, one is during the design analysis and second is during the prototype testing by tuning both the hardware and software to minimize both the peak current requirement and the average current requirement. The battery capacity can then be finalized for the final deployable product.

What battery chemistry should be used?

An analysis of power to weight ratio has to be carried out to decide on the battery chemistry. To give a very brief and a birds eye view of battery chemistry choice purely in terms of weight,

Mobile and handheld applications can use Li-Ion, LiPo,

Stationary applications can use Lead Acid

More on the battery chemistry choice in the series titled “Battery chemistry choice”

Internal resistance of the battery

One of the biggest criterion in battery choice is its internal resistance. Choose a battery with lower internal resistance during battery comparison.

At Tantragyaan, power supply and battery capacity design is not an afterthought but is a part of the complete architecture and design including power budget analysis, application duty cycle, battery life prediction etc