Tag Archives: Raspberry Pi

A Drone-Disabler with the Raspberry Pi

Drones or quad-copters are now affordable, and it is possible to record unique perspectives using their high quality video transmissions. The FAA calls them the unmanned aircraft systems, and these have started posing new challenges to security, safety, and privacy. Experts have started cautioning pilots to consider the implications of the increase in drone usage. Apart from constant surveillance concerns, it is possible for hackers using roving drones to collect location information from mobile devices.

The above has given rise to a cottage industry for anti-drone technology. You can find these devices in a variety of sizes, from handheld tools to plane-mounted types. It is possible to build one using the popular single board computer, the Raspberry Pi (RBPi). However, this rig will work against only Wi-Fi controlled network-based quad-copters. Please be careful to use this technique only on networks and devices that you own, or have permission to experiment, as otherwise, it may be considered illegal.

Many quad-copters use Wi-Fi as the key interface for communication between its controller and the tablet displaying mapping and telemetry data. Others use Wi-Fi as the sole means of control, and existing network-based attacks can be used against these devices. Since modern drones can be treated as flying computers, the attacks developed for use against traditional computer systems are also effective against drones. To illustrate the project, the AR.Drone 2.0 is selected, as it is a low-cost drone with impressive features and sensors.

Using a smartphone, a user can connect to the AR.Drone 2.0 via an access point named ardrone2. It is easy to connect, as the access point is open by default, does not require authentication, and there is no encryption involved. As soon as the user connects to the device through the access point, launching an app allows control of the drone. Although convenient for the user, the process also makes it easy for others to take control of the drone.

Therefore, using a laptop computer or on an RBPi along with a USB Wi-Fi card and a new antenna, it is possible to attack and take over the controls of the drone. For instance, if a friend is flying the AR.Drone 2.0 using the app, the access point will show up in your available wireless network.

The RBPi uses two executable scripts, one to connect to the access point, and the other to disable the drone. Use the first to connect to the network and start up your favorite terminal application. Usually, the default gateway address for this network is 192.168.1.1. As the access point is wide open on the drone system, it is possible to telnet to this address easily. Once you have access, you can proceed to explore the system, or to shut if off entirely.

This project needs a good antenna for effective connectivity. Connecting a good antenna to the wireless device can also extend its range. If you want a directional antenna, it is advisable to go for a cantenna, and you can easily make one from an available empty beer can. The cantenna will allow you control the selected drone without affecting any other device nearby.

Raspberry Pi Goes Binocular

This project uses the popular single board computer, the Raspberry Pi (RBPi) and a spare pair of binoculars to view and take pictures. The LCD on the RBPi is touch enabled to make it easy to capture the images.

To start with, you will need the appropriate Operating System for the RBPi. Download the Wheezy Raspbian OS from the Adafruit site, which will make it easy to interface the 2.8” TFT LCD with a capacitive touchscreen from Adafruit. Once download is complete, unzip the image and install it on the SD card. For the RBPi, you will need the Pi camera with its cable.

Make a suitable arrangement to mount the RBPi and LCD securely on the binoculars and place the camera on one of the eyepieces. This will tell you if the default cable that came with the camera is enough for the purpose or you need to order a longer one. A Wi-Fi dongle (USB type) makes the entire arrangement suitable for transmitting images over the net. In the absence of a Wi-Fi dongle, connect the RBPi to your network using an Ethernet cable.

To configure the RBPi, initially you may have to start with the Raspberry Pi Software Configuration Tool, by logging in and running the command “sudo raspi-config.” This will allow you to set the language, time zone, and keyboard layout according to preference. Additionally, you will also be able to enable the camera, set up the IP address, and the Wi-Fi credentials, which the RBPi will use to communicate.

You can mount the RBPi over the camera in a number of ways, depending on the material available. It is possible to do this with stiff cardboard, thin plywood, and tape. Measure the binoculars and the RBPi to make a suitable cutout in the cardboard. This may require using jigsaw, drill, or laser cutters. If you have access to a 3-D printer, take more accurate measurements, make a suitable image using engineering software, and print a template. Whatever the method of mounting, make sure the RBPi is secure and does not fall over.

