Tag Archives: Raspberry Pi Projects

Brewing beer with Raspberry Pi

Ever since man first tasted naturally made beer, there has been no looking back. Not only man, animals also find beer irresistible. Beer brewers have always been looking for improving on the natural method to make beer tastier. Their work has become somewhat simpler and more high-tech with the introduction of Raspberry Pi or RBPi.

By using open source software and ultra-cheap computer hardware such as the RBPi and the Arduino, people are interconnecting all types of existing devices making them interact with each other. An ardent home brewer and Dutch electrical engineering student, Elco Jacobs has turned his refrigerator into a home beer brewing system. He calls it his BrewPi system and plans to sell kits. He has turned over his instructions and source code on-line for free, since he thinks they might be useful to others even if they do not brew beer.

Elco Jacobs has essentially beefed up his refrigerator with sensors, which send their data to an Arduino board. The Arduino adjusts the controls on the refrigerator for temperature and displays the results on an OLED display. The RBPi has a web server loaded and it provides the web-based interface for viewing. A Python script running on the RBPi allows it to communicate with the Arduino.

By using Jacob’s code, anyone can build a web interface to control an Arduino. The code makes it easy to use an Arduino to control an OLED display and present data on it after filtering the sensor data. When Jacob first started brewing beer at home, he was still a university student. He became interested after learning that to start brewing beer would cost him about 60 euros. He quickly learnt that temperature control was the main thing required when brewing to determine the fermentation rate of the beer and subsequently its flavor.

Hefeweizen, the favorite style of beer for Jacob, is particularly sensitive to temperature fluctuations. The taste of this beer alters radically if the heat to the beer buckets was not under finely tuned temperature controls. However, commercial temperature controls being outside the affordability of a university student, Jacobs wanted something cheap that he could control from the web.

That is how he hit upon the combination of the Arduino (for temperature control) and the RBPi for the web interface). Jacob’s goal is to sell a kit, which will require no soldering. The kit will not have the RBPi and the refrigerator.

By controlling the temperature of the fridge that holds the carboy, BrewPi is able to control the temperature of the fermenting beer accurately. Two zones of temperature are controlled separately, the fridge temperature and the beer temperature. This allow the beer temperature to be held far more steady than if a single thermostat were to be used. However, you can set BrewPi to operate in three modes: constant fridge temperature, constant beer temperature or allow it follow a temperature profile for your beer.

Highlights of BrewPi: four outputs for actuators, single wire bus for all sensors, a OneWire distribution board and lots of pluggable terminals.

Raspberry Pi and Laika

Raspberry Pi and Laika – A Powerful Combination for Robotics

Some of you may recall Laika, the first dog in space, and the first animal to orbit the Earth. In 1957, Laika gave up her life to prove that living beings can survive being launched into orbit.

This platform, aptly named the Laika Explorer, presents a powerful robotics control for your Raspberry Pi (Raspberry Pi). With Laika Explorer and using C, Python or Scratch programming, you can control switches, lamps, motors, robots and more from your Raspberry Pi.

The Laika Explorer is a simple platform, and you can start with the Scratch programming language for controlling the hardware in a matter of minutes. You only need to download the drivers, plug in the USB cable and you are ready to go, building up your hardware and software skills.

The Laika Explorer provides you with:

— Inputs to connect sensors, switches and other input devices – 2x analog and 4x digital;
— Outputs for controlling LEDs, motors, sounders and other output devices – 7x digital;
— Control for motors, drive forward, reverse and brake – 2x H-bridge motor drivers;
— Interaction between hardware and software – 4x switches;
— Diagnostics for digital outputs – 7x indicator LEDs

All the above are available on one PCB. You connect this PCB to your Raspberry Pi using a USB lead, and start the control by using one of the three programming languages – C, Python or Scratch. If you buy the Inventor’s kit, you get a laser cut, custom designed Perspex base to mount the Explorer board and the Raspberry Pi (the Pi is not included with the kit). Some motors, LEDs, potentiometers, wiring, etc., are thrown in. The USB connection will give you access to all the hardware control on the Laika Explorer board.

By sending a Scratch Broadcast, you transfer data to the Explorer board and to the seven digital outputs. Each output is capable of handling 500mA, although not at the same time. Each output is also protected by a back-emf diode, which means you can connect small motors, relays and solenoids, without having to worry about blasting the output driver transistors.

The dual h-bridge motor driver on the Explorer board is very useful in driving two motors individually. The two motors can be independently driven either in backwards, forwards or in braked condition. Both channels can each handle 1.5A continuously, or 3A if you want to drive one bigger motor with the outputs tied together.

The two analog inputs on the Explorer board provide 10-bit resolution. This makes it possible to use variable resistors or potentiometers to give precise control.

