Category Archives: Computing

Latest Touch Display for the Raspberry Pi

Those who were on the lookout for a proper touch display for their single board computer, the Raspberry Pi or RBPi can now rest easy. The official RBPi touch display is on sale at several stores and others will be receiving stock very soon. Users of RBPi models such as Rev 2.1, B+, A+ and Pi 2 can now use the simple embeddable display, instead of having to hook it up to a TV or a monitor. Watch the You-Tube video demonstration for a better understanding.

The new official touch display for the RBPi is a 7” touchscreen LCD. A conversion board interlinks the display module with the LCD and plugs into the RBPi through the display connector. Although the ribbon cable is the same as that used by the camera, the two do not work interchangeably. Therefore, identify the display connector first, before plugging in the ribbon cable from the display.

You can power up the display in one of three ways: using a separate power supply, using a USB link or by using GPIO jumpers. When using a separate power supply, you need a separate USB power supply with a micro-USB connector cable. The power supply must have a rating of at least 500mA and requires plugging in to the display board at PWR IN.

It is also possible to power the RBPi through the display board. For this, use an official RBPi power supply of rating 2A and plug it into the display board at PWR IN. Use another standard micro-USB connector cable from the PWR OUT connector and plug it into the RBPi power in point.

Powering the display from the RBPi GPIO requires using two jumpers – one from the 5V and the other from the GND pins of the GPIO.

After plugging in the ribbon cable and making one of the above power connections between the RBPi and the display, using the display requires updating and upgrading the OS on the RBPi. On rebooting, the OS automatically identifies the new display and starts to use it as its default display rather than the HDMI. To allow the HDMI display to stay on as default, the config.txt file must contain the line:

display_default_lcd=0

For further setup steps, follow these instructions.

The RBPi display comes with an integrated 10-point touchscreen. The driver for the touchscreen is capable of outputting both full multi-touch events and standard mouse events. Therefore, it is capable of working with ‘X’ – the display system of Linux, although X was never designed to work with a touchscreen.

For finger touch operations in cross-platform applications, the Python GUI development system Kivy is a great help. Although designed to work with touchscreen devices on tablets and phones, Kivy works fine with RBPi.

The 7” touchscreen display for the RBPi is of industrial quality from Inelco Hunter and boasts of an RGB display with a resolution of 800×480 at 60fps. It displays images with 24-bit color and a 70-degree viewing angle. The metal backed display has mounting holes for the RBPi and comes with an FT5406 10-point capacitive touchscreen.

How Gray Are The Gray Codes?

Many data acquisition systems and rotary encoders use the Gray Codes for their operation. As only one bit changes state while the numbers progress, read errors from timing and mechanical issues are minimized. Initially, use of Gray Codes was limited to specific applications, but now this versatile coding scheme is extensively used in Karnaugh maps, error detection systems, and in rotary and optical encoders.

In general, a Gray Code represents numbers using the binary encoding scheme and it groups a sequence of bits such that only one bit in the group changes from the number before and after it. Frank Gray, a researcher from Bell Labs, described the code in his 1947 patent, where he called it the Binary Reflected Code. After the patent was granted in 1953, the encoding system was referred to as the Gray Code.

Being an un-weighted code, the columns of bits in the Gray Code do not imply any base weight in contrast to the Binary number system. For instance, in the Binary number system, the right most column holds the most significant bit and carries a weight of 20=1; the second column has the weight of 21=2; the third 22=4, and so on. That means each column represents a base (2 in Binary) raised to a power, with the final value calculated by multiplying the bit by the weight of its column and adding the results of the columns.

Although columns in the Gray Code are also positional, they are not weighted, as the Gray Code is a numeric representation of a cyclic encoding scheme. The code rolls over and repeats, therefore, it is unsuitable for mathematical operations. To be used in displays or in mathematical computations, Gray Code sequences need to be converted to Binary or Binary Coded Decimal (BCD).

Gray Codes are a member of unit-distant, minimal-change codes. That means only a single bit of the sequence changes with the progress of the number count. Therefore, Gray Codes are more flexible during synchronization and misalignment as they limit the maximum read error to one unit. This property makes them useful in error detection schemes as well. Communication systems use Gray Codes in preference to parity check, as detection of unexpected changes in data is better with Gray Codes. If you sum up the bits in a number, the sum of the next number will change only by one, with the sum alternating even and odd.

