Author Archives: Andi

What are UEFI and Secure Boot?

When you first turn on the power button of a computer at the start of your day, your PC or laptop goes through a set of procedures before allowing you to log in. The first thing that happens is the reset signal generated sets the registers of the CPU to their pre-defined values. The reset vector within the CPU now points to the start address of the BIOS or Basic Input Output System.

BIOS is a small firmware stored in a flash memory on the motherboard of the computer. It functions as a startup process for setting up the various hardware peripherals attached to the motherboard. BIOS starts with the POST or Power-on Self-Test, which checks for the presence of basic stuff such as the monitor, keyboard, mouse and memory – primary and secondary. Next, it looks for the MBR or the Master Boot Record on the secondary memory storage – the hard disk or a Solid State Device.

The MBR contains the Primary Boot loader that redirects the CPU to the Secondary Boot loader. What you see on the screen as GRUB when booting into Linux is the Secondary Boot loader is responsible for loading the actual Operating System present on the memory device of the computer.

Hackers planning to usurp the control of your computer have been targeting some of the elements in this chain of the booting process. Malware planted in the computer can modify the boot loaders so that it first enables a sleeping Trojan horse (a form of virus), before actually loading the Operating System. That allows the virus to control whatever you are doing with the computer and report it back to its original master.

To prevent this from happening, members of the PC industry have modified the plain and simple BIOS to a UEFI secure boot type. When booted through UEFI or Unified Extensible Firmware Interface, the firmware ensures that the system boot loader has a cryptographic key as authorized by a database within the firmware. The next steps involve the boot loaders in a series of signature verification for the kernel and possibly of the user space. That prevents any unsigned code (the Trojan horse) from executing and compromising your computer.

The computer requires no specialized hardware to implement and operate UEFI Secure Boot. The firmware resides in the non-volatile flash storage on the motherboard. This storage also stores the UEFI implementation itself as well as the protected variables including the trusted root certificates of the UEFI.

Therefore, unless presented with a signed next-stage boot loader, the UEFI Secure Boot will prevent your computer from functioning, unless you disable or switch off the Secure Boot mode. Note that UEFI Secure Boot does not verify signatures when installing or changing the boot loaders. Signatures are verified only when booting up and any tampered boot path leads to a display of invalid signature, preventing further operations. Unlike web server certificates, there is no information as to who issued the certificate and the user has no way of overriding the decision to reject the signature of the boot loader.

Why are Inductance-to-Digital Converters Useful?

Inductive sensing is bringing a revolution in the technical world. Inductive sensing offers capabilities for measuring position, motion and or composition of a conductive or metal target, with a contact-less, magnet-free sensing technology. In addition, inductive sensing can help to detect twist, compression or extension of a spring.

Now, LDC or Inductance-to-Digital converters from Texas Instruments, such as the LDC1614, is helping to utilize springs and coils as inductive sensors that can deliver better reliability, improved performance and increased flexibility when compared with existing sensing solutions. In addition, inductive sensing offers solutions at lower system costs and with lower power consumption.

Users of LDC technology can expect several advantages –

Higher resolution: 24-bit inductance values and 16-bit resonance impedance offers sub-micron resolutions in position sensing.

Better reliability: sensing is contact-less and therefore, immune to non-conductive contaminants such as dust and dirt.

Increased flexibility: The sensor can be located away from the electronics and in areas that do not have space for PCBs.

Low system power: LDC consumes less than 9mW during standard operations and less than 2mW when in standby mode.

Lower system costs: As no magnets are required for both the sensors and the targets, the entire system can be significantly low-cost.

Limitless possibilities: Permits endless possibilities for innovative and creative system design, such as with conductive ink and pressed foil.

Inductive sensing applications can range from simple push buttons, on/off switches and knobs to high-speed motor controllers, turbine flow meters and high-resolution heart rate monitors. The versatility of the LDC1614 allows it to be used in several markets including medical, industrial, computing, mobile devices, consumer electronics, white goods and automotive industries.

LDC1614, from Texas Instruments, is a series of inductance-to-digital converters comprising four devices. They offer two or four matched channels along with 12-bit or 28-bit resolution. Available in a compact 4x4mm package, users can configure these LDCs easily via an I2C interface. These converters offer precise position and motion sensing almost independent of the environment.