Power up the RBPi and the camera and you should be able to see the image on the LCD screen. Place the camera on one of the eyepieces so that light passes through the binoculars and falls on the camera lens. Adjust the position of the camera until you see a well-defined circle on the screen. Now secure the camera to the eyepiece with tape.

For transportability, use a rechargeable battery pack to power the RBPi. For instance, a 2300 mAh battery pack will allow around two hours of operation. To prevent corruption of the SD card, program the RBPi for safe shutdown well before the two hours is over. If the battery pack is also mounted on the binoculars, the total weight may increase, making it difficult to hold and adjust. It might help to have the battery pack on a long enough USB cable, to allow the pack to be kept in the pocket.

It is necessary to connect the RBPi to the Internet if you want the images properly time-stamped. As the RBPi does not have an internal clock, it has to synchronize the date and time with the Internet connection.

Annoy-Pi: Using the Raspberry PI to Annoy Others

Most of us, as children, have made several attempts at annoying our neighbors. The electronically inclined have attempted circuits producing random chirps, which when hidden in cupboards, produced the most annoying effects. Another was a tiny coin-cell battery operated beeper that produced a beep every minute or so, designed to make people go crazy. Now, you can use the Raspberry Pi (RBPi), the popular single board computer, and try different programs to see which of them can produce the most annoying effect on people nearby.

The Annoy-Pi, as this project has been named, pseudo-randomizes both the duration of the beep, and the delay between them. Unlike the coin-battery operated beeper, where the beep could be anticipated every minute or so, the Annoy-Pi prevents the ability to expect the beep at definite intervals. The random pitch, lasting for a random period, also prevents the ability to identify the actual source of the sound.

As the beeps are noticeably different, the victim is unable to immediately identify that the sound comes from the same source, and instead chalks it up to something else entirely. Changing the pitch of the sound randomly queers the situation further. For instance, when the beeps are extremely short and high-pitched, a person might wonder if they just heard something, rather than long enough to really hear something and register it. Neighbors find this to be far more annoying and aggravating rather than regular tones and intervals.

Electronic circuits produce random chirps in different ways. One of the methods is to use two unsynchronized timers—one running at a much higher frequency than the other does. The timer running at a lower frequency uses a lossy capacitor, making its frequency unpredictable. The low frequency timer also triggers its companion, and as they are not synchronized, the triggering occurs at random intervals. You can use the same technique for programming Annoy-Pi.

In programming Annoy-Pi, the principle of threading helps the concept of generating random beeps to a large extent. The operating system keeps track of the threads, which allows the program to switch from one thread to another when necessary, and to come back to its original thread once again.

One way to do this would be to have a cron job running at boot time, with the script waiting for a random 2-5 minutes before actually beeping. The next part of the code may be involved in deciding whether to continue beeping or to stop. If the two are not related to one another, the effect will be random one.

However, with all the threads running simultaneously, you must be careful to not let the script pause or stop suddenly with the threads still running. The threads need to be closed first and only then should the script stop.

As the entire exercise is based on a program, you can try creating random threads to generate various types of beeps to annoy people. Apart from being a prank exercise, the project has a deeper purpose—of stimulating the thought process of the programmer towards generating innovative ideas.

Reflow Oven Control with a Raspberry Pi

ntroduction of SMT or Surface Mount Technology components have made it more difficult for Do-It-Yourself enthusiasts to solder these components using a soldering iron. The switch from through-hole components to SMT types had actually made hand soldering easier initially. However, with the introduction of BGA and similar packages that require blind soldering and extremely small packages that are difficult to handle manually, hand soldering with a soldering iron is now practically impossible.

Such special packages need a reflow soldering process to solder them properly to the PCB. This is easy to make with a single board computer such as the Raspberry Pi or RBPi, and a convectional hot air oven designated originally for a bakery or gastronomy purposes. The RBPi helps to make it an open-source universal reflow oven that is also web enabled and PID controlled. Another advantage of using the RBPi as a controller for this oven is it can be used also as a sophisticated pizza oven. Unfortunately, the two functions are not interchangeable, meaning you must not heat food in an oven that you have once used for reflow soldering purposes.

Apart from the RBPi, you will also need SPI-driven cold-junction thermocouple converters, for which, you can use the MAX31855 or the MAX6675, useful for K-Type thermocouples. The above ICs offer cold-junction compensation and digitize the signal from K-Type thermocouples. The data will be in a signed 12/14-bit, SPI compatible, read-only format.

