Author Archives: Andi

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.

Designing Intelligent Lighting Systems with Constant Current LED Drivers

Sunpower LLP of UK has launched 25W constant current LED Drivers that facilitate designing of low wattage project style lighting and intelligent LED lighting control systems. The company has added the driver christened LCM-25 to its existing LCM series of constant current LED drivers for 60W and 40W. Apart from maintaining its output at a constant current while meeting the LED needs, the driver can be set up at varying levels ranging from 350mA to over an Ampere with the help of a built-in DIP switch. The LCM-25 driver has been designed with a two-in-one dimming operation. It can be dimmed by a PWM control input or by 0-10VDC.

This new product comes with a host of features. The digital LCM-25DA has a push button dimming function and a DALI interface. The operating range is 180-277 VAC input. EN61000-3-2 Class C (> 50% load) sets the harmonic current limitation. Between the line and neutral, there is 2kV surge-immunity, which meets the needs of the heavy industry. The latest state-of-the-art circuit design ensures a maximum efficiency of 86%, while at the same time, cooling is by simple air convection when operating at ambient temperatures of -30°C to +60°C. No-load power consumption is less than 0.5W.

The main feature of the LCM-25 is its inbuilt PFC operation. The driver is protected against over-temperature and / or short-circuits. In either case, after constant current limiting or over-temperature protection, recovery is automatic after the fault is resolved. The driver is housed in a fully insulated plastic case. This class II power unit is designed conforming to IP 20 and without FG. Each unit can synchronize up to a maximum of 10 units. The ripple current is ±5.0% and the no-load voltage 59V.

The LCM series is housed in a totally insulated rectangular plastic case of low profile, which is rated for IP20. It is offered to the customer with several unique facilities. The first is that it is very easy to install as compared to current products of industry standard, which is to have the outputs at the rear and the inputs at the front. LCM series has been designed with the outputs and inputs on the same side. That ensures installation work remains simple and smooth, while making efficient use of the limited space while wiring. The LCM series is covered under a number of International safety regulation certifications such as the CSA C22.2 and UL-8750.

Sunpower Technology LLP is the UK wing of the Taiwanese manufacturer, taking care of all its power supply needs. The company conforms to BS-EN-ISO 9001:2008 and its factories are certified under ISO certifications 14001 and 9001. Sunpower has been striving for improvements on a continuous basis with the aim of providing customer satisfaction. Even customers buying low volumes are provided technical support and affordable price. The latest LED driver, the LCM-25 has enabled designing low wattage intelligent LED lighting systems. With a global reach, the product is sure to capture a significant share of the market.

ISO 7000 compliant Fully Illuminated Push Button Switches

The Vista-based company APEM, Inc., from California, has developed a new series of fully illuminated push button switches that meet the ISO 7000 standards in all respects. These are the FP30 series pushbuttons. These are being offered to users in both threaded bush mounting form and snap-in type. Even though the size is rather large, they are very light. For snap in types, the panel thickness ranges from 1.5mm to 2.5mm and the threaded type support 1mm to 9mm panels. The unique feature of the FP30 series push buttons is that they are illuminated. They are offered in smooth, glossy finish. The users have the choice of many bezel colors and with differently colored actuators.

The FP 30 series push buttons have the option of being pad printed or even laser etched with more than 100 symbols. The ISO 7000 standards allow the use of graphical symbols on the equipment and FP 30 series complies with this. They are available in seven LED colors meeting the user’s needs and offered in 48V, 24V and 12V ranges. Choice of momentary or latching is available for both threaded bush type and snap-in type along with the option of single pole or double. The push button can be used for 400,000 mechanical operations or 1 million electrical operations when operated at 200mA at 12VDC.

Although the new FP 30 series push buttons are illuminated, non-illuminated push buttons in the FP30 series are also available. The standard packing has 20 pieces. The color options vary marginally for bezel, LED and actuator. For example, you can select a bright chrome bezel with an orange option for the actuator. The case material used is nylon grade PA46, while for the actuator it is PA12 with gloss finish. The bezel is gloss finish ABS, while the bushings and the contacts may be in code 2 silver for 4A 12VDC, code 4 silver or gold plated for 200mA 12VDC. The operating temperature is between -40ºF and +167ºF or -40ºC and +75ºC. Lug terminals are open to soldering.

The new FP 30 series push buttons have a very wide range of applications. They have been designed to make an impact in various industries such as security, industrial automation, defense, medical, instrumentation, apart from being considered ideal for dashboards in the automotive, passenger and commercial vehicle segments. Customer specific requirement of symbols and marking color is also considered on receipt of a specific request and attended to expeditiously.

