Tag Archives: RBPi

Cool your Raspberry Pi with PiCoolFan

Applications for the single board computer, the Raspberry Pi or RBPi are exponentially increasing and there is a great demand on the RBPI for extending its performance to the limits. While users try to push their RBPi to achieve higher results with overclocking, this may result in SBC frying itself, unless the CPU temperature is kept in check.

To enable complete control over the CPU temperature, an advanced cooling fan system is available – PiCoolFan. On the bonus side, the system also includes a Real Time Clock that RBPi does not have in-built. Therefore, if your RBPi is running hot, for whatever reasons, you can use the PiCoolFan to keep its CPU cool. The applicability extends to all models of the RBPi.

The cooling fan does not require any additional power supply to operate. It draws its power from two GPIO pins. You simply have to insert the connector on the PiCoolFan on top of the P1 connector of the RBPi. A dedicated sensor on the PiCoolFan continuously senses the PCB temperature of the RBPi, feeding the readings to an embedded temperature measurement system on the PiCoolFan. Depending on the measured temperature, the micro-controller on-board the PiCoolFan will start, stop or regulate the rotational speed of the tiny fan.

As an added advantage, PiCoolFan contains an Air Distribution Plate, which cools not only the microprocessor on the RBPi board, but also all the heat-generating devices and the entire RBPi PCB. The RBPi user can easily access the embedded micro-controller on the PiCoolFan via the I2C interface. Apart from being able to read the temperature measured, the user can also set the temperature threshold and the temperatures at which the micro-fan will start and stop.

The PiCoolFan also offers on the same board a real time powering voltage monitoring and a real time clock with full battery backup. The entire unit is small enough to be included within most of the already existing cases of the RBPi. Apart from reading the temperature via I2C interface, PiCoolFan offers the user an information system based on three LEDs. A glowing blue LED assures the user the RBPi is comfortably within the allowed operating temperature range. If the temperature exceeds the range, the red LED will start to glow.

A flashing green LED indicates the powering status. When the voltage is within threshold limits, the flashes are continuous. When higher than the threshold, the frequency of the flashes increases. If the voltage is below the threshold limit, the frequency of the flashes decreases. Therefore, with a transparent case, it is easy to see from a distance whether the temperature and voltage of the RBPi system is within specified limits.

The user has complete control over the PiCoolFan system via the I2C interface. The fan can be switched on or off unconditionally and its speed controlled by pulse width modulation or PWM. The user can read the current system temperature and set the temperature threshold – PiCoolFan supports both the Celsius and the Fahrenheit scales. The PiCoolFan kit contains all the hardware necessary for setting up the fan and the air distribution plate.

Get VGA from your Raspberry Pi

Those of you who use the single board computer, the Raspberry Pi or RBPi, know that it has two video outputs. It offers high definition video via the HDMI port and a composite video via the RCA port. For viewing the output of the RBPi on a VGA monitor, one must use an HDMI to VGA adapter or similar. However, there is a simpler and cheaper method now available – the Gert VGA 666.

The Gert VGA 666 is a breakout/add-on board, useful only for the RBPi Model B+. The board does not work on other RBPi Models such as A and B, as it requires the additional GPIO pins that are only available on the Model B+. Gert van Loo has designed this Gert VGA 666 board and has released it as an open source hardware design. Incidentally, Gert van Loo was associated with the initial design of the original RBPi and is one of the architects of the BCM2835 chip that forms the heart of the RBPi.

The Gert VGA 666 is a useful and neat solution for attaching a VGA monitor/screen to your RBPi. Additionally, this works out much cheaper than buying a converter or adapter for converting HDMI to VGA. A parallel interface from the GPIO pins drives the hardware natively for the VGA connection, using the same CPU load as the HDMI connection does. Users have the added advantage of setting up a dual screen, one for HDMI and the other for VGA. This is possible as the RBPi can drive both interfaces at the same time. With no CPU load, you can expect a VGA video display with resolution of 1080p60 or 640×480.

You can buy this adapter in the form of a kit, comprising the PCB for Gert VGA 666, a 40-pin header connector for the GPIO, a 15-pin female VGA connector, 20 through-hole resistors and two Pi supply stickers. When assembled and fitted on the RBPi, the board uses up nearly all the GPIO pins on the Model B+. Therefore, it will not be possible to use any other add-on boards at the same time when using the VGA adapter.

The decision to offer the adapter as a kit stems from the requirement of meeting EMC compatibility regulations. A fully assembled board would be required to meet most EMC regulations. However, these regulations do not cover the kit, as it is a homemade electronic product.