Inductive sensing involves low-cost, high-reliability inductors as sensors. Use of LDC converters enables the sensors to be located remotely from the PCB containing the IC. As the LDC1614 can integrate up to four channels, designers can distribute sensors throughout the system, while centralizing the electronics on a few PCBs. Since the channels are well matched, users can perform ratio metric and differential measurements. That allows easy compensation for aging and environmental conditions, such as those caused by mechanical drift, humidity and temperature.

The 28-bit resolution allows detection of submicron level changes in distance measurements. With the LDC converters supporting a frequency range varying from 1KHz to 10MHz, users can employ a large variety of inductors as sensors. As the converters require powering by a 3.3VDC supply, the power consumption is only about 6.9mW during standard operation and about 0.12mW when in shutdown mode.

TI offers its LDC1614 in QFN-16 packages and in the cheaper WSON-12 packages for both the 12-bit and the 28-bit devices. LDCs applications can be extremely wide-ranging and seemingly endless, covering fields as diverse as automotive, medical, consumer electronics, white goods and other industries.

Types of HATs suitable for the Raspberry Pi

Among several versions of the low-cost, versatile, single board computer, the credit card sized Raspberry Pi or RBPi as it is commonly called, the latest is the Model B+. Along with many new features, the RBPi Model B+ is designed to make intelligent use of expansion cards. Keeping in view of the appendage called a “hat” that many people place on their heads, the RBPi too has expansion cards known as HATs. These are Hardware Attached on Top, and they work by sitting atop the single board computer.

In reality, the RBPi is a bare-bones computer, where only the most essential peripherals are present on-board. This not only helps to keep the prices down, but also allows the primary user to start work with the SBC without being unnecessarily distracted. The primary objective for the makers of the RBPi was to let school children learn about computer programming. The RBPi achieves this objective excellently by allowing the students to start with the bare minimum requirements. They progress by using different HATs to get additional functionality. The advantage is the RBPi behaves as the revolutionary fundamental building block on which widely differing concepts can be easily proven.

Any sort of physical computing with the RBPi generally necessitates setting up extra hardware. Instead of soldering the components directly to the GPIO pins, it is prudent to add the necessary hardware in the form of an expansion card or a HAT, which you simply plug in. To use the HAT, the user has to modify the software suitably, mainly by installing the required drivers and configuring them.

The original models of the RBPi, the A and B, are really not conducive for expansion boards. The 26-pin ribbon cable connector provided on-board offer only the GPIO pins. However, several companies have made expansion boards suitable for direct plug-in to the connector, and they sit on the RBPi, making an electronic sandwich.

With introduction of the RBPi Model B+, the most noticeable change was the transformation of the GPIO connector to a 40-pin PCB header. The first 26 pins of the new header have remained identical to those on the models A and B – maintaining backwards compatibility. That allows HATs developed for the older models to be also used on the RBPi Model B+. The Model B+ has two new pins, ID_SD and ID_SC to allow connecting a serial EEPROM. That allows proper identification of the HAT and RBPi can load the necessary drivers for it. Therefore, as long as the manufacturer designs the HAT or the expansion board correctly, RBPi can configure it automatically.

The Raspberry Pi Foundation has issued specifications that all boards should follow for compatibility with the new model. According to these specifications, an expansion board can be called a HAT only if the board supports the two new pins and has an EEPROM for identification. This identification must include information about the vendor, the GPIO map and the device tree. The board must also conform to the mechanical dimensions specified and not overload the power supply of the RBPi. However, HATs need only meet the minimum specifications, which leave plenty of scope for innovation and stacking.

The Astro Pi in Space

For experiments to run in space, an Astro Pi board fitted with sensors and gadgets is a great way to begin. For this, school pupils in UK are being challenged to write apps for the tiny, inexpensive, single board computer, the Raspberry Pi or the RBPi. As Tim Peake readies for his rendezvous with the International Space Station in November 2015, the British Astronaut will carry with him two RBPis, fortified with Astro Pis. He will have six months to complete the experiments in space.

Analyzing the Astro Pi reveals it to be a HAT or Hardware Attached on Top for the RBPi. It is well packed with several goodies such as – sensors for magnetometer, accelerometer, gyroscope, temperature, barometric pressure, humidity, a real time clock with battery backup, several push-buttons and a versatile 8×8 RGB LED display. In addition, there is also a camera module and an infra-red camera on board the Astro Pi.

