Tag Archives: RBPi

Raspberry Pi and the Smart Video Car

As kids, nearly everyone has played with a battery-operated car controlled by a remote. Now, you can have the same with the Smart Video Car, but with vastly enhanced features. Additionally, you can control the Smart Video Car from your PC, because running the car is the versatile, single board computer, the Raspberry Pi, or RBPi.

You are in luck if you already have an RBPi B+ or the RBPi 2 with you, as the car comes as a complete learning kit, but without the RBPi. The car operates on 7-12V DC, supplied by two 18650 rechargeable lithium batteries. Since the RBPi cannot operate with such high voltages, a step-down DC-DC converter module is included. The module steps the battery voltage down to 3.3V, suitable for the RBPi to operate satisfactorily.

The kit contains all the multiple parts needed to put the car together. The driver module is based on the IC L298N, from ST Microelectronics, which works as a full-bridge motor controller. That means you can run the car backwards as well. To let the PC control the car wirelessly, the kit includes a USB WLAN stick or Wi-Fi Adapter. To know where your Smart Video Car is at any moment, you can check out the video it sends to your PC or smartphone through its webcam in real-time. The webcam is a part of the kit.

Using the PC, you have complete control of your Smart Video Car. Apart from forward or backward motion, you can turn the car left or right to avoid any obstacles in its path. An additional feature is you can control the camera independently to turn it vertically and horizontally. This way, you can capture the image from different directions.

SunFounder, the manufacturer, supplies all the necessary instructions, diagrams, descriptions and code in a complete manual along with their kit. A Tower Pro Micro Servo SG90 drives two front wheels of the car kit to make it turn left or right, while the other two rear wheels are active wheels. Two Gear Reducers drive the rear active wheels. A 12-bit PWM driver with 16 channels drives the L298N driver module for DC motor.

If you are just beginning to learn the RBPi code and application, this is a great kit to start. However, the kit also teaches you about basic components and modules in electronics. You can then use this knowledge for furthering your application and explore in different fields.

As SunFounder provides the entire code including all the necessary parts, anyone can assemble the kit referring only to the user guide. Building this Smart Video Car can be a fascinating experience and an enjoyable one. If you are running Linux on your PC, you can realize the car control very easily. You can even use Linux running on a virtual machine with equal ease.

The kit uses MJPG-streamer to capture images and transmit video in real-time. If you have a Firefox or Google Chrome browser running on your PC or smartphone, you can easily view the video on the browser and at the same time control the Smart Video Car.

Get 37 Sensors for Your Raspberry Pi

If you have a bunch of school kids rearing to have a go at the most popular single board computer, the Raspberry Pi or RBPi, then this 37-sensor kit is something that can keep them happy for hours on end. Fans of the open source RBPi will relish the different kinds of experiments they can try out with the funny and completed modules in this new kit.

The modules in the kit connect to your RBPi and send it all kinds of different signals from the physical world. Using these modules by connecting them to the RBPi is very simple as the manufacturer of the kit provides detailed information and usage guidelines for all the sensors in the kit.

The latest kit from SunFounder comes with the sensors neatly packed in a plastic box, along with the 168-page user manual. The improved Fritzing breadboard and the sensors are suitable for the RBPi Model B+ and RBPi2. The kit also contains the detailed material list of each module. Users get the improved code in Python and C along with the Fritzing images. That certainly helps the user to learn to use the sensors for their individual applications.

You must have your own RBPi for using the sensors in this kit, as the kit itself does not come with the RBPi. Moreover, the 40-pin GPIO expansion board included with the kit is for the RBPi B+. The most interesting part of the kit is the 16×2 LCD module and the Breadboard. Using these and the several sensors you can try out about 35 experiments listed in the kit.

The experiments cover a mixture of analog and digital electronics. For example, you can learn about how a relay works, how a mercury tilt-switch functions or how to make an active or a passive buzzer sound the alarm. Those interested in remote sensing will find the Hall sensor fascinating, along with the sound sensor and the gas sensor. With the Ultrasonic Ranging Module, you can easily measure distances without approaching the distant object.

