HTM(A)A — Charlie DeTar


DPA: Democratic Public Address system

Idea poster (pdf)


Status Dec. 10, 2007

Signals

Microphone signal is working great. Here is a test captured by serial output and constructed into a wave file. The sampling rate is limited by the serial baud rate (115200 kbps, which translates to around 11kHz) - if I can figure out how to increase that speed I could get better sampling rates. This is a limitation because I am communicating between the ADC board and the memory module via serial, so I can only store samples at the maximum serial rate. This is probably OK, 11kHz is plenty for voice, and if the speaker circuit is decent, this should be sufficient.

The speaker, however, sounds like sh*t. Sending the same audio data recorded by the microphone over serial to the PWM DAC is very quiet, very weak, very tinny, and a bit distorted. Clearly the N-Mosfet hack from the speaker hello board is not sufficient for believable reproduction of broad spectrum sound at a decent amplitude. I tried, on Neil's suggestion, to build an H-bridge amplifier (cad file); this had even lower output, so I probably did the circuit wrong. Unfortunately, I subsequently destroyed it by absent-mindedly connecting the battery to the speaker jumper (they're both 2-pin MTA's). Oops. I have some 1-watt IC amplifiers on order which might be a good solution, otherwise I'll have to revisit H-bridges.

Radio

David, Siggi and I spent a bunch of time last week and this weekend trying to get the IA4421 radio modules working. We have not yet been successful.

Code

My board setup is a master-slave network, with one master (which also controls memory), and two slaves - one for ADC/DAC, and one for radio. The master must accept input from 3 sources - radio, ADC, and a button pressed by users. Consequently, it can't afford to sit and spin in getchar loops, it needs to be interrupt driven. I spent a while on the code this weekend, trying to get up interrupt driven control working. Here's the planned architecture:

  • Master board modes:
    • Recording: Interrupts from getchar_audio
    • Waiting to play: Interrupts from button and either getchar_radio or internal play timer, depending on whether this unit is the source of audio or not.
    • Playing: Interrupts from button and getchar_radio
  • Audio board modes:
    • Recording: Activate ADC, send previous sample (spin in putchar), and loop.
    • Playing: Spin in getchar, then set gotten char to PWM.
    • Idle: Spin in getchar, waiting for play or record command.
  • Radio board modes:
    • Sending: getchar from master, and send on radio.
    • Receiving: get bytes from radio, putchar to master.

Design

I found a really cool woodcut image. I tried a raster-cut with the laser, and it looks fantastic. I think I'll put it on the cover of small laser-cut boxes that will encase my units. They'll have a single red button as the user interface, and speaker/microphone built into the boxes with little holes for air to go in and out.