With all this gear, Astro Pi is most suitably equipped to carry out real-time science and innovative experiments in space. School children resident in the UK are being encouraged to join in the competition for setting up experiments that astronauts will conduct in space later this year.

The Raspberry Pi Foundation, along with the UK Space and the European Space Agency are organizing the contest. For this, they have devised five themes for stimulating the kids’ creativity and scientific thinking. These include Satellite Imaging, Data Fusion, Space Measurements, Space Radiation and Spacecraft Sensors.

Kids of ages under 11 in the primary school will devise and describe original ideas for application or experimenting on the Astro Pi. Teams presenting the two best submissions will be able to work with the Astro Pi team for interpreting their ideas. The team at the Raspberry Pi Foundation will code these two ideas and get them ready for flight on the ISS.

The competition in the secondary schools will run across three age categories of 11-13, 14-16 and 16+. A selection of the best 50 submissions will be made for each age category and they will win an RBPi and an Astro Pi on which they can code their original concept. From each age category, two winning teams will be selected.

During his six-month space stint, Tim Peake will be deploying the Astro Pis, uploading the winning experiment code, set them running, collect the generated data and download it to be distributed to the winning teams.

Astro Pi is also great for fun sciences. This is possible because of its Sense HAT, incorporating all the sensors on the single board. For example, with the on-board sensors, one can make a self-balancing attack robot that can also sense humans. In reality, most equipment for experimentation in schools is too expensive – the Astro Pi and RBPi combination changes that dimension.

Apart from the huge scope for fun sciences, useful data is expected to be gathered from using the Astro Pi sensors while on the International Space Station. Young people will have a unique chance to learn core computing skills and this will be extremely useful to them in the future.

Start Learning to Program the Arduino

Often, project builders are not sure of what they would like to build with their development boards. This happens mostly for two reasons – one, the user has just been introduced to the board and two, the user is unaware of the methods of interfacing and programming sensors, switches and other components. The second category of users is mostly those new to the world of development and in need of some hand-holding.

A Starter Shield
For these newcomers, Matt Wirth has proposed a Starter Shield for Arduino boards. With the Starter Shield, novices can learn how to interface components such as sensors for building their own interesting projects. Learning involves programming the IO headers of the micro-controller on-board the Arduino. Interestingly, users can do this without any assembly of intricate parts, soldering or wiring.

However, since many users may want to solder their own, Matt Wirth plans to release an optional kit, which will come with an assortment of components that the user will have to solder before starting. These will include potentiometers, multiple LEDs, digital and analog push buttons, temperature sensors and light sensors. To make it easy for beginners, Matt will provide lessons for programming these components, so that users can proceed with their unique creations – light meters, temperature sensor alarms, police lights and siren and many more.

An IoT Relay
For those who already have some experience in building projects with the Arduino, may find Wi-Fi and other home automation projects interesting. Of course, there are several kits available for automating homes, but most are expensive and limited in their functionality. This is where project builders can effectively use Team IoT’s IoT Relay for the Arduino board.
For those interested in home automation, IoT is a favorite subject. However, the relay solution provided by Team IoT is not limited to home automation alone. With the IoT Relay, apart from the Arduino board, users can work with any development board and create interesting project such as making automated feeders for their fish tanks.

On the IoT Relay, four outlets allow connecting to any number of devices. There is also a universal voltage control to handle inputs of 12-120VAC or 3.3-60VDC, protected with a thermal circuit breaker. That allows users to control power safely and not damage their devices. However, the IoT Relay, although inexpensive, does not come with an Arduino board and the users are expected to supply their own.

Makeblock’s mBot
For those beginning to learn to program, code and work with robots, there is nothing better than an educational robot such as Makeblock’s mBot. With STEM or the academic disciplines of Science, Technology, Engineering and Mathematics being implemented widely in schools all over the world, Makeblock’s mBot is a learning robot that helps kids with their STEM curriculum.
Featuring the mCore platform of the company, Makeblock’s mBot is based on the open-source Arduino Uno featuring a simpler wiring system. There are no GPIO pins to solder. Instead, the mCore uses RJ25 connectors, color-coded to make it easier to connect other components. Additionally, the board is compatible with Mindstorms’ Lego, other Arduino boards and shields and the Raspberry Pi.