After soldering the board, plug it into the RBPi and power up the combination. However, the adapter does not work directly and you will need an intermediate solution for video output. You can use either an HDMI or a DVI-D monitor. If that is not available, use a composite monitor or TV via the RCA port. However, using the composite video means you will need to program the NOOBS on the RBPi.

After booting, you must install the necessary drivers for the Gert VGA 666 adapter. This requires an Internet connection, preferably via an Ethernet connection. If you simply plug in the Ethernet cable, Raspbian will automatically start to use it.

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.

A New Operating System for the Raspberry Pi

The Single Board Computer, the Raspberry Pi or RBPi runs on a version of the popular operating system Linux – the Raspbian. Although there are other versions of Linux equally capable of running on the RBPi, another operating system is in the making. Not ready yet, the Tizen 3.0, is being ported for the RBPi Model 2.

While not attracting a lot of attention, Tizen is another Linux-based operating system into which huge resources are being pumped to make it more popular for the RBPi. The Linux Foundation is providing all the guidance for its development along with help from a number of companies led by Samsung.

Samsung is pushing for the adoption of Tizen, which, until now, it has implemented only on some low-end devices including a watch. Samsung wants Tizen as a replacement for the Android OS developed by Google, mainly because it has to pay royalties to Google. Hence, Tizen 3.0 for the RBPi 2 is an important step for Samsung.

However, the trouble is the community is not very aware of Tizen. The main issue is people do not even know of its existence. By making it available for the RBPi, an SBC already in use by over a million people, Samsung expects to make Tizen more popular.

The Open Source Group of Samsung is currently attempting to port Tizen 3.0 to the RBPi 2. Their goal is to run a fully functional Tizen 3.0 on the RBPi 2. They have chosen the RBPi 2 as their base system, as this is the most popular SBC that more than five million people are using.

Although Tizen 3.0 is presently working on the RBPi 2, there are still a number of issues that Samsung has yet to sort out. For example, installation of applications is one of the biggest issues they need to overcome. However, one can assess the speed of the porting process, as the developers have already managed to enable the 3D acceleration on the platform. However, there is still no indication of when Tizen 3.0 may be available in a stable form, and Tizen 3.0 is still in Beta stages.

In its stable form, Tizen 3.0 will ship with Linux Kernel 4.1 and Wayland in place of the familiar X-windowing system. Linux Foundation, the developers of the open source Linux operating system, aims to run it on phones, tablets, watches, and in-vehicle entertainment systems. They claim Tizen 3.0 will bring some interesting changes.

Although many companies are still evaluating their choices, some of them have chosen to support Tizen as they are looking for alternatives to Android. They know it is not an easy task to move people away from Android, just as Microsoft has discovered to their chagrin.

The Linux Foundation is building Tizen for various profiles and is making the current iteration for the TV and Mobile. It will support 64-bit systems and provide a replacement for the X-server in the form of Wayland. Additionally, Tizen will come with Chromium-efl, a generic policy manager, in place of Webkit2.

Raspberry Pi Can Keep Your Plants Happy

Those who like indoor plants know how important it is to maintain a proper atmosphere for the plants to grow happily. Only a few parameters are important – air humidity, air temperature and soil moisture apart from adequate sunshine. However, it is rare for people to be able to monitor the health and well-being of their flora personally, given the busy schedules.

That is where a single board computer such as the Raspberry Pi or RBPi can help. Being flexible in setting up and connecting to the various sensors necessary, this SBC not only looks after the plants, but also alerts you with SMS and via email whenever the situation differs from the normal. This project also has an app, Plant Friends, for your Android phone, so that you are up to date on the real-time and historical parameter data on your plants. The project consists of three main components – the sensor nodes, the base station and the app.

You need a sensor node for each plant. Each of these sensor nodes consist of an Arduino clone called Moteino fitted with an RF transceiver, a battery meter, a temperature sensor, a humidity sensor and a sensor for soil moisture. The sensor nodes collect the readings from all the sensors and transmit the data using the transceiver to the base station. The sensors and the base station are connected via the 915MHz ISM band.

For this project, users must be slightly above the beginner level. Some basic experience with Arduino hardware and Arduino IDE will be necessary – for installing libraries, making LEDs blink, etc. Additionally, experience in wielding a soldering iron is also necessary. On the RBPi side, it is essential to be familiar with the basic knowledge of the SBC and with installing the Raspbian OS.