For those interested in temperature measurements, there is the DS18820 Temperature Sensor and the Thermistor module. The RTC-DS1302 module will help in measuring in real time, while the Barometric-BMP180 and the Humidity sensor will help in determining or predicting the weather.

Experiments in light interest many. For them, the kit includes dual color LEDs, RGB LEDs, and Auto-Flash LED modules. Photo-interrupter modules, IR obstacle modules, IR remote control module and the IR receiver modules will help those interested in communication with light beams.

Control experiments that are more sophisticated are also possible. For example, those interested in Analog to Digital and Digital to Analog conversion and control will find the AD/DA Converter PCF8591 module to be useful. Other modules such as the Rotary Encoder module, the Joystick PS2 module, the MPU6050 module hold promises of still further sophistication.

The kit is suitable for all types of beginners, learners and the more initiated. It is an attempt to allow users to learn the basics of analog and digital electronics. Users can then move over to experimenting with different types of sensors and learn about controlling their physical world.

Predict Solar Eclipses with Wolfram on Raspberry Pi

Wolfram Research shows how the Wolfram language, used on a Raspberry Pi or RBPi, can help visualize solar eclipses. With this combination, you can view past and present solar eclipses. The most astounding aspect is the solar eclipses you visualize can be not only total or partial, but also as if seen from Earth, Mars or Jupiter.

Depending on your present geographical location, you may or may not be able to witness a solar eclipse. To recapitulate, solar eclipses are events where the Moon blots out the Sun to observers on the Earth. The Moon may be so positioned it blocks out the entire Sun or a part of it. If the Moon blocks out a part of the Sun, the incident is termed a partial eclipse. In a total eclipse, an observer on the Earth will only see the corona of the Sun as a halo around the Moon as it covers the Sun entirely.

By mathematically tracking heavenly bodies, it is possible to predict when a solar eclipse is likely, if it will be visible from a specific location and whether it will be partial or total. Usually, the media drums up a small hype of the event, predicting local weather conditions, telling people how and when to observe the eclipse while including other relevant details. However, this is only if the eclipse is visible in your area.

For people on the Wolfram Community, geographical hurdles do not exist. Novices, experienced users and developers from all over the world share data and knowledge. The Community discusses the latest solar eclipse with anticipation, observation and data analysis. They also participate in the computations for future and extraterrestrial eclipses.

For example, consider the total solar eclipse that occurred on March 20, 2015. Before the event, Jeff Bryant and Fransisco Rodriguez from Wolfram explained how the community could compute the geographical locations from where the eclipse would be totally or partially visible. Fransisco used GeoEntities to highlight with green those countries that would witness at least partial solar eclipse on the date.

Although they predicted the visibility of the solar eclipse, neither Jeff or Fransisco was able to see even the partial solar eclipse, as the former is in the US and the latter in Peru. In their prediction, the intense red area shows the regions from where the total eclipse would be visible, while the lighter red areas depict regions of visibility of the partial eclipse. Another total solar eclipse is predicted in the next decade, of which, at least a partial phase will be visible from almost all countries of the world.

Wolfram now has a new language function, the TimeLinePlot. This is a great way to visualize a chronological event such as a solar eclipse. With TimeLinePlot, you can specify the last few years and the next few years to plot territories and countries from where a total solar eclipse will be visible. TimeLinePlot complies with ISO 3166-1 when depicting territories and countries. Using the incredible powers of computational info-graphics, Wolfram predicts a spectacular total solar eclipse spanning the US from coast to coast on August 21, 2017.

Let Raspberry Pi Track Bats for You

If you live in an area that has fruit trees around, it is likely bats share your space. Bats are furry mammals that flit about at night, feasting on insects and fruits. Although they are not gifted with good eyesight, they locate prey and avoid obstacles using echolocation. They are expert fliers and it is difficult to observe them since they are so silent.

Although humans cannot hear bats, it does not mean these creatures make no noise. In fact, using the process of echolocation, bats produce a considerable amount of sound. However, humans cannot hear them because the sound bats produce has a frequency range beyond human hearing capabilities. Depending on age, humans can hear sounds produced in the frequency range between 20 Hz and 15-20 KHz. Bats can hear and produce sound up to about 110 KHz. That is why a Raspberry Pi or RBPi is necessary to collect process and graphically represent bat calls.