Happy Gecko MCU Only Sips Power

The EMF32 micro-controller series from Silicon Labs, apart from featuring a smart interface, is also ultra-low power and USB enabled. Going by the name of Happy Gecko, this micro-controller is based on the ARM Cortex M0+ core. It uses autonomous peripherals and an advanced system for managing energy usage. That keeps the total energy usage in most applications so low that the controller can source power comfortably for a year from energy-harvesting arrangements or from a single battery.With the CPU core operating at speeds close to 25MHz, the core peripherals include comparators, 1Msps, 12-bit ADC, a current DAC, counter/timers, GPIO and serial buses such as I2C and USB. It supports encrypted firmware updates over USB with an onboard AES acceleration engine. Users have different memory options for up to 8KB of RAM and 64KB of Flash in a series of pin-compatible family members.

The designers of Happy Gecko have employed a variety of techniques for keeping its energy consumption to the minimal levels. Not only does its circuit design feature only 130uA for every MHz when active, the MCU can trade power for functionality through five energy modes. Therefore, developers have the ability to choose the mode consuming the lowest amount of power at any given time.

Apart from intelligent peripherals, the MCU also offers a peripheral reflex system with six channels. That allows several routine functions to execute without involving the CPU. For instance, an onboard comparator is available to monitor an input voltage, triggering an ADC to take sample as the signal crosses a threshold. The ADC in turn, stores the value in memory using a DMA channel. All this happens without the CPU coming out of its sleep mode. When the CPU needs to be active, its high clock rate ensures that it accomplishes the necessary actions in minimal time and it can return to its sleep mode quickly. Only 2µs are necessary to wake up the CPU from its slumbering state.

For the Happy Gecko, the low-energy USB interface is its key feature. However, this operates only as an endpoint device. That means the device does not require an external USB crystal and automatically synchronizes its internal oscillator to the incoming data. The endpoint device has its own dedicated RAM and an integrated PHY layer with a 5V LDO regulator and resistor. The interface remains in its low power mode, waking up only when it detects activity on the bus different from the idle time following a USB start-of-frame.

Silicon Labs offers a starter kit for the Happy Gecko. This is mbed-compatible and comes with a built-in USB debugger. The internal current measurement makes it very easy for developers to correlate the energy use of the CPU with their code.

Silicon Labs also offers an IDE to support the CPU, called the Simplicity Studio. The IDE features a pin out design tool that makes it easy to handle the configurable IO pins of the device. It also has a real-time energy profiler for synchronizing code to the minimal energy consumption of the micro-controller.

Efficient Control of Motors at Low Speeds

When a motor is operating at high electrical frequency or high mechanical speed, the back EMF signal generated by the rotating rotor presents an efficient feedback technique for a sensor less motor control.

However, generation of the back EMF requires a minimum frequency and that makes it difficult to control motors running at low speeds. The process of continuously estimating the rotor flux angle at zero and very low speeds, together with stably moving between low-speed and high-speed estimators helps to improve the effectiveness of starting the motor under load without using sensors.

TI or Texas Instruments’ InstaSPIN-FOC software called FAST helps to make this estimation at very low speeds, sometimes below 1Hz. Although the initial rotor flux angle is unknown, FAST estimates this using sensor less techniques. Until it has measured enough back EMF, this estimate remains unpredictable and the estimated angle is incorrect.

However, FAST feeds the control system applicable to the motor and induces motor movement. Enough back EMF is generated with only a small amount of rotor movement and the algorithm can then converge on a reasonable estimate for the angle very quickly. This allows a controlled high-torque drive at low-speeds with excellent operation. Although the start-up performance may not be consistent, this method can start the motor with enough torque for rotor movement.

With increase in the starting load, the torque requirement goes up. The amount of torque the system can generate depends on the current through the motor and the alignment angle between the magnetic fields of the stator and the rotor. For ensuring generation of enough current, the speed controller must necessarily have a maximum output larger than the rated current required to generate the necessary torque.

For example, a motor starting under full load may require 4A of current to produce the necessary torque to move. This requires setting the speed controller’s maximum current output to 6A. When started, the motor will draw a current of 6A in its first electrical cycle for moving the rotor. With FAST providing a valid angle within this first cycle, the control system will quickly regulate the current usage to the required level of 4A.

