Category Archives: Customer Projects

Are drones invading your privacy?

Unmanned drones have proved to be a stealthy asset in the war on terror, making strikes on targets and collecting data on enemy movements. However, these small, nimble and nearly silent fliers can also be used to keep tabs on law-abiding citizens from nearby skies. This domestic use of drones is raising concerns about privacy violations including potentially violating the Fourth Amendment. Now APlus Mobile is planning to build a Linux-based Personal Drone Detection System. These will detect any nearby drone using a method known as Mesh Grid Triangulation.

The R&D division of APlus Mobile, the DDC or Domestic Drones Countermeasures, is planning to launch a device that will detect and track a drone aircraft that approaches within 50 feet. DDC has launched a Kickstarter project for building the Linux-based Personal Drone Detection System. They plan to make it available in November 2014, at $499 for the alpha test model, and in April 2015, at $699 for the beta test model.

DDC has a drone detection algorithm for which a patent is pending. The Personal Drone Detection System relies on this algorithm to work its magic. APlus Mobile will be using a MotherBone PiOne board-level Linux subsystem motherboard for building the device. The motherboard is an open spec PiOne type, which means it can fit either a BeagleBone Black or a Raspberry Pi single board computer.

The MotherBone PiOne is actually a part of the Primary Command and Control Module unit. This unit works in conjunction with two nodes of detecting sensors and establishes a mesh grid network. In turn, the network can triangulate the location of mobile transmitters. If you deploy more control modules and nodes, the network can cover a wider area.

The wireless mesh network and target triangulation work together. You can set up the nodes as far as 200 feet apart. Although the mesh network uses Wi-Fi to communicate, it is kept isolated from the user unlike the control module, which communicates with the user over Wi-Fi.

To detect the wirelessly enabled, mobile devices or drones, the sensor nodes use a frequency that ranges between 1 MHz and 6.8GHz. While detecting all known telemetry transmission frequencies, the system tries to determine if the mobile transmitter is actually a drone. All drones must transmit some telemetry data that allows it to navigate. Therefore, even if the drone is only storing recorded media and not transmitting it, it can be detected.

The biggest challenge for the drone detection algorithm will be in distinguishing between a jogger passing by with a cell phone and an actual drone. According to Aplus, the software does reduce false triggering. The system is designed to detect and trigger an alarm only if a drone is loitering nearby. Therefore, a jogger would have to stop for a while in front of the house for the device possibly to trigger a false alarm.

Once the device detects a drone hovering nearby, it sounds an alarm and simultaneously, sends a message on your mobile device. That should make you draw your infrared-resistant blinds and call for the police, unless the drone belongs to the police.

A Car Computer with the Raspberry Pi

There are many reasons one would want to make a car computer. Although one of the reasons might be the savings on the expenses of buying a branded one, the most plausible reason would be the thrill of making your own. What could be more exhilarating than to use the most inexpensive, credit card sized, single board computer, the Raspberry Pi or RBPi and turning it into a sophisticated car computer, ready to compete with the most expensive ones in the market.

That is exactly what Derek Knaggs did. He wanted a car computer and searched for one on the Internet – only to be put off by the large costs involved. As an RBPi enthusiast, he reasoned that his tiny RBPi had all the ingredients required to build one – flexible video and audio outputs HDMI and Composite RCA for video, HDMI and 3.5 mm audio jack for audio). Additionally, it has the complete flexibility of switching to any operating system simply by changing the SD card.

Derek made a list of the items he would need for his car computer – RBPi model B, a car DVD player, TFT monitors (7-inch models used, one for the front and one/two for the back seats), composite video cables, audio cables suitable for 3.5mm jacks), Wireless N USB dongle, Wireless mini keyboard and a micro-USB car charger.

Derek’s car already had a radio installed and he connected the audio output of the RBPi to the auxiliary port of the radio. That allowed the audio to be played via the car speakers, so he had stereo audio playing loud and clear. He placed the RBPi in the center console, so that he could route all the cables under the console, giving the whole arrangement a neat and clean look, without any cables hanging around.

