Tag Archives: RBPi

A Smart Development Board for the Raspberry Pi

The Raspberry Pi or RBPi single board computer when fortified with Cloudio makes a personal IoT computer that users can play with or use for prototyping. Cloudio, the add-on board suitable for the RBPi, offers advanced features such as sensor monitoring and displaying on dashboard, providing custom notifications with image and video, unlimited cloud services, one tap upload for multi-boards, voice assistant capabilities, IFTTT integration, drag and drop programming for Android and iOS, and much more.

As a smart development board kit, Cloudio offers drag and drop programming using the included GraspIO Studio app. Users get a block-based approach that is fairly intuitive. For IoT developers, this approach allows them to reach their goals faster, as the simple but powerful mobile IDE simplifies the complexity of software development.

On the hardware side, the Cloudio kit includes an OLED display, a light sensor, temperature sensor, a mini servo port, a tactile switch, three ADC ports to handle external sensors, three ports for digital outputs, an RGB LED, and a buzzer. This provides the user nearly all the tools necessary for an IoT project. On the software side, the kit comes with the GraspIO, which provides unlimited cloud service, allowing the user to program and manage Cloudio from their mobile devices.

GraspIO provides the user with a block-based feature. Users can treat program modules as blocks, dragging and dropping the blocks as necessary to combine them to achieve various functionalities. This feature offers users with an intuitive mobile interface.

Users can monitor the sensors they attach to the RBPi and arrange their response to be studied in a dashboard. They can set up sensor monitoring projects easily and configure the dashboard to exhibit their response in an intelligent and responsive manner. The kit allows plotting the sensor response in real-time graphs on a mobile device, and exporting data for IoT analysis.

Users can manage several Cloudio kits at the same time, as they can connect their mobile devices to the IoT Cloud Service. Therefore, users can connect to, program, control, monitor, and manage several kits with a single smartphone. The IoT Cloud Service comes with a lifetime offering of 100 daily non-cumulative calls, along with a bunch of 50,000 free preloaded calls.

The IoT Cloud Service also helps in voice control and speech recognition. Users can create their own voice assistants, and add custom voice commands including their own wake-word.

For instance, with the Cloudio Smart Development Board hooked up with the RBPi, a user can interface the RBPi and a USB camera, using the in-app camera block to capture images, videos, and even create GIFs or time-lapse videos. The user can add several features to their projects, including custom email, images, and video notifications.

The Cloudio kit enables features such as adding speech outputs to projects. Therefore, users can make their projects respond with voice outputs, using the easy to use in-app speak block that comes along with the kit. Other features the kit offers are creating real-time speech notifications, custom messaging, or playing recorded audio from the board.

Industrial Controls and the Raspberry Pi

Industries with control equipment prefer to use a standardized system of mounting components such as circuit breakers within equipment racks. The most popular arrangement is the DIN rail and enclosure. The rails are typically made from a cold-rolled carbon steel sheet and zinc-plated or chromated for a bright surface finish. DIN is the acronym for Deutsches Institut fur Normung in Germany, and the rest of the world has adopted their standards as the EN and IEC standards.

The famous single board computer, the Raspberry Pi (RBPi) is becoming increasingly accepted as a development platform and a suitable solution for applications involving process controls. Some of these applications involve simple HVAC controls, power management, materials management, and gas detection, among a vast range. However, moving to the industrial arena means the RBPi needs to be fitted with a DIN rail enclosure.

That is exactly what VP Process Inc. has planned. Their series Pi-SPI-DIN of products, based on the RBPi, will all be DIN rail mountable, and hence, suitable for use in the industry. Their first product in the series is the RPi-3 controller, which will work from a wide range of input voltages between 9 and 24 VDC. It will provide RS485 Interface available on RJ45 connectors and Terminal Block. It will provide the RBPi with a real-time clock and battery backup with a CR2032 battery. The user will be able to make use of all the GPIO interfaces of the RBPi as they will be available on a 16/24 pin ribbon cable connector. The DIN rail enclosure will have LED indicators, and VP Process Inc. will be offering sample test programs in C and Python. The idea behind developing the RPi-3 is to allow the RS485 interface to communicate with all the eight channel modules available from VP Process Inc.