Rapidly changing values can lead to errors due to interfacing or hardware constraints. This is where the Gray Code is most useful, as only a single bit quantifies the change. That is also the reason most mechanical rotary and optical encoders offer Gray Code outputs. However, Gray Codes have progressed farther than the encoding mask that Frank Gray documented in his patent.

For example, aircrafts use mechanical altimeters where the encoding disk is synchronized to the dials, producing a sort of Gray Code output known as the Gillham Code. The specialized code offers a single-bit change for each increment of 100 feet – allowing an easy tracking of the altitude.

A New Raspbian for your Raspberry Pi

Your single board computer, the Raspberry Pi or RBPi runs an operating system, or more specifically a Linux OS. Keeping true to its form, the Linux OS comes in umpteen flavors and you can choose and pick the one most suitable to your purpose. Operating Systems are built for the processor in the system, and the most popular so far are the Intel family of processors. Since SBCs generally use the ARM family of processors, a special version of the Linux OS is available for them. Of the many versions of the Linux OS for the ARM processors, the Raspbian is the most popular. A new version of Raspbian is now available.

Although people consider versions of operating systems primarily as updates and bug fixes, the new Raspbian is something more. The existing Jessie image used for the desktops and laptops has been modified and adapted to work with the ARM family of processors. Among the standard applications that come with Raspbian, many have been upgraded to offer newer features.

The new Raspbian offers Sonic Pi, version 2.9. If you view the history section of the Info window in Sonic Pi, you can read the full list of changes. The most important are two new effect functions – all articles of SAM Aaron of The MagPi magazine are now included as part of the online tutorials, and there is a new logging system.

Scratch, at version 20160115, has an improved capability for sound input, and supports the CamJam Edukit 3 robotics board. It offers basic PWM support in its GPIO server, and adds several improvements to the font scaling and display.

You will get the new Mathematica at version 10.3 with added support for additional functionality as described by Stephen Wolfram in his book. It supports Sense HAT, includes several new functions, and adds more interfacing to the Arduino.

WiringPi library has been upgraded to version 2.31 and now it allows access to the GPIO pins without use of the the sudo command from applications that use the library. Another Python library, the Rpi.GPIO is at version 0.6.1, and includes several bug fixes that plagued the GPIO Zero library. Additionally, the ping command does not require sudo anymore.

The ALSA system had earlier made it very difficult to get some USB devices to work as the default output. Now it has a new volume/audio device icon on the taskbar. That allows it to be compatible with a wider range of audio devices than before.

With the improved Main Menu editor, you can now create new menus. Earlier, the LXDE desktop environment did not allow visibility of all other menus, and this has now been addressed to work correctly.

Overclocking options for the RBPi models 1, 2, and Zero boards are now available from the command-line and the RBPi Configuration GUI. Updated language translations are also available for those not using English.

Earlier, there was a wide selection of names in different places such as Trash, Rubbish Bin, and more. Now, the name is consistently Wastebasket everywhere when you set the desktop to British English.

Fanless Mini-PC Consumes only 5W

Industrial control applications, digital signage and thin client users require low-power computer systems. The F200 mini PC from Giada Technology is an ultra-compact unit measuring only 4.6 in x 2 in and a thickness of only 1.2 in. Other desktop PCs use up more than 100 W of power, but the F200 takes up only 5 W at full load. At this level of power consumption, there is no need for cooling, and consequently, the mini PC is a fanless unit.

The fanless F200 mini PC takes up the minimum real estate on your desktop. With a VESA mount, you can do a clean installation of this mini PC on the back of a monitor or display, where it fits easily. An Intel Celeron N2807 processor with dual cores powers the mini PC, and it can operate at up to 2.16 GHz. With 8 GB of DDR3 DRAM and 16 GB of eMMC flash directly soldered on its motherboard, the fanless F200 gives out very little heat. The sturdy build resists shocks and vibrations. You can operate the F200 with Android, Linux, Windows 7 or Windows 8.1. If you want to add a solid-state disk of your choice, F200 has an mSATA II slot as well.

