Monthly Archives: July 2013

Raspberry Pi projects to inspire you!

In How Many Ways Can You Use Your Raspberry Pi?

Many of you who already have the tiny Linux PC – the RaspBerry Pi – affectionately also known as RBPi, are already using it in your own way to write and test code and to build controllers. The Raspberry Pi is a stripped-down Linux computer, running an ARM-Based CPU, with a graphics processor and many pins and ports, which you can use. We present here many extraordinary ways that owners have Raspberry Pi developed new projects.

Well, taken straight out of its packing, you can plug your TV into Raspberry Pi, connect a keyboard and try some of casual games, video streaming and word processing. All this must have become pretty mundane for Simon Cox after sometime, since he decided to build a supercomputer out of many Raspberry Pis. The computer engineer from UK’s University of Southampton tied 64 Raspberry Pis together. His 6-year old son built the rack for the supercomputer with his LEGO set!

Have you ever thought of mixing music, vegetables, wordplay and Raspberry Pi? Not likely, but Scott Garner has. On his BeetBox, you can play drumbeats on real beets when you touch them. He has used capacitive touch sensors for communicating between the beets and his Raspberry Pi. His only complaint is that the beets dry off and have to be replaced.

If Raspberry Pi is a Linux computer, surely it can be used as a palmtop. A similar thought must have prompted Nathan Morgan to build his Pi-to-Go Palmtop. Sporting a 640×480 display, a touchpad, support for HDMI, Bluetooth, Wi-Fi and a 64-GB solid state drive, it is a perfectly portable Raspberry Pi. However, some of you may not find it to be the thinnest or the lightest, but it is enough as a proof of concept to its maker.

Beer and Raspberry Pi may not be an obvious match, but that did not deter a company Robofun Create in making a QWERTY keyboard from 44 beer cans from a Prague-based brewery. If you are over 21, you are allowed in the bar and you can tap the tops of the beer cans to let Raspberry Pi produce the corresponding alphabets on a plasma screen overhead. Of course, the alphabets are also marked on the tops of the beer cans.

Movies such as “The Life of Pi” can also be inspiring. FishPi is planning to set Raspberry Pi adrift in a boat that will be crossing the mighty Atlantic. Raspberry Pi will not be floating idly, but has to control the boat’s navigational system. In short, Raspberry Pi will be the captain, navigator and sailor for the 20-inch long boat. Additionally, it has to collect scientific measurements for which it will be powered by a 130-watt solar panel. We wish Raspberry Pi all success on its solo sailing trip.

Like most people who buy nice things on impulse, such as an Raspberry Pi, are stuck for want of a suitable project. Jeroen Domburg had the same problem, until he came up with the Teeny Tiny Arcade. His is probably the smallest gaming cabinet built in an arcade style. Jeroen cut the plastic with laser to make his cabinet and it has a 2.4-inch TFT Display.

Let Your Raspberry Pi Take Pictures of the Earth

How About Letting Your Raspberry Pi Take Pictures of the Earth?

Many many years ago, before cameras came to be associated with lenses, people captured images on film using a pinhole on the camera. This technique is still in use today. It’s called heliography and it requires long to very long exposure times – sometimes as much as 24 hours to six months. The results are rather stunning, as you can see.

Unless you have photography as a hobby, you may not be able to spare much time and may not have equipment suitable for heliography. However, taking pictures of the earth is quite an exciting project, and since you have Raspberry Pi, why not let the tiny Linux computer do it?

That is exactly what Dave Akeman planned to do. He created the Raspberry Eye-in-the-Sky project that sent Raspberry Pi and a bunch of components out into the atmosphere where the weather balloons go and burst themselves. The payload consisted of a Raspberry Pi, a camera and a tracker, powered by a few AA batteries. The pictures, taken while the camera was in the sky, are spectacular and amazingly crisp.