For playing video on the RBPi, Derek used XBMC, which comes with the Raspbmc operating system. Inputs to the RBPi were controlled by the wireless keyboard, which also has a built-in mouse touchpad. The keyboard has an on-off switch, useful for saving its batteries. The Wi-Fi dongle gave Derek the freedom to connect to any wireless network. Of course, another option is to connect it to the mobile phone, provided it has the option to set up a portable Wi-Fi hotspot.

One of the TFT monitors connects to the RBPi, and although Derek chose to position it on the central console, you might want it behind on the headrest of one of the front seats. Since Derek already had a car DVD player fitted in, there was another TFT monitor available. If the TFT monitors have HDMI inputs, you may want to connect them via HDMI cables. TFT monitors typically come with RCA composite video inputs, so that should not be a problem, as RBPi has composite video outputs along with HDMI. However, as soon as you use one of the video outputs on the RBPi, the other switches off, so it is not possible to use two monitors at a time from the two types of video outputs on the RBPi.

Raspberry Pi Digitizes and reads books

You can make your own book reader that will read books aloud after it has digitized them. The ingredients you will need are the tiny single board computer Raspberry Pi or RBPi, a BrickPi and some Lego motors and blocks. The finished book reader will flip through one page of a book at a time, take its picture and turn the picture into a text document, before moving onto the next page.

The book reader works by preparing a page to turn with the help of a rotating Lego motor. Gravity does its bit by providing just enough friction on the page of the book to allow it to inch forward. Finally, a Lego arm beam swings over and forces the page to turn over.

Once on a new page, the camera of the RBPi snaps an image of the page and saves it in the form of a JPEG file format. The RBPi then uses an open source Optical Character Recognition (OCR) software program to transform the page into text format and saves it. The RBPi then uses free text-to-speech software to read the page aloud over the speakers connected. The BrickPi operates the Lego modules that turn to the next page of the book.

For this project, you will need an RBPi (Model B), an RBPi camera, the BrickPi, the BrickPi Power Pack, Raspbian Wheezy on an SD Card, a Wi-Fi dongle and a Lego Mindstorms kit. The Lego kit could be either an EV3 or a NXT system.

As you have to use the camera to capture the image of the page, you will need good lighting. Arranging for the RBPi and the BrickPi to be placed above the book allows the camera to be positioned squarely above the book. Arrange lights over the sides at angles to fall and illuminate the page from two sides.

You may have to calibrate the page turning mechanism until it runs perfectly. This is done by adjusting the values of the variables in the arm_test.py. The motor connects to the Port A of the BrickPi and for calibration, the values of speed_arm, speed_roller, t1 and t2 may have to be changed and tested until the page turns flawlessly.

The camera is placed in position and held there with two Lego Technic beams. Once the camera is fitted in place, you may have to change its focus, as the camera focus is typically at infinity. Although the camera may give acceptable results without adjusting, focusing on the page gives improved results for OCR recognition. To change the focus read here and here for guidance.

Once the camera is adjusted, take a few images and check for clarity over the whole page. If the image does not look proper, adjust the focus and angle again. If the image looks good, it is time to test whether the OCR can convert it. Setup the Tesseract OCR engine, and use it to convert an image with “tesseract image.jpg o”. The output will be o.txt and this should now be readable with the text-to-speech engine eSpeak. This software allows choice of the reader’s gender and the accent. Once you connect a pair of headphones or speakers to the RBPi, you should be ready to go. For more details on this project, refer here.

High Fidelity Audio from the Raspberry Pi

Although the Raspberry Pi or RBPi has many exceptional qualities such as a small form factor, low price, low power consumption and credit card size, the single board computer is not endowed with a high fidelity onboard sound output. Therefore, to get high-fidelity sound, you must add a sound card to the RBPi. For all RBPi users who love music, HiFiBerry produces sound cards designed for optimal sound quality output.

HiFiBerry has two types of boards depending on whether you are looking for an analog or a digital board. If you have an analog amplifier, use the DAC board. However, if you connect to your amplifier via an optics link, use the Digi board. The standard RBPi kernel in the Raspbian distribution supports both the boards and they use Open Source software. HiFiBerry provides all drivers for both boards as open source. These boards utilize the P5 connector on the RBPi.