The company APEM started its operation in the year 1952, manufacturing industrial switches. Over the years, it has grown multifold in a very rapid manner to reach out globally and is now one among the leading manufacturers of man machine interfaces. With a presence in 11 countries and with global distribution network and agents, the company has 67% of its total turnover as exports. APEM designs for professional switches and manufactures them to cater to diversified markets including, medical, industrial automation, defense, communications, instrumentation and transport. The latest launch of the FP30 series of push buttons complying with ISO 7000 standards is another milestone for the company and is expected to make a significant impact in the market.

ByteLight LEDS provide location based service

Not so very long ago, the friendly neighborhood supermarket had a security guard who would greet you in recognition and the store assistants could guide you since they knew what you usually bought. However, the introduction of huge shopping malls with their multiple floors has done away with anyone able to recognize even frequent customers, making the whole affair of shopping completely impersonal.

However, things are about to change. GE Lighting and ByteLight are harnessing the next generation of LED lighting fixtures to communicate with the smart devices of shoppers while they are in-store. Very soon, shoppers will be greeted with personal messages starting from the parking lot. As shoppers move about within the store, they will receive an easy-to-follow map on their devices to help them optimize their shopping time. The store will offer repeat customers a personalized shopping list along with information on promotions and coupons based on their shopping history, current position and direction on the aisle.

Customers will be able to see reviews, play product information videos and connect with virtual associates on-demand to make their brand choice easier. ByteLight has developed this technology by combining VLC or Visible Light Communication, BLE or Bluetooth Low Energy and inertial sensors. They can determine not only the precise location of the shopper on the aisle, but even the direction the person is facing.

The patented ByteLight LED indoor location technology offers several advantages to both shoppers and retailers. It brings the retailer faster ROI as existing lighting infrastructure can be used and no additional equipment is necessary. It has an accuracy of three feet in determining the location and direction of the shopper anywhere there is light. It can connect to any shopper who has a mobile device equipped with Bluetooth and/or camera. ByteLight, being powered by the light fixture, does not require batteries and hence, is maintenance free.

According to Dan Ryan, the CEO and Co-founder of ByteLight, the value proposition for digital LED lighting is shifting from providing illumination to offering innovative services and applications. They are reinventing LED lighting to provide a platform for indoor-location services. Not only will this revolutionize the in-store shopping experience, LEDs will play a strategic role in the experience of customers in connected retail.

GE is providing the lighting fixtures that ByteLight will be using for their location-based services. It amply demonstrates how simple LEDs can be used beyond their traditional ROI of maintenance and energy savings to change the fundamental way of how people shop by combining information with location.

Shoppers will be using an opt-in application on their smartphones or tablets. The app will be powered by ByteLight and together with the indoor location technology embedded within the GE LED fixtures, will deliver to the shopper high value applications based on their current location and the items they are presently watching.

This comprehensive approach will help retailers reach out to an even broader number of shoppers across the largest area – starting from the parking lot and continuing anywhere within the store where there is LED light. That means, retailers will have continuous ROI on their GE lighting and at the same time, this will provide a strategic platform for the futuristic connected retail store.

Measuring Force with Force Sensors

FlexiForce FSR Sensor can help you to measure the force between almost any two surfaces. The sensors are highly flexible, have a paper-thin construction and robustness to stand up to most environments. Tekscan, the manufacturers, can create custom-designed force sensors because of the high durability and unique construction of the basic FSR sensor element. These meet the specific needs of several OEM customers. Off-the-shelf standard sensor products are also available for low-quantity requirements such as prototyping.

With FlexiForce FSR sensors, you can detect and measure any relative change in the applied load or force, the rate of change in force, detect touch and/or contact and identify force thresholds to trigger appropriate actions. Using a FlexiForce OEM force sensor offers several advantages over a competing product, such as superior linearity and accuracy of +/-3% over a wider range of forces. Tekscan provides expert technical guidance in custom solutions and they test all custom sensors to ensure they meet the agreed-upon specifications. Typically, the sensor output is not a function of the loading area and high temperature versions are available as well, going up to 400°F.

The FlexiForce FSR sensor functions as a force-sensing resistor within an electrical circuit. When there is no load or the force is very low, the resistance of the sensor is very high. The resistance decreases as force is applied to the sensor. If you connect a multi-meter to the outer two pins of the sensor, you can read a resistance, which will change when you apply a force to the sensing area. The sensor allows measurement of force against either resistance or conductance. Since the conductance curve for the sensor is linear, calibration is simple.

