Category Archives: Tutorials

Adding Sensors to the Raspberry Pi Camera Robot Kit

Sensors are a vital part of any robotic project, as they allow a robot to get information about the environment in which it’s operating. Without sensors, a robot has no information about the world around it, and it’s very tough to program intelligent behaviours for the robot.

With sensors your robot can find out about the world

With sensors your robot can find out about the world

Now, you’ve always been able to attach sensors to our Raspberry Pi Camera Robot and the Arduino Mini Driver board we use for motor control, but previously you would have had to modify quite a bit of code in order to get your sensor data out. To fix this, we’ve just released an update to the software for our Raspberry Pi Camera robot which makes things much easier. You can now get a large number of sensors to work simply by connecting them to the Mini Driver. The new Mini Driver firmware repeatedly reads from the attached sensors and sends the readings up to the Pi at a rate of 100 times a second. Once on the Pi, the sensor values can be easily retrieved using the robot web server’s websocket interface. Sensors can also be connected directly to the Pi, with sensor readings returned in the same way.

In this tutorial we show you how to update your robot’s software if needed, how to connect sensors to robot, and then how to read the sensor values using the Python py_websockets_bot library. This will let you write control scripts for your robot that use sensors, and which either run on the Pi, or which run on another computer connected over the network.

Continue reading

New Product – A Power Bank for your Raspberry Pi Robot

One issue that has caught quite a few people out when they build our Raspberry Pi robot kit, is the issue of power. The kit comes with a 6xAA battery holder, but the trouble is, not all AA batteries are the same, which is easy to overlook when you’re grappling with all the other complexities of building a Raspberry Pi robot. :)

We recommend that the robot be powered with good quality, high capacity, rechargeable (NiMh or NiCd) batteries, such as Duracell 2400mAh NiMh . Non-rechargeable (Alkaline) batteries are not recommended as they will struggle to provide enough current to power both the Pi and the motors of the robot.

Good for Robots

Good for robots

Bad for Robots

Bad for robots

Good for Robots

Pretty (and also good for robots)

 

 

 

 

 

As an alternative to AA batteries, we’re now selling the  TeckNet iEP387 USB power bank which can be used to power the entire robot. The power bank is more expensive that the cost of 6 AA rechargeable batteries, but you get the advantage of increased runtime (approx 5 hours compared to 3hrs for the NiMh Duracells), and you don’t have to buy a battery charger.

In this blog post we show you how to use the power bank with the robot. Continue reading

Programming a Raspberry Pi Robot Using Python and OpenCV

Our Raspberry Pi robot has proven to be very popular, as it allows people to easily put together a fun little robot, that they can drive around using a smartphone, tablet or computer, whilst viewing the world with the camera on the robot. However, fun as this is, it’s hard to view this ‘robot’ as being much more than a remote controlled toy. Our personal view has always been that a robot should be autonomous in some way, and that’s why we’ve been working on a programming interface for our robot that will let users of our robots create cool, autonomous behaviours.

Bring your robot to life with Python and OpenCV

Bring your robot to life with Python and OpenCV

The interface is a Python library called py_websockets_bot. The library communicates with the robot over a network interface, controlling it’s movements and also streaming back images from its camera so that they can be processed with the computer vision library OpenCV. Communicating over a network interface means that your scripts can either run on the robot, or they can run on a separate computer. This feature is really useful if you want to use a computer more powerful than the Pi to run advanced AI and computer vision algorithms, or if you want to coordinate the movement of multiple robots.

In this post we show you how to install the interface library, and provide some example programs, that show you how to make the robot move, how to retrieve images from the camera and how to manipulate the images with OpenCV. Continue reading

Using the Pi Co-op as a General Purpose I/O Board for the Raspberry Pi

We released the Pi pi_co-opCo-op, an Arduino add-on board for the Raspberry Pi back in the middle of January. But for various reasons, we haven’t had the time to do much promotional work, and explain to people why it’s so cool, and why you’d actually want to add an Arduino to your Pi.

To fix that, we’ve created a video, because reading text can be really boring :) , and then, we’ve written this blog post to show you one of the really useful things you can do with the Pi Co-op. We show you how you can use your Pi Co-op as a general purpose I/O board for the Pi.