The HiFiBerry DAC is available as a Standard version with RCA connectors or as a 3.5mm phone jack version for headphones. Both are fully soldered boards; however, if you prefer to do some soldering, there is a DIY kit as well. For providing the best sound quality, these boards use a dedicated 192KHz/24-bit DAC from Burr-Brown. No cables are required, as the board connects directly to the RBPi, which also supplies it with power. Optimal audio performance is assured with on-board ultra-low-noise voltage regulators. Mechanical spacing between the audio board and the RBPi requires nylon spacers.

To connect the DAC board, you will need to solder an 8-pin header on to the RBPi, on its onboard sound connector P5. Now simply plug the DAC board in and start using it. The on-board ultra-low-noise voltage regulator will filter out all the noise from the RBPi power supply and you do not require any additional power supply or cable.

If your amplifier connects with an optical signal, use the HiFiBerry Digi board, which offers a high-quality S/PDIF output. The board connects to the P1 and P5 headers of the RBPi and supports up to 192KHz/24-bit resolution via optical (Toslink) and electrical outputs. The audio data streams produced are bit-perfect outputs, unmodified in any way.

The Digi board is also available in two versions, one with an isolation transformer and the other without. Although the hardware on the board is capable of DTS/Dolby Digital output, suitable software is required to make its full use. At present, HiFiBerry is not providing this software, but they will offer support to developers who want to implement this feature. The isolation transformer will provide complete galvanic isolation between the DAC on its output and the amplifier. However, most consumer-grade SPDIF connections do not require any output transformers.

For the future, HiFiBerry is planning a high-quality highly efficient stereo class D power amplifier to be connected directly on to the RBPi. Only external loudspeakers are necessary to get full 2x25W output power when driving 4-Ohm speakers with 44.1KHz and 48KHz sampling rates. This board will require an external power supply of 12-18V, but will power the RBPi as well, so ultimately only one power supply will suffice.

Raspberry Pi Lights up an RGB LED Matrix Panel

Colorful LED screens are a joy to watch. Bright LEDs making up a 16×32 display are not only easy-to-use, but also low cost – you may have seen such displays in the Times Square. Controlling such a display is simple if you use the low-cost, versatile, credit card sized single board computer, the Raspberry Pi or RBPi. Although the wiring is simple, the display is quite demanding of power when displaying.

The items you need for this project are a 16×32 RGB LED Matrix Panel, Female-to-Female jumper wires, Male-to-Male jumper wires, a 2.1mm to Screw Jack Adapter, an RBPi board and a 5V 2A power supply. Use the Female-to-Female jumper wires to connect the display to the GPIO connector pins of the RBPi. Although this connection is display specific, following a generic pattern is helpful:

GND on display to GND on the RBPi (blue or black)
OE on display to GPIO 2 on the RBPi (brown)
CLK on display to GPIO 3 on the RBPi (orange)
LAT on display to GPIO 4 on the RBPi (yellow)
A on display to GPIO 7 on the RBPi (yellow or white)
B on display to GPIO 8 on the RBPi (yellow or white)
C on display to GPIO 9 on the RBPi (yellow or white)
R1 on display to GPIO 17 on the RBPi (red)
G1 on display to GPIO 18 on the RBPi (green)
B1 on display to GPIO 22 on the RBPi (blue)
R2 on display to GPIO 23 on the RBPi (red)
G2 on display to GPIO 24 on the RBPi (green)
B2 on display to GPIO 25 on the RBPi (blue)

When connecting the wires, ensure that both the display and the RBPi are powered off, as the display is able to pull some power from the GPIO pins. Once all the data pins are connected as above, it is time for the power supply to be connected. The panel has a power supply header and a cable that has two red wires for the positive supply and two black wires for the negative. While connecting these wires to the screw jack adapter, make sure of maintaining proper polarity. Additionally, double check that the power supply you are using is rated for 5V, as any other higher voltage is likely to fry the display. The sequence for powering up must be the display first and the RBPi last.

To display an image or a message, you must convert it to a ppm or portable pixel format. Image editors can do this for you and you can very well use the free open source application GIMP. Once the image is in the required format and placed in the specific directory, the display program picks it up and it appears on the display. Shift registers on the back of the display module help with the shifting or scrolling of the image on the display. Of course, the RBPi has also to do a lot of work in bit-banging the pixels onto the screen.

