Tag Archives: Robotics

The GoPiGo Robot Kit for the Raspberry Pi

Making a robot work with the tiny computer Raspberry Pi or RBPi has never been so easy. If you use the RBPi robot kit GoPiGo, all you will need is a small screwdriver with a Phillips head. The GoPiGo kit comes in a box that contains a battery box for eight or 6 AA batteries, two bags of hardware, two bags of acrylic parts, two motors, the GoPiGo board and a pair of wheels. For assembling all this into a working robot, follow these step-by-step instructions.

You start with the biggest acrylic part in the kit, the body plate or the chassis of the GoPiGo. Lay the plate on the GoPiGo circuit board and align the two holes with those on the circuit board. Place two short hex spacers in the holes below the body plate to make sure of which way is the upper side.

Next, you must attach the motors to the chassis. Use the four acrylic Ts in the kit for attaching two motors. Do not over tighten the bolts while attaching the motors, as this may crack the acrylic.

With the motors in place, it is time to attach the two encoders, one for each motor. These encoders fit on the inside of the motors and poke through the acrylic chassis of the GoPiGo. Encoders are an important part, providing feedback on speed and direction of rotation of the motor. If the encoders will not stay on, use blue ticky tacky to make them stay.

Now it is time to attach the GoPiGo board to the chassis. Place the GoPiGo board on the spacers and line its holes with the holes in the board before holding them together with screws. Two hex supports on the back of the GoPiGo board allow you to attach the castor wheel.

That brings us to attaching the wheels to the GoPiGo. You must do this gently, backing the wheels so they do not touch or rub against the screws. The battery box comes next, to be placed as far back on the chassis as possible. This gives it extra space and prevents the box from hitting the SD card on the RBPi.

This completes the mechanical assembly of the GoPiGo robot and only the RBPi remains to be attached. Locate the black plastic female connector on the GoPiGo and slide the GPIO pins of the RBPi into this connector. The RBPi remains protected by a protected plate or a canopy that has to be attached by screwing it on to the chassis.

Make the electrical connections according to the instructions. Be careful while flashing the GoPiGo hardware and leave the motors unconnected during the flashing. After connecting the GoPiGo for the first time, if you find any motor running backwards, simply reverse its connector.

GoPiGo comes with an ATMega 328 micro-controller, operating on 7-12VDC. SN7544 ICs handle the motor control part, which has two optical encoders using 18 pulse counts per rotation and a wheel diameter of 65 mm. External interfaces include single ports of I2C, Serial, analog and digital/PWM. The idling current consumed is about 3-500 mA, and full load current is 800 mA – 2A with both the motors, the servo and the camera running with the RBPi model B+.

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.

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.

Controlling Robotics Through Brain Waves

Imagine moving things about with nothing more than just your brain waves. This is not some science fiction movie with an exaggerated depiction of an obscure term called Telekinesis – the art of moving matter with thought. Some 15-20 patients have joined studies of brain implants that can convey information from the brain to a computer. These include patients in advanced stages of ALS and those completely or partially paralyzed.

All the patients have undergone similar tests conducted by BrainGate, a closely related study. Some patients, totally unable to move to speak, have so far regained some ability to communicate because of electrodes implanted in their brains. A Georgia company called Neural Signals has developed the electrodes.

In 2011, the US Food and Drug Administration loosened its rules for testing “fully pioneering technologies” such as brain-machine interfaces. Since then, one-third of the patients have undergone surgery for inserting implants into their brains. Other human experiments under way, such as at Caltech, are trying to offer patients autonomous control over Android, the tablet operating system from Google.

Another team, at the Ohio State University is collaborating with Battelle, an R&D organization, for inserting an implant within a patient. They intent to use the brain waves of the patient to control stimulators attached to the arm. According to Battele, They aim to reanimate the paralyzed limb via voluntary control of the patient’s thoughts.

Whenever someone intends to move a limb, a few dozen cells in his or her brain generate electrical activity that can be easily recorded. That gives a fairly accurate picture of what the brain intends to do. Although the brain contains billions of neurons, scientists have been able to sample a couple of hundred of them to get some signals.

Although still experimental, the neural engineering program at the National Institute of Neurological Disorders and Stroke initially developed the technology to study animals in physiology labs. They have refined this to a point where the technology can be applied to humans as well.

A bundle of wires leading from the human patient’s cranium reaches a bulky rack containing signal processors, amplifiers and computers. The apparatus enables lifelike movements in the dexterous hand and fingers of a nine-pound robotic arm. However, the movements are finicky and somewhat dangerous, breaking frequently because of loose connections.