In practice, you do not need Scratch running on your Raspberry Pi to control the connected Laika Explorer. You can run a special Python script on your Raspberry Pi, allowing use of Scratch to communicate with the Laika Explorer over a network connection. Therefore, now you can control your Raspberry Pi robot through your Wi-Fi connection.

What does the future look like for Laika? Well, it is quite exciting as of now, with other modules in development. One such module is the multiple radio transceivers (868MHz for EU and 915MHz for US) forming a mesh network extension option, an exciting option for home automation to control lights, music and more through Raspberry Pi and Laika.

Publishing Photos with the Raspberry Pi and Pygmyfoto

You have tons of photos, which you would like to share with your acquaintances, loved ones and so on. Well, there are several sites on the web that will allow you to do so, but doing it through your own server has a separate charm. Additionally, if that server can be put up with the new Raspberry Pi you just bought, then the project takes on a whole different hue altogether.

Although your Raspberry Pi (RBPi) is completely capable of doubling up as a web-server and sharing photos on the web, most of the popular photo publishing applications, such as Piwigo, Gallery, etc., are heavyweights meant for the PC. For publishing your photos online through RBPi, a lightweight entity such as Pygmyfoto is a better choice. Not only can you publish your photos in a continuous roll, Pygmyfoto allows you to add a brief description and assign tags to your photos. In addition, Pygmyfoto displays key EXIF data after automatically processing the photos.

Now the viewer has all information of the exposure, aperture and ISO you used when you clicked the photo. Not only this, Pygmyfoto also adds a link to the photo’s full size version, along with a map URL. Now, if your photo was geotagged, the URL will allow the viewer to use OpenStreetMap service to view the exact place where you had clicked the photo.

When you need simple photo sharing without the unnecessary extras, bells and whistles of more advanced blogging platforms, Pygmyfoto may be more suited to your needs. Since it is open-source, you can tweak it to meet the requirements of even the simplest of hardware. Pygmyphoto is meant to be simple, and if you find something you need is missing, well, you can program it in.

So, how do you install Pygmyfoto on an RBPi? First, you need some required packages to be installed. For this, set up your RBPi to run the following command:

sudo apt-get install apache2 php5 sqlite3 php5-sqlite imagemagick libimage-exiftool-perl git

Now you must switch to the directory /var/www and clone the repository of the Pygmyfoto GitHub:

sudo git clone https://github.com/dmpop/pygmyfoto.git

Now change the directory’s owner and group with:

sudo chown www-data:www-data -R pygmyfoto

Switch to the Pygmyphoto directory and use a text editor to open phpliteadmin.config.php. Replace the default password by editing the line –

$password = “admin”

Modify the default values in the file config.php, if necessary.

Now you can add photos to the directory pygmyphoto/photos. Run the ./pygmyphoto.sh command in a terminal, and provide the required into.

The viewer must point their browser to http://127.0.0.1/pygmyphoto to view your photos. Of course, they must replace the 127.0.0.1 with the IP address or the domain name of your server.

For accessing and managing your database at pygmyphoto.sqlite, you must make it writable. Use the command:

sudo chmod 600 pygmyphoto.sqlite

Now, you can point your browser to http://127.0.0.1/pygmyfoto/phpliteadmin.php and log in. you must use the password you specified in the file phpliteadmin.config.php earlier. Do not forget to replace the 127.0.0.1 with the IP address or the domain name of your server.

4 Accessories to Turn your Raspberry Pi into a Workhorse!

Gert Board To Pair Up Your Raspberry Pi With The ATmega Microcontroller

You can now expand the General Purpose Input Output (GPIO) pins of your Raspberry Pi with a Gert Board. Gert Board is the brainchild of Gert Van Loo, one of the developers of the alpha version of the Raspberry Pi. With the addition of the 28-pin ATmega microcontroller, you have the entire Arduino Integrated Development Environment (IDE) at your disposal. Moreover, it is possible to add any of the following ATmega controller models to the Raspberry Pi – ATmega 48A/PA, ATmega 88A/PA, ATmega 168A/PA or the ATmega 328A/PA.

So, what does this mean for your Raspberry Pi? By adding the Gert Board, you get an 18V @ 2A port for your motor projects. You also get a 2-channel, 8-, 10- or 12-bit Digital to Analog converter along with a 2-channel 10-bit Analog to Digital converter. Additionally, you get 6-Open Collector drivers capable of 50V @ 0.5A, 12-Buffered I/O’s and three push buttons.

PiFace Digital Controller

