week nine

output devices


deciding on an output device

For my final project, I wanted to incorporate a speaker system to allow users to play music for maximum ~relaxation~ and set alarms in case they were planning on sleeping while in the spa box.

In order to create a speaker system, I needed a couple components - audio input, an amplifier board of some sort, and audio output (speakers). The process of understanding and making this system actually took much longer than I had originally anticipated.

making the amplifier board

After asking Anthony a bunch of questions about amplification systems, I learned that I would need to use some kind of audio power amplifier. The EDS only had the LM4681s (1.1W Audio Power Amplifier with Shutdown Mode), so I used the typical application circuit given on page 2 of its data sheet to sdtart my schematic and board in Eagle. You can find the LM4681 data sheet here.

datasheetampcircuit

typical application circuit pulled from LM4681 data sheet

I ran into my first issue pretty quickly. Anthony showed me the SnapEDA site, which is super useful and has downloadable Eagle traces for a lot of different components. Unluckily, the LM4681 is not one of these. So, I needed to draw the trace myself. In Eagle, there's a way for you to create new libraries that will contain 3 parts of information - footprint, symbol, and device. Anthony helped do this one, but I took notes for future use! The following is specifically for the LM4861, but can be applied to any part - here's how this works:

new_lib

new LM4681 Eagle library

left_speaker

finished amplifier schematic for left speaker

After finishing the schematic according to the typical application circuit, I realized that the circuit given is only for one speaker. Since I wanted to have two speakers in my final project, my board would need to have two LM4681 amplifiers (meaning 2 copies of the typical application circuit).

Something I also needed to think about was what kind of connection would happen at the audio input. Because I wanted users to be able to hook up a device of their choice to my system, I opted for a barrel jack and aux cord set up. This meant a barrel jack trace would need to be placed and connects where audio input connects to C_i and R_i in both of the two amplification circuits I was using.

Much Eagle-ing happened, and there was quite a bit of debugging that happened along the way, but eventually, I was able finalize the traces!

ampsch

amplifier schematic in Eagle

ampbrd

amplifier board in Eagle

I decided to use the Other Mill (it's literally called the "Other Mill") instead of the Roland, since I was perfectly fine with a rectangular shaped board. All you need to do is adjust the yellow bounding box around your traces while in board mode. The Other Mill will take files directly from an Eagle .brd file, which is super nice, and your board shape will be whatever that yellow bounding box looks like.

Instructions on milling with the Other Mill for my own safe keeping:

videos: milling amplifier board with the Other Mill

The Other Mill is just way less finicky than the Roland (especially since there's a bit of a door sensing issue with the latter). Long story short, let's just say that ever since milling this amplifier board, I never went back to using the Roland.

smolpads

first milled amp board

The board milled smoothly, but after consulting Ben, we realized that the pads of the barrel jack had through holes with not enough copper around them. this would not allow me to make very sturdy connections. Additionally, I needed to use 0.33uF capacitors, but these do not come in a size that matches the Fab1260 resistor trace I had used for all resistors in my board. So, it was back to Eagle-ing...

I switched out the trace where the 0.33uF capacitor needed to be with the 0805 resistor trace (it's much smaller). For editing the pads of the barrel jack trace: similar concept to when we were making a new library for the LM4681, but now, I was just editing the pad sizes of an existing trace (which Eagle has some presets for). Instead of "auto" (lol), I used 56 for the pads. This seemed to do the trick.

I milled the board a second time, and voila! The pads for the barrel jack now have more copper for me to solder the pins to.

lorgepads

milled board with larger pads

It was finally time to solder my amplifier board. I gathered the necessary components and laid them out to make sure I wasn't missing anything:

ampcomponents

components for amplifier board

The LM4681s run on 5V and are only rated for 1.1W, so my speaker options were limited. Anthony found two speaker options for me - a 0.25W speaker and a 0.5W speaker - which I soldered pins/wires to and tested out. The 0.25W speaker is on the fab lab inventory and is the Mallory Sonalert Products Inc. 8 Ohms General Purpose Speaker 250mW 900Hz~6.5kHz Top Round 81dB (cick here for data sheet). Because at this point in time, I didn't have my main board made (from which I was planning on connecting the amplifier board), I tested the board using a power supply at 5V. It worked! I was super excited about it :)

speaker speakerback

0.25W speaker

soldersmol

soldered pins onto 0.25W speaker

bigspeaker bigspeakerback

0.5W speaker with soldered wire connections

videos: testing speaker system

The larger 0.5W speakers were definitely louder, but I wasn't able to use those in my final project because the EDS only had one of them. That being said, the smaller 0.25W speakers are loud enough for the purposes of my spa box (if you turn up the volume up on the device connected), so it worked out in the end!