Giter Site home page Giter Site logo

muldjord / boobox Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 58.14 MB

A fun Raspberry Pi Pico W project that combines a few pieces of hardware to create an IoT talking skull

License: GNU General Public License v3.0

CMake 0.01% C 0.03% QMake 0.01% C++ 0.02% G-code 99.94%

boobox's Introduction

BooBox

A fun Raspberry Pi Pico W project that combines a few pieces of hardware to create a motion-activated talking skull.

Whenever the motion detector triggers The Pico fetches a sound from the provided TCP server and plays it through the speaker. The jaw matches the audio using a tiny servo that pushes down on a piston that rests on whatever surface the skull is placed on. The skull / Pico W is powered using an ordinary phone charger and a micro USB cable.

I plan on making a more thorough step-by-step explanation on how to built your own BooBox when I get the time. For now, what follows is a quick and dirty walkthrough that should provide all necessary information although in a pretty basic and non-visual way.

NOTE! All sounds added to the BooBox server data folder must be 11KHz 8 bit unsigned .wav files! Due to memory limitations of the Raspberry Pi Pico W the size of each sound file must also be less than 192kb. Files bigger than this will play, but will be cut off.

Here's an example of a BooBox I made looking like the fiendlishly funny Murray the Demonic Talking Skull from the Monkey Island games:

What you need

Hardware

  • Raspberry Pi Pico W
  • Tiny speaker (I use an 8 Ohm, 1 W)
  • PIR HC-SR501 motion sensor
  • SG90 / Micro Servo 9g servo motor
  • MAX98357A class C I2S amplifier module

Electronic schematics

Connect everything exactly as seen here. You'll notice that VSYS and GND has many connections. For the VSYS (+5v) you'll need to share one pin from the Pico W. For the GND connections there are several GND spread out over the GPIO pins of the Pico W. You can use any of those except the one marked AGND.

Connection schematic

Software

  • The official Pico SDK configured and working (https://github.com/raspberrypi/pico-sdk)
    • Quite easy to get working on a standard Ubuntu machine. Just follow their readme.
  • The Qt5 open source SDK
    • On Ubuntu simply run: 'sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools'
  • The code from this repository

3D models / components

All required 3D models are available in the 3D models subdirectory.

Building and running

Server daemon

$ cd server
$ qmake
$ make

Put your wav files in the data directory. Format MUST be mono 11KHz 8 bit unsigned. Now run the server with:

$ ./BooBox

Pico client

  • Compile the pico_boobox client
$ cd client
$ mkdir build
$ cd build
$ cmake -DPICO_BOARD="pico_w" -DWIFI_SSID="SSID" -DWIFI_PASSWORD="PASS" -DTCP_SERVER_IP="SERVERIP" -DTCP_SERVER_PORT="4242" ..
$ make
  • Hold down the 'reprogram' button on the Pico W and connect the USB cable to the PC, then let go of the button to put the Pico into mass storage mode.
  • Drag-n-drop the pico_boobox.uf2 file onto the Pico mass storage device.

If the server is running, everything is hooked up correctly and you've entered your wifi information and IP, your BooBox should now come to life!

boobox's People

Contributors

muldjord avatar

Stargazers

 avatar Andy Hopper avatar  avatar Owen Magelssen avatar Erico Mendonca avatar Rodrigo Vazquez avatar

Watchers

 avatar Rodrigo Vazquez avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.