You will also need Solid State Relays for the heaters and the fan, and if these are of the GPIO driven types, intermediate drivers will not be necessary for the RBPi. The heaters are best made of PWM driven MOSFETs, preferably operating at 12 VDC.

The control software runs as a Python daemon on the RBPi. An OS independent multi-user web-client offers live monitoring and remote control. The profile/curve management and slope calculator is browser-based. The software developed for demonstration is a fully functional PID controller, while incorporating a simulator.

The demonstrators have used an EKA KF412 professional hot air oven produced by Teknoeca srl from Italy. The oven uses hot air temperature transfer (convection) as against infrared, and this was considered preferable. The power consumed by the oven was 2.6 KW at 230 V, producing a maximum temperature of 300°C.

The oven chamber has adequate insulation and this increases its thermal inertia. Therefore, once the oven crosses the maximum reflow temperature, a natural cooling process does not offer quick but controlled cooldown. This is necessary to return the solder paste to its rigid state.

A radial fan mounted on the back of the oven handled the above situation. The RBPi drives this fan via a GPIO pin, and it blows fresh cold air at room temperature into the oven. This gives the RBPi total control over the heating and cooling rates of the oven, and it is possible to define a proper reflow solder profile. It is important to know that the reflow profiles for lead-free solder are different from the profile required by leaded solder.

New Velocity & RBPi: Charting an undiscovered island

Not many engineers are familiar with cartography, the map-making process. However, with advances in technology, map-making also uses computers, including using them for gathering, evaluation, and processing the source data. Furthermore, cartographers use the computer for intellectual and graphical design of the map, down to the drawing and reproduction of the final document.

There is more to cartography than mere map-making. Being an academic discipline in its own right, there exist professional associations – regional, national, and international – educational programs, conferences, journals, and other identities related exclusively to cartography. Although technological change has always affected the way cartographers prepare their maps, the computer helps them gain unparalleled control over the mapping process.

New Velocity, a machine based on the single board computer, the Raspberry Pi or RBPi, helps in the charting process. Luiz Zanotello created New Velocity at the University of the Arts at Bremen. This project has been especially helpful in investigating a certain charting error as yet persisting in cartographic maps. It involves the entanglement of physical phenomenon and data, to both of which the digital media gives the same weight.

This anomaly existed for over a century in the form of Sandy Island, located near the French territory of New Caledonia. Although the island appeared on several maps from as early as the late 19th century, an Australian surveyor ship, passing through the area, discovered that the island actually did not exist, and never had. This was followed up by removing the map from all maps. Luiz has reproduced the conditions upon which the island was seen in 1876. This project recreates the charting glitch that put the non-existing island in maps worldwide. By manipulating the digital presence, New Velocity generates a new dataset to support the existence of this fictitious island.

New Velocity has a platform to replicate the up/down movement of a ship floating over high seas. On the platform is an infrared proximity sensor for scanning sand piles. The RBPi maps the spacial data from the proximity sensor for visualization in real time. New Velocity has four preset modes, one for each dataset it records. For instance, it records coastline coordinates, digital geo-tagging, topographical elevation, and water depth surroundings.

New Velocity generates evidence of the presence of an islet in each set of datasets within the range of the island. It also uploads the data posteriorly to the open data bank of Sandy Island for spreading.

The project uses an RBPi2 running the Raspbian Jessie and openFrameworks for generating outputs that include visuals and mapping. Two NEMA 17 stepper motors help to achieve the physical motion. An Arduino Uno running the AccelStepper Library software program operates the motors via two DRV8834 Low-Voltage Stepper Motor Driver Carriers. For sensing the sand pile, New Velocity uses the GP2Y0A41sk0F Analog Distance Sensor, made by Sharp and it can measure from four to 30 cm. The entire project is encased in handcrafted wood and acrylic cases with red LEDs and a toggle button.

New Velocity proves that effective mapping is crucial for finding solutions to cartography, many of them being environmental. Without accurate maps, several activities related to the earth’s surface, such as mineral prospecting, forest management, locational analysis, road construction, weather prospecting, and so many more would remain unpractical.

Use the Raspberry Pi for the Internet of Things