An analysis of bat calls shows the sounds they produce are quite loud and not limited to just one tone. Different breeds of bats produce a variety of sounds, differing just as bird chirping does. For example, their tone may sweep down from a high frequency to a low one, or move around a specific frequency.

Holger and Henrike Korber from Germany have used an RBPi to make a bat detection device. To collect the sound produced by bats, they use an inexpensive microphone of high sensitivity capable of responding to high frequencies. The algorithm they use allows not only a graphical representation of the calls, but also identification of the bat species as well. Additionally, the software allows manipulation of the calls to bring them into frequencies within the human hearing range and create histories of bat activity.

On their site, which translates to Bat Conservation in English, the Korbers offer a list of bat literature. If you can know the German language, you will find a treasure of information on echolocation and acoustic identification of bat species. To read in English, pass the page through Google Translate.

Details of their new WLAN-Raspi-Bat detector are available here. The detector, based on the RBPi Model B+, is wirelessly connected to an external notebook. That allows easy manipulation of the configuration and wireless recording of data. The RBPi bat project uses a UMTS stick for WLAN communication and a modified image of the RBPi OS.

The WLAN-Raspi-Bat detector sends SMS text messages automatically and at freely configurable times. For example, this could be just after the RBPi has booted or just before it shuts down. As the detector is portable, it is important to save on power consumption and data space on the SD Card. To keep the arrangement simple, the Korbers use a simple clock timer to start and shut down the RBPi. As bats venture out only at night, the RBPi can sleep during the day along with the bats.

As the detector communicates wirelessly, there are numerous applications. For example, it is able to operate at locations hard to access, such as in trees up to the canopy and in buildings with difficult access.

What Can the Raspberry Pi Do After Dark?

A lot more goes on in the museums of the world at night, after everyone has vacated the premises and the guards have locked up the place, than one can imagine. The situation may not be as dramatic as what Ben Stiller shows us in the movie, “Night at the Museum,” but still, it does warrant a serious investigation. This is what Tate Britain has done with its After Dark project with help from the inaugural IK Prize.

Tate Britain has one of the largest art collections in the world. In August 2014, it organized a project After Dark, where visitors could experience the thrill of a prohibited voyage, without once stepping into the museum. For 25 hours, more than 100,000 viewers across the globe saw live streaming video over the Internet from four robots let loose in the darkness of the museum. Additionally, 500 people could take control of the robots for approximately 12 minutes each, guide them as they like and see what the robots were witnessing.

RAL Space has engineered the robots, which are based on the tiny single board computer, the Raspberry Pi or RBPi. Working alongside the UK Space Agency or UKSA, RAL Space is one of the world’s leading centers for the research and development of space exploration technologies.

RAL Space worked in close collaboration with Tate Britain, and the team behind the project After Dark combined the latest software with the bespoke RBPi hardware. They designed and engineered the robots, creating a world-first, one of a kind experience and attracted audiences from all over. The Workers, a digital product design studio, designed the Web interface for After Dark.

For the late night explorations within the museum, people from all over the world get to guide four robots by taking control of any one of them. RAL Space has designed the robots to select new operators for driving them every few minutes. As long as the event is live, people can request control of a robot from the project website. The robots know you are waiting, and as soon as a slot frees up, will try to take you on a ride. Even while you wait, you can watch the video of the event being streamed live and appearing on the project website, and on Livestream.com.

You can use the on-screen buttons on the web-based control interface or the arrow keys on your keyboard for controlling the robot. You can make the robot move forward or turn, and even make it look up or look down. The robot senses obstacles around it, feeding this information back to you. Therefore, even though it is nearly dark, you, the navigator, can operate the robot easily.

If you take the robot too close to an object, it will stop moving and inform you through the web-based control interface. Once that happens, you still have control over the robot, as you can make it turn on the spot and let it move forward, continuing with the journey, provided the path ahead is clear.

Raspberry Pi Helps Marine Ecology with Autonomous Recordings

