Introduction: The Moving OLOID - a Different Pet in Different Times

Corona has changed our lives: it requires us to physicially distance,
which in turn leads to social distancing. So what could be a solution? Maybe a pet? But no, Corona comes from animals. Let's save ourselves from another Corona 2.0. But if we have to keep away from humans (to not infect and not be infected) and animals but remain the social beings we are, what should we do?

Have no despair! We have found a solution: the moving OLOID a.k.a. mOLOID. It combines interesting geometry (a bit nerdy but nerdy is trendy!) with many aspects of pets: it can make you smile, moves on its own, makes cute sounds and listens to you - at least most of the time. In the following we will show you how to build it yourself, so you can have a pet without any of the pet dangers. Watch out though - you could get an electric shock, which you usually would not get from a living pet!

(This project was developed by Jan Ingo Haller and Lorin Samija as part of the Computational Design and Digital Fabrication Seminar in the Master's programme Integrative Technologies and Architectural Design Research (ITECH) at the University of Stuttgart)

Step 1: A More In-depth Introduction

OLOID

What exactly is an oloid? It is the convex hull of two circles which lay in two planes perpendicular to each other. It was discovered by Paul Schatz in 1929. Check out the first two GIFs that nicely show first the two circles in perpendicular planes and then the convux hull of them. They also show how an oloid moves.

mOLOID

How do we get from an oloid to a mOLOID, a (self-)moving oloid? The answer is that we are using weights to adjust the interal weight balance of the oloid. The GIF showing the two half-circles of our oloid and clock-like hands with spheres at their ends show how the shifting of the weights lets the oloid move as desired.

Strategy

We are using an Arduino UNO to make all of this happen. Two servos will be dealing with the weight movement. The movement itself will be triggerd through a passive infrared sensor, i.e. a motion sensor. In order to have more control over the mOLOID, we are using a HC-05 Bluetooth module for Arduino, which let's us communicate with the Arduino via SerialPortPorfile (SPP). The actual communication then is via a Bluetooth terminal (we used the Bluetooth Terminal app by QWERTY for Android), where we just type in our commands ("on", "off" and numbers for speed and direction settings). The Arduino in return sends us status messages like "Device is on/off" etc. In order to make the mOLOID even more communicative, we have a passive buzzer playing custom melodies depending on different scenarios, e.g. when a motion was deteced and it starts moving.

Step 2: Buy the Components and Make Sure You Have Access to the Relevant Tools

This is the first but also quite important step. Please read the entire
guide first (not just the components lists) to know what you can expect. Then go shopping and buy all the components you need. Also check whether you can access all the relevant tools :)

Components
- Arduino UNO

- 2 x Micro 9g Servos

- Bluetooth HC-05 module for Arduino

- Passive Infrared Sensor HC-SR501 module for Arduino

- Passive Buzzer

- 9V Battery

- flat metal or wooden pieces

- 6 x 20-Australian-cent coins (or similar) for the weights

- 1 x 1k and 1 x 2k resistor (the 2k resistor can also be just two 1k resistor in series)

- Screws (3xM2/20, 3x Nuts M2, 8xM2/6, 2xM2/10, some M2 small wooden Screws)

- Glue (Ruderer)

- Tape

- Jumper Wires (many: M/M, F/M)

- Some thread or wire

- Cloth (optional)

- Spraypaint (optional)


Equipment

- 3D printer

- Soldering iron

- Drills

- Bluetooth terminal (we used the Android app "Bluetooth Terminal" by QWERTY)

- Arduino app (for uploading and editing the code)

- Sanding paper (optional)

Step 3: Print the 3D-printing Parts & Prepare Them

To start the fun, use the attached 3D printing file to print the two parts which needs to be 3D-printed. They are the two ice cream cone like shapes which already include fixed spots for the components you will use to get your OLOID moving.

After the print, clean up the print wherever needed with sanding paper.