Integrating a FlexiForce FSR sensor within an application is very easy. One way is to use it in a force-to-voltage circuit. It will be necessary to calibrate the sensor for converting its output into the appropriate engineering unit. Based on the setup, you can easily adjust the arrangement to increase or decrease the sensitivity of the force sensor.

Typical performance specifications of the sensor are very impressive. The error in linearity is less than +/-3%, when the line is drawn from zero to 50% loading. When applying 80% of full force, a conditioned sensor can be expected to be repeatable with a spread of less than +/-2.5% of full scale and a hysteresis of less than 4.5% of full scale. With a constant load of 90% of the sensor rating, the total drift does not go beyond 5% per logarithmic time. If you are measuring impact load, the time required for the sensor to respond to an input force is less than five uS. The sensors work reliably between 15 and 140°F or -9 and +60°C, which are standard. For High-Temp versions, the operating range is 15 to 400°F or -9 to +204°C. The force reading change per degree of temperature is +/-0.2% for every °F or 0.36% for every °C.

FlexiForce FSR sensors have a variety of applications. They are used in bed monitoring, color balancer quality control, fitness training, golf grip measurements, improving robot balance and grip, detection of infusion pump occlusion and several other manufacturing and monitoring purposes.

Meet Bob – the Security Guard Robot

Although security guards are deployed in many places that people visit regularly, it is highly unlikely that one will recall where he or she saw a specific security guard on a particular day. That is because we do not pay much attention to the guards on duty. However, it is different with Bob, and you cannot but look at him, remember him and recall him to your friends later.

That is because Bob is a goofy looking security guard and a robot. He or rather it is an autonomous robot, based on the MetraLabs robot “Scitos A5,” programmed by the University of Birmingham and Bob runs on Linux.

Actually, Bob is on a three-week trial run at the Gloucestershire headquarters of the UK-based security firm GS4 Technology. The School of Computer Science, at the University of Birmingham, designed the robot they named as Bob. GS4 is evaluating Bob’s performance as a trainee security officer. The University of Birmingham is hosting the project STRANDS with an aim of using robots in a more versatile way in the workplace and Bob is a part of the $12.2million project.

Bob is built on the lines of the Germany-based MetroLabs Scitos A5 robot. If you have seen the Softbank Pepper robot made by Aldeberan, Bob looks much like an armless, stripped down version – even the built-in tablet display is present. The difference between the two is in their programming. Pepper can read and respond to human emotions, while Bob is trained to notice changes in a given environment.

With built-in scanners and 3D cameras, Bob can build a map of its patrol area. Bob, being a mobile robot, can identify objects and autonomously maneuver around them. If it finds its batteries are running low on energy, Bob reports to its docking station for charging them. According to GS4, the security robot is programmed with activity recognition algorithms. Therefore, it is able to detect movement of people, observe and draw conclusions about the changes occurring in the environment over time. For example, Bob can identify when and where objects disappear or reappear, detect whether fire doors are closed or open and identify where people can go.

Bob is unarmed and carries no weapons. Therefore, it cannot apprehend a thief in the act. However, Bob can speak and contact human guards for assistance. Typically, human security officers have a very wide range of different tasks that they carry out. They may have to react to fast changing unpredictable events that require on-the-spot decisions. Although the robot security guard of the STRANDS project will not be able to replace a human, it can support the security team as an additional patrolling resource. It can carry out frequent routine checks, highlighting abnormal situations that require the security teams to respond.

The Scitos A5 from MetraLabs sells primarily as a mobile service robot. It is used for exhibition booth and point-of-sales applications. Typically, the Scitos robots run on Fedora Linux with SELinux extensions, whereas Bob runs on Ubuntu Linux. The interface consists of a 15-inch, 1024×768 touchscreen, dual loudspeakers, microphone and 32 LEDs to provide feedback signals.

Use your mobile device’s headset port for data acquisition

Today, almost all of us use mobile phones every day and we depend on them for many features that personal computers offered earlier. The major advantages of mobile phones is their mobility, compact form-factor, always networked and untethered to power (except when charging). Moreover, mobile phones are now platforms that support continuous sensing applications.

Although mobile phones nowadays house many sensors such as imagers, gyroscopes and accelerometers, some sensors such as soil moisture, air quality and EKG have not been integrated yet. Many people desire support for such sensors and prefer a limited set of direct-connecting interfaces that make it suitable to power external peripherals for transferring data to and from them. This has resulted into a search for a universal peripheral interface port.