The first of the new series from VP Process Inc. is the PI-SPI-DIN-RTC-RS485, and this will be available with DIN rail mounting hardened interfaces in three mounting versions—with DIN rail clips, DIN rail enclosures, and PCB spacers.

The wide-ranging power input accepting any voltage between 9 and 24 VDC of the unit will produce an output of 5 VDC at a maximum current of 3 Amps. There will be two GPIO connectors, one belonging to the RBPi board, and the other is external for peripherals. Another 16-pin connector will provide the power, SPI, I2C, and five chip-enables for the PI-SPI-DIN series.

Apart from the RS485 interface, VP Process Inc. is planning for other peripheral units as well. These will include the eight-channel 4-20 mA module, four-channel relay output module with contacts rated for 2 Amps, eight-channel isolated digital input module, and four-channel 4-20 mA module.

VP Process Inc. will be providing each module with two 16-pin ribbon cable sockets and cables. Each of the connectors and cables will carry the main power supply input to the main interface, SPI bus, I2C bus, and the five GPIO lines serving as chip-selects.

To maintain compatibility with non-industrial uses, VP Process Inc. will also provide each peripheral as a PCB on spacers, apart from PCB with DIN rail enclosure or DIN rail clips.

Raspberry Pi to Linux Desktop

You may have bought a new Single Board Computer (SBC), and by any chance, it is the ubiquitous Raspberry Pi (RBPi). You have probably had scores of projects lined up to try on the new RBPi, and you have enjoyed countless hours of fun and excitement on your SBC. After having exhausted all the listed projects, you are searching for newer projects to try on. Instead of allowing the RBPi to remain idle in a corner, why not turn it into a Linux desktop? At least, until another overwhelming project turns up.

An innovative set of accessories converts the RBPi into a fully featured Linux-based desktop computer. Everything is housed within an elegant enclosure. The new Pi Desktop, as the kit is called, comes from the largest manufacturer of the RBPi, Premier Farnell. The kit contains an add-on board with an mSATA interface along with an intelligent power controller with a real-time clock and battery. A USB adapter and a heat sink are also included within a box, along with spacers and screws.

Combining the RBPi with the Pi Desktop offers the user almost all functionalities one expects from a standard personal computer. You only have to purchase the solid-state drive and the RBPi Camera separately to complete the desktop computer, which has Bluetooth, Wi-Fi, and a power switch.

According to Premier Farnell, the system is highly robust when you use an SSD. Additionally, with the RBPi booting directly from an SSD, it ensures a faster startup.

Although several projects are available that transform the RBPi into a desktop, you should not be expecting the same level of performance from the RBPi as you would get from a high-end laptop. However, if you are willing to make a few compromises, it is possible to get quite some work done on a desktop powered with the RBPi.

Actually, the kit turns the RBPi into a stylish desktop computer with an elegant and simple solution within minutes. Unlike most other kits, the Pi Desktop eliminates a complex bundle of wires, and does not compromise on the choice of peripherals. You connect the display directly to the HDMI interface.

The added SSD enhances the capabilities of the RBPi. Apart from extending the memory capacity up to 1 TB, the RBPi can directly boot up from the SSD instead of the SD card. This leads to a pleasant surprise for the user, as the startup is much faster. Another feature is the built-in power switch, which allows the user to disconnect power from the RBPi, without having to disconnect it from the safe and intelligent power controller. You can simply turn the power off or on as you would on a laptop or desktop.

The stylish enclosure holds the add-on board containing the mSATA interface and has ample space to include the SDD. As the RBPi lacks an RTC, the included RTC in the kit takes care of the date and time on the display. The battery backup on the RTC keeps it running even when power to the kit has been turned off. There is also a heat sink to remove heat built-up within the enclosure.

Let the Raspberry Pi Monitor Energy

If you are looking for monitoring energy remotely, an open source system that uses the ever-popular single board computer, the Raspberry Pi (RBPi) may be suitable. The company, OpenEnergyMonitor, makes the open-source tools for monitoring energy, and at present, they are using the RBPi3. According to their co-founder Glyn Hudson, the aim of OpenEnergyMonitor is to help people understand and relate to how they use energy from their energy systems, and the challenges of sustainable energy.

