Keywords

1 Introduction

Simple robotic platforms are ideal tools for teaching a wide range of science and engineering disciplines, encompassing electronics, embedded programming, control theory, signal processing and energy management. When the scope of the individual robot is expanded to allow communication and interaction with other similar robots, their potential value as a tool for research expands to allow investigation of swarm intelligence: the study of complex swarm behaviours and emergent behaviours.

The motivation for this research was to create a new platform to replace a similar robot previously developed by the authors (the Pi Swarm robot [2]) with the goal of reducing cost, improving functionality and specifically enhancing its strengths as a versatile robot for use in a classroom environment. It was desired to have a robotic platform flexible enough to allow the tuition of core robotic disciplines to a wide range of age groups, whilst being scalable enough to permit large swarm research to also take place. Such platforms often come at a cost which is prohibitive to education and research, both in pure monetary terms, and also in the context of the time needed to learn how to use and program a system, and regarding general maintenance such as recharging and repairing.

2 Hardware Design

The Psi Swarm robot is based around a dual-layer 108 mm diameter PCB, shown annotated in Fig. 1. A pair of 40-pin sockets allow for a MBED LPC1768 rapid prototyping board to be attached, which functions as the main controller for the robot. The MBED is a small module based around an ARM Cortex-M3 microcontroller. One of the core features of the MBED board is it is designed for use with a special set of online compiler tools, which allow for the development of programs from any machine with an internet connection and compatible browser; this eliminates the need for purchasing and installing a specific tool chainFootnote 1.

Fig. 1.
figure 1

Photo of the main Psi Swarm PCB with additional modules

2.1 Sensors

A set of 8 infrared (IR) sensors equally spaced around the edge of the robot can be used to detect obstacles and other robots. Based around a Vishay TCRT1000 emitter:phototransistor pair connected to a 10-bit ADC, they can detect white surfaces up to approximately 15 cm and estimate the distance to that surface. On the base of the robot there are 5 additional IR sensors that are primarily designed to allow the robot to discriminate between light and dark surfaces allowing for tasks such as line-following.

Provisions are made on the PCB to allow a number of other sensors to be attached. These include the AMS TCS3472x series colour sensors, which can be attached to the base of the robot in a backlit configuration, and also facing up on the robot unlit, allowing the robot to discriminate between different zones of colour either on the arena surface or projected onto the robot from above - the latter configuration allowing dynamically changing arenas to be easily created for specific experiments. An SRF02 ultrasonic module can attach to the front of the robot, which allows obstacles to be detected between 15 cm and 200 cm from the robot, as seen in Fig. 2a. A socket for a CMPS11 tilt-compensated compass module, which combines a 3-axis gyroscope, 3-axis accelerometer and a dedicated microcontroller to perform the Kalman filtering of raw data to return a compensated bearing is provided. Optical wheel encoders can be attached using special daughterboards which can provide up to 2 degree precision for each wheel. The robot also includes a precision digital temperature sensor, current measurement and voltage measurement. The use of existing modules for many of the sensors helps to simplify construction, minimise processing overheads and reduce costs as only the required modules need to be attached.

Fig. 2.
figure 2

Different setup arrangements and plastic hulls for the Psi Swarm

2.2 Actuators

The drive for the robot is provided by a pair of micro-metal geared motors attached to 32 mm diameter wheels with rubber tyres. Different gearboxes are available, with 102:1 being the default ratio, which provides a top speed of approximately 0.25 \(ms^{-1}\). The motors each have dedicated regulated power supplies and are driven by PWM control using H-Bridge drivers, ensuring that speed remains constant as the battery discharges.

The robot also has a 16\(\times \)2 character display which is useful for providing user feedback when testing algorithms, a set of 8 dual-colour LEDs around the perimeter of the robot, a high-brightness dual-colour LED in the center of the robot facing upwards and a pair of white LEDs on the robot to provide back-lighting for the colour sensor. A piezo sounder allows for simple tunes and other sounds to be generated. A 5-direction cursor switch can be used for user input, and a 4-way DIL switch is provided to allow a robot ID to be set in hardwareFootnote 2.

2.3 Power

The robot is powered using a single 14500-sized Lithium Polymer cell. These cells, similar in size to AA cells, typically provide 800 mAH of charge at 3.7 V nominal voltage. The battery supplies power to a number of voltage regulation circuits to separate supplies for the motors, sensors and the MBED. Unless low-power states are used, the MBED will typically draw 250 mA at 5 V, as such the battery life for the robot varies between approximate 30 min at full-loadFootnote 3 to approximately 120 min at idle.

One of the design goals for the robot was to allow for long-term swarm experiments to be run. The robots contain a recharging circuit which allows the battery to be charged and the robot to remain powered when a 6 V DC supply is provided to two contacts on the base of the robot. This supply is rectified such that the polarity is not important. Utilising this design, arenas can be created that either use bus-strips (as seen in Fig. 3) or chequerboard arrangements of power pads on the surface that allow the robot to recharge.