If you intend to control external hardware via the Raspberry Pi’s GPIO header, the easiest way is to use the PiFace Digital developed by Andrew Robinson of the University of Manchester. The PiFace Digital has two onboard changeover relays, and this is the central feature of the add-on board. The changeover relays have open-and-close positions, which are accessible to the user. Each open-and-close position of the relay can handle 5V @ 10A maximum. You can program the board through Python, C or Scratch. Scratch has also developed an emulator, called the PiFace Emulator. This gives you a graphical control over the features of PiFace. Not only this, PiFace has additional onboard features such as eight digital inputs., eight open-collector outputs on connectors, eight LED indicator lights on the outputs and four tactile switches.

Pi Camera

The Raspberry Pi has an onboard CSI port, which you can connect using a ribbon cable to the Camera Module. The Raspberry Pi camera module measures only 25mm x 20mm x 9mm. The tiny module has an Omnivision 5647 fixed-focus module that can handle 5MP still images, while weighing only 3 gm. You must use a 4GB or larger SD Card on your Raspberry Pi, as this is where the images from the camera are stored. The camera can handle resolutions of 1080p30 (1080 pixels at 30 frames per second), 720p60, and 480p60/90. The CSI bus on the Raspberry Pi is capable of handling high data rates streamed directly to the processor on board (BCM2835 ARM 11).

A Slice of Pi

This breakout board, called the Slice of Pi, is the least expensive of all the expansion boards for the Raspberry Pi. The board has a serial peripheral IO port expander, MCP23017, which adds 16-input/output channels to your Raspberry Pi. Apart from this unique feature, you can also use the board as a custom development area. One key feature of this Slice of Pi is the Xbee style connector mounts. Since this can support the XRF, Xbee and the RN-XV wireless modules, the functionality definitely expands the popularity of the board. Apart from this, you have easy access to the on-board GPIO, the 3V3, 5V; GND and the TX/RX solder points.

Do Even More with your Raspberry Pi

When you own a Raspberry Pi, there is so much you can do with it. However, combine the bare Raspberry Pi with some attachments, and you have a gadget that could far exceed your expectations. Presented here are some of the more useful attachments, which will increase your expectations from the Raspberry Pi.

LCD Option from 4D

When you want to exploit the full HD capabilities of the Raspberry Pi, give it the color LCD options from 4D Systems. The company’s EVE (Extensible Virtual Engine) that is featured by the “Picasso Processor” drives the 480×272 pixels on the TFT Screen of the 4.3-inch “uLCD-43-PT-Pi”. This gives you 65,000 true to live colors on a 4.3-inch diagonal screen. The 4.3-inch screen is notable for its resistive touch layer, which can sense both finger as well as stylus interaction.

When you are going portable with your Raspberry Pi, this screen will be absolutely essential. To connect with the Raspberry Pi, this series of LCD screens from 4D has a “4D Serial Pi Adapter” that connects to the GPIO port of the Raspberry Pi board, through a 5-way cable adapter. The best feature of this adapter is it does not hog all the GPIO port, but allows for duplication of the GPIO lines, so that you can stack another board on top.

AlaMode

A team of like-minded students and engineers has made the AlaMode board that has some special features. Working off the Raspberry Pi GPIO port, AlaMode is a stackable board compatible with Arduino. The goal of the Wyolem Team was to provide the Raspberry Pi and its user’s access to the vast library, devices and “Shield” expansion boards available for the Arduino and its community. This allows you the complete freedom to program the Raspberry Pi in any language you prefer and control the Arduino or the AlaMode directly.

The AlaMode takes its power directly from the Raspberry Pi, or you can power it separately from USB, wall-mart or external batteries. For application memory support or for data logging, a micro-SD card slot is added. You also have a real-time clock (DS3234), which reports its time back to the Raspberry Pi, thus removing the necessity to program two clocks.

You can even connect a Fastrax UP501 GPS receiver module on the AlaMode. This opens up the Raspberry Pi to the expanding stackable shields of the Arduino.

LCD & Keypad Kit

Some Frequently Asked Questions about Raspberry Pi

Q. What is a Raspberry Pi?

A. The Raspberry Pi is a low cost, tiny computer, about the size of a credit card. You can plug your keyboard, mouse and your TV into it, and use it just as you would use a PC. It is capable of playing games, word-processing and working with spreadsheets. You can even watch high-definition video. The composite and HDMI out allows you to connect to any old analog TV, a digital TV or to a DVI Monitor. It is a wonderful device for kids to learn programming.

Q. What are the different models of Raspberry Pi available?

A. As of today (August, 2013) there are two: Model A and model B. Model A has 256MB RAM and one USB port. Model B has 512MB RAM, 2 USB ports and one Ethernet port. When you buy the Raspberry Pi, you get only the board. No SD card or power supply is included, but you can buy them separately. Pre-loaded SD cards are also available.