The health of marine ecosystems is linked to that of all living beings on Earth. Around the world, people are waking up to this truth and making efforts to find out what goes on in the murky depths of the oceans. One of the foremost indicators of the health of oceans is determining the population size of Cetacean species, which includes porpoises, dolphins and whales.

However, that is easily said than done. Over the centuries, man has recklessly hunted these gentle giants to the point of almost near extinction. Those left over, are in the endangered list. Conservation status and population size of these mostly endangered species is only possible by collecting extensive amounts of data about them.

Researchers are carrying out studies on the ecological impact of industrial activities such as human-generated noise on the coasts. A team from the University of Sao Paulo in Brazil is carrying out underwater acoustic monitoring. They quantify the human-generated noise while studying sound generated by cetaceans. Water being an efficient medium for transmission of sound, such research is useful because water allows easy detection of the tones and clicks cetaceans produce, even when they are hundreds of kilometers away.

The team first went about their research using commercial underwater recorders. However, they found these to be expensive and inflexible. Almost all the underwater recorders had proprietary hardware and software, which they found impossible or difficult to modify. Therefore, the team built a flexible, low-cost autonomous hydrophone recorder based on the Raspberry Pi or RBPi, an affordable single board computer. They published a paper about their effort in the open-access journal PLOS ONE.

The system is an underwater sound recorder. The entire unit consists of a 50 cm PVC case with 9.5 mm thick walls, closed on both ends. One end has a protective cage made of stainless steel, and this houses the actual hydrophone or an underwater microphone. All the other electronics is located within the PVC case, which is sturdy enough to withstand pressures up to 10 bar. Pressure-chamber testing establishes this as equivalent to pressures experienced almost 100 m underwater.

After signal conditioning, the analog output from the hydrophone passes into a USB linked analog to digital converter, which generates the digital data corresponding to the analog signal. The RBPi stores the digital information along with an appropriate time stamp. Five ordinary D-sized Duracell batteries power the RBPi and there is adequate room within the PVC enclosure to add four more such packs in parallel. Power from the batteries reaches the RBPi via a power management module. The RBPi also includes a real-time clock for generating the time stamp.

The team monitored marine traffic including dolphin and whale population on the eastern and southeastern coast of Brazil. They used their own RBPi based hydrophone recorders and these worked satisfactorily. According to the results of their tests, the devices recorded for two weeks continuously when powered with five battery packs. If they recorded for one hour each day, the researchers estimate the five batteries would power the recorder for over four months of recording.

The RemotePi Board for the Raspberry Pi

If you have designed a mediacenter system around a Raspberry Pi or RBPi, you would also want to control it remotely, just as commercial mediacenters allow. You can do that with the RemotePi Board. Added atop your RBPi, the RemotePi acts as an intelligent infrared remote controlled power switch and remotely controls to power on/off your mediacenter system.

The RemotePi does not need a special IR remote, as it can learn to decipher the IR code of almost any commercial remote – it works with a standard GPIO IR receiver. This allows you to switch off or on the power safely to the RBPi with any TV remote or a pushbutton. The RemotePi is available in two versions, the 2015 version for fitting on older RBPi models A or B, and the Plus 2015 version for fitting on the newer RBPi models A+, B+ or the 2. Two versions of RemotePi are necessary as the RBPi models differ in their physical dimensions as well as in the position of their connectors and mounting holes. For example, the RBPi models A and B have only two mounting holes, while RBPi models A+, B+ and 2 have four mounting holes on each corner.

For both versions of the RemotePi Board, two variants are available. One has the IR LED and receiver integrated on it, while the other has them connected via a cable. The cable-connected variant is useful if you plan to use the RemotePi Board with a non-transparent case or you intend to mount the RemotePi Board and the RBPi out of line of sight. In this case, you only have to keep the extended IR LED and receiver visible to the users. Although you can buy an acrylic case specifically designed to fit the RemotePi Board piggy backing on the RBPi, most of the readily available cases need only minor modifications to accommodate the two.