Optional for the looks you can use spraypaint to colour them in the colour of your choice.

Step 4: "Dry" Assembly

In this step, no electronics is involved. Do not connect any wires.

You first need to connect the two 3D-printed parts with 3 M2/20 screws and the Nuts. You can then start placing the different components into their fixed positions: start with the Arduino board and screw it in with the M2/8

Then add the battery and put the two servos in their positions. For them, the small wood screws are used to fix the servos into place. Their rotation center should be aligned with the center of the OLOID.

After that add the Bluetooth component with a bit of glue and screw in the passive infrared sensor with M2/8.
Both wire outputs should face to the outside.

Step 5: Be Creative - the Wiring

Well, the creative part is mainly about the many ways, the wires can go from A to B, the creative part is not really on the side what we connect. For this refer to our circuit diagram.

In order to make wiring easier, use the holes that were included in the 3D print. Otherwise, be creative (and efficient) :)

First, connect the battery wires (don't put the battery end of the wire to the battery, so that you do not waste your battery's energy): the black/ the ground wire goes to one of the ground pins of your arduino, the other (most likely red) wire goes to the Vin pin of your arduino.

Then connect a wire to the other ground pin of the arduino, and wire it to one of the available places on your mOLOID (see the photo where we picked the location of the ground hub and how we soldered all of them together). Here we will have our "ground hub", where we collect all the other ground wires from our components.

Do something similar with the 5V-pin: connect a wire from the 5V-pin to the other available location. Here we are collecting all VCC wires needed for our components.

Continue wiring all the other components. Please always double-check with the data sheets of the components you have since some might differ slightly. For connecting to the VCC or the ground hub, use the soldering iron and solder the wires together:

  • The servos need to be connected to the VCC hub, the ground hub and to one of the pins of the Arduino (here 6 and 8 - one for each of the servos)
  • the passive infrared sensor is also connected to the VCC hub, the ground hub and one of the pins of the Arduino (here 13)
  • the buzzer needs to be connect to the ground hub and one of the pins of the Arduino (here 7)
  • for the bluetooth component, you should check your data sheet. The HC-05 we used required some extra resistors but we had also found some tutorials with thr HC-05 that did not require any resistors. Either way, you need to connect the VCC and the ground to the respective hubs. The TXD output (blue wire in the diagram) connects directly to the Arduino (here pin 11). The RXD output splits and connects with a 1k resistor in between to the Arduino (here pin 12). The other part of the split is connected to the ground hub with a 2k resistor (or 2 x 1k resistors in series). We solved this by soldering three 1k resistors together in series and soldered a wire from the TXD output of the bluetooth component to the connection betweent the first and second resistor (see picture).

Step 6: The Buzzer - Flexible Choice

The buzzer is small and adds a further communication aspects to the mOLOID. Its location on the mOLOID is flexible and up to you. We placed it after the other fixed parts were in place, so that we knew where would be a good location.

Watch out that the buzzer has polarity. The one we had, had "legs" of different sizes. The long one (the positive side) we connected to pin 7, the short one (the negative side) to the ground hub. Solder the ground wire to the ground hub as with the other wires connecting to this hub.

Step 7: Circuit & Code Test

All the electronics part are now in place, and we can make our test to check whether all the wiring is working.

Use the USB cable to connect the Arduino board to your computer. Download the attached code (at the end of this step) and open it with the Arduino app. Make yourself familiar with the code. Tt uses three special libraries: one for the servos, one for the Bluetooth communication (SoftwareSerial) and one for the buzzer melodies (pitches). We have also attached the pitches library (at the end of this step) for you to download and import into your Arduino app: for this download the pitches.h file, put it into a zip-file, and then open your Arduino app. Select "Sketch" in the upper menu bar, then "Include Library", then "Add .ZIP Library" and browse to the zip-folder including the pitches.h file.