You may use the code as it is in C, or you may prefer to use Python. Currently, the program displays only eight colors; for reference, see here.

PicoBorg Helps To Build a DoodleBorg

Imagine a small tank driven by a Raspberry Pi or RBPi. This is the DoodleBorg, a two-horsepower goliath and is the most powerful robot controlled by the RBPi. Powered by starter motors originally from a motorcycle, the DoodleBorg uses six PicoBorg motor boards made by PiBorg.

The DoodleBorg uses a tiny, credit card sized single board computer, the RBPi, as its brain. It has six reverse motor controller boards or PicoBorgs controlling its six wheels. Each of the boards is capable of handling 10A on average. Therefore, with two batteries in series, the average power output is 6x10x24=1440Watts or roughly 2HP. Peak power outputs are higher, about 2.1KW or three horsepower. Usually, the RBPi is prominently visible in the robot it is powering. However, in this case, you will hardly recognize it in the massive size of the project. Commands to the DoodleBorg are sent via a PS3 controller.

The PicoBorg reverse motor controller cards were specifically chosen for this project. These are advanced dual motor control boards for use with an RBPi. PicoBorgs can control big or small motors, with forward or reverse speed control. Each board, with its own emergency power off, is sized to mount on your RBPi for PID control and feedback via the GPIO pins. If you need to control more motors, simply plug in more boards and control up to 200 motors.

The dual motor controllers can handle input voltages between 6 and 25VDC and control up to 5A per channel, that is, 10A when combined. The emergency power off switch works in both bidirectional and speed control modes. PicoBorg boards are capable of handling two DC motors or one stepper motor with 4- or 6-wire configuration. For communication, you can use the I2C or SCK/SDA pins on the GPIO together with 3V3/GND pins. Adding the PicKit2 brings additional functionality.

PicoBorg reverse motor controllers are protected against overheat, short circuits on all outputs and under-voltage lockout. Connections are very straightforward. Six screw-terminals on the board allow connecting two motors and a battery. There are two 6-pin terminals, one of which is for connecting to control signals from the GPIO of the RBPi. The other 6-pin terminal can be used for daisy chaining another PicoBorg board.

Another connector on the board allows you to easily add a normally closed switch to act as an emergency switch. In case of any fault, simple open the switch and the motor will be cut off. The software on the PIC micro-controller on board will recognize the emergency switch operation and prevent further operation of the motors until enabled by a software command.

Another feature of the PicoBorg is its ability to run DC motors with taco feedback. The software accepts taco input signals that indicate either the number of rotations or the distance traveled by the wheels. Acceptable feedback signals are – quadrature signal (A or B) from an encoder, taco signal from a computer fan motor, index mark feedback such as one per revolution pulse. The motor connection remains the same as that for a standard DC motor setup.

An Exquisite Raspberry Pi Enclosure

There are countless types of enclosures available for the inexpensive credit card sized Single Board Computer – the Raspberry Pi, popularly known as the RBPi. All have their unique capabilities and advantages. Some are made of wood, some of paper while most others are made of plastic.

The molded enclosure from Hammond Electronics is specifically designed to house the RBPi model B. The exquisitely molded container is shaped like a book and is available in black, grey and translucent blue. The stylishly rounded design has apertures for all the IO interfaces and accessories supported by the RBPi. The enclosure is actually two parts made to fit one on top of the other, holding the RBPi between them. No screw-fixings are involved, and a specific sequence is required to get the bottom, the RBPi and the top fitted together perfectly.

On opening the 1593HAMPI enclosure assembly, you will notice the bottom half has some stationary clips on its inside. Holding the bottom half in your palm, slide the RBPi board in at an angle against these stationary clips. Once in place, push down firmly on the RCA jack of the RBPi, until you hear the board click into position. Now the RBPI is securely held in the bottom part of the enclosure.

Take the top part of the enclosure and touch its rounded ends to the corresponding rounded ends of the bottom part, on an angle. Still holding the bottom part firmly, push down on the outer edge of the top part, until you hear a snapping sound. On turning the assembly around, you will see a clip from the top part jutting through an opening on the bottom part. This holds both the halves together. In case you would like to separate the two parts of the enclosure, simply pull back the clip from the bottom part and the two halves will come apart.