Fig. 3.
figure 3

A swarm of Psi Swarm robots on a charging table with IR beacon

2.4 Construction

A set of 3D-printed parts form a protective sandwich around the main PCB, providing a reflective surface to allow robots to sense other robots. On the base of the robot, a pair of ball-bearings minimise wobble whilst allowing the robot to negotiate uneven surfaces. Various shells have been designed to allow different sensor configurations and tracking systems to be accommodated, including AprilTags [4] and the Optitrack system [3] as seen in Fig. 2b.

3 Software Design

The API for the platform is written in C++ and is designed for use with the MBED online compiler. Functions to simplify interaction with all the available sensors and actuators are written. The API includes a built-in demonstration mode, in which various testing routines and simple code-demos can be activated through a menu-based system when the robot is turned on. A simulator model for the robot using the ARGoS simulation package is currently in development [5].

A set of API functions work in conjunction with a special IR beacon (seen in Fig. 3) that emits 25 mS pulses of light at 4 Hz. Swarms of robots can synchronise with this beacon, and based on relative sensor strength estimate the heading of the beacon. The robots then use an ID-based TDMA system to ensure that only one robot is emitting IR at any one time. Using this system it is possible for swarms of up to 15 robots to can approximate range and bearing measurements for every other robot within line of sight.

3.1 Communication

The robot has two different RF-based communication modules available. A BlueSMIRF Bluetooth to RS-232 module can be attached which allows simple interaction between the robots and a host computer or other device. Inter-swarm communication is possible using the Bluetooth interface, or a 433 MHz transceiver module, which allows for low bitrate communications between robots using code previously developed for the Pi Swarm robot. The API includes functions that allow instructions to be sent to the robots using either communication interface. The functions allow sensor data to be communicated between robots and a computer and allow remote control of the robot hardware. The API also includes functionality to allow file-handling of the flash memory on the MBED using the Bluetooth interface; it is possible to send updated controller binaries to multiple robots at once using this method, which allows large swarms to be reprogrammed wirelessly.

4 Case Study: The Psi Swarm as an Education Platform

As of September 2014, there has been a dramatic change in the English national curriculum, shifting the focus from Information, Communication and Technology (ICT) to Computing. Where previously teaching has been focussed on office based skills such as Microsoft PowerPoint and Access, they will now be educated in programming skills and fundamentals such as algorithm design and logical flow [1]. Teachers are being encouraged to experiment with different possible teaching methods and materials to aid in the choice of a more standardised approach. To take advantage of this renewed interest in computing, we have developed an application that can educate primary school students in programming and logical flow through the control of a Psi Swarm robot using a Android based tablet.

4.1 Background

We have focussed on Key Stage 2 (pupils aged 7 to 11) and the following 4 learning goals outlined in the curriculum:

  1. 1.

    Design, write and debug programs that accomplish specific goals

  2. 2.

    Solve problems by decomposing them into smaller parts

  3. 3.

    Use sequence, selection, and repetition in programs

  4. 4.

    Use logical reasoning to explain how some simple algorithms work

There are a number of existing projects for the education of programming skills, ranging from the older packages such as Logo to more recent examples such as the BBC Micro:Bit. Logo, a LISP based language, developed by MIT in 1967, was designed to allow children to learn to program by controlling the movement of a robot called a Turtle. Scratch, a graphical programming suite that allows the user to define the activity of a program using a set of pre-made building blocks, allows students to learn programming using the concepts of Logo while making interaction more media oriented to make it more appealing [6].

Fig. 4.
figure 4

Screenshots from Scratch and the Android Tablet Application

4.2 Android Application

Based on the basic design concepts of Scratch we have developed an Android-based tablet application utilising an intuitive drag-and-drop user interface; examples of both are shown in Fig. 4. These concepts include the use of colour codes and shaped blocks that have distinct areas to snap together, allowing the students to focus on the function and logic of the code without having to be concerned about syntax.

The user generated code can be saved and loaded on the tablet, and multiple methods to run the code on the robots are implemented. The tablet application can connect with the robot using Bluetooth and send program instructions directly, allowing for the quick testing and step-through debugging of programs. Test lessons for Year 3 and a Year 6 classes have been designed. The students are given a target course, printed onto an A1 acrylic-sheet, which contains a start location for the robot, a target location and a path they should try to follow. The younger students are instructed to move the robot from the start to the target using combinations of turtle-style commands. The older students are to use conditional statements and sensor data from the line-following IR sensors.

5 Conclusions

This paper has discussed the design and implementation of a low-cost robotics platform, designed with the dual-goals of being suitable for demonstrating programming and robotics principles to a wide-variety of age groups, whilst also being a powerful platform for the research of swarm-robotics. Further information about the Psi Swarm can be found at www.york.ac.uk/robot-lab/psiswarm.