When using the RemotePi Board with the RBPi, you need to connect the power to the RemotePi Board and not to the RBPi. The RemotePi routes the power to the RBPi, decided by a micro-controller, which switches the power on or off based on the command it receives from a push-button on top of the board or the infrared remote control.

When you command the power to be switched off, the RemotePi first sends a notification to the RBPi via a signal on the GPIO port. The RBPi has a script running in the background that picks up the signal and initiates a clean shutdown of the operating system, avoiding data corruption.

The RemotePi Board cuts off the power to the RBPi completely, after the RBPi has successfully shut itself down. That reduces the power consumption of the duo to a few mA of standby current.

You must teach the RemotePi software to remember the infrared remote control button you want to use for switching power to the RBPi. For this, the RemotePi software has a learning mode and it stores the button information in its flash memory. Of course, you can make it learn a new button any time you like.

Raspberry Pi and the RTK Motor Control Kit

While building robots, many a time you need a simple motor controller for the RBPi or the Raspberry Pi. The RTK Motor Control Kit fits these requirements very well, is budget-friendly, works using the GPIO pins and needs very little coding. The self-assembly kit of the RTK Motor Control Board allows easy control of DC motors with your RBPi.

Once you have soldered the few components correctly on the board, plug the assembly on top of an RBPi. You can control the GPIO pins of the RBPi with a programming software such as Python, Scratch or any other. Connect power to the motors and you can start driving the motors in either direction simply by toggling the GPIO pin on or off. The board supports PWM or Pulse Width Modulation. With PWM, you can control the speed of each motor separately.

To program the board and drive a motor with it is as simple as turning a pin on or off. The tutorial section has an example code in Python, but you could use Scratch or any other compatible language as well. The pins you need to toggle for Motor 1 are 17 & 18 and for Motor 2 are 22 & 23. To control motors with the kit you will need a working RBPi board with its power source, one or two DC motors and 4.5-12VDC power sources for the motors.

To assemble the kit you will need a soldering iron of 35W minimum rating and a reel of 60/40 solder wire. Before starting assembly, it is advisable to read the assembly instructions included with the kit.

On unpacking the kit, you will find it containing the RTK-000-001 PCB, an H-Bridge driver IC SN754410NE, three two-way terminal screw blocks, three two-way pin headers, one 26-way pin GPIO header and one 16-pin IC socket. Ensure all parts of the kit are present before beginning the assembly.

Switch on the soldering iron and ensure it is hot. Place the PCB with the writing RTK RPi M.C.B. facing up and towards the right. Place the IC socket in the PCB at the label IC1, taking care to match the notch of the socket with the gap in the silkscreen. Hold the IC socket in place, turn the PCB around and solder all the pins. Solder the three terminal blocks in their positions J1, J2 and J3, ensuring the terminal blocks face outwards. Place the two pin headers into the PCB at positions J4, J5 and J6, taking care to insert the shorter side of their pins into the board and solder them in place.

Insert the RBPi GPIO connector from the bottom side of the board and solder the pins to the top side of the board. This is important, as the assembled board will sit on the RBPi with this connector engaging the GPIO pins of the RBPi.

Don your ESD wrist-strap and insert the H-Bridge IC into its IC socket, ensuring the notch on the IC matches with the notch on the socket. Connect the motors and their power supply with the correct polarity. Plug in the RTK Motor Control Board to the RBPI, and power on the RBPi first and then the motors.

A Portable Raspberry Pi Powered display

If you have a motor to control, the RasPiRobot Board is a very good fit. Apart from controlling motors, you can also use its switch mode voltage supply to power your RBPi or Raspberry Pi using a large range of battery types. Therefore, with a pack of AA type batteries and the RasPiRobot shield, you can make a very convenient and portable RBPi powered display.

To make an RBPi display that will show the current time as a scrolling text, you need to collect a few parts. These would be – the Adafruit Bicolor square Pixel LED Matrix along with its I2C backpack, A RasPiRobot Board version 2, a battery holder with on/off switch suitable for holding 4xAA batteries and the RBPi Model B+ with 512MB RAM.

Not much of wiring is involved in setting up the parts together. The only soldering you will need to do involves the LED Matrix display, as this comes in a kit form. This is not too difficult as all the instructions are included inside the kit. Once soldering is over, fit the LED Matrix display into the I2C socket of the RasPiRobot Board.

