Jeff Highsmith

Human Swiss-Army Knife, Tinkerer Extraordinaire

The Cat’s Meow

Posted by jeff on February 2, 2013
Posted in: Arduino.

As a gift for the person watching our cats while we were on vacation, I whipped up a charming little electronic kitty cat.

/videos/CatsMeowiPhone.m4v

I already had most of the circuit soldered together, as it was one of my failed (too big, physically) prototypes from my office chair lowrider enhancement. To make it more feline, I added some cat parts and reprogrammed the ATTiny85 (running the Arduino core) to make the closest approximation of a meow that I could manage. It’s not easy to express a meow in C, believe me. If only you’d heard some of the horrible sounds I rejected, you might think more highly of the sound I settled on. I had a greeting-card-style digital recorder module in my parts bin, but it seemed like cheating to use it. I wanted to give a gift that could be be repurposed into all kinds of things, and an Arduino circuit is that. I even put a programming header on the cat.

Take a look at my code and email me if you can think of any better way to programmatically meow.

/*

Cat’s Meow, by Jeff Highsmith

circuit:
* 8-ohm speaker on digital pin 3
* Power supplied by contact switch when tail is pressed.

*/

void setup() {
}

void loop() {
// Meee
int i=60;
while( i < 1500) { tone(3, i,1); delay(1); i=(i+2); } i = 1100; // ooo while (i>400) {
tone(3,i,3);
delay(3);
i=i-(i/80)+1;
}
// ww!
while(i<600) { tone(3,i,4); delay(4); i=i+(i/40); } noTone(3); } [/code] Finally, here's a circuit diagram that would be easier to understand if I didn't insist upon making it vaguely cat-shaped. Cat's Meow Circuit Diagram

Now I’m imagining a whole desktop menagerie of circuit board animals. I also have a much greater appreciation for all the rough sounds emitted by my kids’ toys.

Posts navigation

← Dispatchatron Junior
Anapestic Tetragraph →
  • About Me

    I love to make things. The medium isn't important, and I enjoy scrounging for materials and making do with what's at hand.
  • Recent Posts

    • Morse Riddler
    • Roping Dummy
    • Spacecraft
    • Mission Control Desk
    • House-Roaming, Color-Hunting, Christmas Tree-Controlling CheerBot
  • Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    • Mastodon
Proudly powered by WordPress Theme: Parament by Automattic.