Dave changed the regulator on the Raspberry Pi and modified it so the computer could work on 3V instead of 5V, to allow the batteries to last longer. He embedded the entire electronics in a foam replica of the Raspberry Pi logo, with the camera peeping out from the bottom. The foam was for softening the landing of the package when it hit the ground after the balloon burst. Dave also put in a parachute so the package would come down smoothly.

Dave had to take permission from the CAA for the Hydrogen balloon that would carry his Raspberry Pi camera payload into the atmosphere. He used the latest Pi camera software and changed the code to make it take three types of images each at about one minute interval. One small image is taken for the first radio channel, one medium image for the second radio channel and one hi-resolution image is stored on the SD Card onboard. Additionally, Dave configured the camera to work in matrix-metering mode instead of spot metering, as this gave better resolution images.

The balloon and its camera payload went up one sunny morning, near Tetbury, UK. People from France, Holland and Northern Ireland monitored the Raspberry Eye-in-the-Sky broadcast. The image quality throughout the 3-hour flight time was excellent. The flight path, with the wind guiding it, had quite a few changes of direction and some loops. The package went up to about 24.5 miles in height finally landed near the city of Swindon about 22 miles away from Tetbury.

As the launch was delayed by more than 2 hours, the Raspberry Pi package missed the original predicted landing spot, since the wind pattern had changed in the meantime. In addition, a resident of Swindon found the package as it landed near him, and took it home. He then called up Dave after finding his telephone number on the package. That solved the initial mystery as to how the Raspberry Pi package travelled to another location after it had landed.

How to measure temperature with a Raspberry Pi

Looking for another project to make with a Raspberry Pi? You can use your Raspberry Pi to measure temperature. Not only at a single point, but also at maximum of 20 points simultaneously. Of course, you will need 20 individual sensors for doing that. Raspberry Pi will poll all the 20 sensors one after the other, and read the temperature from each of the sensors.

If you are wondering how complicated it would be to wire up 20 sensors to the Raspberry Pi, you can relax, since you need only three wires in all. One of the wires will carry power to the sensors, one wire will be the ground or return path and the third wire is a unique 1-wire interface to control the sensor and to read the temperature measured by it.

This wonder sensor is a High-Precision 1-Wire Digital Thermometer, DS18S20, with a measurement range of -55°C to +125°C (-67°F to +257°F), a thermometer resolution of 9-bits and an accuracy of ±0.5°C from -10°C to +85°C. Maxim Integrated makes this thermometer and the smallest size is a little larger than a matchstick head (TO-92).

Not only can this tiny fellow read the temperature, it stores them in its non-volatile memory and can present them either as °C or as °F. You can set temperature limits in its memory and DS18S20 will tell you when the temperature it is monitoring goes beyond the programmed limits. You can use this thermometer with the Raspberry Pi to control thermostats, industrial systems, consumer products or any thermally sensitive system.

At this point, you may be wondering if there is only one single wire for all the 20 sensors, how is the Raspberry Pi able to differentiate the twenty temperature readings. Maxim has programmed each of the sensors with a unique serial number, and when Raspberry Pi wants to read the temperature from a specific sensor, it simply asks for it by the serial number of that sensor. Only the sensor whose serial number the Raspberry Pi queries, sends the temperature data, all the others remain silent.

The Raspbian Linux distribution that you are using in your Raspberry PI already has all necessary kernel modules installed for accessing the 1-wire bus. The programming details are rather simple and you can refer to them here.

What else can you do with a DS18S20 and Raspberry Pi? You may be measuring temperature at a remote place, or there is no space for the extra power supply to the DS18S20. So, instead of supplying power separately, you could make DS18S20 “steal” power from the 1-Wire bus. For this, you must connect the VDD pin of the DS18S20 to ground. According to the datasheet, do not use the parasitic mode for measurements above 100°C, as the DS18S20 will not be able to sustain communications.

If you have programmed temperature limits for some of the DS18S20s, they will raise a flag if the temperature they are sensing goes beyond the set points. By polling for the flags, Raspberry Pi can know, which sensor is sensing temperatures beyond its set point.