Q. What are the physical dimensions of the Raspberry Pi?

A. The Raspberry Pi dimensions are 85.6x56x21 (mm) or 3.37×2.21×0.827 (in.), with a small overlap as the connectors and the SD Card project over the edges. The Raspberry Pi weighs about 45 gm.

Q. What is the SoC used for the Raspberry Pi?

A. The SoC or System on Chip is a Broadcom BCM2835. This contains an ARM1176JZFS processor running at 700 MHz, with floating point and a Videocore 4 GPU. The GPU is capable of Blu-ray quality playback and uses H.264 at 40MBits/s. The fast 3D core is accessed using the supplied OpenVG and OpenGL ES2.0 libraries.

Q. How powerful is the Raspberry Pi?

A. The GPU or the Graphical Processing Unit operates with OpenGL ES2.0 and the hardware-accelerated OpenVG libraries, providing 1080p30 H.264 high-profile decode.
The GPU can provide 1Gpixel/s, 1.5Gtexel/s or 24GFLOPS of general-purpose compute along with several texture filtering and DMA infrastructure.
In real world terms, the performance is similar to a 300MHz Pentium 2; however, Raspberry Pi provides much swankier graphics. Overall, the graphical capabilities can be equated to an Xbox 1 level of performance.

Q. Will the Raspberry Pi blend?

A. Yes, extensive virtual simulations have been carried out, there were no failures.

Q. Is it possible to overclock the Raspberry Pi?

A. Most of the devices run comfortably at 800MHz. The latest operating system has options of changing the options for overclocking on the first boot. If you run “raspi-config” you can change the options again at any time, and your warranty stays intact. However, these settings are experimental and not every board can be expected to run stably at the highest setting. To restore stability, try reducing the settings for overclocking.

Q. How do you boot the Raspberry Pi?

A. You need a pre-loaded SD card to boot. After the initial boot, a USB HD can “take over”. The root partition on the SD card must contain the operating system. Currently Debian Linux is the default distribution, but you can use any other ARM Linux distro available on the downloads pages.

Q. What are the power requirements of the Raspberry Pi?

A. The device is powered by 5V from the micro USB. To switch on, simply plug in the USB, to switch off, remove the power.

Let Raspberry Pi Make It to the Movies through XBMC

The Raspberry Pi is capable of HD video. Won’t it be great if you could playback your Blu-ray movie collection through Raspberry Pi on to your HD TV or monitor? That would be possible if you knew how to let Raspberry Pi run XBMC.

What is XBMC?

XBMC is a software media player and entertainment hub, and the best part is you do not need to pay anything to get it, as XBMC is free and open source (GPL). As a media player, XBMC has almost everything you will need, right from TV and remote controls, to support for digital media files from local and network storage media including the internet. You can play and view most digital media files such as podcasts, music and videos.

There is not much that XBMC misses. You get to play all your music files in mp3, flac, wav and wma formats. You can watch movies in all the main video formats including streamable online media. You can keep track of your progress of season views and episodes of TV shows. You can import pictures into a library for browsing as in a slideshow, and you can record live TV all from the nice GUI interface that XBMC has.

Step 1: Download XBMC

You will need to download an image of XBMC, which is available as “debian-xbmc-24-04-2012.zip” and you can get it here. Unzip the file to get to the image.

Step 2: Write the Image on to an SD Card

If you are on Linux or OSX, open up a terminal and navigate to the folder containing the downloaded image. To write to an SD card, you have to enter the following command –

dd bs=1m if=debian-xbmc-24-04-2012.img of=/dev/rdisk1

Note that ‘/dev/rdisk1’ depends on the type of PC you are using.

If you are still on Windows, you need the Win32DiskImager utility program to write the image to the SD card in the device box.

Step 3: Make Space on the SD Card

The image written to the SD Card will be about 2GB, leaving about 60MB free space. This is not enough for XBMC to operate properly. Use Gparted, which is the Debian partition editor to expand the free space. Assuming you have a 16GB card on which you installed the OS and XBMC, there is still 13GB space left over. Go into Gparted, and expand the Linux swap partition to cover the 13GB. That will allow XBMC to use the free space.

Step 4: Start Action

Plug in the SD card into your Raspberry Pi, and boot it up. At the command prompt, type –

XBMC

and you should be able to see the following –

Note that XBMC is still an alpha release, and is somewhat fragile. It might lock up or not start at all. This is expected and you may need to restart Raspberry Pi over again to get XBMC play properly.

Try out all your music, video and other programs including your favorite TV shows, and you will be surprised at the quality of the output from the combination of XBMC and Raspberry Pi.

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.