So now, instead of having to buy loads of different add-on boards for your Pi, you can just buy the Pi Co-op here. :) You can use it as an Analog to Digital Converter (ADC), you can use it to connect to 5V devices, you can use it to generate PWM signals, and you can use it for I2C. To top it all off, you can also control all of this functionality from a high level language such as Python.

Continue reading

Using the Dagu Mini Driver to Build a Raspberry Pi Camera Robot

pi_magician_small_03__98633A Raspberry Pi with a camera, gives you a small, low cost, embedded vision system, but it’s not very mobile. In this tutorial we show you how to fix that by attaching it to a robot to give you a Raspberry Pi camera robot! The robot is WiFi enabled which means you can drive it around using a tablet, phone or computer, using the camera to explore remote areas.

We’ve tried to keep the components for this tutorial as affordable as possible, and as such we’re using the Dagu Arduino Mini Driver to control the motors and servos of the robot. This board also contains a 1A voltage regulator which we can use to power the Pi. Now a limit of 1A is a bit tight for the Pi, but we’ve found that with the right WiFi dongle, the Mini Driver voltage regulator can happily power itself, the Pi, a camera, and WiFi. All the ingredients you need for a camera robot. :)

Update: This robot also works with the new Model B+ Pi. We’ve updated the instructions to reflect this below.

Update: We’ve now changed the robot slightly so that it uses a UBEC to power the Pi. This extends the battery life of the robot, and increases the current limit for the Pi to 3A.

Continue reading

Creating a Dawn Robotics SD Card

Update: This post is now out of date as we’ve released a new version of the software. You can find an updated version of the instructions here.

This post describes all the steps we go through to set up a Dawn Robotics SD Card. This SD card contains Raspbian with software installed on it to support a Raspberry Pi robot, and also to support the Pi Co-op Arduino add-on board we sell. If you want to get up and running quickly, then you can just download a complete version of the SD card image here, or alternatively buy a pre-installed SD card from us here. For people who want to build their SD card image from scratch however, or who want to customise it for their own Raspberry Pi robot, hopefully this set of notes will be a good guide to show you what we’ve done.

Continue reading

Building a Raspberry Pi Robot and Controlling it with Scratch – Part 3

Happy New Year everyone! Things have been a bit quiet on this blog due to the Christmas rush, and the fact that we’ve been spending time on product development (more on that in a future post). But here at last is the 3rd and final post in our series on the Raspberry Pi robot we used for a workshop at the now not so recent Digimakers event at @Bristol.

In part 1 we described the hardware of the robot, in part 2 we talked about the software that ran on the robot. In this post we’ll talk about about the the Scratch simulator which the workshop participants used to create their robot control programs, and our experience of running the workshop. Continue reading

Building a Raspberry Pi Robot and Controlling it with Scratch – Part 2

Welcome to the second part of our series of posts, describing the workshop we ran at the recent Digimakers event at @Bristol. In the last post we described the outline of the workshop and looked at the hardware of the Raspberry Pi robot that we built for the event. In this post we describe the software running on the robot, and how we set it up. Hopefully this post will give some useful ideas for those wanting to set up their own Raspberry Pi robot.

Continue reading

Talking to a Bluetooth Serial Module with a Raspberry Pi

Bluetooth is a very low cost and flexible way to add wireless communication to your projects. However, it can also be a bit tricky to set up. In this post we show you how to set up a Raspberry Pi with a USB Bluetooth dongle so that it can communicate with an Arduino using a Bluetooth serial module.

Once the set up is complete, we’ll have a new serial port on the Raspberry Pi that can be used to communicate with the serial Bluetooth module, either using a program such as Cutecom, or using one of the many serial programming libraries such as pySerial. Continue reading

Building a Raspberry Pi Robot and Controlling it with Scratch – Part 1

Last weekend we ran a workshop at the Digimakers event at @Bristol where we taught people how to program a Raspberry Pi robot with the Scratch programming language. It went really well, and it was amazing to see kids as young as 7 grasp the basics of robot control, and produce some really good control programs. Quite frankly, our careers are obviously in jeopardy once they reach the jobs market. :)

This is the first in a series of posts where we describe the basics of how we built the robot, programmed it and put on the workshop. All of the workshop code, and the workshop worksheet can be found here if people are interested in recreating our work.

Continue reading