Hammond Electronics offers self-adhesive rubber feet, which you can fit in the circles on the bottom part of the enclosure. They will prevent the encased RBPi from sliding off. One of the most popular accessories of the RBPi is the camera module. You have a choice of two methods for mounting the camera module. Screw the camera to the inside of the top part, which has a hole provided for the lens. However, if the camera must remain outside the enclosure, you can fit it through a slot in the top. The camera will now be standing at right angles to the assembly.

Access to the GPIO header is provided through a cutout on the mating line between the top and the bottom halves. The sides also have apertures of the right size and shape for all the ports. Therefore, you can easily access the HDMI interface, the micro-USB power-in connector, the RCA ports for audio and video, the SD card, the RJ45 LAN and the two USB ports. The base has two captive slots so that you can attach the enclosure to a surface. For stand-alone applications, the rubber feet are helpful.

Meet the Prettier Raspberry Pi Model B+

Just as soon as you thought you knew as much as there is to know about the most popular single board computer, the tiny versatile Raspberry Pi or the RBPi, acquaint yourself to a prettier cousin. There is an update to the familiar RBPi Model B and it is called the RBPi Model B+. Raspberry Pi Foundation, the manufacturers of the RBPi, have incorporated several improvements requested by users in the new model.

Although the RBPi Model B+ retains the same controller, has the same amount of RAM and runs on the same software as the Model B, there have been several cosmetic changes. The most notable improvements in RBPi Model B+ are:

— GPIO has 40 pins; the first 26 pins retain their pinout as in Model B.
— Four USB 2.0 ports with better hot plugging and overcurrent behavior; Model B has 2 ports
— A micro SD socket (push-push type); Model B has SD card socket of friction-fit type
— Power consumption 0.5-1.0W; Model B power consumption 0.55-1.65 W
— Better audio with separate low-noise power supply
— Improved form factor. Compared to Model B, the USB connectors align with the board edge and composite video moved to the 3.5 mm jack. Model B+ has four mounting holes.

Even with all the above improvements, the price of the RBPi Model B+ has been retained at $35. So what happens to the Model B now? According to the Raspberry Pi Foundation, Model B will remain in production as long as demand for it continues.

In its lifetime of two years, the RBPi SBC has gone to many places such as floating in space, deep under the sea and controlled complex machinery. Considering that the initial goal of the project was to educate children in Computer Science, RBPi has definitely marked a place of its own. RBPi has revolutionized the landscape of education for children and adults alike. People have learnt more about Computing and Electronics with RBPi.

Since the RBPi B+ model has the same architecture as the earlier Model B, the Foundation assures compatibility with the existing projects and software developed so far. According to the feedback received from the community, RBPi Model B+ is a more refined product.

Measuring 85x56x17mm in size, the RBPi B+ is slightly smaller than the form factor you are accustomed to with the Model B. Additionally, an improved layout backs up the size reduction. The organization of the board is neater and there are several improvements.

For example, there are now four USB ports as opposed to the two earlier. This is because the RBPi Model B+ uses the new LAN9514 chip. The Model B had its ports dotted all around the perimeter of the board. In contrast, the Model B+ has concentrated its ports only on two sides. The RBPi Model B+ with its four USB 2.0 ports supporting higher currents can now attach external portable USB2 hard drives. For those who had to counter the USB reboot issue on the Model B, can now rejoice since RBPi Model B+ has more stable USB hot swapping of USB devices.

Talk To Your Raspberry Pi through an FTDI Breakout Board

You do not really need a monitor and a keyboard for logging into the tiny credit card sized single board computer, the famous Raspberry Pi or RBPi; there are several ways to do that. One of the very simple ways is to listen in on two of the serial communication monitoring pins on the GPIO header of the RBPi.

Manufacturers of most computers have now given up on including serial ports on their products in favor of the more Universal Serial Bus or USB. However, connecting the serial pins on the RBPi to the USB port on the computer is not so straightforward. A special translator is required, one that understands and converts between the serial and USB protocols.