Barriers are coming down between operational technologies. Barriers such as were existing between industrial hardware and software for monitoring and controlling machines and the ERP systems and other information technology people typically use when operating and supporting their business. Manufacturers are having an exciting time as new opportunities are emerging every day for improving the productivity. Along with the rise in the challenges, there are innovations in creating new sources of customer value.

Data is not a new thing for manufacturers. In fact, there was enough data with manufacturers long before the Internet of Things and Big Data came into existence. Although manufacturers have been collecting and analyzing machine data for ages, they can now replace their legacy equipment and systems. With the explosion of the Internet of Things, the flow of data on the customers’ side is also ramping up. Networked products are tightening the connection between customers and manufacturers, with service capabilities expanding and creating entirely new revenue models.

With every organization wanting to participate in the Internet of Things, and IT professionals wanting to know how to add IoT skills to their resume, it is time to look at the different options for learning about IoT. Although there are many ways to gather this knowledge, nothing really can beat the hands-on experience.

The tiny single board computer, the Raspberry Pi or RBPi is one of the key learning platforms for IoT. Not only because this involves very low cost, but also because it offers a complete Linux server in its tiny platform. When you use the RBPi for learning about IoT, you will find that the most difficult thing to face is the picking the right project to make a start.
On the Web, you can find several thousand projects based on the RBPi. They involve the ambitious types, silly types, while some are really great for learning about Linux, RBPi, and the intricacies of the IoT.

When starting out with IoT projects and the RBPi, it is prudent to keep to a boundary – use some common sensors and or controller types. Custom-built hardware is fine for geeks, but for those who are just starting out with IoT, going wild with hardware builds can lead you astray.

While selecting a project, choose one that has something interesting going on for the control software. While it would be foolish to start with an epic development project, just to make a meaningful learning experience, simply calling pre-existing scripts and applications is also likely to cause a loss of interest.

Choose a fun project to start with. Of course, you will be training for the IoT. Nevertheless, training in the form of drudgery is no fun. Therefore, select a project that will want to make you move forward and continue your journey with the education.

You can buy individual sensors from the market and hook them up to your RBPi. However, as a beginner, you might be well off buying a kit for a specific use such as a single wire temperature sensor or a humidity sensor. Later, when more confident, you could move on to Hardware Attached on Top or HATs for the RBPi.

Pi-Top: Convert your Raspberry Pi into a Laptop

Although we call the Raspberry Pi or RBPi as a single board computer and it is small enough to fit in your pocket, it is hardly useful as a computer when you are on the move. This is mainly because the SBC comes without a keyboard, display, and mouse, intended to keep the costs down. However, if you are interested in turning your RBPi3 into a laptop, there is the Pi-Top.

You get everything necessary to turn your $35 single board computer into a laptop. For instance, you get a 13.3” HD LCD screen with an eDP interface and 1366×768 pixel resolution, which comes with an active 262K color matrix, anti-glare finish, and a 60 Hz refresh rate TFT LCD module. Additionally, you get a keyboard that is fully programmable via USB and a trackpad with a PalmCheck feature that helps prevent unwanted mouse clicks.

Although the Pi-Top converts the RBPI into a general-purpose laptop, its actual strength lies in its being a tinkerer’s toolkit. Pi-Top gives you great power management with LED battery indicators. The power supply requires an input capable of 18 V at 3 A, while it offers two outputs, one of 5 V, 3.5 A, and the other at 3.3 V, 500 mA. One good feature is the 3.3 V output is persistent. That means this voltage is available even when you have powered off the Pi-Top. Battery capacity is substantial, giving a run-time of 10-12 hours. There is protection for all outputs from over-current, over-voltage, over-temperature, and short-circuit. The smart battery pack uses a charging profile recommended by JEITA.

The hub-board of the Pi-Top has a screen driver that converts the HDMI output from the RBPi to the eDP 1.2 interface required by the LCD screen. It allows connection of UART, I2C, and SPI to the RBPi for use with add-on boards. There is even a PS/2 interface. The screen consumes 3 W, but you can dim it with a PWM screen dim control to make it consume less power.

Pi-Top comes with a manual to walk you through the assembly process in steps, while identifying clearly the part necessary to use at each stage. The manual has a pictorial guide to help in assembling the laptop. That makes the job relatively simpler. Since all the tools you need are already included, piecing together the case, cables, and boards into a working laptop is an unforgettable experience. However, you do need to be careful when tightening the smallish 2.5 mm nuts that hold the boards in place, as there are various electronic components on the boards.