The Plant Friends system has several advantages. It reminds you to water your plants and sends you an alert via email and/or SMS. It works for multiple plants at the same time, even if they are in different rooms of your home. Since wires are a minimum and all components of the system are of a reasonable size, you can move the plants and the system freely about the home.

The entire system consumes low power and therefore runs on batteries. Typically, battery swaps are necessary every 4 to 6 months. The electronics is low-maintenance as it is housed in a moisture-proof enclosure. The best part of the system is the Android app, as it allows monitoring from anywhere in the world.

An RBPi, model B, is used for the project, although a model A will work equally well. However, model B has more RAM and an Ethernet port, which may be necessary for flexibility. A USB Wi-Fi adapter helps to connect to the internet.

For each sensor node, you will need a holder for four AA type rechargeable batteries. In addition, you will need a combined sensor for temperature and humidity. For sensing the moisture in the soil, you may use a soil probe consisting of a PCB with exposed traces. However, ensure there is no lead involved.

PIR Sensor: Let Raspberry Pi Guard your Home

With a versatile platform such as the Raspberry Pi or RBPi, prototyping a project is very simple. The scale does not matter for you can start with a single blinking LED and move on to complex quad copters. If you have the necessary components, simply add a little amount of imagination, and RBPi can work wonders for you.

A practical use for the RBPi is to sense the surrounding environment. Not only is this interesting, but also gathering this data is useful in myriad ways. For example, a weather station uses different sensors to measure pressure, humidity, wind speed and temperature. The main objective in recording and manipulating such data is to predict future weather conditions. Anyone technically savvy can store this data and manipulate it to produce tables and graphs for importing into other applications or projects.

Using a PIR or Passive Infra-Red sensor with an RBPi can be an effective guard for your home. These inexpensive sensors are used with motion activated air fresheners from which, you can easily harvest a couple for building this project. The PIR and RBPi combination can act as an effective burglar alarm in homes and offices.

The PIR sensor effectively sends out a beam of infrared light into the area that it is monitoring. As long as there is no movement in the area, the beam remains undisturbed. However, the slightest movement causes the beam to change, which the PIR sensor can sense. The PIR sensor, when connected to the RBPi, sends it a signal once it detects movement. The RBPi responds to this signal in a manner defined by its program.

For this project, the PIR sensor is set up to watch over an area for any movement. As soon as it detects movement, it triggers the RBPi, which responds by capturing a picture of the event on its camera, including recording a 10-second video at a resolution of 640 x 480 pixels.

Additionally, the RBPi will send out a text message to the owner’s phone, thereby alerting the user of an intruder or whatever that triggered the event. The text message includes the picture and the video. After sending the text, the RBPi will wait for 30 seconds before resuming its watchful stance.

Apart from being an effective burglar alarm, you can use this combination of PIR sensor and RBPi with its camera in many innovative ways. For example, those who like to study birds and their habitat, can set it up near the nest to record the coming and goings of the parent birds.

Using a text message to alert the user is effective, as all phones are capable of receiving SMS. Other methods using emails or tweets usually rely on 3G or Wi-Fi coverage and may not be always useable. Additionally, you can use several alerts from the project simultaneously. The RBPi stores the pictures and video it captures in its memory. You can retrieve them later via any means convenient.

To set up, install the OS in the RBPi, enable the camera via raspi-config and test its working. Use the command “raspistill -o test.jpg” for testing. This produces an image file by the name test.jpg.

Keep Your Fish Happy with a Raspberry Pi

People who keep fish in aquariums at home know it is important to feed them timely and to keep their habitat clean. Trouble starts when the owner has to leave home for a few days and cannot find a knowledgeable caretaker to take care of the pets. Cabe Atwell tried to solve the problem he faced in an ingenious way – by using the power of the Internet.

Cabe had an automatic fish feeder, but he also enlisted the services of a friend to keep an eye on her goldfish, the friend was not sure of what was required and the automatic fish feeder broke down. Fortunately, the losses were not fatal, but Goldie the goldfish grew to double her size because of overfeeding. This led Cabe to work on a system to allow watching and feeding the pet over the Internet.

Cabe wanted a system that would allow seeing the fish in real time, anytime, by moving a camera around the tank. The next requirement was sensing the tank water temperature and cutting off the power to the tank bubbler and air filters, if necessary. It was also necessary to feed the fish manually, and above all, to do this through a network and ultimately, via the Internet.

Cabe’s research led to the conclusion that a Single Board Computer such as the Raspberry Pi or RBPi and a Pi camera would be most suitable for seeing the fish via the internet. For the other features, an Arduino Uno was more appropriate.