How to solder – an illustrated guide

Guide to learning to solderWe love when we come across electronics info and guides that others are sharing freely – and especially those that encourage others to share their knowledge and work.

For example…here is a fully illustrated guide to learning how to solder which was done by the fine folks at http://mightyohm.com. They’ve created a super guide with all the basics covered as well as some interesting tips and tricks that can make your soldering experience a little better. This would be a great staple for some basic electronics classes.

To see the full soldering guide, click on the image above.

Thank you to the creators of this comic book: Mitch Altman, Andie Nordgren and Jeff Keyzer. Great work!

How Does A Real Time Spectrum Analyzer Work?

We use an oscilloscope to view variations of input voltage with time. We use a spectrum analyzer to view variations of input voltage with frequency. Measurements in the frequency domain are possible with traditional architectures such as the super heterodyne, swept-tuned spectrum analyzer. Earlier such instruments were made purely with analog components. Modern instruments have evolved with digital elements such as Analog to Digital Converters (ADCs), Digital Signal Processors (DSPs) and microprocessors.

However, the basic principle of working remains the same, and for observing controlled, static signals, it is the best suited. The signal analyzer makes amplitude vs. frequency measurements. The signal of interest is down-converted and swept through the passband of a Resolution Bandwidth Filter (RBW). The signal then passes through a detector that calculates the amplitude of each frequency point in the selected span.

Although this method provides a high dynamic range of measurements, it can only calculate the amplitude data for one frequency point at a time. This assumes that while the analyzer is making one sweep, there is no significant change to the signal being measured. Therefore, the measurements are suitable for relatively stable input signals that remain unchanging. If there were fast changes in the signal, statistically there would be a probability that some signals were missed.

This spectrum analyzer architecture therefore, does not provide a reliable way to discover transient signals, which leads to a prolonged time and effort for troubleshooting modern RF signals; this lead to the development of the Real Time Spectrum Analyzer.

To analyze signals in real-time, therefore, the analysis must be carried out fast enough so that all signal components in the frequency band of interest are accurately processed. For this, two things are necessary. First, the sampling of the input signal must be fast enough and satisfy the Nyquist criteria, which implies the sampling frequency must be more than two times the bandwidth of interest.

Second, all computations must be performed fast enough and continuously so that the output of the analysis always matches and keeps track of the changes in the input signal.

The architecture of the Real-Time Spectrum Analyzer or RSA is so designed that it can overcome the measurement limitations of the simple Spectrum Analyzer (SA). The RSA addresses the challenges that transients and dynamic RF signals pose to signal processing by the SA. The RSA does this by real-time digital signal processing before the storing the results in memory.

This way, the user is able to see and capture transient events invisible to other types of instruments, and he can trigger on such events allowing them to be selectively captured in the memory. The data in the memory can then be separately analyzed extensively in many other domains with the help of batch processing. The real-time DSP engine is also helpful in signal conditioning and calibration of many types of analysis.

Modern RSA architecture uses a combination of both analog and digital signal processing for converting RF signals into measurements that are calibrated and time-correlated. Input RF signals are converted into analog IF signals that are filtered by a bandpass filter before they are digitized.

Carbon Nanotubes Can Reduce the Price of Fuel Cells

Like all other batteries, fuel cells too use chemicals to create electricity. However, in contrast to ordinary batteries, the advantage of fuel cells is their very high energy density. The energy they produce is high compared to their weight when compared with other batteries.

The energy density of the fuel cells comes at a high price. The platinum catalysts in the fuel cells are very expensive. Now, scientists at the Stanford University have developed a technique to replace the platinum with carbon nanotubes, which makes for an attractive and low-cost solution.

At Stanford, scientists have used multi-walled carbon nanotubes, which are riddled with impurities and defects on the outside. Such nanotubes may be used to replace the expensive platinum catalysts presently used in metal-air batteries and fuel cells.