Unattended operations on the F200 are easy because of its built-in capabilities. You can schedule power on and off, and program it for auto power-on after a power failure. Therefore, F200 is eminently suitable for simple digital signage and other industrial installations. For those looking for pushing signage content over a network, the F200 offers a SIM card slot for Wi-Fi, BT or 3G module connectivity.

The F200 ultra compact mini PC can act like a virtual desktop. As industrial environments can be typically harsh, Giada Technologies has made F200 durable, noise proof and dust resistant. Its Intel Celeron Processor N2807 operates with two cores, 2 threads at 1.58-2.16 GHz, reaching a TDP of 4.3 W.

Display interfaces on the F200 consist of Intel HD Graphics, with Microsoft DirectX 11 on a single HDMI port. With an optional VGA output, the display resolution can be 3200 x 2000 at 60 Hz for DP, or 3840 x 2160 at 24 Hz for HDMI.

F200 offers three expansion slots. The first is for a SIM card capable of connecting 3G enabled Wi-Fi modules. There are two Mini-PCI Express slots where you can connect full-length mSATAII SSDs, full-length PCIe, USB Wi-Fi & BT or a 3G enabled module.

The F200 is rather rich in IO interfaces. A single port offers Microphone and audio in/out. A Realtek Gigabit Ethernet Controller connects to a single RJ45 port on the back panel. There are two USB2.0 ports and a single USB3.0 port, one COM port, and one SIM card slot. 12/19V DC in is through a Jack on the back panel. Optional ports include IEEE 802.11 ac/b/g/n, a Bluetooth module and an IR module.

Several built-in features provide system management on the F200. For example, there is JAHC support, a watchdog timer, auto power on, wake on LAN and RTC wake up to control the mini PC. The operating temperature range is from 0-40°C.

An Energenie Pi-Mote controller Board for Your Raspberry Pi

Those looking for a low-cost automation and home control solution can use the Pi-Mote controller board from Energenie. The Pi-Mote controller board is an add-on for your single board computer, the Raspberry Pi or more simply, RBPi. With this combination, you can control electrical appliances connected to special radio controlled electrical sockets.

Working at 433.92 MHz, the Pi-Mote controller board for radio-controlled sockets is easy to install and command. The product offers a safe and simple way to let your RBPi control mains powered devices and appliances. The Pi-Mote controller board from Energenie is compatible with all RBPi models such as the A, A+, B, B+ and B2.

The Pi-Mote controller has a range of up to 30 meters and puts out an output power of 3V, 27mA at +12 dBm. The output is encoded at four data bits, offering a 20-bit address pre-set with OTP. The user can select the output modulation with software from OOK or FSK.

The product actually comes in two parts, the RF board and the electrical socket. The RF board attaches to the RBPi for controlling several 13A, 3-pin electrical sockets. Although the original Energenie sockets are meant for use in the UK, plug adapter sockets are available, which make these almost universal. You can also get kits with a 4-way extension lead and other compatible sockets from Energenie. All can be controlled from the Pi-Mote controller board.

A small Python program allows the add-on RF transmitter board to control up to 4 radio controlled sockets simultaneously by toggling the socket on and off individually. The add-on board attaches to the GPIO pins of the RBPi. In its basic form, each board transmits a frame of information to the sockets. The frame is made up of a 20-bit address and a 4-bit control data. Additionally, the frame uses the On-Off Keying or OOK technique, a basic form of Amplitude Shift Keying or ASK. The source addresses are pre-programmed and the user cannot change them.

When using the Pi-Mote controller, you are required to insert the radio-controlled socket into the mains wall socket and switch it on. The socket then enters a learning mode, which is indicated by the slowly flashing LED in front of the socket housing. You can force a socket to enter the learning mode at any time by pressing the green button on its housing form, holding it for five seconds and releasing it.

Once it is in the learning mode, send the socket a signal from the program running on the RBPi. The LED on the socket housing gives a brief flash and stops glowing. This indicates the socket has accepted and memorized its address. You can then program the rest of the three sockets in turn; otherwise, they will react to the same address. When using more than one socket, insert each into separate mains wall outlets, maintaining a physical separation of at least 2 meters so they do not interfere with each other. The sockets must not be put into a single extension lead.

Expand the Ports of your Raspberry Pi

The ubiquitous single board computer, the Raspberry Pi, or the RBPi, as it is fondly called by its users, is rich in General Purpose Input Output or GPIO pins. These are lined up on the board in two rows of 13 easily accessible pins, totaling 26 of which 17 are GPIO pins, the others being either power or ground pins.