However, even when there is a stable feedback angle, the rotor may not necessarily align itself properly for generating the maximum torque. In reality, you are simply sweeping the stator field and waiting until the rotor field locks on and synchronizes. If the stator field is not oriented properly, the motor may fail to generate enough torque or even produce torque in the opposite direction. Control systems can improve this situation only by starting with a better starting angle.

The simplest way to control the initial alignment is to inject a DC current in a field-oriented control system. This defines the orientation of the rotor flux. A large enough DC current injected will move the rotor and the load to a known angle. Even though the forced angle is still emulated, the orientation will be proper for correct starting and the rotor will be in the best position for produce torque. The DC current injection may be done manually or programmed through FAST.

High Efficiency Hybrid Solar Cells

Normally, a modern silicon solar cell exhibits a maximum theoretical efficiency of about 33.7 percent. A majority of the sunlight falling on the solar cell – more than 66 percent – is not converted to electricity and is simply wasted in heating up the cell. Now, a new type of solar cells may be able to boost this efficiency to 95 percent or more.

The University of Cambridge Cavendish Laboratories is researching on a new type of high-efficiency hybrid solar cell. The UK researchers are using an organic formulation to put in as a layer on top of a standard silicon solar cell. This layer will help the solar cell to reach its target of the hard-to-believe 100 percent efficiency.

The top layer of special organic formulation coating on the solar cell helps to absorb high-energy light and produce pairs of triplets. Inorganic solar cells underneath can efficiently absorb these triplets. Generally, the cells cannot convert the high-energy radiation into electricity and these radiations only serve to heat up the solar cells. The organic film on top of the solar cells converts the wasted energy into a form that the underlying solar cell can turn into useful electricity.

With an increase in efficiency brought about by the Cavendish Laboratory hybrid approach, solar energy harvesting farms can be reduced in size significantly, while still producing the same amount of electricity.

According to Maxim Tabachnyk, Scholar, and Akshay Rao, research fellow at Gates Cambridge, and other members of the Cavendish Laboratory at the University, they have developed a film to convert wasted energy into useful form. The traditional solar cell is unable to convert high-energy light and wastes it as heat because of the fundamental limit of the solar cell’s power conversion efficiency.

The researchers coated the silicon solar cells with a special organic layer. This layer functions to distribute the energy of the incoming high-energy photons into two triplet excitons that in turn transfer their electrons on to the silicon cells.

The researchers had to first characterize the ultra-fast processes occurring at the organic/inorganic interface. For this, they directed ultra-short laser pulses into organic pentacene and studied the effect with laser spectroscopy. By following the transfer of energy taking place within a femtosecond (a billionth of a billionth of a second), they confirmed the presence of two electrons for each high-energy photon. Normally, only one electron is generated per photon.

After proving the concept that each high-energy photon can generate two electrons, the researchers had to find an alternative candidate to replace pentacene, which is not a suitable candidate to produce electrons suitable for silicon to absorb. They have now found a suitable organic material that can produce electrons with excitation higher than the band gap or the minimum absorption energy of silicon. The organic material is cheap and can be printed or even sprayed on as ink on top of traditional silicon solar cells.

According to Tabachnyk, normal solar cells harvest only the bright single-spin excitation electrons produced by the photons. The organic layer extends the ability of the cells by allowing them to harvest additional electrons from high-energy photons producing dark spin-triplet excitations.

What is a Raspberry Pi?

Raspberry Pi or RBPi, the fully functioning, tiny, single board computer costing next to nothing, has been a runaway success. However, a perennial question doing the rounds is – why would anyone want one when there is such a glut of PCs, tablets and smartphones? This article discusses the answer while exploring the RBPi doing real things.

Why is the RBPi Special?
Being an ARM-based single board computer, the RBPi, though unexceptional, is not particularly powerful. However, it is amazingly cheap and that makes it an almost disposable computer.

Several low-cost embedded systems platforms such as the Arduino are available on the market. However, unlike others, the RBPi is a complete general-purpose computer. For a very low cost, the RBPi offers the complete package of a Linux-based machine that challenges the computing power of a desktop machine of a few years ago. Apart from using it as a desktop personal machine, you can also use the RBPi as a server, a dedicated device running in kiosk mode, or for physical computing – its digital IO pins control other hardware.