According to John Donoghue, a neuroscientist at the Brown University leading the BrainGate study, today’s brain-machine interface is similar to that of the first pacemakers. They too had wires punched through the skin, reaching the heart and were connected to carts full of electronics. He says brain-machine interfaces today are at the start of a similar trajectory, and will ultimately reach a stage such as that of the present-day self-contained pacemaker, powered by a long-lasting battery.

Researchers were able to demonstrate practical activities – the tasks of daily living, something that most of us take for granted, such as brushing teeth. They examined the patient’s abilities using the Action Research Arm Test, where the patient scored 17 out of 57 in dexterity tests. This was about similar to results that someone with a severe stroke would have obtained.

Zumo-George the Raspberry Pi Behavior Driven Robot

It is difficult to forget the roving Roomba, but it is time we have a new rover – Zumo-George. It is necessary to look differently at the process of control from a series of behaviors, while defining the tenets of development driven by behavior. Development undertaken via BDD or behavior-driven development is a superior method of emphasizing collaboration and communication between testers, developers and business stakeholders. Features and scenarios define behavior, as the Gherkin syntax specifically elicits –

Given: Zumo-George is more than 10cm from wall

Situation: Power is applied to the motors

Result: Zumo-George should drive forward

Developers write the BDD scenarios before writing other code, and this determines what code is written. This process reduces wastage. In addition, the written code drives the development, which, in most cases, passes the first time. As Zumo-George executes the scenarios, developers can see exactly what steps it passes, what it fails to pass and whether it encounters any situation that they have overlooked.

Intermixed with electronics, use of BBD to program robots such as Zumo-George can be an ideal abstraction for exploring robotic control based on behavior – BDR, or Behavior-Driven Robotics. Such programming can even include testing or internal diagnostics on Zumo-George. For example,

Given: Lights are all off

Situation: When light is switched

Result: light should turn

Or, on a lighter side,

Given: Batteries are fully charged

Situation: Shoot lasers

Result: Target should fry

As Zumo-George has no laser.

Zumo-George has to execute a series of internal diagnostic tests each time it boots up. If it fails any test, then it will simply refuse to rove and will flash a red light. This will preclude the problem of the robot running out of control.

Naming the robot Zumo-George, the developers prefer referring to the robot as a “he” rather than “it.” They expect Zumo-George to mimic certain human behavior. For example, do not bump into a wall while walking/driving.

Polulu’s Zumo and the Explorer HAT Pro from Pimroni form the basis of the rover (including its name). Therefore, Zumo comes in several variants. For example, for Arduino, there is the all singing Zumo 32U4, with accelerometers, LCD, buzzers, sensors and more. Then there is the bare-bones Zumo Chassis Kit and this is most suitable for Raspberry Pi (RBPi), as users can add their own electronics.

XMP-1 the Raspberry Pi Robot

XMP-1 the Raspberry Pi Robot
The inexpensive, credit card sized single board computer, the Raspberry Pi or RBPi, can be teamed up with another inexpensive, credit card sized processor platform, the XMOS startKIT. The duo presents the unique possibility for DIY enthusiasts to construct robotics applications. An additional incentive – almost no soldering required.

The XMOS StartKit comes with an XMOS processor chip that has multiple XMOS cores. You can program these cores directly in C. Multiple programs will run in parallel within the XMOS cores, at high speeds and without jitter. That is exactly what the robotics applications ideally require.

The combination of the RBPi and the XMOS startKIT makes a simple mobile platform that its designer Shabaz chooses to call as XMP-1 – the XMOS Mobile Platform, version 1. Using only simple tools such as pliers, wire-cutters and a screwdriver, XMP-1 involves only low-cost off-the-shelf standard hardware. It is flexible enough to allow addition of more sensors and programming to make it more versatile than it is at present. The XMOS board communicates with the RBPi via the Serial Peripheral Interface or SPI and you can control the XMP-1 from a web browser.

Although XMP-1 can move at quite a high speed, it is preferable to keep its speed low when it is being taught a new route. The console output and the browser controls are available on the display on the web browser to generate keep-alive and status messages to help you see what is happening. Shabaz has recorded this project in three parts, the first of which deals with programming the XMP-1 that has no sensors. In part two, Shabaz conducts more XMOS startKIT experiments. These serve to establish the process of high-speed SPI communication between the XMOS startKIT board and the RBPi.