GPIO pins provide a physical interface between the RBPi and the external world. Speaking plainly, these act as switches that the user can turn on or off as inputs or the RBPi can turn on or off as outputs. GPIO pins are physically arranged along the edge of the RBPi board, next to the yellow output socket for video.

To allow the RBPi to interact with the real world, you can program the pins in amazing ways. For example, there need not be a physical switch to connect inputs. Inputs can come from a signal from a device such as another computer or a sensor. Similarly, outputs can be made to do almost anything, such as sending data or signal to another device such as an LED.

One of the advantages of having an RBPi on a network is you can control devices attached to it from remote places, while collecting data from those devices. Connecting to and controlling physical devices over the Internet is exciting and a powerful feature best done by the RBPi.

However, some applications demand more input and output pins apart from the 17 that are available on the RBPi. That requires the user to expand the GPIO pins and this they can easily do by using the Quick2Wire Port Expander board. The board adds 16 more GPIO pins to the RBPi’s 17, so you can now have 33 GPIO pins with one expander board.

Additionally, you can stack more boards to have more GPIO pins. Each expander board can be preset with a configurable address via DIP switches on-board. Since eight addresses are possible, you can add eight more boards. Each board communicates to the RBPi via the I2C bus.

The Inter Integrated Circuit Communication protocol, called I2C in short, links the micro-controller or microcomputer to other micros or circuits. Another similar protocol is the Serial-Parallel Interface or the SPI. Both protocols are widely used for robotics and hobby electronics projects.

NXP (originally Philips) developed the I2C protocol. This is a very popular protocol used in several equipment including computer motherboards, monitors and TVs. Although a very flexible protocol, I2C is rather limited in its bandwidth.

Freescale (originally Motorola) developed the SPI protocol, which is much faster as compared to I2C. However, it is somewhat more complicated to use and has its own limitations.

Modern micro-controllers now support both protocols. These include the RBPi, Arduino, BeagleBone and BeagleBoard. Therefore, with I2C, you can control a host of devices, treating them as slaves and using two lines SDA and SCL. With SPI, data rates of over 10 MHz are common. Data transfer happens over three lines, one of which carries the clock and the other two communicate between the master and the slave.

Comparing Wireless Standards 802.11ad & 802.11ah

Wireless LAN standards were first set up for serving the needs of laptops and PCs in homes and offices. These were IEEE 802.11a and b, and these later served to allow connectivity in different places such as in shopping malls, Internet cafes, hotels and airports. The main functionality of the standards was providing a wireless link to a wired broadband connection for email and Web browsing.

Initially, speed of the broadband being a limited factor, a relatively slow wireless connection was enough. Therefore, 802.11a offered up to 54Mb/s at 5GHz and 802.11b up to 11Mb/s at 2.4GHz, with both frequencies being in the unlicensed spectrum bands. To reduce interference from other equipment, both standards were heavily encoded using forms of spread-spectrum transmission. In 2003, a new standard 802.11g used the 2.4GHz band maintaining the maximum data rate of 54MB/s.

However, by this time, people started realizing the need for higher throughput, especially with increased data sharing amongst connected devices in the home or small office. By 2009, a new standard, 802.11n came up, which improved the single channel data rate to over 100Mb/s. The new standard also introduced spatial streaming or MIMO, multiple inputs, multiple outputs. The new modems had up to four separate transmit and receive antennas, carrying independent data that was aggregated in the modulation/demodulation process.

However, new WLAN usage models were continually raising the demand on throughput, such as projection to TV or projectors, streaming from camcorders to displays, video streaming around the house, airplane docking, public safety mesh and more. Catering to these VHT or very high throughput demands made it necessary to generate two new standards 802.11ac (an extension of 802.11n) and 802.11ad.

Standard 802.11ac runs in the 5GHz band, providing a minimum of 500Mb/s on a single link and 1Gb/s overall throughput. On the other hand, 802.11ad provides up to 6.7Gb/s using a spectrum of about 2GHz at 60GHz, but at short range. Operation at high frequencies limits the transmission range and obstacle penetrating capacity of the signals.

