GithubHelp home page GithubHelp logo

cardeaduino's Introduction

cardeaduino

Microcontroller that makes discouraging sounds when a doorknob is touched (like racking the slide on a shotgun, or a dog growling). The original PCM library [1] only allowed playing a single sound once. My modified version that removes this restriction is in this repo. I've also added support for playback of bit-crushed audio (with bit depth reduced to 4, 2 or 1).

I'll use an Arduino Uno for the first iteration, because the PCM library is currently AVR only.

Two very useful utilities for generating audio input for PCM are SoX [2] and wave2c [3]. The latter needed some tweaking so I'm including my version in this repo, named "wav2h" (tucked away in a subdir to prevent the Arduino IDE from trying to link it into the sketch).

Cardea is the "Roman goddess of door hinges and handles who prevented evil spirits from crossing thresholds" [4].

The output on Pin 11 is a 62.5 kHz square wave with amplitude signal modulation in 256 (2^8) discrete steps. It is an ugly signal, and its impedance is also quite high. If you connect a speaker directly across ground and Pin 11, the speaker, as well as your ear, does do low-pass filtering. However, even if you can't directly hear the ultrasonic carrier wave, it interferes with the speakers ability to produce fidelitous sound. A reasonable effort to improve the sound quality would therefore be to put a low-pass filter on Pin 11 (at 4 kHz, or just above) and to use a transistor for current amplification (to reduce the signal impedance to something closer to the input impedance of the speaker, which is typically 4 to 16 Ohms).

[1] https://github.com/damellis/PCM

[2] http://sox.sourceforge.net/

[3] http://thieumsweb.free.fr/english/gbacss.html

[4] https://www.brooklynmuseum.org/eascfa/dinner_party/heritage_floor/cardea

cardeaduino's People

Contributors

johancar1sson avatar

Watchers

 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.