Have a garden? Show it off! Share your pics here.

Posts with tag audio

Make a story CD for your child

classic children's books

My three-year-old loves to listen to stories. As a conscientious mom and former reading teacher, this thrills me beyond words. We read books together often throughout the day, and though I love to spin a good yarn, we really like to listen to audiobooks while traveling in the car.

We own some good ones, and we frequent the library to check out lots of recorded books every three weeks. But Owen's favorite stories we can't find on CD, so we've just had to be creative about it. Here's what we've discovered:
  • Robert Munsch is an author and storyteller with the sense of humor of a six-year-old boy. This works out for us, and since he's got scads of downloadable stories, it is a great resource.
  • If you and your child like the classics, Kiddie Records Weekly has all the old recordings you listened to as a child, scratchy LP quality included! Some of these are really priceless; my son loves this version of Goldilocks and the Three Bears.

Continue reading Make a story CD for your child

Record audio with the MSP430 microcontroller

This article continues a series about building a DIY digital audio recorder. Inspired by this microcontroller audio project [via], I set out to build a simple digital recording device. I chose Texas Instrument's MSP430 microcontroller for this project because it's fast (16 MHz), it's cheap ($1), and it's very low power. Read the first part, the second part, and the third.

In the first few segments I developed a digital audio recorder prototype that plays raw audio files from an SD card. This time we finish up the introductory segments by recording audio to the SD card. Before the audio can be recorded by the microcontroller, it has to be prepared by a small amplifier. Read on to learn more about working with microphones and recording audio with a microcontroller.



Gallery: MSP430 audio sampling

Audio sample overviewRaw microphone outputAnalog measurementEcho audio input

Make a singing MSP430 microcontroller



This is my second article about building a DIY digital audio recorder. Inspired by this microcontroller audio project [via], I set out to build a simple digital recording device. I chose Texas Instrument's MSP430 microcontroller for this project because it's fast (16 MHz), it's cheap ($1), and it's very low power.
Read the first part here.

This week we'll progress towards a digital audio recorder by generating simple tones with the MSP430 microcontroller. We'll use the MSP430's pulse-width modulator to generate an audio waveform, and clean it up with a simple low-pass filter. The signal won't be strong enough to drive a speaker directly, but it'll work great with a cheap set of powered PC speakers.

Next week we'll expand on this basic circuit to play audio recordings from SD memory cards.

Read on to learn more about generating audio with a microcontroller.

next page

Gallery: MSP430 audio prototype

Audio filter exampleMSP430 audio prototype circuitMSP430 audio prototype renderingMSP430 audio prototype PCB placementMSP430 audio prototype bare PCB

Make a singing MSP430 microcontroller - part 2

Microcontroller audio

There some great resources on the web to get us started with microcontroller audio.

This series of articles on Arduino audio (part 1, part 2, DAC options) gives a fantastic introduction to the theory side. There's tons of great stuff in these pages that I won't duplicate here.

Another project feeds audio samples into the microcontroller from a PC serial port. The microcontroller is like a simple PC sound card, it's not capable of independent operation. This project, and the great video, inspired me to design this digital audio recorder.

TI and ATMEL have application notes detailing designs for simple digital audio recorders. TI's design[pdf] records 12 seconds of low quality audio to the flash program memory of an MSP430. It uses a specialized chip to create the audio signal, complicating the design. A great TI app note on speech compression[pdf] also has some interesting support circuitry for digital audio. The ATMEL digital sound recorder[pdf] uses a small external memory chip to store a few seconds of audio.

Pulse-width modulated audio synthesis

The cheapest, easiest way to generate audio on a modern mirocontroller is to use a hardware pulse-width modulator (PWM). A PWM is a circuit that generates a repeating time period (called the period), and turns on a switch during a percentage of that time period (called the duty cycle). This happens so fast that only the average value of the on and off periods is measurable. Different audio tones can be generated by varying the duty cycle.

For more about pulse-width modulation, see my previous projects: Make a USB color changing light, and Show PC stats on analog gauges.

This diagram gives an overview of the design.


next page

Gallery: MSP430 audio prototype

Audio filter exampleMSP430 audio prototype circuitMSP430 audio prototype renderingMSP430 audio prototype PCB placementMSP430 audio prototype bare PCB

Make a singing MSP430 microcontroller - part 3



MSP430

The digital audio recorder will use a MSP430 F2012 or F2013. Both have useful hardware modules, like a pulse-width modulator (PWM) to generate sound, an analog to digital converter (ADC) to capture audio from a microphone, and a hardware communication module (SPI) to communicate with external memory chips. They're also fast (16 MHz), cheap ($1), and very low power.