The system uses five main units. Users can assemble and configure these to work in a variety of applications. Both hardware and software in the system is fully open-source, and the hardware is based on Arduino and RBPi platforms. Users can opt to use the system for monitoring home energy, monitoring solar PV, and or monitoring temperature and humidity.


When configuring the OpenEnergyMonitor system, emonPi, as a simple home energy monitoring system, it allows measuring the daily energy consumption and analyzing real-time power use. The all-in-one energy-monitoring unit, emonPi is a simple installation based on the RBPi, requiring only an Ethernet or Wi-Fi connection at the meter location.

Clip-on CT sensors on the emonPi enable it to monitor independently two single-phase AC circuits simultaneously. While the emonPi can monitor temperature, it has an optical pulse sensor to interface directly with the utility meters, which means the emonPi has to be installed next to the utility meter.

The emonPi comes with Emoncms, the open-source web application. This helps in logging and visualizing energy use along with other environmental data such as temperature and humidity. It has two power outlets and requires Ethernet or Wi-Fi to transfer data. The RBPi operates on a pre-built OS on an SD card included with the energy monitor. The 5 VDC power required has to be fed in from an external power supply unit.

As power is the product of voltage and current, the emonPi requires an AC-AC voltage sensor adaptor and a clip-on CT sensor. While the emonPi comes with one CT sensor as standard, it can accept two CT sensors.


For remote monitoring, users can use emonTx, a remote sensor node as an alternative to emonPi. The emonTx runs as a standalone unit, with an ESP8266 Wi-Fi module running EmonESP. This can post directly to Emoncms without using emonPi or emonBase.

Users can monitor a maximum of four single-phase AC circuits with the clip-on CT sensors using the emonTx. A plug-in AC-AC adaptor powers the unit, and provides the AC voltage sample, which the emonTx uses for real-time power calculations. If AC power is not available, emonTx can be powered using four AA type batteries.

Optional LED Pulse Sensor for Utility Meter

This sensor allows interfacing directly with utility meters that have LED pulse output. It is compatible with emonTx and emonPi, and reports the exact amount of energy as the utility meter does. Although best used together with clip-on CT sensors, the LED pulse sensor cannot measure instantaneous power.


This is a web-connected gateway, consisting of an RBPi and RFM69Pi RF receiver board. It receives data via a low power RF carrier at 433 MHz from emonTx or emonTH and offers local and remote data logging using Emoncms.

A Soundcard HAT for the Raspberry Pi

If you have been wondering how to use the popular Raspberry Pi (RBPi) single board computer for effects to be used with musical instruments such as the guitar, the Pisound board from Blokas may be the answer. With the Pisound board, any musician can connect any type of audio gear to the RBPi, and bring their project to an entirely new level. Pisound is a soundcard HAT for the RBPi.

HAT is an acronym for Hardware Attached on Top of an RBPi. HAT boards have an EEPROM that tells the RBPi the values of its variables specific to the device on the board. The HAT board will also have a GPIO connector to match with that on the RBPi, so that when plugged in, the HAT will sit atop the RBPi.

The Pisound HAT for the RBPi3 acts as a high-technology sound card. Not only does it allow sending and receiving audio signals from its jacks, but it can also send MIDI input and output signals to compatible devices. On board the card are two 6 mm input and output jacks, two standard DIN-5 MIDI input/output sockets, potentiometers for gain and volume, and a button for activating patches of manipulating audio. The Indiegogo campaign has given the Pisound board an incredibly successful start.

The Pisound website offers excellent documentation, making it a simple affair to set up the board. First, you have to mount the board atop your RBPi, matching the GPIO pins, and securing it with screws. Next, download and install a fresh installation of the Raspbian OS and set up the software according to instructions from the website. The only thing that remains now is to connect the instrument and create patches for Pure Data. This is a popular visual programming interface to manipulate media streams.

The possibilities with Pisound are endless. For instance, you can create simple fuzz, delay, and tremolo guitar effects. Limited only by your imagination, you could come up with endless ideas.

For example, the guitar effects could go into a web interface, accessible over a local network on a tablet or smartphone. On the other hand, with the characteristics of the guitar signals, you could control an interactive light show or project visualization on the stage. One of the advantages of the Pisound is you can use the audio input stream basically to generate other non-audio activities.

