Petoi Bittle robot dog

FunduinoLast updated on

Aufbau, Programmierung und Kalibrierung des Roboterhundes

Bittle ist ein kleiner, wendiger und leistungsstarker Roboterhund und ein ideales Werkzeug für das Erlernen, Unterrichten und Erforschen von Robotern. Mit einem speziell angefertigten Arduino-Board, das alle instinktiven und anspruchsvollen Bewegungen koordiniert, kannst du verschiedene Sensoren anbringen, um dem Roboterhund weitere „Wahrnehmungen“ hinzuzufügen. Du kannst auch künstliche Intelligenz integrieren, indem du einen Raspberry Pi oder andere KI-Chips montierst.

Der Start mit dem Bittle ist einfach, da bereits bei der Auslieferung ein Programm mit vorkonfigurierten Bewegungsabläufen installiert ist. Diese Bewegungen lassen sich mithilfe der beiliegenden Fernbedienung aufrufen. So kann der Bittle ohne jeglichen Programmieraufwand rennen, sitzen oder Pfote geben.

Nach den ersten „Gehversuchen“ kannst du den Roboter selbst programmieren – mit einfachen blockbasierten Programmbausteinen, aber auch über Hochsprachen wie Arduino (C++) und Python. Insbesondere Schülerinnen und Schüler können über die TinkerGen IDE Programme schreiben oder bereits bestehende Programme erweitern und verändern.

Die OpenCat-Software funktioniert neben dem Bittle auch auf dem Nybble. Sie kommuniziert mit einem Arduino-kompatiblen Mikrocontroller mit dem Namen NyBoard, der wie viele Arduino-Mikrocontroller auf dem Chip ATmega328P basiert. Weitere Informationen zur Programmierung findest du hier: github.com/PetoiCamp/OpenCat

Bittle robot dog by Petoi
Bittle with remote control: Preconfigured movements straight from the factory
Block-based programming of Bittle in the TinkerGen IDE
1 / 3

Hardware overview

Robots, including Petoi’s bionic robot dog Bittle, consist of various components that work together. Their external appearance gives us an idea of how they can perform advanced movements. In this guide, we’ll take an in-depth look at the modules that make up Bittle and how they interact with each other.

Main component: the servos

A servo motor is built into every movable joint - for the shoulder, hip, and head joints. Servos are motors that can be precisely controlled to rotate to a specific angle. A servo resembles an electric motor - in fact, it is an electric motor with a control chip, a potentiometer, and gears for reducing speed, all housed in a plastic casing.

The potentiometer measures the shaft’s angle of rotation, and a control circuit lets you move the servo shaft precisely to a specified position. Unlike simple DC motors, which can only be controlled for direction and speed, servos are uniquely useful in robotics applications.

Bittle servo motor

Main component: the battery

A battery is installed under Bittle’s belly and can be charged via the micro-USB port. It is a lithium-ion battery: lightweight, powerful, and familiar from laptops and mobile phones. This makes it ideal for devices that need a high current but still have to be lightweight.

Lithium-ion battery under Bittle's belly

Main component: the main board (NyBoard)

When you remove the rear cover, you’ll see the top of the mainboard. Due to product updates, the Bittle Kit includes different versions of the mainboard. The mainboard version may be relevant for programming later on. You can identify the version by reading the version printed on the mainboard.

The version is visible on the front of the board, also known as the NyBoard. In this case, it is version V1_1.

Mainboard (NyBoard) after removing the rear cover
Version V1_1 marking on the front of the NyBoard
1 / 2

Before programming: Power supply

Before programming Bittle, you should know the power supply guidelines.

Also turn on the battery power supply when using USB for programming. Standard USB ports do not provide enough power to operate Bittle properly and may cause a power surge at the computer’s USB port, triggering the USB self-resetting fuse and temporarily disabling the current USB port (restarting the computer reactivates it).

Fully charge the battery before each use of Bittle. Although Bittle can run on a weaker battery, lower voltage will reduce servo performance. If you will not use Bittle for a long time, store the charged battery in a dry, well-ventilated place.

Hardware configuration: Arduino or RPi

The mainboard has a slide switch for selecting how it is used: choose whether to use the integrated Arduino board or an external microcontroller (such as a Raspberry Pi). The switch can be set to either “Arduino” or “RPi.”

The I2C switch changes which device acts as the master for the I2C devices (gyroscope/accelerometer, servo driver, external EEPROM). With the default “Arduino” setting, the NyBoard uses its built-in ATmega328P as the master chip. With “RPi” selected, it uses external chips connected via the I2C ports (SDA, SCL). “Arduino” is selected by default.

Connect Bittle to the computer

To connect Bittle to your PC, first lift the rear cover.

Then attach the USB-TTL converter (small green circuit board) to Bittle's mainboard - make sure the pin order is correct! It should be the same on the USB-TTL converter and Bittle's mainboard. Check the labels on the contacts on both sides. Then connect the USB-TTL converter to the PC using a USB cable.

Lift the rear cover of the Bittle

Choose a programming environment and programming language

If you’re already familiar with the Arduino IDE, we recommend continuing to use it. If you’re already familiar with Scratch or similar software, you’ll probably find the TinkerGen IDE quite easy to use.