You will be able to get the XMP-1 up and running, if you simply take the code, compile it and plug it into the flash on the XMOS startKIT board and the RBPi. However, this project is useful to all types of enthusiasts apart from those only interested in constructing and using XMP-1. For example, on the site, you will get adequate help in the XMP-1 hardware assembly, controlling hardware using RBPi and using a web browser to do it from a remote location. The site is very informative for those who are new to the XMOS startKIT.

The RBPi is connected to the network via an 802.11 Wi-Fi USB adapter and handles all network activity. A small web server running on the RBPi provides feedback to the user via a web browser. The RBPi also transfers the motor control speeds it receives from the user over to the XMOS startKIT board via the Serial Peripheral Interface. In turn, the XMOS startKIT feeds the motors with the correct Pulse Width Modulation or PWM signals.

Based on these input signals, the hobby servomotors operate to allow the XMP-1 to run at varying speeds in a straight line or to take a turn. Usually the servomotors rotate to less than a complete revolution – within a range of nearly 180-degrees. The output shaft is connected to linkages that make the wheels turn a full right, a full left or anything in-between.

Integrate your Raspberry Pi to the Hackable Roomba

You do not find many robots in the consumer arena, unless it is the AVA 500, the telepresence robot from iRobot. Users can simply specify where they want AVA 500 to be and it automatically navigates to the destination without requiring any human intervention. It has advanced mapping technology combined with a real-time view of the environment. Another simpler consumer robot is Roomba, from the same company, iRobot.

iRobot has turned the highly successful Roomba 600 robot into a hackable Create 2 version. This is very useful for K12 and college level STEM education, because Create 2 can be programmed via a laptop, an onboard Arduino or a Raspberry Pi (RBPi). Although both AVA 500 and Roomba are Linux based, unlike the more sophisticated AVA 500, Roomba 600 was a modest, vacuuming robot, based on a simple Motorola HC12 micro-controller.

Create 2, the modified Roomba 600, is not meant for vacuuming, as iRobot has eliminated all the internal vacuuming equipment. That leaves Create 2 with plenty of space inside for adding custom hardware components. You can easily put in an RBPi there, using pre-programmed routines to control the bot. Other alternate methods of direct control are tethering Create 2 to a laptop via the serial Mini-Din port using a serial-to-USB cable.

Based on the original Roomba 600, Create 2 is a round, 3.58-Kilo robot, measuring 340 mm in diameter and 92 mm in height. The market has several models of the Roomba robot, but Roomba 600 is the cheapest. iRobot offers 3D printing files that help you in adding electronics and peripherals to Create 2. They provide instructions for replacing the bin with a cargo tray that you can 3D print. They also supply a faceplate drill template.

Rechargeable batteries on the Create 2 allow a three-hour run before needing a recharge. As with the original Roomba 600, Create 2 will also return to its charging dock when it is time for a recharge. Sensors, such as IR transceivers on Create 2 enable it to escape cul-de-sacs and move around obstacles.

To interface with the Motorola MCU and related components, Create 2 comes with a programming environment, the Roomba OI or Open Interface. With the Roomba OI, a user can program the behavior, sounds, movements and read its sensors. The OI provides several commands for the sensors, cleaning, song, actuator and mode settings.

RBPi Model A is the most suitable for controlling Create 2 as you can run it off the serial connector of the robot. Power requirements for the Model A and its camera are just within the headroom of the on-board thermal resettable fuse of Create 2. It is also possible to work with RBPi models A+, B or B+; however, you will have to power them independently.

The RBPi will need an SD card of at least 4GB, pre-installed with the Raspbian Linux. Other hardware that you will require are an RBPi camera board, a switching DCDC converter, a micro-USB male cable, a 5V to 3.3V level converter and a USB to Wi-Fi module. iRobot provides several programming samples and starter projects with varying levels of difficulty.

Raspberry Pi gets a stepper-motor hat

Robotics enthusiasts find the credit card sized single board computer, Raspberry Pi or RBPi – a versatile unit for controlling various functions. With several add-ons or HATs readily available in the market, the RBPi can be a formidable force to reckon with. With its latest Motor HAT from Adafruit, your RBPi can control up to four DC motors or two stepper motors using PWM to achieve full speed control.

Although the RBPi has several GPIO pins, not many of them work as PWM. That means, to control motor direction and speed, you require a fully dedicated PWM driver chip onboard. Such chips will handle all the motor and speed controls, while communicating with the RBPi on only two pins – SDA & SCL. These pins follow the I2C standard protocol for communication. Therefore, you can connect this Motor HAT to any other device working with the I2C protocol.