The compact and practical size of the project makes it convenient for embedding it within one of your instruments say the guitar. However, it is always possible to design and fabricate a custom enclosure for the board and the RBPi.

Sonic Pi, a musical community favorite, has also pledged to support the board very soon. That means even if you do not own a musical instrument, or play one, you can still make awesome sound effects with this clever little HAT.

You can load patches from Pure Data using a USB key. The button on the card makes it easier to interface with the RBPi. Moreover, it you are familiar with Automatonism, it will be easier for playing with the Pisound just as if it were a modular synthesizer.

How to Simulate the Raspberry Pi?

You may have an urgent project that requires the use of a Raspberry Pi (RBPi), but do not have immediate access to a physical kit or the SBC. However, that should not hamper your progress with the project, as Microsoft is now offering an online RBPi simulator. The online RBPi simulator allows users to write code for controlling emulated hardware. Therefore, for the present, users can interact with a sensor to collect data from it and control an LED.

On the simulator, the user has a graphic of an RBPi wired on a breadboard to a combined humidity, temperature, and pressure sensor, along with a red LED. On a side panel, the user can enter JavaScript code as Node.js, with which, they can control the LED while collecting dummy data from the simulated sensor. A command line at the base of the panel allows execution of the code.

When loaded, the simulator starts with a sample program, which the user can use to collect temperature from the sensor and display it on the command line. Tutorials are available from Microsoft on running this code, and for this, the user has to first sign into Microsoft’s Azure IoT Hub, and select the free tier service option. Microsoft has designed the simulator to be compatible with a real RBPi. Therefore, anyone can test their code for controlling hardware using the RBPi, before they are ready to transfer their code it to a real device.

According to a Microsoft employee, Xin Shi, the simulator is presently in preview, offering only basic functionality. That means the embedded image of the RBPi is static, allowing only a limited interaction with the sensor and the LED. There are plans for emulating new devices and sensors, but there is no timeline. Moreover, the simulator’s code being open-source, anyone is free to work on expanding the simulator.

However, this is not the first time a simulator has been designed for simulating RBPi controlled hardware. Working with the US startup Trinket, the Raspberry Pi Foundation had created a web-based emulator for Sense HAT. This is an RBPi compatible add-on board bundled with several sensors, a joystick, and a matrix of LEDs.

Just as the Microsoft simulator does, the emulator for the Sense HAT also allows users to work with Python codes for interacting with the add-on board. Compared to the Microsoft simulator, the emulator from the Foundation offers users a greater number of sensors to interact with, and allows the user to have more control over the simulated version of the LED matrix on the board.

On the website, users have a choice of four Python programs. The first one allows selecting temperature, pressure, or humidity sensors, and manipulating the sliders to change the readout of the LEDs. The second is a game of rock, paper, and scissors, which the users can play using arrow keys to select while competing against the RBPi. The third is another game where a small bird has to fly through obstacles, and the fourth is a game of Astro Bug, which has to eat the food, while avoiding enemies.

BrailleBox with the Raspberry Pi

Reading, whether online or from the page of a book is a simple affair for those endowed with the power of sight. However, for those who are sightless, or have lost their eyesight, totally or partially, reading can be cumbersome, if not impossible. The Braille system, by allowing a changeover to the sense of touch, helps sight-impaired people to read.

Braille uses a system of raised dots that blind or those with low vision can follow with their fingertips. It is not a separate language, but rather a code for representing individual alphabets of a language. So far, the Braille system covers several languages, including Chinese, Arabic, Spanish, English, and dozens of others. Thousands of people all over the world use the Braille system of dots in their native language, providing a means of literacy for all.

The main code for reading materials in the US is the Unified English Braille, and seven other English-speaking countries use this code.

As such, Braille is useful when the material is in printed form. However, the challenge lies in reading online material. Although text-to-speech software packages are available, they are expensive and not very useful when the reader, say, wants to move back and forth while reading.

As a solution to the above problem, Joe Birch has built BrailleBox, a simple device to convert online news stories to Braille. His BrailleBox works with Android Things, News API, and the popular single board computer, the Raspberry Pi 3 or RBPi3.

Being a symbol system for people with visual impairment, the Braille system consists of letters and numbers as raised points in an array. Commercial systems are available and they produce Braille dynamically, but they are very expensive and out of reach of most people. Therefore, Joe built a low-cost alternative, the BrailleBox, which is simple to create.