Once assembled, the Pi-Top is an impressive sight, with its fluorescent green finish. The external case is injection-molded plastic and is sturdy enough to be travel-worthy. When powered on, you may be surprised at not seeing the familiar Linux-based Raspbian desktop on the screen. That is because the PI-Top re-skins the Raspbian desktop as the pi-topOS. Basically, they have added a launcher and configured the desktop to add a menu button at the bottom left corner – familiar to long-time Windows users with the Start menu.

Driving Motors and Servos with the ZeroPi

If you are looking for a development board for the 3-D printer you are designing, ZeroPi may be the best fit. Suitable for use with the Arduino and the Raspberry Pi (RBPi) single board computers, ZeroPi offers an integrated solution allowing makers to build projects easier and faster.

This miniature board for the Arduino and RBPi is a next generation development kit ideal for maker projects that involve any type of robotic motion control including CNC milling and 3-D printers. According to technical specifications, the ZeroPi runs on an Atmel 32-bit, ARM Cortex M0+ processor the SAMD21J18 operating at 48 MHz. This MCU is fully compatible with the RBPi, the Arduino Zero, and so many more hardware resources that drive robots.

Capabilities of the ZeroPi include driving and controlling 11 micro servos and 8 DC motors simultaneously. Alternatively, you can use ZeroPi to control four stepper motors. The four-channel SLOT module is compatible with the regular DC motor and stepper motor drivers such as the TB6612 DC motor driver and the A4988 or DRV8825 Stepper motor drivers.

According to the team that developed ZeroPi, the board works perfectly for a 3-D printer, acting as its mainboard. Additionally, with the ZeroPi and a web interface, it is possible to control the 3-D printer remotely. The team claims to have successfully ported the Repetier and Marlin firmware to ZeroPi. They have tested the combination on Delta and I3 open source 3-D printers, with success. The combination directly controls the printer without requiring any additional expansion boards. Compared to the Mega2560, ZeroPi is all open-source, cheaper and four times faster. In addition, it is only half the size of the Mega 2560. All board schematics, Repetier and Marlin firmware, and the user manual for the ZeroPi is available on GitHub.

Apart from 3-D printers, you can also use the ZeroPi for driving laser cutters and CNC mills. In fact, it is perfectly possible to use the ZeroPi for developing an all-in-one mainboard suitable for all three. This open-source mainboard can serve the creativity and innovation of an entire community, advancing their ambitions. That makes the ZeroPi useful to several people and projects.

Some key features of the ZeroPi are operating voltage of 3.3 V, 2 UARTs, 35 general-purpose IO pins, 4 analog input pins, 12-bit ADC channels, 1 analog output pin, 10-bit DAC. Other features include external interrupts on any pin except pin 4, 7-mADC current per IO pin, Flash memory of 256 KB, SRAM of 32 KB. The ZeroPi board has dimensions of 73 x 61 mm.

You can program the ZeroPi from the Arduino IDE using example codes available for specific functions such as temperature monitoring and encoder readout. By connecting the ZeroPi to the GPIO connector of the RBPi, it is possible to add further functionality such as controlling the ZeroPi via Bluetooth, wireless control, and tablet. By installing a web interface, it is possible to control the motors and servos remotely. The interface can use Java Script as well.

Does the NexDock Work With The Raspberry Pi 3?

Although smartphones are getting smarter all the time, some of their landmark features limit their use as a laptop, two of them standing out prominently. One is the lack of a full-fledged keyboard and the other, a reasonably sized display screen. Therefore, although the smartphone has nearly the same computing powers as your laptop, it fails to compete successfully with a laptop or netbook.

To remedy the situation, you can take recourse to the lapdock. This is a mobile docking station with a built-in battery, a Bluetooth keyboard, and a 14” LCD monitor. While you can connect your smartphone or tablet to the lapdock, it also allows you to dock your single board computer such as the Raspberry Pi or RBPi with equal ease. The lapdock can make use of any device that has an HDMI output.