Since platinum is very expensive, it is impractical for commercialization on a large scale. Scientists have been researching to find a cheaper alternative for the past several decades. The price of Platinum is anywhere from $800 to $2,200 an ounce. So far, the most promising low-cost alternative has been the carbon-nanotubes.

A carbon nanotube is a rolled-up sheet of pure carbon. This is called grapheme, and only one atom thick. An impression of the thinness can be gaged by the fact that a human hair is more than 10,000 times thicker than a carbon nanotube. Apart from being inexpensive to produce, carbon nanotubes of graphene are excellent conductors of electricity.

For replacing the Platinum catalysts, the Stanford scientists used multi-walled carbon-nanotubes. These had two or more concentric tubes nesting together. The catalytic activity of the nanotubes was enhanced with a shredded outer wall, with the inner walls intact. Moreover, this did not reduce their ability to conduct electricity.

Although typical carbon-nanotubes do not have many defects, to promote the formation of catalytic sites, defects had to be deliberately introduced in the outer walls of the carbon-nanotubes. The net effect of the introduction of the defects was they rendered the nanotubes as very active for catalytic reactions.

If the carbon-nanotubes are thinner than human hair, how did the scientists cause defects in the outer wall, leaving the inner walls intact? They treated the multi-walled nanotubes in a chemical solution. With this treatment, the outer nanotube unzipped partially and formed nano-sized graphene pieces. The inner nanotubes remained mostly intact, and the graphene pieces clung to these inner tubes.

Scientists then added a few impurities such as nitrogen and iron to the outer wall to make it very active for catalytic reactions. The nanotube maintained its integrity because of the inner walls, and the inner walls provided the necessary path for electrons to move. The overall effect was a very active outside wall along with excellent electrical conductivity. This advantage would not have been possible with just a single wall carbon-nanotube, as the damage to the wall would have impaired its electrical property as well.

Metal-air batteries and fuel cells require Platinum catalysts to speed up chemical reactions for converting oxygen and hydrogen to water. The catalytic activity of the partially unzipped, multi-walled nanotubes was very close to Platinum. Scientists are planning to produce fuel cells with very high energy density that can last for a long time.

What Is Ultrasonic Ranging?

Ultrasonic technology has some unique advantages over other types. With ultrasonic methods, you can solve several application problems that become cost prohibitive or simply cannot be solved by other methods. Some of these are: long range detection, broad area detection, widest range of targeted materials and non-contact distance measuring.

In simplest terms, ultrasonic ranging is a method of echo-location. Most of us have used echo-location to know the distance to the cliff producing the echo, the distance of the thundercloud or the depth of a deep well. The principle is simple, note the time taken for the sound to travel and multiply it with the speed of sound. For example, you may hear the sound of thunder 3 seconds after you see the flash. The source of the sound is then 3 times 330 or 990 meters away, as sound travels roughly at 330 meters every second in air. Thunder is visible almost instantaneously, as light travels nearly 1,000,000 times faster than sound does.

The only difference in ultrasonic ranging is the use of sound frequencies that are beyond the range of normal human hearing. Young humans can hear sounds with frequencies ranging from 20 Hz to 20 KHz, with the upper limit dropping off to 15 KHz or even to 10 KHz with advancing age. Frequencies of 30 KHz to 40 KHz are common in ultrasonic ranging.

In ultrasonic ranging, a burst of high-frequency sound is generated, and a timer is started simultaneously. The timer stops as soon as the echo arrives. The burst of sound leaves the transmitter, hits the target object and returns to the receiver. Therefore, it took only half of the total time elapsed for the sound to reach the target object. This half-time multiplied by the speed of sound in the medium gives the distance of the target object from the source of the sound.

Although the sensors for producing the ultrasonic sound and for receiving it may take many complicated shapes depending on the actual application, for general purpose ultrasonic ranging, the sensor module looks like:

The associated electronics on board the sensor module consists of a microprocessor programmed to generate a burst of sound on trigger. The microprocessor also measures the time taken to receive the echo (time of flight) and thereby calculates the distance.

Ultrasonic ranging is mostly used in two ways for locating objects – proximity detection and precise range measurement. In proximity detection, any object passing within the preset range will be detected and the module will generate an output signal. The detection will be independent of object size, material or degree of reflectivity.

Ultrasonic ranging is also used for precise measurements of an object moving to and from the sensor. As explained earlier, the time of flight is measured for calculating the distance between the sensor and the object. By repeatedly sending sonic bursts and measuring the echo received, the distance of change is continuously calculated and displayed.

Depending on the frequency of sound generated by the ultrasonic transducer, the sensing range can vary from a few centimeters to about 10 meters.

How Do You Measure Current Flowing In A Circuit?

Engineers have several methods of measuring currents flowing in circuits. The method depends on the magnitude of the current whose range can vary from a few pico-amperes to thousands of amperes.

Current flow in a circuit primarily causes two effects: voltage drop and magnetic field generation. Passage of electric current through a material produces a voltage drop. For most conductive materials, the voltage drop is proportional to the current and this remains true over a wide range. Therefore, by measuring the voltage drop, you can infer the current. This forms the basis of most resistive current sensing,

Engineers also measure current by the magnetic field it generates. The magnetic field generated is at right angles to the flow of current. Any magnetic material placed in the region will concentrate the field in itself depending on its permeability. The main advantage in magnetic current sensing is the isolation. No direct contact is necessary with the circuit carrying the current.

Using highly stable and linear resistors, which are available as standard circuit components, it is easy to measure current flow. The sense resistor is placed in series with the circuit in which the current is to be measured, causing a voltage drop. By using Ohm’s law, the current flowing is the ratio of the voltage drop to the resistance of the sense resistor.

How you measure the voltage drop across the sense resistor, depends on where the resistor is placed in the circuit. If one end of the sense resistor is on the ground side, which essentially means all the current through the sense resistor flows into the ground, the measurement is called low-side measurement. With high values of current, the ground voltage can vary considerably depending on where the measurement is made.

However, the sense resistor can be placed in the circuit such that there is non-zero voltage on both the ends of the resistor. Measuring in this way is called high-side measurement, and a special amplifier such as a differential amplifier is required for accurate readings. Both high-side and low-side resistive methods of measuring current have some drawbacks.

The presence of the sense resistor causes additional voltage drops in the circuit and may also introduce parasitic series or parallel resistance affecting the functioning of the circuit. Voltage drop across the sense resistor may also change its temperature, resulting in a drift in the reading with time.

Where safety is critical, especially in high voltage circuits, current flow in the circuit is measured by the magnetic field it generates. The major advantage in such measurements is the sensing circuit need have no direct electrical contact with the current being sensed.

The magnetic field generated by the current is distributed in free air and a magnetic sensor placed nearby will not give very reliable results. In actual practice, a magnetic toroid is placed around the circuit and this helps to concentrate the magnetic flux within itself. A magnetic sensor placed on the toroid will now sense the magnetic flux in the toroid and give more reliable readings.

Are OLEDS better than LEDS?

Chances are, you still own a TV that is bulky, has a picture tube and is kept on a table. Well, with advancing technology, TVs have become slimmer and lighter, can hang on the wall and do not have a bulky picture tube.

The new TVs have an LCD or a Liquid Crystal Display in place of the earlier picture tube. Now, unlike the picture tube, LCDs have no light of their own, and have to be lit with a backlight. Until recently, most LCD TVs were backlit with plasma discharge tubes or CCFL lamps.

The CCFL lamps are placed directly behind the LCD panel and this adds to the overall thickness of the TV. Another newer method of lighting up the LCD panel is with LEDs and these are placed all around the panel, just beneath the bezel of the screen. Some models, especially the larger sized TVs place the LEDs behind the panel.