Joe uses the News API as a tool that fetches jSON metadata from more than 70 news sources online. The API can integrate articles or headlines into text-based applications and websites.

The Braille system uses an array of six dots arranged in an array of three rows and two columns. Apart from representing the alphabets and numbers with various combinations of the six dots, they also represent whole words, sometimes in contraction. For instance, contracted braille includes 75 short form words and 180 different letter contractions. These help to reduce the volume of paper necessary for reproducing books in Braille.

To make the six dots for forming the Braille symbols, Joe attached wooden balls atop solenoids. He arranged the solenoids in an array of 2×3, and wired them individually to GPIO pins of an RBPi3.

Being an Android engineer, Joe controls the solenoids through Android Things, running on the RBPi3 as self-booting BrailleBox software. The reader has to push a button, which makes the program fetch a news story using the News API. As the RBPi3 deciphers the alphabets, it operates the solenoids, moving the dots.

Joe’s project is still in prototype stage, and he is yet to move all hardware inside a proper box. He also wants to add a potentiometer, preferably foot operated, so the readers can set their own reading speed.

Sensor Nodes Based on the Raspberry Pi

Building sensor networks is economical if a microcontroller hosts the sensors. However, sometimes the computational power a microcontroller offers is not adequate. For instance, it may be necessary to convert the data to a different format, print a hard copy of the sensor data, or incorporate the data within an application. What you need is a computer that not only has more processing power, but also allows the use of common applications, affords access to peripherals, and permits the use of scripting languages.

Although the use of an inexpensive personal computer would be of great advantage here, using them as sensor nodes in the networks has its own disadvantages. The primary hurdle is most personal computers are built for use as servers or desktop computers, and almost no general-purpose input/output ports are available. Of course, a data collection card added to the personal computer will serve the purpose, but the cost of the computer added to that of the data-collection card makes the cost of the sensor node uneconomical.

Fortunately, single board computers such as the Raspberry Pi (RBPi) provide an easy solution to the above problem. With sufficient processing power and memory, use of standard peripherals, supported programmable I/O ports, and a small form factor, the RBPi is the most suited for building sensor networks economically.

Essentially, the RBPi is a single board computer that runs Linux as its operating system. To get started with the RBPi, you need a few additional things, such as a USB power supply rated at 2 A with a male micro-USB connector, an HDMI monitor, a keyboard, an optional mouse, and most importantly, an SD card to hold the OS.

The most commonly used operating system for the RBPi is the Raspbian image provided by the Raspberry Pi Foundation on their download page. Once you have downloaded the image, you will have to unzip it and write it into an SD card. The easiest way to do this with a Windows PC is to use the Win32 Disk Imager software. Those on the Mac OS X or the Linux PC may use the dd command.

Now it is time to boot up your RBPi board. Plug in the SD card holding the new image, plug in the keyboard, mouse, and the monitor. Once all the peripherals are in place, plug in the USB power and turn on the power. When prompted to enter a username and password, use Pi and raspberry respectively, and configure the system to your requirement.

For connecting and experimenting with sensors, you may use expansion boards, but using a simple prototyping board instead is more flexible. Using a Pi Cobble Breakout board or similar allows a simple ribbon cable from the GPIO connector on the RBPi to the prototyping board, with the pins arranged in the same order as those on the RBPi are.

Be careful to make or change connections with the RBPi powered off. Also double-check all connections are rightly connected. The GPIO on the RBPi is not protected against short circuits and high voltages, and is easily damaged.

Voice HAT for Raspberry Pi for Controlling a Motor

If you were one of the unlucky ones to miss out on the issue 57 of the MagPi, then the only option is to buy the Voice HAT from the AIY projects. The issue 57 had offered a free AIY projects Voice Kit, which Google had developed to make a Voice Assistant, and you could control a speaker with the voice HAT that attached on top of a Raspberry Pi Zero (RBPiZ).

Other tutorials in the MagPi show how to connect the Voice HAT hardware to simple circuits.  So far, the tutorials have dealt with LED lights and servomotors, but this project is somewhat more complex—using the Voice HAT to control a DC motor. Therefore, you will need a DC motor, four AA size batteries, breadboard, and jumper wires.