F2012 and F2013 target boards are available for the ez430 development kit. You can get started on this project with a full programmer, debugger, and development board for $20. You'll still need the extra parts described in this article, but the development kit can make life easier if you're worried about working with surface mount components. The both MSP430 models are also available as a through-hole parts.

If you want to know more about basic MSP430 connections and programming, read last week's primer on the MSP430.

The MSP430 pulse-width modulator

The MSP430 has a 16 bit PWM. This could be used to play 16 bit resolution audio, a vast improvement over most previous 8 bit microcontroller audio projects.

The MSP430 PWM has a ton of modes. I'm sure they're all super useful, but we just want a standard pulse without the fancy stuff. To do this on the MSP430, I set the following registers:

CCTL1 = OUTMOD_6; // Mode 6 is toggle/set
CCR0 = 0xFE; // 16 bit PWM Period, use period-1 for MC_1(up counter)
TACTL = MC_1; // Timer A MC_1 mode counts up to the value in CCR0, resets

The PWM output signal can be enabled on three different pins. This is handy, but it can also be really confusing. I designated pin P2.6 for the audio PWM output. P2.6 is also used for an optional 32.768khz watch crystal. The crystal oscillator circuitry on the pins must be disabled before using the PWM output. This isn't documented very well in the MSP430 datasheets, read more in this forum post.

BCSCTL3|=LFXT1S1+LFXT1S0; //enable PWM output on P2.6, disable oscillator.
//.........................................................//now there are limitations on VLO....

This was a real pain to figure out. I don't usually include these details in an article, but I hope this info will now be easily accessible to anyone facing a similar problem in the future.

next page

Gallery: MSP430 audio prototype

Audio filter exampleMSP430 audio prototype circuitMSP430 audio prototype renderingMSP430 audio prototype PCB placementMSP430 audio prototype bare PCB

Make a singing MSP430 microcontroller - part 4

Audio hardware

The signal from MSP430 PWM pin isn't quite ready to drive a speaker or amplifier. First, we can clean up the signal a bit by running it through a low pass filter. This clips the sharp edges from the PWM waveform to make it sound a bit more natural.

You can calculate the ideal low pass filter for a given frequency with a calculator like this. I used an 8000Hz frequency because I eventually plan to play and record about 8000 samples-per-second with the digital voice recorder. Note that this is just a fraction of the 48000 samples-per-second used by CD players and PCs. At 8000Hz my ideal low-pass filter has a 0.01uF capacitor (C1) and a2K ohms resistor (R1).



Finally, it's proper form to block any DC voltage from the signal path using an electrolytic capacitor (POL-C1). The capacitor allows only the AC waveform to pass out of the circuit. A value between 4.7uF and 47uF seems to work fine. I didn't notice a difference among the range of values that I tried for the quality of audio produced. This capacitor is usually not necessary, as most amplifiers have a similar capacitor at the audio input connection.

Generating an audio signal in software

Now that the signal is conditioned, we can connect it to an audio amplifier. A cheap set of powered PC speakers work great.

Test program 1 (test1 in the project archive) creates a 50% 'on' signal with the PWM. This generates a continuous tone from the speakers. See it in this short video clip.


next page

Gallery: MSP430 audio prototype

Audio filter exampleMSP430 audio prototype circuitMSP430 audio prototype renderingMSP430 audio prototype PCB placementMSP430 audio prototype bare PCB

Make a singing MSP430 microcontroller - part 5

The next step...

Complex waveforms are generated by placing a series of values on the PWM in the right order, at the right time. Test program 2 (test2 in the project archive) is a simple program that plays different tones. I re-appropriated the watchdog timer for a twice-per-second interval alarm. When the alarm sounds (interrupts), the PWM duty cycle is changed to the next value (tone). This generates alternating tones as can be heard in this video.




Next week we'll expand on this basic circuit to play complete audio recordings from SD memory cards. A sneak peak of the next week's project is shown in the full project video.

The Prototype Circuit



The prototype circuit is not intended to be a final project – it's just an aid to understanding the article. It has three basic parts:

1. An MSP430 and support circuitry as described in the project last week.
2. An audio filter circuit attached to the PWM as described this week.
3. An SD memory card connected to the MSP430's SPI interface, which I'll introduce next week.

We'll design two final projects in a few weeks, but this prototype will demonstrate the important concepts along the way. There are several problems with this design that I know of, and probably several more that I'll find in the next few weeks.