FTDI makes a special cable with an FT232 chip in between that can help to connect the serial port pins on the RBPi to the USB port of the computer and provide meaningful communication between the two. Modern Devices have gone one step further. Instead of having to deal with connectors or soldering on the RBPi side, they have designed a breakout board with the FT232 on it. The FT232 TTL signals are available on a header, which is suitable for plugging into the GPIO header on the RBPi; this is the USB BUB 1,

On one side of the BUB is an FTDI header, a six-pin version very common with most of the Arduino-compatible boards. The breakout area of the BUB is very handy as it allows you to reconfigure the signals to any of the pins on the second header. When you have to connect different devices such as the Parallax Propeller, this rerouting is very useful, as pinouts or the RBPi and the Parallax Propeller are different. The rerouting process also allows you to select the proper logic level (5V or 3.3V) for your device with a single jumper. You can suitably modify the breakout area of the BUB to enable it to connect appropriately to two different style devices without resoldering the connections.

When connecting to the RBPi, make sure you are connecting the Transmit of the RBPi to the Receive pin of the BUB, and the Transmit of the BUB to the Receive of the RBPi. Unless you follow this method of connections, BUB and RBPi will be unable to communicate with each other. For connecting with the RBPi, another very important thing to take care on the BUB is the logic level jumper. Make sure and double-check that it is connected to the 3.3V rail and NOT to the 5V.

Now that you have everything under control, boot up your RBPi, plug in the BUB and connect the other end of the serial cable to the USB port on your computer. All FTDI chips have a unique ID and this will show up as the device name. The device will be available under the /dev directory if you are using a Mac or Linux computer. On Linux, the BUB will show up as /dev/ttyUSBx, where x will depend on the number of USB devices already plugged in.

Use F-RAM to Replace SD Card in Raspberry Pi

For those who use their Raspberry Pi very frequently, there is always the risk of wearing out the SD card. This tiny, inexpensive, credit card sized, single board computer – the Raspberry Pi – or RBPi, boots and runs a Linux Operating System held on an SD card. Therefore, if your RBPi has to boot often, you run a database on the SBC or use virtual swap space that resides on your SD card, the life of the SD card reduces very fast.

In fact, any time you use the SD card, for example, for data logging, serial or network capture or while reading sensors, you are saving data to the SD card at fairly frequent intervals. Similarly, when you run a customized server on an RBPi such as an email or a web server, the system writes temporary or configuration files constantly to the SD card. That puts the SD card at risk.

The problem with SD cards or any other standard Flash-based memories and EEPROMs is that they require a block erase before writing any data. These devices have a limit to how many times these erase cycles may be used.

However, you can supplement the Flash-based SD card of your RBPi with an F-RAM board, called the Ironman. The first advantage is that F-RAM does not require any erase cycle to write new data, which makes it very fast. Secondly, F-RAMs can be written limitless times, so it will last a very long time. Thirdly, F-RAMs do not need external batteries to retain data. This video compares the three types of memories.

All over the world, nearly two million RBPis are running from SD cards. The RBPis write data frequently to the Linux root partition stored on their individual SD cards. On average, after 10,000 writes, an RBPi may fail to boot, losing all the data and configuration. Using an F-RAM card that adds 1-4 MB memory allows your SD card to be used as read-only. All the small databases, log-files, temporary files, configuration files, caches and anything that changes during normal use, goes on to the F-RAM card. That prevents use of precious kernel or application memory from the built-in RAM or tmpfs of the RBPi. The best part is that all the temporary files are available even after a reboot.

F-RAM or Ferroelectric RAM is very well suited for embedded systems. Being non-volatile, it does not require power or battery backup to retaining data up to 10 years. There is no restriction on erase/write cycles, making it as fast as SRAM. Unlike EEPROMs or Flash, there is no limit to the number of writes before device failure. The only disadvantages of F-RAM are cost and density/size.

F-RAMs can be read and written to up to 100 trillion times. To put that figure in understandable terms, you could write to the same address on the F-RAM chip 1,000 times per second continuously every second over 317 years – without the device failing. If the same process were to be tried on a Flash memory, the device would fail in just 100 seconds.