According to the TV manufacturers, LED models provide a better contrast (difference between black and white parts of the picture). This is because LEDs can be turned off completely to render a complete black portion. With CCFLs, there was no turning off, and the blacks produced were not so deep.

With further advancement of technology, there is a new kid on the block, called OLED or Organic Light Emitting Diode. This is a thin layer of film made from an organic compound which emits light in response to an electric current. Unlike an LCD, an OLED screen needs no backlighting, making it the thinnest of all the screens for a TV; a screen, which can be rolled up.

Other advantage of OLEDs is its very high switching speed, which produces practically no blur when there is fast movement in the picture. Moreover, OLEDs can be switched off to produce black color, and there is no leakage of light from the neighboring OLEDs. This allows OLEDs produce the highest dynamic contrast among all the displays. Does that mean OLEDs are better than LEDs?

As the technology is relatively new, there are some primary difficulties that OLEDs face today. The first is OLEDs are still not as bright as LEDs are, and that makes them harder to see in sunlight or even in broad daylight. Additionally, with the present structure of the OLEDs, producing blue light is harder. This makes the images just passable.
Another issue with the OLEDs is their lifespan. At present, the OLED has the shortest lifespan among LED, LCD and other technologies commonly available on the market. The average lifespan of an OLED is only 14,000 hours, which means if you watch eight hours of TV every day, the OLED screen will last only five years.

Although OLEDs are good at displaying high contrast, they hog quite a bit of power when displaying all whites. Moreover, similar to the old cathode ray tubes or picture tubes, OLEDs are prone to burn-in, meaning if you let the picture remain static for long, a shadow of the picture remains on the screen.

The last disadvantage of OLEDs is their prohibitive cost.

Is open source software right for you?

Open Source versus Closed Source Software

Open source software permits downloading, customization and distribution of copies by the user. This type of software offers freedom to its users and promotes its use for business applications. One can download the source code to customize the software. The user has the option to distribute the customized version and its source code either free of cost or for a price. Examples include Firefox, Linux, Android, etc. When distributed free, the software is termed Free Software, and the user is bound by certain ethical practices.

In contrast, closed-source software needs the user to obtain a license for use and does not permit him the option to modify the software or access the source code. Microsoft Windows is a typical example of this type.

License Types for Open Source Software

GPL or General Public License is a common license, which imposes the condition that where a user customizes and distributes the software, he is bound to distribute the source code along with it. In other words, a user modifying open-source software is not permitted to convert it into closed-source software. Users not agreeing for this may opt out of a GPL license.

A BSD license, on the other hand, permits use of the program’s source code into another program. The user is not bound to distribute the source code of the modified software. A BSD license permits developers to use the code into their own closed-source programs, but denies end users similar rights.

Advantages to Users

• Open-source software are available to users at no cost

• Open-source programs are flexible

• One can use or distribute unrestricted number of copies, and would not need licensing for limited instances of usage.

• Open source software does not need developers to “reinvent the wheel”. The developers can use established open-source software to create new applications.

Popular sentiments about open-source software

Misconceptions and ambiguities between “open-source” and “free” software abound in the industry. The term “Free”, while offering convenience, also loads the users with bindings and responsibilities. Potential users often feel uneasy with this term. Many prefer to be vocal about just the immediate benefits of free software, deliberately avoiding the mention of contentious issues such as ethics and freedom. This is done with the objective of selling the software better for business applications. The users would do well to realize timely that the “open’ or “free” software programs, apparently lucrative to begin with, often lure them to proprietary software.

One may tend to believe that an “Open Source company” offers free software. Many developers have admitted in certain forums that they target selling only a portion of their products to the users as “free” or “open”, while they are in the process of developing proprietary add-ons, which the users would eventually need in any case. Developers are even known to use the term “open” to mean open to their internal staff, to ensure better and faster service delivery to their clients.

It can therefore be surmised that the users are made to see only the “lucrative” portion of the deal, whereas software sellers conveniently and effectively camouflage their hidden agenda.