With the proliferation of local sensor networks working on low power, billions of IoT or Internet of Things and M2M or machine-to-machine device connections, a new standard is now deemed necessary. This new standard is the 802.11ah, working in the license-exempt 1GHz band and its final version is expected in 2016.

Standard 802.11ah is a down-clocked version of the 802.11ac standard. While adding some enhancements in the MAC and PHY layers, the new standard offers advantages such as power savings, multiple station support, better coverage and mobile reception.

For the standard 802.11ah, three main use-case categories are under consideration. These are Wi-Fi extended range networks, backhaul networks for sensors and meter data and sensor networks. The standard 802.11ah extends the transmission range with 1 and 2MHz mandatory modes, allows ultra-low power consumption, thereby offering multi-year battery life for large scale sensor networks and is optimized for long sleep times while handling small packet sizes.

Therefore, with 802.11ah, you can have several devices such as light sensors, temperature sensors and smart meters set up throughout the home, enabling your home devices and appliances to be considered smart.

Adding Memory to the Raspberry Pi

Although the memory onboard the Single Board Computer Raspberry Pi or RBPi is sufficient for most applications, some may feel the necessity of expanding the storage capacity. The options provided on the RBPi are limited, as the USB ports often engage a keyboard, a mouse or a game controller and the SD card slot holds only a single device.

The most obvious option for expanding the storage capacity on the RBPi is through the USB ports. However, tying up ports with a USB hard disk drive or flash drive can run into difficulty if you need the port for plugging in another USB device. One way of getting around this problem is by using powered USB hubs. It is important to realize the RBPi cannot supply enough power for driving the hub.

Using a powered USB hub makes it easy to add USB devices to your RBPi, including additional storage. However, you must consider a few things when expanding storage on your RBPi. In reality, there are only two common USB storage options available – flash drive and hard disk drive. Nevertheless, you may also consider a card-expanding trick for the Raspbian operating system for your RBPi. These are the three primary options available for expanding storage on your SBC. Apart from this, you may also consider using secondary storage devices such as networked drives, USB DVD-r drives and NAS drives.

The SD card in the RBPi acts as the main storage option – use an SDHC card for best results. It is a boot device acting as the general storage and from which the operating system also runs. You may think of the SD card as a replacement for the HDD of a regular desktop computer, more like an SSD or Solid State Drive, as it has no moving parts and uses very low energy.

By default, Raspbian, the standard Operating System of the RBPi, is designed to run from a 2 GB SD card. Therefore, when you flash the Raspbian image, the SD card will have a partition of 2 GB, with the balance of the card memory remaining unused.

To get around this, you must use the expand file system feature included in the raspi-config screen in Raspbian. This enables expanding the size of the partition to the maximum capacity of the SD card.

When you insert your flash drive into a USB port of the RBPi, you may be surprised it does not have the same effect as it does in a regular Ubuntu or Windows computer. It is not enough to insert the flash drive, Raspbian expects you to mount the device manually before you can use it as an additional USB storage device. However, before you can mount it, you must know the exact device name that Raspbian has assigned to the drive.

For this, the command necessary is: sudo ls /dev/sd*. The command “sudo” gives you temporary administrative status, “ls” allows listing the devices and “/dev/sd*” lists the devices seen by Raspbian. With this command, you will know the number Raspbian has assigned for your drive.

Now, you can mount the USB flash drive and use it as an additional storage device with the command: sudo mount -t vfat /dev/[USB DEVICE NUMBER] /mnt/usb.

Solid State Drives – Why Are They So Fast?

For most people, an HDD or hard disk drive inside their computer is the flat broad box that stores their Operating System, files, documents, and other essentials. So far, not many users were aware of the inner workings of their HDD. Lately, with speeds of computers going up many folds, people have started looking at alternatives for the HDD – the SSD or the Solid State Drive.

Whatever else you change in your computer system, the general experience remains the same. For example, you may get a new display, add more RAM or install a new graphics card. Barring a few moments of exhilaration, you do not experience the constant euphoria that you get when you replace your regular HDD with an SSD.

An SSD suddenly transforms your computer into a high-speed demon. Additionally, you get this feeling every time you use the computer. Even if you do not realize this increase in speed with an SSD, you will appreciate it as soon as you have to revert to operating a computer with a regular HDD. It is truly amazing the way this new technology is helping to transform our computer experience.