The RBPi is cheap enough for one to use it to do a single job. To be equally multipurpose, other platforms would need machines that are more expensive. For example, a single RBPi can work equally well as a wall clock, a weather station, a digital photo frame, etc. Earlier, one would be using multiple temperature sensors and running long cables to a single data-collecting machine. The same job can now be handled more efficiently with an RBPi in each location, individually enabled with Wi-Fi and sending their data to another RBPi acting as a central server.

Therefore, the low cost of the RBPi is changing the optimal architecture of several projects.

Types of RBPi Available

At present, all RBPi models are based on the Broadcom BCM2835 system on a chip. This is actually a combination of a version 6 ARM architecture CPU and a VideoCore IV GPU. That makes it roughly as powerful as a 300MHz Pentium II processor typically used in the year 1999. The actual distinction between the different models is primarily based on the amount of RAM and the interfaces offered. All modes come with an HDMI and an audio port.

The initial Model A started with 256MB, while the later Models B and B+ have 512MB each. However, Linux and most applications for Linux are not as memory hungry as Windows, so the RBPi & Linux constitutes an efficient and economical combination.

Although RBPi operates on a capable Linux operating system, there are no hard disk drives and no disk interfaces either. Instead, the RBPi relies on an SD card interface that supplies the 8-32GB Operating System and file system storage.

While the Model A started with a single USB port interface, the Model B comes with a 100MHz network port and two USB ports. The latest Model B+ has one 100MHz network port and four USB ports. Therefore, you can connect a mouse and a keyboard to the Model B+ and still have two more USB ports left for connecting other appliances.

Silver Nanowire Conductors Improve Touchscreen Products

The next generation of flexible wearable devices is getting help from an unexpected quarter – the silver nanowire, which is proving to be cost-effective for producing touchscreen products.

As wearables grow in popularity, designers struggle with offering flexible products. So far, notebooks and tablets needed to have tough, flat surfaces that were able to survive frequent wear and tear. Although designers have been largely successful in mastering this technology, wearable products pose a different challenge. Humans attaching wearables to their bodies want flexible products that can follow the curvature of their body part. Touch-enabled products are taking a leap forward with the use of materials such as silver nano-wires.

Apart from the mind-boggling reduction in electronic devices, wearability is the next best thing already happening in personal computing devices. That also means an evolution in the human interface. Therefore, people prefer flexibility, not only for the display glass and the electronics, but for the interface as well. In turn, this is leading to virtually unlimited design flexibility along with durability and portability.

With flexible touch comes flexible ergonomics. For example, phone screens are now unbreakable – when dropped, they flex rather than shatter. Therefore, it is now possible to roll up a seven-inch tablet and carry it in the pocket. A display could easily wrap around the arm or a huge public display could wrap around a pillar or a building, just as easily as a neon light can.

The clunky boxes that passed for consumer electronic devices are no longer in vogue. Today, consumers prefer ever-thinner laptops and tablets. Even kiosks and monitors therein are now sleeker and aesthetically more pleasing. This is leading to a greater demand for thinner and lighter components. Additionally, electronic components with lower mass are more durable and rugged.

Apart from being thin, light, visible in different ambient light conditions, highly responsive, touchscreens also need to be brighter, stronger, more sensitive, consume lower power and most importantly, be lower in cost. Since most touchscreens are of the capacitive type, they typically have a see-through conductor as a screen. This very thin layer of material has to conduct electricity while remaining lucid. The transparency allows light from the display underneath to shine through the screen. At present, Indium Tin Oxide or ITO is the legacy material used for the conducting screen, but this has limited flexibility, transparency and conductivity, when compared to silver nano-wires.

Touch interfaces made of silver nanowires are showing great promise on all accounts. This material will help to make forthcoming generations of touch interfaces more responsive, whether they are small or large. They will also be brighter and be visible in all ambient lighting. All this requires more transparency, higher transmission ability and higher conductivity – things that silver nano-wires can easily deliver.

Applications for transparent conductors are not limited to LCDs alone. They are required for OLEDs, shutters for 3D TVs, thin-film photovoltaic cells and future products that the world can only imagine for now. With better light transmission, higher conductivity and no side effects such as pattern or moire-fringe visibility, silver nano-wires are set to introduce all these and more at a lower cost than the traditional technologies presently can.