Skip to main content
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 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.

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


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

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

Related link

Program a MSP430 microcontroller

MSP430 audio prototype(click thumbnails to view gallery)

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


  • Lisa Hoover

    Dude. Ian. This I'm totally impressed.

  • Michael Saunby

    I've just started building this project, or at least something based on it. My work around for the SD flash holder was to buy a micro SD card with a SD adapter and solder 0.1" spaced pins to the gold contacts (1 to 7) of the adapter.

  • Ian Lesnet

    That's a great solution. I'm seeing the micro SD cards more and more. I remember when I thought that SD cards were tiny -- now I want to find a socket for the micro sd cards because the regular size take up so much board space!


  • 3 Comments / 1 Pages

Follow Us

  • No features currently available.

  • More Hot Topics The Daily Fix  •  DIY Warrior  •  Home Ec  •  Handmade
    DIY Disaster Doctor  •  In the Workshop  •  Product Picks

    Home Improvement Videos