To understand the functioning of SSDs, it is necessary to know the computer’s inner structure or architecture regarding its memory. A computer’s memory architecture is actually made up of three sections: the cache, the temporary memory and the actual memory storage itself.

The CPU or the Central Processing Unit of a computer is intimately connected to the cache memory and accesses it almost instantaneously. As the computer operates, the CPU uses the cache memory as a sort of scratch pad for all its interim calculations and procedures.

The temporary memory, also known as the RAM or Random Access Memory of a computer is the place where the CPU stores information related to all the active programs and running processes. Although the CPU can access the RAM at high speeds, the access is slower than that for cache memory.

For permanent storage, your computer uses the memory within the HDD or the SSD. These may be programs, documents, configuration files, movie files, songs, and many more. Unlike cache and RAM, an HDD or an SSD retains its contents even when the computer has been shut down.

When people replace their HDD with an SSD, their computer operates at a higher speed even when they have not updated their cache or RAM. This is fundamentally because of the difference in the way of working of an HDD and an SSD.

An HDD is essentially an electromagnetic device. Inside, there is a motor to spin the several magnetic platters stacked one on top of the other. Before the CPU can read data from the magnetic plates, they have to spin until the right sector comes under the reading heads, which then move in to read from the exact location. All this mechanical movement takes time.

On the other hand, the SSD, being an all-electronic device, involves no mechanical movements. It uses a grid of electrical cells to store and retrieve data. Moreover, these cells are further separated into sections called pages. Further, pages are clumped together to form blocks. All this contributes to the fantastic speed of an SSD.

What is 3D Flash Memory?

Slowly, but steadily, the memory market is veering away from magnetic disc storage systems to solid-state drives or SSDs. Not only are prices falling fast, manufacturers are producing SSDs with improved technologies, leading to denser memories, higher reliability and lower costs. For example, Samsung has recently announced SSD and systems designs that will drive their new 3-D NAND into mass markets.

Samsung’s latest SSDs are the 850 EVO series. According to Jim Eliot, a marketing executive for Samsung, these are 48-layer, 256 Gbit 3-D NAND cells, with 3-bits per cell. The new chips show more than 50% better power efficiency and twice the performance when compared to the 32-layer chips Samsung is now producing. In the future, Samsung is targeting Tbit-class chips made with more than 100 layers.

On a similar note, an engineer with SK Hynix says that by the third quarter, the company will start production of 3-D NAND chips with more than 30 layers. By 2019, SK Hynix will be making chips containing more than 190 layers.

At present, 3-D NAND production is still low in yield and the cost of production is higher than for producing traditional planar flash chips. However, these dense chips bring promises of several generations of continuing decreases in costs and improvements in the performance of flash. According to analysts and vendors, it might take another year or so before the new technology is ready for use in the mainstream.

Samsung was the first to announce 3-D NAND production, with rivals catching up fast. Toshiba has already announced its intentions of producing 256 Gbit 3-D NAND chips in September. These will also have 48 layers and 3-bits per cell.

According to Jim Handy, an analyst at the Objective Analysis, Los Gatos, California, sales of the 3-D NAND will not pick up before 2017. With Samsung shipping its V-NAND SSDs at a loss, they are gearing up to put the 48-layer devices in volume production. This will enable them to beat the cost of traditional flash.

The reason is not hard to find. Wafers of 3-D chips with 32-layers cost 70% higher than wafers for traditional flash. On the other hand, wafers for 48-layer versions cost only 5-10% higher, but have 50% more layers. Therefore, although the 48-layer chips tend to start with a 50% yield, they will easily approach the planar flash yield levels with a year or so.

According to expert analysts, it takes a couple of years for any new technology to mature. Therefore, the prediction that 3D NAND will reach a majority of flash bit sales only after 2018.

The number of 3D layers providing an optimal product is still under experimentation. Also, included is the development of a new class of controllers and firmware for managing the larger block sizes. Vendors are still exploring other unique characteristics of these 3D chips.

For example, Samsung has designed controllers and firmware that addresses the unique requirements of 3-D NAND and is selling its chips only in SSD form. According to the head of Samsung’s Memory Solutions Lab, Bob Brennan, SSDs provide higher profit margins as compared to merchant chips, and are the fastest way to market.