NexDock is a budget lapdock with a built-in battery that supplies 3.8 V with a capacity of 10,000 mAH. It provides the user with a Bluetooth keyboard, a 14” display, two USB ports, and one micro SD card slot. NexDock has two small loudspeakers built-in, but you can use headphones on the 3.5 mm socket. This is a revolutionary concept helping to harness the productivity of single board computers, tablets, and smartphones.

Single board computers such as the RBPi3 come with an HDMI output. That makes the RBPi3 a suitable candidate for use with the NexDock. As the NexDock uses the operating system of the RBPi, you can use either Linux or Windows 10 easily. An advantage with using the Windows 10 is its Continuum feature, which allows switching between touch and desktop modes. Using NexDock with the iPhone or Android provides the user with a substantial screen size and upgrades the productivity.

This revolutionary budget concept allows you to have the best of both worlds with an SBC, a smartphone, tablet or mini PC. Simply plug in your device and continue to work with it without fear of the battery running out of juice. The massive battery in the NexDock lasts for days on one charge. That means you now have a powerful laptop to take anywhere and do anything along the way. The device measures 351 x 233 x 20 mm, and weighs 1,490 gm. Most of this weight is due to the generously sized battery with a capacity of 10,000 mAH. The display screen is 14.1 inch TN, with a resolution of 1,366 x 768 pixels.

Although the main functionality of the NexDock is boosting mobile productivity, it can also serve to turn your RBPi into a full-fledged computer. However, you can also use it as a secondary portable monitor, a game controller for your iPhone or use it as a dual-screen for AirPlay-enabled games.

For the future, the company is planning to build high-end mini-computers, where you can swap parts. These will have the capability to connect with devices via a single USB-C port. This will serve to reduce the cost of upgrading your computer, as the process serves to separate components that need frequent updates from those that do not. Therefore, while you retain the keyboard, display and the battery, you can update the processor, memory, and operating system as you wish.

How Can I Protect My Raspberry Pi?

By connecting the Single Board Computer to the Internet, you actually run the risk of compromising your Raspberry Pi or RBPi to different types of attacks from malicious persons. However, as several advantages of an Internet connection far outweigh such risks from attackers, there is merit in looking for ways to mitigate them. Spain Hardware from Madrid is venturing on a Kick Starter project to enable hardware protection for the RBPi.

When your RBPi requires secure communication, you can rely on the PiSec module, from Spain Hardware, to provide the necessary assistance. PiSec, being a protecting module, uses its own hardware to protect and encrypt all the inputs and outputs on the RBPi. PiSec protects the RBPi from all angles – SD card, USB, and Ethernet, offering a strong hardware base security that includes Elliptic curves and AES-256 XTS.

PiSec, based on a True Random Number Generator, works by generating safe and strong encryption keys and certificates. Internally, PiSec uses a protected file system that it protects with an internal certificate making it impervious to unauthorized access. The processor on board the PiSec module makes use of Elliptic Curve Cryptography to reduce its own overhead and speed up the process of verification.

PiSec provides protection complying with certificates such as the AES 256-bit XTS Military Grade Encryption and X.509. Repeated attempts after a predefined number of unsuccessful attempts to gain access to the RBPi results in the PiSec automatically blocking access. This helps in preventing DoS or Denial-of-Service and brute force attacks.

Typically, you can use your RBPi right out of its box, including its Ethernet connection, the USB ports, and its SD card. You can use the SBC to collect, store, and transfer data, but the RBPi handles all this using clear text, which anyone can intercept and read. You can use your tiny but powerful computer in several ways, for instance, as a standalone PC as a storage system, data logger, and standalone server, a device to control complex systems/machines, or used with licensed software. In all these cases, it will certainly hurt your business if your data is exposed and someone sniffs the actuator or the sensor communication lines and steals your telemetry.

There are several ways to achieve security through software generated keys and certificates. However, relying on a hardware solution is a far better solution, as most of such software solutions do not use a true random generated number. PiSec offers this strong protection security to the entire RBPi, including all devices on its SPI bus, without overloading the processor of the RBPi, nor collapsing its OS. Being a hardware solution, it is simple enough to plug the PiSec on your RBPi, without any necessity of a learning curve or any previous experience on security.

Features of the PiSec include a TRNG or true random number generator. It obtains the random seed from on-board white noise generators that are FIPS and AIS 31 compliant, and with a very high entropy level. TRNG is crucial to creating strong secure keys and certificates.