If you are using the latest version 2 of the RasPiRobot board, you have to be careful its extended header pins do not reach up to the bare connections on the underside of the LED Matrix module. In case they do, you will need to insulate the module by covering the header pins with a layer or two of electrical insulating tape.

Next, plug in the RasPiRobot Board on top of the RBPi. Just make sure the RasPiRobot board fits over all the GPIO pins on the right hand side of the RBPi. The RasPiRobot Board has two screw terminals marked GND and Vin. From the battery box, attach the flying leads to these screw terminals taking care of the correct polarity.

Fit four rechargeable AA batteries to the battery holder. Make sure they are fully charged and fitted with the correct polarity. When you turn on the switch on the battery holder, you should see the RBPi light up its power LED as well as the two LEDs on the RasPiRobot Board.

To operate the LED Matrix board from the RBPi, you will need to install the Adafruit I2C and the Python Imaging Libraries – follow the instructions here. The guide also has a few examples to allow you to check the working of your I2C interface and consequently the LED Matrix display. For example, you can have a slow display scrolling text on the LED Matrix, showing the current time.

The LED Backpack library has a number of sub-libraries that handle the low-level interface to the matrix display. The Python Imaging Library handles the job of writing text onto the display as an image. This uses the True type Font FreeSansBold size 9 from the library, although you can use other fonts as well that look good. You may need to experiment with the fonts, as they are not primarily intended to be displayed in the 8×8 pixels the matrix uses. You can select the color of the display also.

The RasPiRobot Board for the Raspberry Pi

In robotics, it is usual to have to drive a few motors with the RBPi or Raspberry Pi. However, instead of letting the RBPi handle the low-level job of motor control, using a motor controller board is another option. This frees the RBPi for handling more of the high-level code, resulting in better utilization of the resources and improving the efficiency of the project.

For turning your RBPi into a proper motor controller, you can use the RasPiRobot Board. Apart from simply running your motors from an external supply, the RasPiRobot does a fantastic job of powering your RBPi as well. A switch-mode power supply on board the RasPiRobot ensures that your RBPi receives a well-filtered and regulated power supply.

To run two motors from the RBPi, you will need a few parts. These include a battery holder with a switch – capable of holding six batteries of the AA type, two 5V or 6V DC motors, a RasPiRobot Board v2 and an RBPi Model B+ with 512MB RAM. You will find the version 2 of the RasPiRobot Board perfectly matches the RBPi Model B+. The RasPiRobot Board fits directly over the RBPi, with its GPIO connector matching the GPIO pins of the RBPi.

The RasPiRobot Board uses the L293D motor driver chip in an H-bridge configuration to run two DC motors independently and bi-directionally. The switch-mode power supply on board allows you to drive low-voltage DC motors from a higher voltage battery supply. Additionally, the RasPiRobot Board can also supply the RBPi with over 2A of current. That means you need only a single power supply for driving both the motors and the RBPi.

You must connect the motors via the screw terminal pairs on the RasPiRobot Board. These terminals are marked as L and R on the board. Take care to connect leads from one motor to the L terminals and the leads from the other motor to the R terminals. Swapping the leads of a particular motor will make it spin in the reverse direction.

Now plug in the RasPiRobot Board on the RBPI, taking care to match the GPIO pins and connector correctly. After this, you may connect the flying leads from the battery pack to the screw terminals. Be careful to connect the positive lead (red/yellow color) to the screw terminal marked Vin and the negative lead (black/blue color) to the screw terminal marked GND. Reversing these leads could result in irreversible damage to your RasPiRobot Board.

Place the batteries in the holder (be careful of maintaining the sequence), and throw the switch to the on position. The RBPi starts to boot, which is evident from its LED lighting up. The two LEDs on the RasPiRobot Board should also light up. You will need to download and install the Python Library – follow the tutorial.

After the library has installed, you can get the motors running individually in forward or reverse directions for a definite interval or stop them. It is also possible to make your entire assembly mobile by mounting it on a robot chassis.