Usually, the RBPiZ draws its power from the power supply on the Voice HAT board. For this project, this connection has to be broken, else the motor may draw too much power from the RBPiZ and short it. On the Voice HAT board, locate the external power jumper marked JP1, and use a sharp knife to cut the track. If you later wish the power to be shared again between the board and the RBPiZ, re-solder the cut joint.

Power off the RBPiZ and the Voice HAT, and connect the positive terminal of the DC motor to Driver 0, middle pin, which is marked with a “+” symbol. Same way, the negative terminal of the DC motor connects to the “–“ pin of the Driver 0. As this pin connects to the GPIO4 pin, it allows the motor to be turned on and off.

The four AA battery pack connects to the +V and GND pins on the Voice HAT. This ensures the motor is supplied adequate power from the battery pack and the Voice HAT and does not crash the RBPiZ when it draws power. Now turn on the power to the Voice HAT, and then turn on the battery pack.

At this point, you are ready to turn on power to the RBPiZ. Boot into the AIY Projects software and enter the code from motor.py for testing the circuit. The control to the motor comes from the PWMOutputDevice from GPIO Zero, and this allows managing the speed of the motor.

The motor is controlled via a Pulse Width Modulation (PWM) method. The RBPiZ controls the power to the motor by controlling the on and off periods. If the on period is more than the off period, the motor receives more power and therefore, rotates faster.

To manage the speed of the motor, you control the variables .on() and .off() in the software.  Alternately, you may set the value of the instance variable to a value between 0.0 and 1.0 for controlling the speed. Here, 0.0 means the motor is a dead stop, while 1.0 sets the motor to a maximum speed. The motor.py uses both techniques and you can also use pwm.pulse() for pulsing the motor on or off. To integrate this with the Voice Assistant, enter the code from add_to_action.py to the relevant sections. You can now control the motor using voice commands.

Charlieplexing on the Raspberry Pi

If you suddenly find the need to control many LEDs and do not have the requisite electronics to do so, you can turn to your single board computer, the Raspberry Pi (RBPi) and use it to charlieplex the LEDs.

Charlieplexing is named after Charlie Allen, the inventor of the technique. Charlieplexing takes advantage of a feature of the GPIO pins of the RBPi, wherein they can change from outputs to inputs even when the RBPi is running a program. Simply setting a GPIO pin to be low does not allow enough current to pass through an LED or influence the other pins set as outputs and connected to the LED.

Using Charlieplexing, you can control up to six LEDs with three GPIO pins. For this, you will need three current limiting 470Ω resistors on each GPIO pin. The program charlieplexing.py defines a 3×6 array, which sets the state and direction of the three GPIO pins. The state defines whether the pin is set as digitally high or low, and the direction defines whether the pin is an output or an input.

Since LEDs are also diodes, they will light up only if their anodes are at a higher potential than their cathodes are, and not otherwise. Therefore, to light up a single LED, the program has to set the pin connected to its anode as output and drive it high. Next, the program must set the pin connected to the anode of the LED as input, while it sets the third pin as output and drive it low. Various combinations of the state and direction of the pins will drive all the LEDs on and off sequentially.

The array in the program holds the settings for each GPIO pin. A value of 0 means the pin is an output in a low state, 1 means the pin is an output in a high state, and -1 means the pin is set as an input.

In charlieplexing, it is easy to calculate how many LEDs each GPIO pin can control. The formula for this is, LEDs = n2-n, where n is the number of pins used. According to the charlieplexing formula, three GPIO pins can charlieplex 6 LEDs; four pins can control 12 LEDs, while 10 pins would allow control over a massive 90 LEDs.

Charlieplexing is good for not only lighting one LED at a time, but it is capable of lighting more at the same time also. For this, the program must run a refresh loop to keep the desired state of the LEDs in the array. While refreshing the display, the program must turn on other LEDs that need to be on, before moving on to the next. However, persistence of vision plays a large part here, and the program must be sufficiently fast to make it appear that more than one LED is on at a time.

However, there is a downside to lighting more LEDs at a time. Since more number of LEDs are now on to make it appear that more than one LED is on simultaneously, each LED is actually lit for a lower amount of time, which makes each LED glow less than at its full brightness.