In case you need to control a larger number of motors, as it is often required in robotics, you can easily stack up several of these Motor HAT boards. A total number of 32 boards are allowed by the I2C standard. Therefore, you will be able to control simultaneously 64 stepper motors or 128 DC motors, or a mix of both. To do this, you will have to replace the header on the Motor HAT with a stacking header.

Typically, stepper motor drivers rely on L293D chips. However, the Adafruit Motor HAT uses TB6612 MOSFET drivers. These drivers have the flyback diodes built-in and provide a huge improvement over the L293D – you get 1.2A per channel with 3A as peak current capability. The Motor HAT board comes with a small prototyping area and a polarity protection FET on the power pins. Adafruit offers the Motor HAT fully assembled and tested. All that a user has to do is to solder on the included terminal blocks and the 2×20 plain headers. However, stacking headers are not included.

Looking at the specs of the Motor HAT, you will find four H-bridges with thermal shutdown protection and internal kickback protection diodes. The bridges are capable of driving motors operating from 4.5VDC to 13.5VDC. Each board is capable of driving up to four bi-directional DC motors with individual speed selection using 8-bits or 0.5% resolution. Alternately, you can drive up to two stepper motors – unipolar or bipolar. These could be of single coil or double coil type and the driving could be interleaved or micro stepping.

Motors require a good amount of current for producing the required torque. The huge terminal block connectors allow use or 18-26AWG wires for drive and power. External power can come from a 5-12VDC power supply; the two-pin terminal block connector on the board is polarity protected.

Adafruit Motor HAT board is best suited for RBPi models B+ and A+. For using with models A and B, you have to use an extra-tall 2×13 header in place of the 2×20 header supplied. Adafruit supplies the easy-to-use Python library that makes driving motors a breeze with the RBPi wearing the HAT.

Two Delightful Robots Using the Raspberry Pi

Two kits are presented here for those trying to build a robot for the first time. The first is the GoPiGo, a complete robot kit from Dexter Industries and the second is TiddlyBot, a simple fun robot with lots of features. Both kits are great for introducing anyone to the exciting world of robotics and doing it in a fun and simple way. Building robots is a great way for learning Science, Technology, Engineering and Math (STEM), including basic robotics and programming.

GoPiGo

Apart from the robot itself, the GoPiGo kit comprises a full Linux computer, the Raspberry Pi or RBPi, USB and camera expansion for less than $100. You can turn GoPiGo into a full-fledged Wi-Fi robot for exploring unreachable corners of a closet. The inclusion of RBPi makes the possibilities endless. You can even control the robot with your mobile or phone over local Wi-Fi network.

GoPiGo has an acrylic robot body and associated hardware or mounting the RBPi and the Pi camera. It has a control board for motors, controls and extra hardware other than the encoders, wheels and motors.

You need only a screwdriver to assemble the kit. The kit comes with its power source in the form of an 8XAA battery pack along with its connector. You can use your desktop to program GoPiGo directly downloading the program wirelessly or via a USB stick.

The use of the Pi camera along with the RBPi increases the potential of GoPiGo many times over. There is a servo camera mount with the kit and it allows the camera to turn a full half-circle. This increases the robot’s potential for dynamic exploration – for details visit here.

TiddlyBot

If you are looking for something a little less complicated, TiddlyBot is sure to help. Under RBPi control, TiddlyBot begins with robot like movements, using a multi-colored light and progressing to line drawing and following. This is great for teaching children how to program robots as well as for simply playing games.

You can program TiddlyBot using any smartphone, tablet or PC with the provided Blocky Interface, out of the box. It has a web interface for remote control. Use TiddlyBot as a squiggly bot and draw programmatically or let it run freestyle. Use several pens with different colors to make modern art. Makers of TiddlyBot run many workshops for enabling young people pick up nuances of robot building and programming.

What can you do with these two simple but exciting robots? For starters, here are some suggestions:

• Use Wi-Fi To remotely explore a house or office
• Deliver drinks remotely
• Make sneak attacks on unsuspecting people
• Use it for herding pets and babies
• Use it for remote monitoring an event
The greatest benefit of both the robot kits is the inclusion of the Pi camera, which gives the robots their vision. You can monitor where they are going and manoeuver them remotely. This opens up possibilities of several awesome projects. You can make your robots follow hand motions, navigate and map rooms, track objects, follow faces, check on pets remotely, find lost stuff under the couch and so much more – the possibilities are endless.