Monthly Archives: July 2015

Prototyping Plate Kit for the Raspberry Pi

For new owners of the versatile inexpensive Raspberry Pi or RBPi, there is always a period of perplexity as to how they can try out an embedded computer project with the SBC. Although a breadboard helps to some extent, connecting the circuit on a breadboard to the RBPi involves many loose wires, making the experiment very cumbersome. An add-on kit, the Pi Plate from Adafruit, makes it very easy to prototype circuits for the RBPi.

The Pi Plate snaps on to the RBPi and the user can easily unplug it for making any changes to the circuitry. This is a double layer board and has a connector on the underside for fitting on to the GPIO pins of the RBPi. The specialty of the Pi Plate is the huge prototyping area, half of which is in the form of a breadboard style, and the rest in the form of a perfboard style. Therefore, users can wire up DIP chips, sensors and switches.

All the GPIO, I2C, SPI and Power pins from the RBPi are broken out to 0.1” strips along the edge of the proto area. The connections are all labeled, so the user has little difficulty in connecting them to his/her prototype circuit. In addition, all the breakout pins are also connected to 3.5mm screw-terminal blocks, all with labels. That makes it very easy to connect sensors, actuators, LEDs, etc. semi-permanently with wires. For general-purpose non-GPIO connections, there is also a 4-block terminal block broken out to 0.1” pads. For those with surface mount chips to be connected, the remaining space has a SOIC breakout area, therefore, if you can conveniently use an IC that does not come in a DIP format.

When you buy the kit, all parts come separated. Following a tutorial on how to assemble the kit, any first-time user can learn to put it together. One advantage with this process is the user learns to solder and thereby acquiring a new skill. This is in line with the philosophy of learning with the RBPi.

Those who regularly use add-ons to the RBPi will appreciate that the header breakouts on the Pi plate are taller than the typical custom header breakouts. Therefore, the prototype plate sits above the metal connectors on the RBPi, allowing for a large workspace. However, this does not prevent it from fitting within the RBPi enclosure. Therefore, the RBPi remains safe within the enclosure, with complete access to the terminal blocks, making prototyping simple. Adafruit plans to have stackable header kits, which will help in putting multiple plates on top of the RBPi.

It is very easy to use the Prototyping Pi Plate. Adafruit has designed it to be as simple as possible so that it is a good fit for any type of RBPi project – whether simple or complex. According to Adafruit, there is no extra power regulator on board and none of the pins is buffered, because that keeps the design simple and inexpensive. In addition, it also offers the maximum space for adding any circuitry for prototyping.

Raspberry Pi and Energy Harvesting Wireless Devices

Do-It-Yourself home automation enthusiasts will welcome the idea of a wireless arrangement when setting up devices for automating their homes. It would be still better if these sensors and switches did not require an external power source to make them work. EnOcean Pi makes both these scenarios possible, with the tiny ubiquitous single board computer, the Raspberry Pi or RBPi, acting as a home automation server.

Therefore, with the EnOcean Pi, enthusiasts can set up home automation systems without any cables connecting the self-powered sensors and switches. Depending on information from sensors measuring temperature, humidity and from those detecting human presence, the RBPi may switch lights on/off and control blinds on windows.

Enthusiasts may either have sensors and actuators communicating directly with one another, or control them through an intelligent and smart home server. The latter allows adding remote sensing and remote control for home automation, which can be done conveniently through a PC or a smart phone. This type of home server is ideally suited for a tiny single board computer such as the RBPi. The EnOcean Pi then acts as a gateway controller to the EnOcean radio world. Element14 offers three types of kits for this purpose – the starter kit ESK 300, the developer kit EDK 350 and the Sensor kit PSK 300.

The wireless module, EnOcean Pi, comes in three versions – 868MHz for Europe; 315MHz for Japan, India and North America; and 902MHz for North America. This wireless module connects to other self-powered EnOcean sensor modules, which generate their own power through energy converters that use temperature differences, light or mechanical motion as an energy source. Therefore, the RBPi receives necessary data for intelligent control from maintenance-free sensors and actuator solutions.

It is always possible for OEMs and developers to design low-cost gateways for embedded applications including smart home solutions. Rather than developing new products from scratch, developers now have the option of using the EnOcean Pi and RBPi for creating a ready-made smart home box. This can process and visualize the data coming from self-powered wireless sensors, thereafter providing central control of a wirelessly connected house.

Users wanting to develop and integrate quick applications can download the EnOcean Link Trial Version middleware that comes with the new Pi accessory. The RBPi acts as a gateway, automatically controlling the EnOcean-based energy harvesting wireless sensors, switches and thermostats. That ensures a comfortable management of lighting, shading and HVAC, thus helping to save energy.

For a bi-directional communication via radio and serial interfaces, EnOcean Pi also offers the EnOcean Smart Ack controller functionality. The RBPi can use the serial interface to send and receive radio messages transparently in both directions. In this case, using the Smart Ack technology, the EnOcean Pi acts as a postmaster and controls up to 20 bi-directional sensors.

The EnOcean Sensor Kit has a set of three wireless sensors that includes a temperature sensor, a reed switch and a push button. Rather than use a battery, the sensors have a solar cell that supplies them with power. Each sensor has a wireless module with a built-in antenna requiring no cables. That makes the sensors totally self-powered and maintenance-free.

What is the Torrent Protocol?

When downloading a large file, you can do so from a single source, with a multiple mirror sources technique for data distribution. This presents a problem when used on networks with lower bandwidths and in the presence of sever recipients. As an alternative, a Torrent (also known as BitTorrent) protocol increases the efficiency of the distribution by reducing the network and server impact. The torrent protocol allows users to join a swarm of hosts that download and upload from each other simultaneously. That increases the efficiency of distributing files to many recipients, working over low bandwidth computers and mobile phones.

A user wanting to upload a file has to create a small torrent descriptor file first. They can distribute this file by conventional means such as web, email, etc. The file itself is made available through a seed or BitTorrent node. Those wanting to download the file present the torrent descriptor file to their own BitTorrent nodes on their computers. These nodes further act as peers or leeches and the node downloads the file by interconnecting to the seed and to other peers.

The file under distribution is divided into several segments called pieces. When a peer downloads a piece of the file, it turns into a source for that piece for all other peers. That exempts the primary seed from having to transmit that piece to all computers or users connected to copy. BitTorrent allows the task of file distribution to those who want the file. While the seed may only be sending a single copy of the file itself, the distribution ultimately reaches an unlimited number of peers.

A cryptographic hash within the torrent descriptor protects each piece of the file. Therefore, any modification of the piece is reliably detectable. That prevents any modification – accidental and malicious – of any piece received at other nodes. If any node starts downloading with a genuine copy of the torrent descriptor, it can verify the genuineness of the entire file it downloads.

This way of downloading pieces makes the collection non-sequential. However, the BitTorrent Client rearranges them in the correct order. The client continually monitors the pieces it has, and uploads to other peers, as they need. Throughout a single download, all pieces are of the same size. That makes the BitTorrent process very useful for transfer of large files as you can stop a file download any time and resume it later, without the loss of any information previously downloaded.

The non-sequential download typically reduces the overall length of a download. The client can seek out readily available pieces and download them immediately. It does not have to halt the download process to wait for the next and possibly unavailable piece in the line.

As a peer completes its file download, it turns into an additional seed. This eventual shift from peer to seed actually determines the overall health of the file. This is also shown as the number of times the file is available in its complete form. In reality, BitTorrent type of distribution creates a spreading akin to a torrential flood throughout many peer computer nodes. As the number of peers goes up, the likelihood increases for any particular node to complete a successful download.

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.