Every mobile phone has a headset port, which is almost standardized. Users can connect physically and electrically a vast range of hands-free and headphone audio devices. Therefore, the mobile phone’s headset port is a suitable candidate for such a peripheral interface. Recently introduced peripherals show that designers and manufacturers have a growing interest in using the mobile phone’s headset port for more than just headsets.

Transferring power and data to peripheral devices via the headset port looks an attractive proposition when considering the cost, simplicity and the ubiquity involved in the process. However, different mobile phones show considerable variance in their power delivery ability, microphone bias voltage and passband characteristics among their headset ports.

Therefore, contrary to recent claims, one is forced to conclude that the headset port is not as universal as it is made out to be. For example, peripherals designed to work with iPhones may fail on other Windows or Android phones and vice versa. Moreover, designs for smartphones may not be suitable for less capable feature phones. Therefore, mobile phone peripherals may have a hard time working with the headset ports of different mobile phones.

A new platform, called the AudioDAQ, makes it easier to acquire data continually via the headset port of a mobile phone. Unlike existing phone peripheral interfaces such as HiJack, AudioDAQ draws all the necessary power from the bias voltage of the microphone. It encodes all data as analog audio while taking advantage of the voice-memo application built into the phone for continuously collecting data.

Therefore, AudioDAQ is not limited only to iOS devices, but works smoothly on smartphones and feature phones as well – no hardware modification is required on the phone. Compared to HiJack, AudioDAQ has extended sampling periods, which is a result of using a power-efficient analog solution, making it suitable for a large class of sensing applications.

The efficient AudioDAQ design draws all its necessary power from the microphone bias voltage. Since this voltage is present on all phones, irrespective of whether it is a smartphone, feature phone, Android or iOS phone. Moreover, the voice memo application is present in almost all mobile phones. That makes AudioDAQ almost universal in its application. Designers of AudioDAQ have demonstrated the viability of their architecture by and end-to-end system that captures EKG signals continuously for several hours and sends the collected data to a cloud for storage, further processing and visualization.

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.

What is a 3D Tablet?

We hear so much of 3D today that we are no longer surprised with 3D printing, 3D movies, 3D gaming consoles, 3D TV sets etc. Therefore, 3D tablets ought not to come as a surprise. When we live in a 3D environment, it is no wonder that we try to capture it in 3D. Therefore, very soon we will have 3D mobile devices that will not only display 3D movies and games, but also record videos and pictures in full 3D.

In the past three weeks, Google set the whole news world abuzz by announcing their Project Tango and you can see them working with NASA here. The goal of the Project Tango is to let a mobile device sense space and movement in a way similar to what humans do. Google released their first prototype in February 2014 – an Android smartphone with a five-inch screen. The smartphone uses special software for tracking the movements of the device entirely in 3D motion. Measuring over 250-thousand 3D movements every second, it creates a virtual space model of the user’s environment.

Wall Street Journal reports that Google is on its way to building a first-generation 3D tablet as a part of the Project Tango. According to the report, apart from the usual sensors that are present on current tablets, the 3D tablet will have additional and advanced vision sensors such as sophisticated 3D cameras and infrared depth sensors including dedicated software.

The report suggests that Google may well be producing about 4,000 such units of seven-inch tablets for presenting at their annual developer’s conference. Possibilities are the tablet could have the ability to create accurate virtual worlds from real-world environments. This would be similar to mockup sets, and would be of great assistance to movie producers and game developers, as it could cut down on digitizing time.

The report also conjectures that the Movidius Vision Processor, also known as Myriad 1, would power the new tablet – this can map space and motion in real time and with detailed accuracy and precision. Myriad 1 is specifically designed to handle these tasks, and Movidius has a set of tools for developers planning to implement 3D solutions quickly.

Very soon, users will be able to experience the new way of how a mobile device can be used to experience the world and Google is paving the future direction that smart mobile vision systems are expected to take.

Although 3D technology is nothing new, the potential of commercialization by a company such as Google, at an affordable price, is the transforming point in its adoption. As such, phones and consumer tablets running on the Android Operating System are already highly popular. Google, by developing this really compelling technology, is helping fields such as medicine, real estate, engineering and automotive, which make heavy use of video and imaging.

As many of these fields already make extensive use of imaging technology, the next stage will open up huge vistas for them. Imagine doctors and researchers able to see and understand human health in an entirely new way. Other uses can be very diverse such as a property inspection by a prospective buyer or examination of a road project.