Overview

This endeavor seamlessly integrates elements of mechanics, electronics, and software programming, converging into an innovative project. Our ultimate goal is to bring to life a charming robotic creation, embodied by a plush octopus.

This captivating robot will showcase its capabilities by orchestrating the movement of three mallets, precisely controlled by three servos, to strike six tubular bells tuned to resonate six distinct musical notes.

Video

Mechanical Assembly

  • Note the 6 tubular bells made by alluminium (15mm diameter, 1 mm thickness), suspended using fishing wire glued to the suspension wires.
  • The green suspension wires are 2.0 mm plastic coated iron wire (commonly used for gardening).
  • The white plastic box contains the electronics (ESP32 + Digital to Analog Converter)
  • The black rounded box is the loudspeaker.
  • The three mallets are made of wood: 3 mm stick inserted into a 20 mm ball.
  • The three servo motors are SG90

Schematic for ESP32 WROVER (no SD card)

  • The DAC is a MAX98357 board (mono).
  • The ESP32 is an ESP32 WROVER. The ESP WROVER, compared to the ESP32 WROOM, has a 4MBytes additional PSRAM (Pseudo Static RAM) which is necessary to load the MIDI file into memory before parsing and playing it.  
  • It has no SD card so it works only with the SW https://github.com/guido57/PlayingOctopus (see below)

Schematic for ESP32-CAM (with SD card)

  • The DAC is a MAX98357 board (mono).
  • The ESP32 is an ESP32-CAM which has a 4MBytes additional PSRAM (Pseudo Static RAM) and an SD Card Socket.  

having an SD card It works with both SW: 

(see below)

Hardware Assembly with ESP32 WROVER

I used an ESP32 WROVER. It has also a camera  but I didn't activate it.

Under the ESP32 I attached the MAX98357 DAC board using double adhesive tape. 

The two 1000 uF electrolytic capacitors are in parallel.

The completed wiring. 

Note the external reset button I added for easy resetting the board, as the original reset button is inaccessible.

Hardware Assembly with ESP32-CAM

In this case I used an ESP32-CAM (without camera).

Under the ESP32 I attached the MAX98357 DAC board using double adhesive tape. 

Using double adhesive tape I attached a 6 pins connector to the ESP32. See the schematic.

Software

The non trivial software has two alternatives:

https://github.com/guido57/PlayingOctopus

  • It needs an external flask python server to store songs (mid and mp3), convert midi to mp3, stream mp3, search the WEB for new mid files.
  • Can search among about 63.000 MIDI songs
  • It needs an ESP32 with 4MB PSRAM, like ESP32 WROVER

https://github.com/guido57/PlayingOctopusSD

  • Completely autonomous, no need of Internet
  • It needs an ESP32 with 4MB PSRAM and SD card, e.g. ESP32-CAM
  • Can search among about 3.900 MIDI songs stored in a 32 GBytes micro SD

Browse web page

See details at https://github.com/guido57/PlayingOctopusSD