Accordingly, Cabe selected two small Nema 17 mount stepper motors, available on Adafruit, for the driver components. The motor controls came from an Arduino Motor Shield, which made it simpler to drive the motors. Cabe designated one motor for allowing movements in two directions, while the other rotated the food container to dump fish food into the water.

The fish feeder was a modification of the original malfunctioning feeder. It consisted of a drum to hold the fish food. When rotated completely around, a simple trap door opens briefly to let a small amount of feed.

To keep the camera motor traveling too far, Cabe incorporated limit switches in both directions. The limit switches were placed in position using rare-earth magnets, which allowed easy adjustments for the movement range. A surplus belt driven motion platform provided an affordable arrangement for viewing the entire length of the tank.

For sensing the water temperature, a waterproof digital temperature sensor was the most suitable – DS18B20. Although fresh-water fishes are more tolerant of water temperature variations, loss of air-conditioning or heating arrangement can lead to the tank water becoming too hot or cold for the comfort of its occupants.

For the video stream, Cabe settled on VLC since it was easier to use. VLC offered the maximum resolution of 640×480 pixels at 15 frames per second, which Cabe found adequate for keeping a tab on the fish. A simple AC relay took care of feeding power to the air filters and bubbler.

For the future, Cabe wants a better AC control and more sensors for measuring the pH, ammonia and nitrate levels in the water.

Incubating Eggs with a Raspberry Pi

Incubating eggs is a process best left to the mother bird alone or sometimes the father bird. That is because nature has programmed them for applying the appropriate temperature profile necessary to hatch their eggs successfully. However, this vital information is no longer the sole proprietary knowledge of the birds alone. Humans, at least those who rear chicken, probably know as much.

Hens incubate their eggs by sitting on them and instinctively controlling several factors, mainly the temperature and humidity, with their body heat. They also turn the eggs over periodically, which is vital for a successful hatch.

Although there are commercial alternatives available, building your own incubator has its own advantages such as affordability and the ability to add features. Dennis Hejselbak from Denmark has not only made such an incubator, but has also posted complete build instructions here. For those who want to follow, Dennis uses a Raspberry Pi or RBPi, the tiny, versatile single board computer for controlling his incubator. He has made available the necessary Python codes and the wiring schematics as well.

Dennis has built his incubator box from polystyrene, which makes it well insulated. He controls the temperature inside using an incandescent light bulb and an old CPU fan. Wet sponges inside the incubator supply it with the moisture necessary, while a hygrometer keeps an eye on the humidity levels. The RBPi controls the light bulb and the CPU fan based on feedback from a temperature sensor and the hygrometer. Dennis keeps watch on his eggs via a camera attached to the RBPi. He has enabled his RBPi with Wi-Fi and real time pictures of the incubation process are available on his website.

The only process Dennis has not attempted to automate so far is the periodic turning over of the eggs. He does this manually, about three times each day, until the eggs hatch. Although hatching eggs takes about 21 days on average, some eggs may hatch a day or two early and some a day or two late.

As Dennis is using forced air for his incubator, he programs the RBPi to keep the temperature within about 99-99.5°F (37.2-37.5°C). For successful hatching, eggs require 45-50% humidity from day 1 to 18 and 65% for the balance few days. Dennis has placed the temperature and humidity sensors to hang just above the eggs.

As the incubator is a large box, placing the RBPi on its top was not a difficult task for Dennis. This has its advantages as the box needs only a single hole for both the cables of temperature and humidity sensors to pass through – making it easier to insulate. Of course, other holes are necessary for the cable of the light bulb. Dennis handles all monitoring of the RBPi from outside, without having to open the incubator.

The RBPi controls the temperature by turning the light bulb on or off as necessary. A simple electromagnetic relay operated with a power transistor is enough for this purpose, although those who are adventurous among you may opt for a more expensive solid-state relay.

A Primary Display HAT for the Raspberry Pi

A portable single board computer such as the Raspberry Pi or the RBPi ought to have a portable screen, preferably a touch screen that is comfortable to use. This is a long overdue, much sought-after request from users, especially from developers, who see and use several smartphones and tablets with capacitive and or resistive touch screens.

The Pi Foundation has been hard at work on developing a seven-inch touch screen as an add-on to the RBPi. This would be appropriate for a number of projects where you would want to pit the RBPi against a portable tablet or even a laptop. However, for development of embedded systems, people prefer a smaller and more compact version of display. The 2.4-inch TouchScreen display from 4D Systems fills this void perfectly and affordably, being compatible with the RBPi models A+, B+ and RBPi2.