Have your Bluetooth Terminal app (or an alternative) ready. Connect to the Arduino by finding the HC-05 device and connecting to it. It worked best for us when we connected first outside of the app; just in the usual way using Android. Then we opened the Bluetooth Terminal app and connected within the app.

Once you are connected, upload the code from your code editor. You should now see "bluetooth available" appear in your Bluetooth terminal.

By sending a number you can set the speed of the servos. When you send "on", you switch the mOLOID on properly and it will react to sensor input. Once the sensor is triggerd, the Arduino sends "Motion deteced" and executes a composition of servo movements so that the weights, which we will attach to the end of the servo blades result into the mOLOID moving. You can see a schematic on how the servos will move in one of the pictures.

At the end of the movement, it will send "Motion ended".

In this step, check the following:

- bluetooth communication is working (you can send "on", "off" and non-zero integers, and you receive messages like "Device is on/off", "Motion detected." etc.

- once you send "on", you hear a melody (if yes, the buzzer is working)

- after you have sent "on" and the device is switched on, you can trigger the servo movements (if yes, the sensor is working) & you can hear again a melody

- check in the servo movements that both servos are moving (if yes, the servos are correctly wired)

- last but not least, check whether you hear a melody after you have sent "off".

If all the checks are fulfilled, the eletronics part and the code are working nicely. Congratulations! :)

Step 8: Create and Attach the Weights

The weights are made out of a flat metal piece (7.5 cm long, 1 cm wide, tapered towards the servo base) cut with a handsaw and 3 coins stacked on each other. Instead of the metal piece, you can also take a small flat wood piece. If the metal piece bumps into the 3D shell, you can bend it upwards. To attach it to the Servo, you first have to drill a hole aligned with the servo add-on. Then screw the plastic servo add-on to the metal piece. After this, you are able to attach it. Be aware of the right direction of the Servo. After you placed, fix it with the M2/10 into the Servo, so that the weight is stable.

Then you can place your weight as needed and fix it with some tape. If you want to, you can also spray paint these weights, but detach them first.

If required, you can use some wire or thread and connect the end of the spokes together on each side, so that the weights do not get stuck in the spokes.

Step 9: The OLOID Becomes the MOLOID, the MovingOLOID

Congratulations if you made it until here - reading wise and hopefully also building and testing wise!

In this last step, you can just play around, find good settings and enjoy the mOLOID, the moving OLOID.

Make sure you have uploaded the code as in step 7. Then close the circuit by connecting the battery plug to the battery. Connect to the mOLOID by using the Bluetooth Terminal app and connecting to the HC-05 module.

You can send "on", "off" and any non-zero integer to the mOLOID via Bluetooth. The first two commands are clear: they switch the mOLOID on and off in the sense that when the mOLOID is on, it reacts to sensor input and starts moving, when it is off, it does not react to sensor input. Sending a non-zero integer adjusts the speed of the movement: we found good values were between 5 and 20 (and -5 and -20 if you want the reverse direction).

Small tip: always send "off" first so that the two servos are in their correct base position. Then

  • either send "on" and go with the default speed,
  • or first send a number (note that the mOLOID changes directions if you input a negative number) to adjust the speed, and then send "on".

You can also adjust the speed while the mOLOID is on and has possibly moved already. Just send again a non-zero integer.

Trigger the sensor and enjoy your new favourite non-viral, Corona-safe pet :)

Step 10: OPTIONAL: Sew a Covering

Optional but interesting for the crafty ones amongst you:


You can sew a cloth covering for your mOLOID. Use a stretchy fabric and a zigzag stitch. The stretchy fabric gives you some flexibility putting it on and makes sure that your infrared sensor is still reacing to motion. The shape is just the surface of an oloid "unrolled".

Also make sure when putting the covering on that the opening of the it is where the battery is, so that you can easily attach and detach the battery.

We hope you had fun building your very own mOLOID and are now enjoying playing with it :)