If you’re teaching, we recommend simply continuing with what you’ve already used to teach your students. If you’re just getting started with the topic, we recommend the TinkerGen IDE, as it’s quick to learn.

If you later decide to switch to the Arduino IDE, or generally want to show it to your students, you can always do so under the “Code” tab. The block-based program is displayed there as Arduino code.

Programming with the Arduino IDE

Download Arduino: Download the latest software version from the official Arduino website for your computer’s operating system: www.arduino.cc

Connecting Arduino and Bittle: After installation, open Arduino and go to “Tools → Port” to find the corresponding COM port. If there are multiple COM ports, check your computer’s Device Manager.

Connection test: Turn on the Bittle switch, open the Serial Monitor, set the baud rate to 115200, and press the Bittle reset button. A successful connection is indicated by Bittle’s test code appearing in the Serial Monitor.

Configure settings: Bittle is designed for beginners and uses the same official bootloader as the ATmega328P UNO development board. Set up the Arduino environment by selecting “Arduino UNO” under “Arduino AVR Boards” in “Tools → Board”.

Bittle reset button

Download sample programs

Bittle comes with a program already installed: an Arduino sketch called OpenCat.ino. This sketch responds to data sent to the robot dog by other programs, such as TinkerGen Blocks. It is overwritten when you upload your own programs using the Arduino software. But don't worry: you can always reinstall the original OpenCat.ino program.

Ready-made example programs for Bittle are available on GitHub: github.com/PetoiCamp/OpenCat

The “ModuleTests” folder contains test code for testing independent functional modules. As an example, we’ll test the “testBuzzer.ino” sketch and upload it to Bittle. First, select the board and port in the Arduino software. The code runs immediately. Open the Serial Monitor and set the baud rate to 115200.

Before uploading the OpenCat.ino sketch to the Bittle again at a later date, you must set the mainboard version number in the sketch. Otherwise, the connection to the mainboard could be lost. In that case, the bootloader would have to be reflashed.

TinkerGen IDE and Blocks

This section covers block-based programming of the Bittle. On the TinkerGen website, first select the Bittle category: ide.tinkergen.com

You can set the website language to “German” in the menu at the top.

First, connect the Bittle to your computer using the USB cable. Then click “Connect” to connect to the Bittle. At this point, you’ll be notified that the Bittle driver still needs to be installed, if you haven’t already done so. Install the drivers using the device wizard.

After that, it’s quite easy to use and very similar to Scratch and other block-based programming interfaces. For example, you could create a program that makes the robot walk for one second, stop for one second, and then start walking again.

Now just click “Upload,” select the port, and click “OK”—and the robot is programmed.

Language selection in the top menu of the TinkerGen website
Driver installation via the device wizard
Example of a block-based program: run, stop, resume
Select the COM port and click OK.
1 / 4

Troubleshooting: Power Supply

It may happen that the code uploads successfully, but Bittle only plays a funny tune. In most cases, this is because the battery is not sufficiently charged or is switched off.

Solution: Turn on or charge the battery.

Troubleshooting: Upload Error

The upload error message indicates that the PC cannot send data to the mainboard. There can be several reasons for this. The following diagram illustrates a troubleshooting procedure.

[1] Basic checks:

  • Make sure no other program is using the serial port. An open Serial Monitor can occupy the port.
  • Make sure the uploader (green circuit board) is properly connected to the NyBoard.
  • Make sure you are using the USB cable that came with the device. Some USB cables only have two wires for power and no data wires.

[2] Upload a test sketch: In the Arduino IDE, select the mainboard type (Tools → Board → Arduino AVR Boards → Arduino Uno) and upload the sketch File → Examples → 04.Communication → ASCIITable. In the Petoi Desktop App, select the mainboard type NyBoard_V1_* to update the standard firmware.

[3] Install the USB uploader driver:

[4] Reset the bootloader: Instructions from Petoi

If you reset the bootloader, you will then need to configure the joints (servomotors). The joint calibrator is described in the next step.

Error message when uploading a program to the Bittle
Flowchart for troubleshooting upload issues
1 / 2

The joint calibrator

First, download the Petoi Desktop App: petoi.com/pages/software-apps or github.com/PetoiCamp/OpenCat/releases

You’ll receive a ZIP file. Extract it and open UI.exe. In the Petoi Desktop App, click “Joint Calibrator.”

You can reset the Bittle’s firmware by clicking “Firmware Uploader.” When resetting it, make sure it is standing upright; otherwise, the posture sensor (MPU6050) on the mainboard will be configured incorrectly, which will later cause the Bittle to veer off course.

The Bittle will then connect to the software automatically. You can now use the orange calibration angle tool included with the Bittle to check the servo positions. If the Bittle’s legs don’t align with the calibration angle tool, you can adjust the position of each servo using the software.

To start calibration, click “Calibrate,” then click “Save” when it’s complete. You can also check whether it can stand normally by clicking the “Stand Up” button.

Downloaded ZIP file of the Petoi Desktop App
UI.exe in the extracted folder of the Petoi Desktop App
Joint Calibrator button in the Petoi desktop app
joint calibrator with Calibrate and Save buttons
1 / 4
Rate the instructions

Comments

Ask a question or share an experience

Contact us if something doesn’t work. Please include your board and the error message.

We review every comment before publication. Your email address remains with us.