The TouchScreen is almost as large as the RBPi board and covers it as far as the USB and Internet ports, while sitting perfectly on the bank of GPIO pins and covering all of them. At present, the other end of the TouchScreen hangs as there is no support and there is a possibility of its backside touching the connectors. You can expect a set of stand-offs to come soon and these will secure the screen above the connectors and pins of the RBPi.

According to an intentional design decision between 4D Systems and element14, the TouchScreen fits very neatly within the official case of the RBPi. That leaves out only the portable power, which, if the official case could support, would have made the RBPi truly portable.

The 30 gm. TouchScreen module dimensions measure 56.5×65.0x14.2 mm. It has a viewing area of 49.0×36.7 mm, with four mounting holes of 2.6 mm diameter. The QVGA TFT screen has a resolution of 240×320 pixels and sports 65K true to life colors. Integrated with the screen is a 4-wire resistive touch panel. You can display the full GUI output or the primary output on the TouchScreen, just as would a monitor connected to the RBPi. The display uses a PWM control for the backlight and on board, there are three backlight choices, selectable with jumpers – On, Off and PWM.

The display module connects to the RBPi via a high-speed SPI interface working at 46MHz and using SPI compression technology. If you have a kernel that compresses images, expect higher frame rates than the typical value of 17 frames per second. The module does not require a separate power supply as it powers itself directly from the RBPi.

Although the screen has full capabilities, its limitations are because of the way Linux handles framebuffers. For example, although the display can play full motion video, you cannot render OpenGL to the screen. That means you cannot expect hardware acceleration from the SPI screen. Someday, this may be possible if someone tweaks the Broadcom code for the VideoCore and OpenGL.

UPS-PIco for Uninterruptible Power for the Raspberry Pi

The innovative Raspberry Pi or RBPi, the tiny single board computer, has endeared itself to the young and old alike. When used for critical applications, it is often necessary to supply the RBPi with continuous power, for which, an advanced uninterruptible power supply such as the UPS PIco offers several innovative power back up and development features.

With a 300mAh LiPO battery, the standard UPS PIco offers a safe shutdown during a power cut. However, you can easily upgrade this battery to an extended version of 3000 mAh. This will allow you to use the RBPi for a prolonged 8 hours, even if no power supply is available.

An embedded measurement system within the UPS PIco works continuously to check the powering voltage of the RBPi. As soon as it detects the absence or the inadequacy of the cable power of the RBPi, or senses a power failure, the UPS PIco switches over to its battery source automatically. The module continues to check the voltage on the RBPi cable, and if the power is once again available or adequate, it switches over from the battery and allows the regular cable supply to power the RBPi.

You do not need any additional cabling or a separate power supply for charging the battery, as the UPS PIco is a powered unit, with the GPIO pins on the RBPi powering and charging the battery pack intelligently.

The UPS PIco complies with the HAT standards for the RBPi models A+/B+ and 2B. Mechanically, it is compatible with the original models A & B of the RBPi, provided you use an extension header. Additionally, the UPS PIco is compatible with most cases housing the RBPI, especially as it fits within the footprint of the RBPi and does not require any additional powering.

An additional feature on the UPS PIco allows remote operation. An optional infrared receiver does the trick. The PCB routes the infrared receiver directly to the GPIO18. With this feature, you control the RBPi and UPS PIco remotely.

Finally, if you are likely to operate the RBPi in a very high temperature environment, you will need to cool it with external methods. The UPS PIco allows you to implement a PWM fan controller with an automatic temperature control feature. With a micro-fan fitted on the RBPi, the UPS PIco keeps your CPU cool.

Apart from being HAT compliant with RBPi models A+/B+ and 2B, the smart uninterruptible power supply or UPS is fully plug and play. Although the integrated LiPO battery provides 8-10 minutes of back-up power, an additional 3000 mAh battery pack extends this run-time to nearly 8 hours, providing a power backup of 5V, 2A with a peak output of 5V, 3A.

A real time clock simulated with software, with the battery backup offers a functionality offering a file-safe shutdown. The UPS PIco has a pair of user-defined buttons and a pair of user-defined LEDs, along with integrated buzzer for UPS and user applications. With I2C Pico and RS232 RBPi Interfaces, the user can easily monitor and control the operations of the UPS. Add-on boards are easy to use, as the UPS PIco has a stackable header.