All the code and design files for the prototype are included in the project archive. The circuit and PCB were made using the freeware version of Cadsoft Eagle. You can download it here. The test firmware is written in C and compiled with the free/demo IAR Kickstart compiler.

Prototype PCB


Part list -- Name, value (size)
The parts are specified by value and size. I used mostly surface mount components in this design. SMD parts help keep the design as small as possible, and save a ton of time on drilling. The audio coupling capacitor is a through-hole part because large value electrolytic capapacitors have resisted miniturization and remain quite large.

Nearly all the parts specified are also available in a through-hole version. I know of no through-hole SD card holders, but the large soldering tabs on this part aren't at all intimidating.

The most obscure part is probably the SD card holder. I used ALPS part number SCDA1A0901, purchased at Mouser.com (Mouser number 688-SCDA1A0901). This model is a push in, push out model with a spring. I'd much prefer a simple push in/pull out type, but I've yet to find one. Watch out when you pick a holder, pin placement and measurements vary wildly.

Misc
IC1, MSP430F20X2 or F20x3 (PW14)
LED1, SMD LED (0805)
ALPS-SCDA1A0901, Alps SD Card holder (n/a)

Capacitors

C1, 0.1uF (0805)
C2, 0.1uF (0805)
C3, 0.01uF (0805)
C4, 47uF (0805)

Resistors
R1, 47K (0805)
R3, 330R (0805)
R4, 2K (1206)

Related link

Program a MSP430 microcontroller

Gallery: MSP430 audio prototype

Audio filter exampleMSP430 audio prototype circuitMSP430 audio prototype renderingMSP430 audio prototype PCB placementMSP430 audio prototype bare PCB

Home theater insanity: a $6.8 million obsession

speaker
Taking the concept of home theater to extremes: the gentleman who spent a jaw-dropping $6.8 million on construction of a home theater. Not just any home theater. The ultimate home theater. I mean, this thing has everything. Owner, Jeremy Kipnis, says his creation is "the greatest show on earth."

The theater is a large room, eight feet high at the entrance and sloping up to sixteen feet high. The centerpiece is a massive eighteen foot laboratory grade screen. Equally impressive (or tasteless, depending on your view): a super-powerful audio system with sixteen eighteen-inch subs arrayed around the seating area for totally realistic surround sound.

Naturally, the whole thing can play "ungodly loud," according to Steve from Audio Video Interiors. Yes, it's basically like having your own personal IMAX theater to hang out in.

For more home theater fun and games, check out my earlier post on home theaters, and Jessi's home theater-planning post. Also handy: Anna's post on DIY projection screens.

Keep the 80's alive - Digitize your old cassette tapes

cassette tapesDo you have old tapes kicking around? Recently, my husband's parents cleared out the old boxes they had been keeping from his childhood. Along with some trophies and LEGO there were boxes and boxes of cassette tapes. Many were mixes that he'd spent hours recording off the radio and making the perfect music compilation. As fun as those are to listen to, most of it can be downloaded. You'll get better quality and most of those 80's favorites should be readily available. What can't be downloaded elsewhere are his first music recording or memorable concerts. There were also some old books on tape that I haven't seen in ages. These recordings can't be replaced.

A year ago, Lifehacker taught us how to digitize old cassette tapes. In the spirit of getting organized before the New Year, let's get rid of the tape boxes, and get those recordings digitized. In case you missed it last year, or it's still on your to do list, have a look through the instructions. With a few tools and Audacity (an audio editing program), you can save these tapes in digital format to enjoy again and share with your children and grandchildren. The best part is that you can then ditch all those old boxes that are taking up space in your garage.

Build a talking tombstone

talking tombstoneAffectionately referred to as Tombie, this talking tombstone makes a great Halloween prop. Alan Perakh built a tombstone out of Styrofoam then added the talking face and hooked it up to a laptop for audio. It looks like this project takes some time, but the directions are easy to follow and the result will be well worth it.

There are many Styrofoam tombstone designs out there, but the idea of using clay and adding stone effect paint makes all the difference here. The final prop looks realistic, and perfectly frightening. Play around with your own preferences and make the face look any way you'd like. The audio will be a fun part to design. What will your tombstone say? I can just imagine this guy greeting me at the door, offering instructions before entering the haunted house, or telling spooky tales.

Make your own MP3 player

Yeah, we all know that the all-powerful iPod, which Apple has turned into a perpetual cash machine, gives many of us our portable music fix just about anywhere we are, from the car to the treadmill, but if you're into solutions that you build yourself, and are handy with electronic parts, why not build your own MP3 player?

Many folks I know use their MP3 players to listen to news podcasts and music collections in their cars only. Do you need iPod fashion in your vehicle? Maybe not, an that is where a self-built MP3 digital audio player could be useful. Now that SD memory cards are insanely cheap (2GB cards go for under $20), what's keeping you from building your own MP3 hack job?

With a microcontroller chip, a power source (preferably a Lithium-Ion battery), a storage module (like an SD card), a small color display (like from a 2005-era cellphone) and a few assorted chips (like a MP3 decoding chip and amp circuit), you too can have your own MP3 player from scratch. Now, this is the type of solution that may take some skills in the areas of schematics reading and directions, but if you're not willing to depart with two benjamins for that latest iPod nano, break out your electrostatic gloves and get busy here.

Home Theater 101

Okay, so you have an idea of a home theater, but knowing exactly where to put speakers can be a guessing game. Not anymore. Setting up a home theater is easier than you think. Most people don't want a separate movie room, and for good reason. Most of us are not part of the Motion Picture Academy of Directors and don't need the $600 movie chairs with cup holders (although my husband would argue this). It only takes two great things to make any living room into a great movie room: audio set-up and video quality.

I'm not an audio or visual expert, but I do know what works in my room and my set-up. Every room and personal preference is different, so trust yourself when it comes to making adjustments and modifications for your set up. However, here are the basics for any home theater.


Continue reading Home Theater 101

Untangle your earbuds for good

earbud cords tangledLifehacker brings us yet another great inventive idea they found on Instructables. A 5 minute or less job to keep those nifty though slightly too big ear-buds detangled. All you'll need for this is a junk-mail or old (and hopefully expired) credit card, scissors, and 5 minutes.

The basic idea is to cut certain notches into the card, so your earbud wires are held by the plastic and wound up neatly. I can't tell you how many times a day I fight with my earbuds to stop getting all twisted, and I keep them in the same place, they rarely ever leave my desk, so I can't imagine floating around a backpack or briefcase, and the tangled mess it would become.

Check out the full details at Instructables, and don't forget to browse around LifeHacker's site as well, both are great resources for finding and finishing that perfect DIY project.

[via Instructables]

How to use TiVo Desktop, until it works on Windows Vista

TiVoTiVo is a great invention, that lets you record TV shows for later viewing. TiVo Desktop is a piece of software that lets you transfer shows to your PC for watching and storage, but if you have Windows Vista, you might be plumb out of luck there. TiVo's application will not run on Windows Vista yet, so hopefully you don't have to deal with that if you want to watch TV on your PC.

If you do have this problem, our own Lisa Hoover also writes for our sister site Download Squad, and has figured out your TiVo options if you have Windows Vista and can't run the application. Check out Lisa's excellent suggestions at Download Squad.

[via Download Squad]

Need living room entertainment in the bedroom?

For older homes, it can be a chore to wire up existing bedrooms for cable TV, satellite TV or just about anything else related to punching holes in walls and fishing cables through attics. There has to be an easier way, right? While wireless Internet routers have made it easy to share an Internet connection wirelessly throughout a home, can the same be done for audio and video signals? Sure!

Using products like the Recoton DSC-IR100A and X10 Audio/Video sender, you can transmit that audio and video signal from the TiVo, cable DVR, DVD player or anything else out of the living room and into the bedroom without duplicating equipment like satellite receivers and DVD players. The X10 system can transmit a complete audio and video signal through walls from that living room setup to an existing TV in a kid's room or other bedroom, and the Recoton infrared/RF pair can let you use a regular remote control to work in that separate bedroom to control all that living room equipment through walls and such. Without an "infrared extender," that remote would become useless when it is out of "line of sight" from the main equipment. But, the Recoton unit solves that problem.

Using both of these items is an easy, fairly inexpensive and enjoyable way to get those audio and video signals from the main living or den area and into some other room while saving you time, a backache and the dirty job of attic crawling or wall holes and cable fishing.

DIY Lists

About DIY Life

Do Life! DIY Life highlights the best in "do-it-yourself" projects.

Here you'll find all types of projects, from hobbies and crafts to home improvement and tech.


Powered by Blogsmith

DIY Life Contributors

#ContributorPostsCmts
1Erin Loechner390
2Diane Rixon201

Featured Galleries

An easy way to insulate and skirt an elevated structure
USB analog gauge overview
USB analog gauge circuit
Basil harvesting
Bug snacks
Fabric scraps projects