diff --git a/content/10_input_devices.md b/content/10_input_devices.md new file mode 100644 index 0000000000000000000000000000000000000000..956d6e2f7c999d5b888277592c06be645d90f549 --- /dev/null +++ b/content/10_input_devices.md @@ -0,0 +1,126 @@ ++++ +title = "Input Devices" +date = "2018-11-7" +menu = "main" +weight = 11 ++++ + +Files: [audio_input.sch](/designs/10_audio_input.sch) [audio_input.brd](/designs/10_audio_input.brd) [audio_top.png](/designs/10_audio_top.png) [audio_cutout.png](/designs/10_audio_cutout.png) [sampler.c](/designs/10_sampler.c) + +This week we're exploring input devices, so our microcontrollers can start sensing the physical world. Since my final project involves manipulating signals from steel bass guitar strings, I will use an [electromagnetic pickup](https://en.wikipedia.org/wiki/Pickup_(music_technology)) as an input. + + +### Design Considerations + +For my final project I plan on winding my own pickups, but I'd like to start by interfacing with existing ones so I can be certain that they work. So my goal is to read the signal from the pickups on my bass guitar, a five string Musicman Stingray. + +The pickups generate an analog electrical signal, so the most direct way to read their output is with the ADC found on pretty much any microcontroller. But there are a few complications. First, the raw signal from my bass is probably in the hundreds of millivolts range, but to get the most out of the ADC's bit depth I'd like its maximum peak-to-peak amplitude to span almost the full difference between VCC and GND. Second, the pickups produce a signal with no DC bias. The ADCs on many microcontrollers don't read negative voltages, so I may need to add a DC bias of 0.5 * VCC. Alternatively, I can find a microcontroller with an ADC that supports bipolar input (whether single-ended or differential). + + +### A note on processors + +At this point I'm reasonably certain I will use an ATMEL SAMD51 microcontroller for my final project, but to get started with audio sampling I'm going to explore the functionality of the ATTINY44A. It's a lot easier to program, and should teach me some things that I might otherwise miss in the SAMD51's more complex datasheet. + +For maximum resolution (10 bits), the ATTINY44A's ADC desires a clock input of 50kHz to 200kHz. A single conversion takes 13 ADC clock cycles, which means that the maximum sampling frequency is about 15kHz (section 16.5 of the datasheet). This is a bit slow for audio, but is sufficient for my current test purposes. + + +### Circuit Design + +To gain experience with analog circuitry, I'm going to make an off-chip preamp stage that boosts the signal and provides a DC offset. Instead of adding a microcontroller to this board, I plan on connecting it to my existing board using an ISP header. This will save me some soldering, and will allow me to test the same preamp stage with different microcontrollers. + +I mostly followed Amanda's [Instructables article](https://www.instructables.com/id/Arduino-Audio-Input/), but added some modifications I found on [Electronics Stackexchange](https://electronics.stackexchange.com/questions/14404/dc-biasing-audio-signal). To amplify the signal, I use an op-amp in a non-inverting configuration, and to provide a DC offset I pass the amplified signal through a capacitor that's connected to a voltage divider circuit. + + + +I think I found a pretty good layout for the board. By routing signals underneath capacitors and resistors, I can keep the traces pretty short. I did have to cheat a little with the design rules: mods is generally happier when the clearances are much larger than the diameter of the end mill, but using these rules globally would prevent me from routing under components. So I changed the design rules as I worked. + + + + +### Testing + +I connected my bass guitar's output to the preamp, in a maximally professional manner. + + + +As an initial test of the preamp, I measured its input and output with a [Saleae Logic Analyzer](https://www.saleae.com/). It looks promising! + + + +Upon closer inspection, however, it's clear that my amplification isn't linear. Clearly there's something wrong with my op-amp circuit. At least the DC bias appears to be right at 2.5V. + + + + +### Sampling + +Finally I connected the output of my preamplifer to a spare input on my microcontroller board. + + + +On the software side, I started with Neil's [echo program](http://academy.cba.mit.edu/classes/embedded_programming/index.html#echo). This way I have all the serial communication ready to go. Here is my new main method. + +{{< highlight c >}} +#define input_pin (1 << PA5) + +int main(void) { + // Set clock divider to /1 + CLKPR = (1 << CLKPCE); + CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); + + // Initialize serial output pins + set(serial_port, serial_pin_out); + output(serial_direction, serial_pin_out); + + // Initialize the input pin. + DDRA &= ~input_pin; + + // Make sure power is getting to the ADC. + PRR &= ~1u; + + // Turn on the ADC. + ADCSRA |= (1u << 7); + + // Use VCC as the reference voltage, and connect the ADC to PA5. + ADMUX = 0u; + ADMUX |= 0b00000101; + + // Make ADC samples "left adjusted" so that we only have to read one register + // to get the 8 most significant bits. + ADCSRB |= (1u << 4); + + // Note: I should configure the ADC's clock divider. + // I don't bother here since we're just reading samples one at a time + // and sending them over the serial connection. + + // We'll store audio samples here. + uint8_t samples[256]; + uint8_t n_samples = 0; + + while (1) { + // Tell the ADC to record a value. + ADCSRA |= (1u << 6); + + // Wait until the reading is finished. + while (ADCSRA & (1u << 6)) {} + + // Read the result. + samples[0] = ADCH; + + // Write the result (in binary). + put_string(&serial_port, serial_pin_out, "hello.ftdi.44.echo.c: read sample \""); + for (int i = 1u; i <= 8; ++i) { + if (samples[0] & (1u << (8 - i))) { + put_char(&serial_port, serial_pin_out, '1'); + } else { + put_char(&serial_port, serial_pin_out, '0'); + } + } + put_char(&serial_port, serial_pin_out, 10); // new line + } +} +{{< /highlight >}} + +This reads samples and spits them out over the serial connection. + + diff --git a/static/designs/10_audio_cutout.png b/static/designs/10_audio_cutout.png new file mode 100644 index 0000000000000000000000000000000000000000..4bc77942b878f46fda4e9e4450bab7472ee6a7a9 Binary files /dev/null and b/static/designs/10_audio_cutout.png differ diff --git a/static/designs/10_audio_input.brd b/static/designs/10_audio_input.brd new file mode 100644 index 0000000000000000000000000000000000000000..a328354e090c236f917f192f49c532a8de2faefe --- /dev/null +++ b/static/designs/10_audio_input.brd @@ -0,0 +1,594 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE eagle SYSTEM "eagle.dtd"> +<eagle version="9.1.3"> +<drawing> +<settings> +<setting alwaysvectorfont="no"/> +<setting verticaltext="up"/> +</settings> +<grid distance="0.25" unitdist="mm" unit="mm" style="lines" multiple="1" display="yes" altdistance="5" altunitdist="mil" altunit="mil"/> +<layers> +<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/> +<layer number="2" name="Route2" color="16" fill="1" visible="no" active="no"/> +<layer number="3" name="Route3" color="17" fill="1" visible="no" active="no"/> +<layer number="4" name="Route4" color="18" fill="1" visible="no" active="no"/> +<layer number="5" name="Route5" color="19" fill="1" visible="no" active="no"/> +<layer number="6" name="Route6" color="25" fill="1" visible="no" active="no"/> +<layer number="7" name="Route7" color="26" fill="1" visible="no" active="no"/> +<layer number="8" name="Route8" color="27" fill="1" visible="no" active="no"/> +<layer number="9" name="Route9" color="28" fill="1" visible="no" active="no"/> +<layer number="10" name="Route10" color="29" fill="1" visible="no" active="no"/> +<layer number="11" name="Route11" color="30" fill="1" visible="no" active="no"/> +<layer number="12" name="Route12" color="20" fill="1" visible="no" active="no"/> +<layer number="13" name="Route13" color="21" fill="1" visible="no" active="no"/> +<layer number="14" name="Route14" color="22" fill="1" visible="no" active="no"/> +<layer number="15" name="Route15" color="23" fill="1" visible="no" active="no"/> +<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/> +<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/> +<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/> +<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/> +<layer number="20" name="Dimension" color="24" fill="1" visible="yes" active="yes"/> +<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/> +<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/> +<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/> +<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/> +<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/> +<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/> +<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/> +<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/> +<layer number="29" name="tStop" color="7" fill="3" visible="yes" active="yes"/> +<layer number="30" name="bStop" color="7" fill="6" visible="yes" active="yes"/> +<layer number="31" name="tCream" color="7" fill="4" visible="yes" active="yes"/> +<layer number="32" name="bCream" color="7" fill="5" visible="yes" active="yes"/> +<layer number="33" name="tFinish" color="6" fill="3" visible="yes" active="yes"/> +<layer number="34" name="bFinish" color="6" fill="6" visible="yes" active="yes"/> +<layer number="35" name="tGlue" color="7" fill="4" visible="yes" active="yes"/> +<layer number="36" name="bGlue" color="7" fill="5" visible="yes" active="yes"/> +<layer number="37" name="tTest" color="7" fill="1" visible="yes" active="yes"/> +<layer number="38" name="bTest" color="7" fill="1" visible="yes" active="yes"/> +<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/> +<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/> +<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/> +<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/> +<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/> +<layer number="44" name="Drills" color="7" fill="1" visible="yes" active="yes"/> +<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/> +<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/> +<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="yes"/> +<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/> +<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/> +<layer number="50" name="dxf" color="7" fill="1" visible="no" active="no"/> +<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/> +<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/> +<layer number="53" name="tGND_GNDA" color="7" fill="9" visible="no" active="no"/> +<layer number="54" name="bGND_GNDA" color="1" fill="9" visible="no" active="no"/> +<layer number="56" name="wert" color="7" fill="1" visible="no" active="no"/> +<layer number="57" name="tCAD" color="7" fill="1" visible="no" active="no"/> +<layer number="59" name="tCarbon" color="7" fill="1" visible="no" active="no"/> +<layer number="60" name="bCarbon" color="7" fill="1" visible="no" active="no"/> +<layer number="88" name="SimResults" color="9" fill="1" visible="no" active="no"/> +<layer number="89" name="SimProbes" color="9" fill="1" visible="no" active="no"/> +<layer number="90" name="Modules" color="5" fill="1" visible="no" active="no"/> +<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/> +<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/> +<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/> +<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/> +<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/> +<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/> +<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/> +<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/> +<layer number="99" name="SpiceOrder" color="7" fill="1" visible="no" active="no"/> +<layer number="100" name="Muster" color="7" fill="1" visible="no" active="no"/> +<layer number="101" name="Patch_Top" color="12" fill="4" visible="yes" active="yes"/> +<layer number="102" name="Vscore" color="7" fill="1" visible="yes" active="yes"/> +<layer number="103" name="tMap" color="7" fill="1" visible="yes" active="yes"/> +<layer number="104" name="Name" color="7" fill="1" visible="yes" active="yes"/> +<layer number="105" name="tPlate" color="7" fill="1" visible="yes" active="yes"/> +<layer number="106" name="bPlate" color="7" fill="1" visible="yes" active="yes"/> +<layer number="107" name="Crop" color="7" fill="1" visible="yes" active="yes"/> +<layer number="108" name="tplace-old" color="10" fill="1" visible="yes" active="yes"/> +<layer number="109" name="ref-old" color="11" fill="1" visible="yes" active="yes"/> +<layer number="110" name="fp0" color="7" fill="1" visible="yes" active="yes"/> +<layer number="111" name="LPC17xx" color="7" fill="1" visible="yes" active="yes"/> +<layer number="112" name="tSilk" color="7" fill="1" visible="yes" active="yes"/> +<layer number="113" name="IDFDebug" color="7" fill="1" visible="yes" active="yes"/> +<layer number="114" name="Badge_Outline" color="7" fill="1" visible="yes" active="yes"/> +<layer number="115" name="ReferenceISLANDS" color="7" fill="1" visible="yes" active="yes"/> +<layer number="116" name="Patch_BOT" color="9" fill="4" visible="yes" active="yes"/> +<layer number="118" name="Rect_Pads" color="7" fill="1" visible="yes" active="yes"/> +<layer number="121" name="_tsilk" color="7" fill="1" visible="yes" active="yes"/> +<layer number="122" name="_bsilk" color="7" fill="1" visible="yes" active="yes"/> +<layer number="123" name="tTestmark" color="7" fill="1" visible="yes" active="yes"/> +<layer number="124" name="bTestmark" color="7" fill="1" visible="yes" active="yes"/> +<layer number="125" name="_tNames" color="7" fill="1" visible="yes" active="yes"/> +<layer number="126" name="_bNames" color="7" fill="1" visible="yes" active="yes"/> +<layer number="127" name="_tValues" color="7" fill="1" visible="yes" active="yes"/> +<layer number="128" name="_bValues" color="7" fill="1" visible="yes" active="yes"/> +<layer number="129" name="Mask" color="7" fill="1" visible="yes" active="yes"/> +<layer number="131" name="tAdjust" color="7" fill="1" visible="yes" active="yes"/> +<layer number="132" name="bAdjust" color="7" fill="1" visible="yes" active="yes"/> +<layer number="144" name="Drill_legend" color="7" fill="1" visible="yes" active="yes"/> +<layer number="150" name="Notes" color="7" fill="1" visible="yes" active="yes"/> +<layer number="151" name="HeatSink" color="7" fill="1" visible="yes" active="yes"/> +<layer number="152" name="_bDocu" color="7" fill="1" visible="yes" active="yes"/> +<layer number="153" name="FabDoc1" color="7" fill="1" visible="yes" active="yes"/> +<layer number="154" name="FabDoc2" color="7" fill="1" visible="yes" active="yes"/> +<layer number="155" name="FabDoc3" color="7" fill="1" visible="yes" active="yes"/> +<layer number="199" name="Contour" color="7" fill="1" visible="yes" active="yes"/> +<layer number="200" name="200bmp" color="1" fill="10" visible="yes" active="yes"/> +<layer number="201" name="201bmp" color="2" fill="10" visible="yes" active="yes"/> +<layer number="202" name="202bmp" color="3" fill="10" visible="yes" active="yes"/> +<layer number="203" name="203bmp" color="4" fill="10" visible="yes" active="yes"/> +<layer number="204" name="204bmp" color="5" fill="10" visible="yes" active="yes"/> +<layer number="205" name="205bmp" color="6" fill="10" visible="yes" active="yes"/> +<layer number="206" name="206bmp" color="7" fill="10" visible="yes" active="yes"/> +<layer number="207" name="207bmp" color="8" fill="10" visible="yes" active="yes"/> +<layer number="208" name="208bmp" color="9" fill="10" visible="yes" active="yes"/> +<layer number="209" name="209bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="210" name="210bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="211" name="211bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="212" name="212bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="213" name="213bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="214" name="214bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="215" name="215bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="216" name="216bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="217" name="217bmp" color="18" fill="1" visible="no" active="no"/> +<layer number="218" name="218bmp" color="19" fill="1" visible="no" active="no"/> +<layer number="219" name="219bmp" color="20" fill="1" visible="no" active="no"/> +<layer number="220" name="220bmp" color="21" fill="1" visible="no" active="no"/> +<layer number="221" name="221bmp" color="22" fill="1" visible="no" active="no"/> +<layer number="222" name="222bmp" color="23" fill="1" visible="no" active="no"/> +<layer number="223" name="223bmp" color="24" fill="1" visible="no" active="no"/> +<layer number="224" name="224bmp" color="25" fill="1" visible="no" active="no"/> +<layer number="225" name="225bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="226" name="226bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="227" name="227bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="228" name="228bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="229" name="229bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="230" name="230bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="231" name="231bmp" color="7" fill="1" visible="yes" active="yes"/> +<layer number="232" name="Eagle3D_PG2" color="7" fill="1" visible="yes" active="yes"/> +<layer number="233" name="Eagle3D_PG3" color="7" fill="1" visible="yes" active="yes"/> +<layer number="248" name="Housing" color="7" fill="1" visible="yes" active="yes"/> +<layer number="249" name="Edge" color="7" fill="1" visible="yes" active="yes"/> +<layer number="250" name="Descript" color="3" fill="1" visible="no" active="no"/> +<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/> +<layer number="254" name="cooling" color="7" fill="1" visible="yes" active="yes"/> +<layer number="255" name="routoute" color="7" fill="1" visible="yes" active="yes"/> +</layers> +<board> +<plain> +<wire x1="0" y1="0" x2="0" y2="20.32" width="0.254" layer="20"/> +<wire x1="0" y1="20.32" x2="23.622" y2="20.32" width="0.254" layer="20"/> +<wire x1="23.622" y1="20.32" x2="23.622" y2="0" width="0.254" layer="20"/> +<wire x1="23.622" y1="0" x2="0" y2="0" width="0.254" layer="20"/> +</plain> +<libraries> +<library name="fab"> +<packages> +<package name="C1206"> +<description><b>CAPACITOR</b></description> +<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-0.965" y1="0.787" x2="0.965" y2="0.787" width="0.1016" layer="51"/> +<wire x1="-0.965" y1="-0.787" x2="0.965" y2="-0.787" width="0.1016" layer="51"/> +<smd name="1" x="-1.4" y="0" dx="1.6" dy="1.8" layer="1"/> +<smd name="2" x="1.4" y="0" dx="1.6" dy="1.8" layer="1"/> +<text x="-1.27" y="1.27" size="1.27" layer="25">>NAME</text> +<text x="-1.27" y="-2.54" size="1.27" layer="27">>VALUE</text> +<rectangle x1="-1.7018" y1="-0.8509" x2="-0.9517" y2="0.8491" layer="51"/> +<rectangle x1="0.9517" y1="-0.8491" x2="1.7018" y2="0.8509" layer="51"/> +<rectangle x1="-0.1999" y1="-0.4001" x2="0.1999" y2="0.4001" layer="35"/> +</package> +<package name="SOT23-5"> +<description><b>Small Outline Transistor</b>, 5 lead</description> +<wire x1="-1.544" y1="0.713" x2="1.544" y2="0.713" width="0.1524" layer="21"/> +<wire x1="1.544" y1="0.713" x2="1.544" y2="-0.712" width="0.1524" layer="21"/> +<wire x1="1.544" y1="-0.712" x2="-1.544" y2="-0.712" width="0.1524" layer="21"/> +<wire x1="-1.544" y1="-0.712" x2="-1.544" y2="0.713" width="0.1524" layer="21"/> +<smd name="5" x="-0.95" y="1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="4" x="0.95" y="1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="1" x="-0.95" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="2" x="0" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="3" x="0.95" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<text x="-1.778" y="-1.778" size="1.27" layer="25" ratio="10" rot="R90">>NAME</text> +<text x="3.048" y="-1.778" size="1.27" layer="27" ratio="10" rot="R90">>VALUE</text> +<rectangle x1="-1.1875" y1="0.7126" x2="-0.7125" y2="1.5439" layer="51"/> +<rectangle x1="0.7125" y1="0.7126" x2="1.1875" y2="1.5439" layer="51"/> +<rectangle x1="-1.1875" y1="-1.5437" x2="-0.7125" y2="-0.7124" layer="51"/> +<rectangle x1="-0.2375" y1="-1.5437" x2="0.2375" y2="-0.7124" layer="51"/> +<rectangle x1="0.7125" y1="-1.5437" x2="1.1875" y2="-0.7124" layer="51"/> +</package> +<package name="R1206"> +<description><b>RESISTOR</b></description> +<wire x1="0.9525" y1="-0.8128" x2="-0.9652" y2="-0.8128" width="0.1524" layer="51"/> +<wire x1="0.9525" y1="0.8128" x2="-0.9652" y2="0.8128" width="0.1524" layer="51"/> +<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/> +<smd name="2" x="1.422" y="0" dx="1.6" dy="1.803" layer="1"/> +<smd name="1" x="-1.422" y="0" dx="1.6" dy="1.803" layer="1"/> +<text x="-1.27" y="1.27" size="1.27" layer="25">>NAME</text> +<text x="-1.27" y="-2.54" size="1.27" layer="27">>VALUE</text> +<rectangle x1="-1.6891" y1="-0.8763" x2="-0.9525" y2="0.8763" layer="51"/> +<rectangle x1="0.9525" y1="-0.8763" x2="1.6891" y2="0.8763" layer="51"/> +<rectangle x1="-0.3" y1="-0.7" x2="0.3" y2="0.7" layer="35"/> +</package> +<package name="2X03SMD"> +<smd name="1" x="-2.54" y="2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="3" x="-2.54" y="0" dx="2.54" dy="1.27" layer="1"/> +<smd name="5" x="-2.54" y="-2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="2" x="2.92" y="2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="4" x="2.92" y="0" dx="2.54" dy="1.27" layer="1"/> +<smd name="6" x="2.92" y="-2.54" dx="2.54" dy="1.27" layer="1"/> +<text x="-5.08" y="2.54" size="1.27" layer="27">1</text> +<text x="-3.81" y="3.81" size="1.27" layer="25">>NAME</text> +<text x="-3.81" y="-5.08" size="1.27" layer="27">>VALUE</text> +</package> +</packages> +</library> +<library name="SparkFun-Resistors" urn="urn:adsk.eagle:library:532"> +<description><h3>SparkFun Resistors</h3> +This library contains resistors. Reference designator:R. +<br> +<br> +We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. +<br> +<br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. +<br> +<br> +<b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ +<br> +<br> +You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description> +<packages> +<package name="TRIMPOT-SMD-3MM-CLOSED" urn="urn:adsk.eagle:footprint:39634/1" library_version="1"> +<description><h3>Trimpot - SMD, 3mm Square, Closed-Frame</h3> +<p>Used on e.g. <a href="https://www.sparkfun.com/products/12779">EasyDriver - Stepper Motor Driver</a></p> +<p><a href="http://www.bitechnologies.com/pdfs/22.pdf">Datasheet</a> (22AR10KTR)</p></description> +<wire x1="-1" y1="1.6" x2="-1.6" y2="1.6" width="0.2032" layer="21"/> +<wire x1="-1.6" y1="1.6" x2="-1.6" y2="-1.6" width="0.2032" layer="21"/> +<wire x1="1" y1="1.6" x2="1.6" y2="1.6" width="0.2032" layer="21"/> +<wire x1="1.6" y1="1.6" x2="1.6" y2="-1.6" width="0.2032" layer="21"/> +<smd name="1" x="-0.85" y="-1.65" dx="1" dy="0.9" layer="1"/> +<smd name="2" x="0" y="1.65" dx="1.1" dy="0.9" layer="1"/> +<smd name="3" x="0.85" y="-1.65" dx="1" dy="0.9" layer="1"/> +<text x="-1.778" y="0" size="0.6096" layer="25" font="vector" ratio="20" rot="R90" align="bottom-center">>Name</text> +<text x="1.778" y="0" size="0.6096" layer="27" font="vector" ratio="20" rot="R90" align="top-center">>Value</text> +</package> +</packages> +<packages3d> +<package3d name="TRIMPOT-SMD-3MM-CLOSED" urn="urn:adsk.eagle:package:39665/1" type="box" library_version="1"> +<description>Trimpot - SMD, 3mm Square, Closed-Frame +Used on e.g. EasyDriver - Stepper Motor Driver +Datasheet (22AR10KTR)</description> +<packageinstances> +<packageinstance name="TRIMPOT-SMD-3MM-CLOSED"/> +</packageinstances> +</package3d> +</packages3d> +</library> +</libraries> +<attributes> +</attributes> +<variantdefs> +</variantdefs> +<classes> +<class number="0" name="default" width="0" drill="0"> +</class> +</classes> +<designrules name="fabcity-designrules *"> +<description language="de"><b>EAGLE Design Rules</b> +<p> +Die Standard-Design-Rules sind so gewählt, dass sie für +die meisten Anwendungen passen. Sollte ihre Platine +besondere Anforderungen haben, treffen Sie die erforderlichen +Einstellungen hier und speichern die Design Rules unter +einem neuen Namen ab.</description> +<description language="en"><b>EAGLE Design Rules</b> +<p> +The default Design Rules have been set to cover +a wide range of applications. Your particular design +may have different requirements, so please make the +necessary adjustments and save your customized +design rules under a new name.</description> +<param name="layerSetup" value="(1*16)"/> +<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/> +<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/> +<param name="mdWireWire" value="24mil"/> +<param name="mdWirePad" value="24mil"/> +<param name="mdWireVia" value="20mil"/> +<param name="mdPadPad" value="24mil"/> +<param name="mdPadVia" value="20mil"/> +<param name="mdViaVia" value="20mil"/> +<param name="mdSmdPad" value="20mil"/> +<param name="mdSmdVia" value="20mil"/> +<param name="mdSmdSmd" value="20mil"/> +<param name="mdViaViaSameLayer" value="6mil"/> +<param name="mnLayersViaInSmd" value="2"/> +<param name="mdCopperDimension" value="20mil"/> +<param name="mdDrill" value="16mil"/> +<param name="mdSmdStop" value="0mil"/> +<param name="msWidth" value="10mil"/> +<param name="msDrill" value="32mil"/> +<param name="msMicroVia" value="9.99mm"/> +<param name="msBlindViaRatio" value="0.5"/> +<param name="rvPadTop" value="0.25"/> +<param name="rvPadInner" value="0.25"/> +<param name="rvPadBottom" value="0.25"/> +<param name="rvViaOuter" value="0.25"/> +<param name="rvViaInner" value="0.25"/> +<param name="rvMicroViaOuter" value="0.25"/> +<param name="rvMicroViaInner" value="0.25"/> +<param name="rlMinPadTop" value="10mil"/> +<param name="rlMaxPadTop" value="20mil"/> +<param name="rlMinPadInner" value="10mil"/> +<param name="rlMaxPadInner" value="20mil"/> +<param name="rlMinPadBottom" value="10mil"/> +<param name="rlMaxPadBottom" value="20mil"/> +<param name="rlMinViaOuter" value="8mil"/> +<param name="rlMaxViaOuter" value="20mil"/> +<param name="rlMinViaInner" value="8mil"/> +<param name="rlMaxViaInner" value="20mil"/> +<param name="rlMinMicroViaOuter" value="4mil"/> +<param name="rlMaxMicroViaOuter" value="20mil"/> +<param name="rlMinMicroViaInner" value="4mil"/> +<param name="rlMaxMicroViaInner" value="20mil"/> +<param name="psTop" value="-1"/> +<param name="psBottom" value="-1"/> +<param name="psFirst" value="-1"/> +<param name="psElongationLong" value="100"/> +<param name="psElongationOffset" value="100"/> +<param name="mvStopFrame" value="1"/> +<param name="mvCreamFrame" value="0"/> +<param name="mlMinStopFrame" value="4mil"/> +<param name="mlMaxStopFrame" value="4mil"/> +<param name="mlMinCreamFrame" value="0mil"/> +<param name="mlMaxCreamFrame" value="0mil"/> +<param name="mlViaStopLimit" value="0mil"/> +<param name="srRoundness" value="0"/> +<param name="srMinRoundness" value="0mil"/> +<param name="srMaxRoundness" value="0mil"/> +<param name="slThermalIsolate" value="16mil"/> +<param name="slThermalsForVias" value="0"/> +<param name="dpMaxLengthDifference" value="10mm"/> +<param name="dpGapFactor" value="2.5"/> +<param name="checkAngle" value="0"/> +<param name="checkFont" value="1"/> +<param name="checkRestrict" value="1"/> +<param name="checkStop" value="0"/> +<param name="checkValues" value="0"/> +<param name="checkNames" value="1"/> +<param name="checkWireStubs" value="1"/> +<param name="checkPolygonWidth" value="0"/> +<param name="useDiameter" value="13"/> +<param name="maxErrors" value="50"/> +</designrules> +<autorouter> +<pass name="Default"> +<param name="RoutingGrid" value="50mil"/> +<param name="AutoGrid" value="1"/> +<param name="Efforts" value="0"/> +<param name="TopRouterVariant" value="1"/> +<param name="tpViaShape" value="round"/> +<param name="PrefDir.1" value="a"/> +<param name="PrefDir.2" value="0"/> +<param name="PrefDir.3" value="0"/> +<param name="PrefDir.4" value="0"/> +<param name="PrefDir.5" value="0"/> +<param name="PrefDir.6" value="0"/> +<param name="PrefDir.7" value="0"/> +<param name="PrefDir.8" value="0"/> +<param name="PrefDir.9" value="0"/> +<param name="PrefDir.10" value="0"/> +<param name="PrefDir.11" value="0"/> +<param name="PrefDir.12" value="0"/> +<param name="PrefDir.13" value="0"/> +<param name="PrefDir.14" value="0"/> +<param name="PrefDir.15" value="0"/> +<param name="PrefDir.16" value="a"/> +<param name="cfVia" value="8"/> +<param name="cfNonPref" value="5"/> +<param name="cfChangeDir" value="2"/> +<param name="cfOrthStep" value="2"/> +<param name="cfDiagStep" value="3"/> +<param name="cfExtdStep" value="0"/> +<param name="cfBonusStep" value="1"/> +<param name="cfMalusStep" value="1"/> +<param name="cfPadImpact" value="4"/> +<param name="cfSmdImpact" value="4"/> +<param name="cfBusImpact" value="0"/> +<param name="cfHugging" value="3"/> +<param name="cfAvoid" value="4"/> +<param name="cfPolygon" value="10"/> +<param name="cfBase.1" value="0"/> +<param name="cfBase.2" value="1"/> +<param name="cfBase.3" value="1"/> +<param name="cfBase.4" value="1"/> +<param name="cfBase.5" value="1"/> +<param name="cfBase.6" value="1"/> +<param name="cfBase.7" value="1"/> +<param name="cfBase.8" value="1"/> +<param name="cfBase.9" value="1"/> +<param name="cfBase.10" value="1"/> +<param name="cfBase.11" value="1"/> +<param name="cfBase.12" value="1"/> +<param name="cfBase.13" value="1"/> +<param name="cfBase.14" value="1"/> +<param name="cfBase.15" value="1"/> +<param name="cfBase.16" value="0"/> +<param name="mnVias" value="20"/> +<param name="mnSegments" value="9999"/> +<param name="mnExtdSteps" value="9999"/> +<param name="mnRipupLevel" value="10"/> +<param name="mnRipupSteps" value="100"/> +<param name="mnRipupTotal" value="100"/> +</pass> +<pass name="Follow-me" refer="Default" active="yes"> +</pass> +<pass name="Busses" refer="Default" active="yes"> +<param name="cfNonPref" value="4"/> +<param name="cfBusImpact" value="4"/> +<param name="cfHugging" value="0"/> +<param name="mnVias" value="0"/> +</pass> +<pass name="Route" refer="Default" active="yes"> +</pass> +<pass name="Optimize1" refer="Default" active="yes"> +<param name="cfVia" value="99"/> +<param name="cfExtdStep" value="10"/> +<param name="cfHugging" value="1"/> +<param name="mnExtdSteps" value="1"/> +<param name="mnRipupLevel" value="0"/> +</pass> +<pass name="Optimize2" refer="Optimize1" active="yes"> +<param name="cfNonPref" value="0"/> +<param name="cfChangeDir" value="6"/> +<param name="cfExtdStep" value="0"/> +<param name="cfBonusStep" value="2"/> +<param name="cfMalusStep" value="2"/> +<param name="cfPadImpact" value="2"/> +<param name="cfSmdImpact" value="2"/> +<param name="cfHugging" value="0"/> +</pass> +<pass name="Optimize3" refer="Optimize2" active="yes"> +<param name="cfChangeDir" value="8"/> +<param name="cfPadImpact" value="0"/> +<param name="cfSmdImpact" value="0"/> +</pass> +<pass name="Optimize4" refer="Optimize3" active="yes"> +<param name="cfChangeDir" value="25"/> +</pass> +</autorouter> +<elements> +<element name="C1" library="fab" package="C1206" value="CAP-US1206 10uF" x="12.954" y="6.604" rot="R90"/> +<element name="C2" library="fab" package="C1206" value="CAP-US1206 10uF" x="16.51" y="13.462" rot="R90"/> +<element name="IC1" library="fab" package="SOT23-5" value="OPAMPSOT23-5" x="10.414" y="16.256" rot="R180"/> +<element name="R1" library="fab" package="R1206" value="100k" x="11.43" y="11.938"/> +<element name="R4" library="fab" package="R1206" value="10k" x="16.51" y="6.604" rot="R270"/> +<element name="R5" library="fab" package="R1206" value="10k" x="19.812" y="13.462" rot="R270"/> +<element name="R6" library="fab" package="R1206" value="10k" x="19.558" y="6.604" rot="R90"/> +<element name="R7" library="fab" package="R1206" value="1M" x="5.08" y="11.938" rot="R180"/> +<element name="U$1" library="fab" package="2X03SMD" value="AVRISPSMD" x="6.35" y="5.842"/> +<element name="VR1" library="SparkFun-Resistors" library_urn="urn:adsk.eagle:library:532" package="TRIMPOT-SMD-3MM-CLOSED" package3d_urn="urn:adsk.eagle:package:39665/1" value="100k" x="5.08" y="16.002" rot="R180"> +<attribute name="PROD_ID" value="RES-09285" x="5.08" y="16.002" size="1.778" layer="27" rot="R180" display="off"/> +</element> +</elements> +<signals> +<signal name="GND"> +<contactref element="IC1" pad="2"/> +<contactref element="U$1" pad="6"/> +<contactref element="U$1" pad="5"/> +<contactref element="R5" pad="1"/> +<contactref element="C2" pad="2"/> +<contactref element="R7" pad="1"/> +<contactref element="VR1" pad="3"/> +<polygon width="0.254" layer="1"> +<vertex x="-2" y="-2"/> +<vertex x="-2" y="22.07"/> +<vertex x="25.622" y="22.07"/> +<vertex x="25.622" y="-2"/> +</polygon> +<wire x1="4.23" y1="17.652" x2="10.414" y2="17.562" width="0" layer="19" extent="1-1"/> +</signal> +<signal name="+5V"> +<contactref element="U$1" pad="2"/> +<contactref element="IC1" pad="5"/> +<contactref element="R4" pad="2"/> +<wire x1="9.334" y1="8.446" x2="9.27" y2="8.382" width="0.254" layer="1"/> +<wire x1="11.364" y1="14.95" x2="11.364" y2="13.14560625" width="0.254" layer="1"/> +<wire x1="11.364" y1="13.14560625" x2="11.4176" y2="13.09200625" width="0.254" layer="1"/> +<wire x1="11.4176" y1="13.09200625" x2="11.4176" y2="9.80594375" width="0.254" layer="1"/> +<wire x1="11.4176" y1="9.80594375" x2="10.05765625" y2="8.446" width="0.254" layer="1"/> +<wire x1="16.51" y1="5.182" x2="15.0722" y2="6.6198" width="0.254" layer="1"/> +<wire x1="9.27" y1="8.382" x2="9.618" y2="8.382" width="0.254" layer="1"/> +<wire x1="15.0722" y1="6.6198" x2="11.5" y2="6.6198" width="0.254" layer="1"/> +<wire x1="10.05765625" y1="8.446" x2="9.75" y2="8.446" width="0.254" layer="1"/> +<wire x1="9.75" y1="8.446" x2="9.334" y2="8.446" width="0.254" layer="1"/> +<wire x1="9.75" y1="8.3698" x2="9.75" y2="8.446" width="0.254" layer="1"/> +<wire x1="11.5" y1="6.6198" x2="9.75" y2="8.3698" width="0.254" layer="1"/> +</signal> +<signal name="N$1"> +<contactref element="U$1" pad="1"/> +<contactref element="IC1" pad="3"/> +<contactref element="R7" pad="2"/> +<wire x1="3.81" y1="8.382" x2="3.81" y2="11.02525" width="0.254" layer="1"/> +<wire x1="3.81" y1="11.02525" x2="3.658" y2="11.938" width="0.254" layer="1"/> +<wire x1="7.7156" y1="15.8136" x2="9.464" y2="17.562" width="0.254" layer="1"/> +<wire x1="3.86" y1="12.14" x2="3.86" y2="14.99410625" width="0.254" layer="1"/> +<wire x1="3.658" y1="11.938" x2="3.86" y2="12.14" width="0.254" layer="1"/> +<wire x1="3.86" y1="14.99410625" x2="3.895" y2="15.02910625" width="0.254" layer="1"/> +<wire x1="3.895" y1="15.02910625" x2="3.895" y2="15.065025" width="0.254" layer="1"/> +<wire x1="3.895" y1="15.065025" x2="4.643575" y2="15.8136" width="0.254" layer="1"/> +<wire x1="4.643575" y1="15.8136" x2="7.7156" y2="15.8136" width="0.254" layer="1"/> +</signal> +<signal name="N$3"> +<contactref element="IC1" pad="4"/> +<contactref element="R1" pad="1"/> +<contactref element="VR1" pad="2"/> +<wire x1="9.464" y1="14.95" x2="5.678" y2="14.95" width="0.254" layer="1"/> +<wire x1="5.678" y1="14.95" x2="5.08" y2="14.352" width="0.254" layer="1"/> +<wire x1="9.464" y1="14.95" x2="10.008" y2="14.406" width="0.254" layer="1"/> +<wire x1="10.008" y1="14.406" x2="10.008" y2="11.938" width="0.254" layer="1"/> +</signal> +<signal name="OA_OUTPUT"> +<contactref element="R1" pad="2"/> +<contactref element="IC1" pad="1"/> +<contactref element="C1" pad="2"/> +<wire x1="12.954" y1="8.004" x2="12.954" y2="11.836" width="0.254" layer="1"/> +<wire x1="12.954" y1="11.836" x2="12.852" y2="11.938" width="0.254" layer="1"/> +<wire x1="11.364" y1="17.562" x2="12.954" y2="15.972" width="0.254" layer="1"/> +<wire x1="12.954" y1="15.972" x2="12.954" y2="11.836" width="0.254" layer="1"/> +</signal> +<signal name="N$4"> +<contactref element="U$1" pad="4"/> +<contactref element="C1" pad="1"/> +<contactref element="R6" pad="1"/> +<wire x1="9.27" y1="5.842" x2="9.908" y2="5.204" width="0.254" layer="1"/> +<wire x1="9.908" y1="5.204" x2="12.954" y2="5.204" width="0.254" layer="1"/> +<wire x1="12.954" y1="5.204" x2="14.411" y2="3.747" width="0.254" layer="1"/> +<wire x1="18.123" y1="3.747" x2="19.558" y2="5.182" width="0.254" layer="1"/> +<wire x1="14.411" y1="3.747" x2="18.123" y2="3.747" width="0.254" layer="1"/> +</signal> +<signal name="N$5"> +<contactref element="C2" pad="1"/> +<contactref element="R4" pad="1"/> +<contactref element="R5" pad="2"/> +<contactref element="R6" pad="2"/> +<wire x1="16.51" y1="8.026" x2="19.558" y2="8.026" width="0.254" layer="1"/> +<wire x1="16.51" y1="12.062" x2="16.532" y2="12.04" width="0.254" layer="1"/> +<wire x1="16.532" y1="12.04" x2="19.812" y2="12.04" width="0.254" layer="1"/> +<wire x1="19.558" y1="8.026" x2="19.558" y2="11.786" width="0.254" layer="1"/> +<wire x1="19.558" y1="11.786" x2="19.812" y2="12.04" width="0.254" layer="1"/> +</signal> +</signals> +<mfgpreviewcolors> +<mfgpreviewcolor name="soldermaskcolor" color="0xC8008000"/> +<mfgpreviewcolor name="silkscreencolor" color="0xFFFEFEFE"/> +<mfgpreviewcolor name="backgroundcolor" color="0xFF282828"/> +<mfgpreviewcolor name="coppercolor" color="0xFFFFBF00"/> +<mfgpreviewcolor name="substratecolor" color="0xFF786E46"/> +</mfgpreviewcolors> +</board> +</drawing> +<compatibility> +<note version="8.2" severity="warning"> +Since Version 8.2, EAGLE supports online libraries. The ids +of those online libraries will not be understood (or retained) +with this version. +</note> +<note version="8.3" severity="warning"> +Since Version 8.3, EAGLE supports URNs for individual library +assets (packages, symbols, and devices). The URNs of those assets +will not be understood (or retained) with this version. +</note> +<note version="8.3" severity="warning"> +Since Version 8.3, EAGLE supports the association of 3D packages +with devices in libraries, schematics, and board files. Those 3D +packages will not be understood (or retained) with this version. +</note> +</compatibility> +</eagle> diff --git a/static/designs/10_audio_input.sch b/static/designs/10_audio_input.sch new file mode 100644 index 0000000000000000000000000000000000000000..a460f97cfd6c0a8dbbba39c35a127382f56b8d2b --- /dev/null +++ b/static/designs/10_audio_input.sch @@ -0,0 +1,1045 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE eagle SYSTEM "eagle.dtd"> +<eagle version="9.1.3"> +<drawing> +<settings> +<setting alwaysvectorfont="no"/> +<setting verticaltext="up"/> +</settings> +<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/> +<layers> +<layer number="1" name="Top" color="4" fill="1" visible="no" active="no"/> +<layer number="2" name="Route2" color="1" fill="3" visible="no" active="no"/> +<layer number="3" name="Route3" color="4" fill="3" visible="no" active="no"/> +<layer number="4" name="Route4" color="1" fill="4" visible="no" active="no"/> +<layer number="5" name="Route5" color="4" fill="4" visible="no" active="no"/> +<layer number="6" name="Route6" color="1" fill="8" visible="no" active="no"/> +<layer number="7" name="Route7" color="4" fill="8" visible="no" active="no"/> +<layer number="8" name="Route8" color="1" fill="2" visible="no" active="no"/> +<layer number="9" name="Route9" color="4" fill="2" visible="no" active="no"/> +<layer number="10" name="Route10" color="1" fill="7" visible="no" active="no"/> +<layer number="11" name="Route11" color="4" fill="7" visible="no" active="no"/> +<layer number="12" name="Route12" color="1" fill="5" visible="no" active="no"/> +<layer number="13" name="Route13" color="4" fill="5" visible="no" active="no"/> +<layer number="14" name="Route14" color="1" fill="6" visible="no" active="no"/> +<layer number="15" name="Route15" color="4" fill="6" visible="no" active="no"/> +<layer number="16" name="Bottom" color="1" fill="1" visible="no" active="no"/> +<layer number="17" name="Pads" color="2" fill="1" visible="no" active="no"/> +<layer number="18" name="Vias" color="2" fill="1" visible="no" active="no"/> +<layer number="19" name="Unrouted" color="6" fill="1" visible="no" active="no"/> +<layer number="20" name="Dimension" color="15" fill="1" visible="no" active="no"/> +<layer number="21" name="tPlace" color="7" fill="1" visible="no" active="no"/> +<layer number="22" name="bPlace" color="7" fill="1" visible="no" active="no"/> +<layer number="23" name="tOrigins" color="15" fill="1" visible="no" active="no"/> +<layer number="24" name="bOrigins" color="15" fill="1" visible="no" active="no"/> +<layer number="25" name="tNames" color="7" fill="1" visible="no" active="no"/> +<layer number="26" name="bNames" color="7" fill="1" visible="no" active="no"/> +<layer number="27" name="tValues" color="7" fill="1" visible="no" active="no"/> +<layer number="28" name="bValues" color="7" fill="1" visible="no" active="no"/> +<layer number="29" name="tStop" color="7" fill="3" visible="no" active="no"/> +<layer number="30" name="bStop" color="7" fill="6" visible="no" active="no"/> +<layer number="31" name="tCream" color="7" fill="4" visible="no" active="no"/> +<layer number="32" name="bCream" color="7" fill="5" visible="no" active="no"/> +<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="no"/> +<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="no"/> +<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="no"/> +<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="no"/> +<layer number="37" name="tTest" color="7" fill="1" visible="no" active="no"/> +<layer number="38" name="bTest" color="7" fill="1" visible="no" active="no"/> +<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="no"/> +<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="no"/> +<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="no"/> +<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="no"/> +<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="no"/> +<layer number="44" name="Drills" color="7" fill="1" visible="no" active="no"/> +<layer number="45" name="Holes" color="7" fill="1" visible="no" active="no"/> +<layer number="46" name="Milling" color="3" fill="1" visible="no" active="no"/> +<layer number="47" name="Measures" color="7" fill="1" visible="no" active="no"/> +<layer number="48" name="Document" color="7" fill="1" visible="no" active="no"/> +<layer number="49" name="Reference" color="7" fill="1" visible="no" active="no"/> +<layer number="50" name="dxf" color="7" fill="1" visible="no" active="no"/> +<layer number="51" name="tDocu" color="7" fill="1" visible="no" active="no"/> +<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="no"/> +<layer number="53" name="tGND_GNDA" color="7" fill="9" visible="no" active="no"/> +<layer number="54" name="bGND_GNDA" color="1" fill="9" visible="no" active="no"/> +<layer number="56" name="wert" color="7" fill="1" visible="no" active="no"/> +<layer number="57" name="tCAD" color="7" fill="1" visible="no" active="no"/> +<layer number="59" name="tCarbon" color="7" fill="1" visible="no" active="no"/> +<layer number="60" name="bCarbon" color="7" fill="1" visible="no" active="no"/> +<layer number="88" name="SimResults" color="9" fill="1" visible="yes" active="yes"/> +<layer number="89" name="SimProbes" color="9" fill="1" visible="yes" active="yes"/> +<layer number="90" name="Modules" color="5" fill="1" visible="yes" active="yes"/> +<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/> +<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/> +<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/> +<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/> +<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/> +<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/> +<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/> +<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/> +<layer number="99" name="SpiceOrder" color="7" fill="1" visible="yes" active="yes"/> +<layer number="100" name="Muster" color="7" fill="1" visible="no" active="no"/> +<layer number="101" name="Patch_Top" color="12" fill="4" visible="no" active="yes"/> +<layer number="102" name="Vscore" color="7" fill="1" visible="no" active="yes"/> +<layer number="103" name="tMap" color="7" fill="1" visible="no" active="yes"/> +<layer number="104" name="Name" color="7" fill="1" visible="no" active="yes"/> +<layer number="105" name="tPlate" color="7" fill="1" visible="no" active="yes"/> +<layer number="106" name="bPlate" color="7" fill="1" visible="no" active="yes"/> +<layer number="107" name="Crop" color="7" fill="1" visible="no" active="yes"/> +<layer number="108" name="tplace-old" color="10" fill="1" visible="no" active="yes"/> +<layer number="109" name="ref-old" color="11" fill="1" visible="no" active="yes"/> +<layer number="110" name="fp0" color="7" fill="1" visible="no" active="yes"/> +<layer number="111" name="LPC17xx" color="7" fill="1" visible="no" active="yes"/> +<layer number="112" name="tSilk" color="7" fill="1" visible="no" active="yes"/> +<layer number="113" name="IDFDebug" color="7" fill="1" visible="no" active="yes"/> +<layer number="114" name="Badge_Outline" color="7" fill="1" visible="no" active="yes"/> +<layer number="115" name="ReferenceISLANDS" color="7" fill="1" visible="no" active="yes"/> +<layer number="116" name="Patch_BOT" color="9" fill="4" visible="no" active="yes"/> +<layer number="118" name="Rect_Pads" color="7" fill="1" visible="no" active="yes"/> +<layer number="121" name="_tsilk" color="7" fill="1" visible="no" active="yes"/> +<layer number="122" name="_bsilk" color="7" fill="1" visible="no" active="yes"/> +<layer number="123" name="tTestmark" color="7" fill="1" visible="no" active="yes"/> +<layer number="124" name="bTestmark" color="7" fill="1" visible="no" active="yes"/> +<layer number="125" name="_tNames" color="7" fill="1" visible="no" active="yes"/> +<layer number="126" name="_bNames" color="7" fill="1" visible="no" active="yes"/> +<layer number="127" name="_tValues" color="7" fill="1" visible="no" active="yes"/> +<layer number="128" name="_bValues" color="7" fill="1" visible="no" active="yes"/> +<layer number="129" name="Mask" color="7" fill="1" visible="no" active="yes"/> +<layer number="131" name="tAdjust" color="7" fill="1" visible="no" active="yes"/> +<layer number="132" name="bAdjust" color="7" fill="1" visible="no" active="yes"/> +<layer number="144" name="Drill_legend" color="7" fill="1" visible="no" active="yes"/> +<layer number="150" name="Notes" color="7" fill="1" visible="no" active="yes"/> +<layer number="151" name="HeatSink" color="7" fill="1" visible="no" active="yes"/> +<layer number="152" name="_bDocu" color="7" fill="1" visible="no" active="yes"/> +<layer number="153" name="FabDoc1" color="7" fill="1" visible="no" active="yes"/> +<layer number="154" name="FabDoc2" color="7" fill="1" visible="no" active="yes"/> +<layer number="155" name="FabDoc3" color="7" fill="1" visible="no" active="yes"/> +<layer number="199" name="Contour" color="7" fill="1" visible="no" active="yes"/> +<layer number="200" name="200bmp" color="1" fill="10" visible="no" active="yes"/> +<layer number="201" name="201bmp" color="2" fill="10" visible="no" active="yes"/> +<layer number="202" name="202bmp" color="3" fill="10" visible="no" active="yes"/> +<layer number="203" name="203bmp" color="4" fill="10" visible="no" active="yes"/> +<layer number="204" name="204bmp" color="5" fill="10" visible="no" active="yes"/> +<layer number="205" name="205bmp" color="6" fill="10" visible="no" active="yes"/> +<layer number="206" name="206bmp" color="7" fill="10" visible="no" active="yes"/> +<layer number="207" name="207bmp" color="8" fill="10" visible="no" active="yes"/> +<layer number="208" name="208bmp" color="9" fill="10" visible="no" active="yes"/> +<layer number="209" name="209bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="210" name="210bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="211" name="211bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="212" name="212bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="213" name="213bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="214" name="214bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="215" name="215bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="216" name="216bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="217" name="217bmp" color="18" fill="1" visible="no" active="no"/> +<layer number="218" name="218bmp" color="19" fill="1" visible="no" active="no"/> +<layer number="219" name="219bmp" color="20" fill="1" visible="no" active="no"/> +<layer number="220" name="220bmp" color="21" fill="1" visible="no" active="no"/> +<layer number="221" name="221bmp" color="22" fill="1" visible="no" active="no"/> +<layer number="222" name="222bmp" color="23" fill="1" visible="no" active="no"/> +<layer number="223" name="223bmp" color="24" fill="1" visible="no" active="no"/> +<layer number="224" name="224bmp" color="25" fill="1" visible="no" active="no"/> +<layer number="225" name="225bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="226" name="226bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="227" name="227bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="228" name="228bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="229" name="229bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="230" name="230bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="231" name="231bmp" color="7" fill="1" visible="no" active="yes"/> +<layer number="232" name="Eagle3D_PG2" color="7" fill="1" visible="no" active="yes"/> +<layer number="233" name="Eagle3D_PG3" color="7" fill="1" visible="no" active="yes"/> +<layer number="248" name="Housing" color="7" fill="1" visible="no" active="yes"/> +<layer number="249" name="Edge" color="7" fill="1" visible="no" active="yes"/> +<layer number="250" name="Descript" color="3" fill="1" visible="no" active="no"/> +<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/> +<layer number="254" name="cooling" color="7" fill="1" visible="no" active="yes"/> +<layer number="255" name="routoute" color="7" fill="1" visible="no" active="yes"/> +</layers> +<schematic xreflabel="%F%N/%S.%C%R" xrefpart="/%S.%C%R"> +<libraries> +<library name="fab"> +<packages> +<package name="SOT23-5"> +<description><b>Small Outline Transistor</b>, 5 lead</description> +<wire x1="-1.544" y1="0.713" x2="1.544" y2="0.713" width="0.1524" layer="21"/> +<wire x1="1.544" y1="0.713" x2="1.544" y2="-0.712" width="0.1524" layer="21"/> +<wire x1="1.544" y1="-0.712" x2="-1.544" y2="-0.712" width="0.1524" layer="21"/> +<wire x1="-1.544" y1="-0.712" x2="-1.544" y2="0.713" width="0.1524" layer="21"/> +<smd name="5" x="-0.95" y="1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="4" x="0.95" y="1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="1" x="-0.95" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="2" x="0" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<smd name="3" x="0.95" y="-1.306" dx="0.5334" dy="1.1938" layer="1"/> +<text x="-1.778" y="-1.778" size="1.27" layer="25" ratio="10" rot="R90">>NAME</text> +<text x="3.048" y="-1.778" size="1.27" layer="27" ratio="10" rot="R90">>VALUE</text> +<rectangle x1="-1.1875" y1="0.7126" x2="-0.7125" y2="1.5439" layer="51"/> +<rectangle x1="0.7125" y1="0.7126" x2="1.1875" y2="1.5439" layer="51"/> +<rectangle x1="-1.1875" y1="-1.5437" x2="-0.7125" y2="-0.7124" layer="51"/> +<rectangle x1="-0.2375" y1="-1.5437" x2="0.2375" y2="-0.7124" layer="51"/> +<rectangle x1="0.7125" y1="-1.5437" x2="1.1875" y2="-0.7124" layer="51"/> +</package> +<package name="SO08"> +<description><b>Small Outline Package</b></description> +<wire x1="-2.362" y1="-1.803" x2="2.362" y2="-1.803" width="0.1524" layer="51"/> +<wire x1="2.362" y1="-1.803" x2="2.362" y2="1.803" width="0.1524" layer="21"/> +<wire x1="2.362" y1="1.803" x2="-2.362" y2="1.803" width="0.1524" layer="51"/> +<wire x1="-2.362" y1="1.803" x2="-2.362" y2="-1.803" width="0.1524" layer="21"/> +<circle x="-1.8034" y="-0.9906" radius="0.3556" width="0.0508" layer="21"/> +<smd name="1" x="-1.905" y="-2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="8" x="-1.905" y="2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="2" x="-0.635" y="-2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="3" x="0.635" y="-2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="7" x="-0.635" y="2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="6" x="0.635" y="2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="4" x="1.905" y="-2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<smd name="5" x="1.905" y="2.6162" dx="0.6096" dy="2.2098" layer="1"/> +<text x="4.0005" y="-2.032" size="1.27" layer="27" ratio="10" rot="R90">>VALUE</text> +<text x="-2.7305" y="-2.032" size="1.27" layer="25" ratio="10" rot="R90">>NAME</text> +<rectangle x1="-2.0828" y1="-2.8702" x2="-1.7272" y2="-1.8542" layer="51"/> +<rectangle x1="-0.8128" y1="-2.8702" x2="-0.4572" y2="-1.8542" layer="51"/> +<rectangle x1="0.4572" y1="-2.8702" x2="0.8128" y2="-1.8542" layer="51"/> +<rectangle x1="1.7272" y1="-2.8702" x2="2.0828" y2="-1.8542" layer="51"/> +<rectangle x1="-2.0828" y1="1.8542" x2="-1.7272" y2="2.8702" layer="51"/> +<rectangle x1="-0.8128" y1="1.8542" x2="-0.4572" y2="2.8702" layer="51"/> +<rectangle x1="0.4572" y1="1.8542" x2="0.8128" y2="2.8702" layer="51"/> +<rectangle x1="1.7272" y1="1.8542" x2="2.0828" y2="2.8702" layer="51"/> +</package> +<package name="2X03SMD"> +<smd name="1" x="-2.54" y="2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="3" x="-2.54" y="0" dx="2.54" dy="1.27" layer="1"/> +<smd name="5" x="-2.54" y="-2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="2" x="2.92" y="2.54" dx="2.54" dy="1.27" layer="1"/> +<smd name="4" x="2.92" y="0" dx="2.54" dy="1.27" layer="1"/> +<smd name="6" x="2.92" y="-2.54" dx="2.54" dy="1.27" layer="1"/> +<text x="-5.08" y="2.54" size="1.27" layer="27">1</text> +<text x="-3.81" y="3.81" size="1.27" layer="25">>NAME</text> +<text x="-3.81" y="-5.08" size="1.27" layer="27">>VALUE</text> +</package> +<package name="2X03"> +<description><b>PIN HEADER</b></description> +<wire x1="-3.81" y1="-1.905" x2="-3.175" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="-1.905" y1="-2.54" x2="-1.27" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="-1.27" y1="-1.905" x2="-0.635" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="0.635" y1="-2.54" x2="1.27" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="-3.81" y1="-1.905" x2="-3.81" y2="1.905" width="0.1524" layer="21"/> +<wire x1="-3.81" y1="1.905" x2="-3.175" y2="2.54" width="0.1524" layer="21"/> +<wire x1="-3.175" y1="2.54" x2="-1.905" y2="2.54" width="0.1524" layer="21"/> +<wire x1="-1.905" y1="2.54" x2="-1.27" y2="1.905" width="0.1524" layer="21"/> +<wire x1="-1.27" y1="1.905" x2="-0.635" y2="2.54" width="0.1524" layer="21"/> +<wire x1="-0.635" y1="2.54" x2="0.635" y2="2.54" width="0.1524" layer="21"/> +<wire x1="0.635" y1="2.54" x2="1.27" y2="1.905" width="0.1524" layer="21"/> +<wire x1="-1.27" y1="1.905" x2="-1.27" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="1.27" y1="1.905" x2="1.27" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="-0.635" y1="-2.54" x2="0.635" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="-3.175" y1="-2.54" x2="-1.905" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="1.27" y1="-1.905" x2="1.905" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="3.175" y1="-2.54" x2="3.81" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="1.27" y1="1.905" x2="1.905" y2="2.54" width="0.1524" layer="21"/> +<wire x1="1.905" y1="2.54" x2="3.175" y2="2.54" width="0.1524" layer="21"/> +<wire x1="3.175" y1="2.54" x2="3.81" y2="1.905" width="0.1524" layer="21"/> +<wire x1="3.81" y1="1.905" x2="3.81" y2="-1.905" width="0.1524" layer="21"/> +<wire x1="1.905" y1="-2.54" x2="3.175" y2="-2.54" width="0.1524" layer="21"/> +<wire x1="-3.175" y1="-2.921" x2="-1.905" y2="-2.921" width="0.127" layer="21"/> +<pad name="1" x="-2.54" y="-1.27" drill="1.016" shape="square"/> +<pad name="2" x="-2.54" y="1.27" drill="1.016" shape="octagon"/> +<pad name="3" x="0" y="-1.27" drill="1.016" shape="octagon"/> +<pad name="4" x="0" y="1.27" drill="1.016" shape="octagon"/> +<pad name="5" x="2.54" y="-1.27" drill="1.016" shape="octagon"/> +<pad name="6" x="2.54" y="1.27" drill="1.016" shape="octagon"/> +<text x="-3.81" y="3.175" size="1.27" layer="25" ratio="10">>NAME</text> +<text x="-3.81" y="-4.445" size="1.27" layer="27">>VALUE</text> +<text x="-5.08" y="-2.54" size="1.27" layer="21">1</text> +<rectangle x1="-2.794" y1="-1.524" x2="-2.286" y2="-1.016" layer="51"/> +<rectangle x1="-2.794" y1="1.016" x2="-2.286" y2="1.524" layer="51"/> +<rectangle x1="-0.254" y1="1.016" x2="0.254" y2="1.524" layer="51"/> +<rectangle x1="-0.254" y1="-1.524" x2="0.254" y2="-1.016" layer="51"/> +<rectangle x1="2.286" y1="1.016" x2="2.794" y2="1.524" layer="51"/> +<rectangle x1="2.286" y1="-1.524" x2="2.794" y2="-1.016" layer="51"/> +</package> +<package name="R1206"> +<description><b>RESISTOR</b></description> +<wire x1="0.9525" y1="-0.8128" x2="-0.9652" y2="-0.8128" width="0.1524" layer="51"/> +<wire x1="0.9525" y1="0.8128" x2="-0.9652" y2="0.8128" width="0.1524" layer="51"/> +<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/> +<smd name="2" x="1.422" y="0" dx="1.6" dy="1.803" layer="1"/> +<smd name="1" x="-1.422" y="0" dx="1.6" dy="1.803" layer="1"/> +<text x="-1.27" y="1.27" size="1.27" layer="25">>NAME</text> +<text x="-1.27" y="-2.54" size="1.27" layer="27">>VALUE</text> +<rectangle x1="-1.6891" y1="-0.8763" x2="-0.9525" y2="0.8763" layer="51"/> +<rectangle x1="0.9525" y1="-0.8763" x2="1.6891" y2="0.8763" layer="51"/> +<rectangle x1="-0.3" y1="-0.7" x2="0.3" y2="0.7" layer="35"/> +</package> +<package name="R1206W"> +<description><b>RESISTOR</b><p> +wave soldering</description> +<wire x1="-0.913" y1="0.8" x2="0.888" y2="0.8" width="0.1524" layer="51"/> +<wire x1="-0.913" y1="-0.8" x2="0.888" y2="-0.8" width="0.1524" layer="51"/> +<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/> +<smd name="1" x="-1.499" y="0" dx="1.8" dy="1.2" layer="1"/> +<smd name="2" x="1.499" y="0" dx="1.8" dy="1.2" layer="1"/> +<text x="-1.905" y="1.27" size="1.27" layer="25">>NAME</text> +<text x="-1.905" y="-2.54" size="1.27" layer="27">>VALUE</text> +<rectangle x1="-1.651" y1="-0.8763" x2="-0.9009" y2="0.8738" layer="51"/> +<rectangle x1="0.889" y1="-0.8763" x2="1.6391" y2="0.8738" layer="51"/> +<rectangle x1="-0.3" y1="-0.7" x2="0.3" y2="0.7" layer="35"/> +</package> +<package name="R1206FAB"> +<wire x1="-2.032" y1="1.016" x2="2.032" y2="1.016" width="0.127" layer="21"/> +<wire x1="2.032" y1="1.016" x2="2.032" y2="-1.016" width="0.127" layer="21"/> +<wire x1="2.032" y1="-1.016" x2="-2.032" y2="-1.016" width="0.127" layer="21"/> +<wire x1="-2.032" y1="-1.016" x2="-2.032" y2="1.016" width="0.127" layer="21"/> +<smd name="1" x="-1.651" y="0" dx="1.27" dy="1.905" layer="1"/> +<smd name="2" x="1.651" y="0" dx="1.27" dy="1.905" layer="1"/> +<text x="-1.778" y="1.27" size="1.016" layer="25" ratio="15">>NAME</text> +<text x="-1.778" y="-2.286" size="1.016" layer="27" ratio="15">>VALUE</text> +</package> +<package name="C1206"> +<description><b>CAPACITOR</b></description> +<wire x1="-2.473" y1="0.983" x2="2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="-0.983" x2="-2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-2.473" y1="-0.983" x2="-2.473" y2="0.983" width="0.0508" layer="39"/> +<wire x1="2.473" y1="0.983" x2="2.473" y2="-0.983" width="0.0508" layer="39"/> +<wire x1="-0.965" y1="0.787" x2="0.965" y2="0.787" width="0.1016" layer="51"/> +<wire x1="-0.965" y1="-0.787" x2="0.965" y2="-0.787" width="0.1016" layer="51"/> +<smd name="1" x="-1.4" y="0" dx="1.6" dy="1.8" layer="1"/> +<smd name="2" x="1.4" y="0" dx="1.6" dy="1.8" layer="1"/> +<text x="-1.27" y="1.27" size="1.27" layer="25">>NAME</text> +<text x="-1.27" y="-2.54" size="1.27" layer="27">>VALUE</text> +<rectangle x1="-1.7018" y1="-0.8509" x2="-0.9517" y2="0.8491" layer="51"/> +<rectangle x1="0.9517" y1="-0.8491" x2="1.7018" y2="0.8509" layer="51"/> +<rectangle x1="-0.1999" y1="-0.4001" x2="0.1999" y2="0.4001" layer="35"/> +</package> +<package name="C1206K"> +<description><b>Ceramic Chip Capacitor KEMET 1206 reflow solder</b><p> +Metric Code Size 3216</description> +<wire x1="-1.525" y1="0.75" x2="1.525" y2="0.75" width="0.1016" layer="51"/> +<wire x1="1.525" y1="-0.75" x2="-1.525" y2="-0.75" width="0.1016" layer="51"/> +<smd name="1" x="-1.5" y="0" dx="1.5" dy="2" layer="1"/> +<smd name="2" x="1.5" y="0" dx="1.5" dy="2" layer="1"/> +<text x="-1.6" y="1.1" size="1.016" layer="25">>NAME</text> +<text x="-1.6" y="-2.1" size="1.016" layer="27">>VALUE</text> +<rectangle x1="-1.6" y1="-0.8" x2="-1.1" y2="0.8" layer="51"/> +<rectangle x1="1.1" y1="-0.8" x2="1.6" y2="0.8" layer="51"/> +</package> +<package name="C1206FAB"> +<wire x1="-2.032" y1="1.016" x2="2.032" y2="1.016" width="0.127" layer="21"/> +<wire x1="2.032" y1="1.016" x2="2.032" y2="-1.016" width="0.127" layer="21"/> +<wire x1="2.032" y1="-1.016" x2="-2.032" y2="-1.016" width="0.127" layer="21"/> +<wire x1="-2.032" y1="-1.016" x2="-2.032" y2="1.016" width="0.127" layer="21"/> +<smd name="1" x="-1.651" y="0" dx="1.27" dy="1.905" layer="1"/> +<smd name="2" x="1.651" y="0" dx="1.27" dy="1.905" layer="1"/> +<text x="-1.778" y="1.27" size="1.016" layer="25" ratio="15">>NAME</text> +<text x="-1.778" y="-2.286" size="1.016" layer="27" ratio="15">>VALUE</text> +</package> +</packages> +<symbols> +<symbol name="OPAMP"> +<wire x1="-3.81" y1="-1.905" x2="-3.81" y2="-3.175" width="0.1524" layer="94"/> +<wire x1="-4.445" y1="-2.54" x2="-3.175" y2="-2.54" width="0.1524" layer="94"/> +<wire x1="-4.445" y1="2.54" x2="-3.175" y2="2.54" width="0.1524" layer="94"/> +<wire x1="-2.54" y1="5.08" x2="-2.54" y2="3.8862" width="0.1524" layer="94"/> +<wire x1="-2.54" y1="-3.9116" x2="-2.54" y2="-5.08" width="0.1524" layer="94"/> +<wire x1="5.08" y1="0" x2="-5.08" y2="5.08" width="0.4064" layer="94"/> +<wire x1="-5.08" y1="5.08" x2="-5.08" y2="-5.08" width="0.4064" layer="94"/> +<wire x1="-5.08" y1="-5.08" x2="5.08" y2="0" width="0.4064" layer="94"/> +<text x="2.54" y="5.715" size="1.778" layer="95">>NAME</text> +<text x="2.54" y="-5.08" size="1.778" layer="96">>VALUE</text> +<text x="-1.27" y="4.445" size="0.8128" layer="93" rot="R90">V+</text> +<text x="-1.27" y="-5.715" size="0.8128" layer="93" rot="R90">V-</text> +<pin name="-IN" x="-7.62" y="2.54" visible="pad" length="short" direction="in"/> +<pin name="+IN" x="-7.62" y="-2.54" visible="pad" length="short" direction="in"/> +<pin name="OUT" x="7.62" y="0" visible="pad" length="short" direction="out" rot="R180"/> +<pin name="V+" x="-2.54" y="7.62" visible="pad" length="short" direction="pwr" rot="R270"/> +<pin name="V-" x="-2.54" y="-7.62" visible="pad" length="short" direction="pwr" rot="R90"/> +</symbol> +<symbol name="AVRISP"> +<wire x1="-6.35" y1="-5.08" x2="8.89" y2="-5.08" width="0.4064" layer="94"/> +<wire x1="8.89" y1="-5.08" x2="8.89" y2="5.08" width="0.4064" layer="94"/> +<wire x1="8.89" y1="5.08" x2="-6.35" y2="5.08" width="0.4064" layer="94"/> +<wire x1="-6.35" y1="5.08" x2="-6.35" y2="-5.08" width="0.4064" layer="94"/> +<text x="-6.35" y="5.715" size="1.778" layer="95">>NAME</text> +<text x="-6.35" y="-7.62" size="1.778" layer="96">>VALUE</text> +<text x="-5.08" y="3.175" size="1.27" layer="95">MISO</text> +<text x="-5.08" y="0.635" size="1.27" layer="95">SCK</text> +<text x="-5.08" y="-1.905" size="1.27" layer="95">RST</text> +<text x="7.62" y="3.175" size="1.27" layer="95" rot="MR0">VCC</text> +<text x="7.62" y="0.635" size="1.27" layer="95" rot="MR0">MOSI</text> +<text x="7.62" y="-1.905" size="1.27" layer="95" rot="MR0">GND</text> +<pin name="MISO" x="-2.54" y="2.54" visible="off" length="short" direction="pas" function="dot"/> +<pin name="VCC" x="5.08" y="2.54" visible="off" length="short" direction="pas" function="dot" rot="R180"/> +<pin name="SCK" x="-2.54" y="0" visible="off" length="short" direction="pas" function="dot"/> +<pin name="MOSI" x="5.08" y="0" visible="off" length="short" direction="pas" function="dot" rot="R180"/> +<pin name="RST" x="-2.54" y="-2.54" visible="off" length="short" direction="pas" function="dot"/> +<pin name="GND" x="5.08" y="-2.54" visible="off" length="short" direction="pas" function="dot" rot="R180"/> +</symbol> +<symbol name="R-US"> +<wire x1="-2.54" y1="0" x2="-2.159" y2="1.016" width="0.2032" layer="94"/> +<wire x1="-2.159" y1="1.016" x2="-1.524" y2="-1.016" width="0.2032" layer="94"/> +<wire x1="-1.524" y1="-1.016" x2="-0.889" y2="1.016" width="0.2032" layer="94"/> +<wire x1="-0.889" y1="1.016" x2="-0.254" y2="-1.016" width="0.2032" layer="94"/> +<wire x1="-0.254" y1="-1.016" x2="0.381" y2="1.016" width="0.2032" layer="94"/> +<wire x1="0.381" y1="1.016" x2="1.016" y2="-1.016" width="0.2032" layer="94"/> +<wire x1="1.016" y1="-1.016" x2="1.651" y2="1.016" width="0.2032" layer="94"/> +<wire x1="1.651" y1="1.016" x2="2.286" y2="-1.016" width="0.2032" layer="94"/> +<wire x1="2.286" y1="-1.016" x2="2.54" y2="0" width="0.2032" layer="94"/> +<text x="-3.81" y="1.4986" size="1.778" layer="95">>NAME</text> +<text x="-3.81" y="-3.302" size="1.778" layer="96">>VALUE</text> +<pin name="2" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/> +<pin name="1" x="-5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1"/> +</symbol> +<symbol name="C-US"> +<wire x1="0" y1="-2.54" x2="0" y2="2.54" width="0.254" layer="94"/> +<wire x1="1.016" y1="0" x2="2.54" y2="0" width="0.1524" layer="94"/> +<wire x1="1" y1="0" x2="1.8542" y2="2.4892" width="0.254" layer="94" curve="-37.878202"/> +<wire x1="1.8504" y1="-2.4668" x2="1.0161" y2="0" width="0.254" layer="94" curve="-37.373024"/> +<text x="-1.27" y="3.175" size="1.778" layer="95">>NAME</text> +<text x="-1.27" y="-5.08" size="1.778" layer="96">>VALUE</text> +<pin name="1" x="-2.54" y="0" visible="off" length="short" direction="pas" swaplevel="1"/> +<pin name="2" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/> +</symbol> +</symbols> +<devicesets> +<deviceset name="OPAMP" prefix="IC"> +<description><b>Rail-to-Rail Operational Amplifiers</b><p> +Single-Supply, MicroAmplifier(TM) Series</description> +<gates> +<gate name="G$1" symbol="OPAMP" x="0" y="0"/> +</gates> +<devices> +<device name="SOT23-5" package="SOT23-5"> +<connects> +<connect gate="G$1" pin="+IN" pad="3"/> +<connect gate="G$1" pin="-IN" pad="4"/> +<connect gate="G$1" pin="OUT" pad="1"/> +<connect gate="G$1" pin="V+" pad="5"/> +<connect gate="G$1" pin="V-" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="SO08" package="SO08"> +<connects> +<connect gate="G$1" pin="+IN" pad="3"/> +<connect gate="G$1" pin="-IN" pad="2"/> +<connect gate="G$1" pin="OUT" pad="6"/> +<connect gate="G$1" pin="V+" pad="7"/> +<connect gate="G$1" pin="V-" pad="4"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +<deviceset name="AVRISP"> +<gates> +<gate name="G$1" symbol="AVRISP" x="0" y="0"/> +</gates> +<devices> +<device name="SMD" package="2X03SMD"> +<connects> +<connect gate="G$1" pin="GND" pad="6"/> +<connect gate="G$1" pin="MISO" pad="1"/> +<connect gate="G$1" pin="MOSI" pad="4"/> +<connect gate="G$1" pin="RST" pad="5"/> +<connect gate="G$1" pin="SCK" pad="3"/> +<connect gate="G$1" pin="VCC" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="" package="2X03"> +<connects> +<connect gate="G$1" pin="GND" pad="6"/> +<connect gate="G$1" pin="MISO" pad="1"/> +<connect gate="G$1" pin="MOSI" pad="4"/> +<connect gate="G$1" pin="RST" pad="5"/> +<connect gate="G$1" pin="SCK" pad="3"/> +<connect gate="G$1" pin="VCC" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +<deviceset name="RES-US" prefix="R" uservalue="yes"> +<description><b>Resistor (US Symbol)</b> +<p> +Variants with postfix FAB are widened to allow the routing of internal traces</description> +<gates> +<gate name="G$1" symbol="R-US" x="0" y="0"/> +</gates> +<devices> +<device name="1206" package="R1206"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="1206W" package="R1206W"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="1206FAB" package="R1206FAB"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +<deviceset name="CAP-US" prefix="C"> +<gates> +<gate name="G$1" symbol="C-US" x="0" y="0"/> +</gates> +<devices> +<device name="1206" package="C1206"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="1206K" package="C1206K"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +<device name="1206FAB" package="C1206FAB"> +<connects> +<connect gate="G$1" pin="1" pad="1"/> +<connect gate="G$1" pin="2" pad="2"/> +</connects> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +</devicesets> +</library> +<library name="supply1" urn="urn:adsk.eagle:library:371"> +<description><b>Supply Symbols</b><p> + GND, VCC, 0V, +5V, -5V, etc.<p> + Please keep in mind, that these devices are necessary for the + automatic wiring of the supply signals.<p> + The pin name defined in the symbol is identical to the net which is to be wired automatically.<p> + In this library the device names are the same as the pin names of the symbols, therefore the correct signal names appear next to the supply symbols in the schematic.<p> + <author>Created by librarian@cadsoft.de</author></description> +<packages> +</packages> +<symbols> +<symbol name="GND" urn="urn:adsk.eagle:symbol:26925/1" library_version="1"> +<wire x1="-1.905" y1="0" x2="1.905" y2="0" width="0.254" layer="94"/> +<text x="-2.54" y="-2.54" size="1.778" layer="96">>VALUE</text> +<pin name="GND" x="0" y="2.54" visible="off" length="short" direction="sup" rot="R270"/> +</symbol> +<symbol name="+5V" urn="urn:adsk.eagle:symbol:26929/1" library_version="1"> +<wire x1="1.27" y1="-1.905" x2="0" y2="0" width="0.254" layer="94"/> +<wire x1="0" y1="0" x2="-1.27" y2="-1.905" width="0.254" layer="94"/> +<text x="-2.54" y="-5.08" size="1.778" layer="96" rot="R90">>VALUE</text> +<pin name="+5V" x="0" y="-2.54" visible="off" length="short" direction="sup" rot="R90"/> +</symbol> +</symbols> +<devicesets> +<deviceset name="GND" urn="urn:adsk.eagle:component:26954/1" prefix="GND" library_version="1"> +<description><b>SUPPLY SYMBOL</b></description> +<gates> +<gate name="1" symbol="GND" x="0" y="0"/> +</gates> +<devices> +<device name=""> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +<deviceset name="+5V" urn="urn:adsk.eagle:component:26963/1" prefix="P+" library_version="1"> +<description><b>SUPPLY SYMBOL</b></description> +<gates> +<gate name="1" symbol="+5V" x="0" y="0"/> +</gates> +<devices> +<device name=""> +<technologies> +<technology name=""/> +</technologies> +</device> +</devices> +</deviceset> +</devicesets> +</library> +<library name="SparkFun-Resistors" urn="urn:adsk.eagle:library:532"> +<description><h3>SparkFun Resistors</h3> +This library contains resistors. Reference designator:R. +<br> +<br> +We've spent an enormous amount of time creating and checking these footprints and parts, but it is <b> the end user's responsibility</b> to ensure correctness and suitablity for a given componet or application. +<br> +<br>If you enjoy using this library, please buy one of our products at <a href=" www.sparkfun.com">SparkFun.com</a>. +<br> +<br> +<b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ +<br> +<br> +You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description> +<packages> +<package name="TRIMPOT-PTH-3386U" urn="urn:adsk.eagle:footprint:39632/1" library_version="1"> +<description><h3>Trimpot - PTH, Trimpot w/ finger-adjustable knob</h3> +<p><a href="https://www.sparkfun.com/products/9806">Trimpot 10K with Knob</a> (COM-09806)</p> +<p><a href="http://www.sparkfun.com/datasheets/Components/General/TSR-3386.pdf">Datasheet</a></p></description> +<circle x="0" y="0.575" radius="4" width="0.127" layer="51"/> +<wire x1="-4.765" y1="-4.765" x2="-4" y2="-4.765" width="0.2032" layer="21"/> +<wire x1="4" y1="-4.765" x2="4.765" y2="-4.765" width="0.2032" layer="21"/> +<wire x1="4.765" y1="-4.765" x2="4.765" y2="4.765" width="0.2032" layer="21"/> +<wire x1="4.765" y1="4.765" x2="-4.765" y2="4.765" width="0.2032" layer="21"/> +<wire x1="-4.765" y1="4.765" x2="-4.765" y2="-4.765" width="0.2032" layer="21"/> +<wire x1="-1.5" y1="2.2" x2="-0.5" y2="2.2" width="0.127" layer="51"/> +<wire x1="-0.5" y1="2.2" x2="-0.5" y2="-1.8" width="0.127" layer="51"/> +<wire x1="-0.5" y1="-1.8" x2="0.5" y2="-1.8" width="0.127" layer="51"/> +<wire x1="0.5" y1="-1.8" x2="0.5" y2="2.2" width="0.127" layer="51"/> +<wire x1="0.5" y1="2.2" x2="1.5" y2="2.2" width="0.127" layer="51"/> +<wire x1="0" y1="3.7" x2="-1.5" y2="2.2" width="0.127" layer="51"/> +<wire x1="1.5" y1="2.2" x2="0" y2="3.7" width="0.127" layer="51"/> +<wire x1="-4" y1="-4.765" x2="-4" y2="-4.365" width="0.2032" layer="21"/> +<wire x1="-4" y1="-4.365" x2="4" y2="-4.365" width="0.2032" layer="21"/> +<wire x1="4" y1="-4.365" x2="4" y2="-4.765" width="0.2032" layer="21"/> +<pad name="1" x="-2.54" y="-0.015" drill="1.016" diameter="1.8796" shape="square"/> +<pad name="2" x="0" y="-0.015" drill="1.016" diameter="1.8796"/> +<pad name="3" x="2.54" y="-0.015" drill="1.016" diameter="1.8796"/> +<text x="0" y="4.953" size="0.6096" layer="25" font="vector" ratio="20" align="bottom-center">>Name</text> +<text x="0" y="-4.572" size="0.6096" layer="27" font="vector" ratio="20" align="top-center">>Value</text> +</package> +<package name="TRIMPOT-SMD-5MM" urn="urn:adsk.eagle:footprint:39633/1" library_version="1"> +<description><h3>Trimpot - SMD, 5mm Square, Closed-Frame</h3> +<p>Used on e.g. <a href="https://www.sparkfun.com/products/13613">IOIO-OTG - V2.2</a></p> +<p><a href="http://www.vishay.com/docs/51008/ts53.pdf">Datasheet</a> (TS53YL502MR10)</p></description> +<wire x1="-2.5" y1="-2.14" x2="-2.5" y2="2.86" width="0.127" layer="51"/> +<wire x1="-2.5" y1="2.86" x2="2.5" y2="2.86" width="0.127" layer="51"/> +<wire x1="2.5" y1="2.86" x2="2.5" y2="-2.14" width="0.127" layer="51"/> +<wire x1="2.5" y1="-2.14" x2="-2.5" y2="-2.14" width="0.127" layer="51"/> +<wire x1="-1.4" y1="2.96" x2="-2.6" y2="2.96" width="0.2032" layer="21"/> +<wire x1="-2.6" y1="2.96" x2="-2.6" y2="1.56" width="0.2032" layer="21"/> +<wire x1="1.409221875" y1="2.96" x2="2.6" y2="2.96" width="0.2032" layer="21"/> +<wire x1="2.6" y1="2.96" x2="2.6" y2="1.56" width="0.2032" layer="21"/> +<wire x1="-2.09398125" y1="-2.24" x2="-2.6" y2="-2.24" width="0.2032" layer="21"/> +<wire x1="-2.6" y1="-2.24" x2="-2.6" y2="-1.54" width="0.2032" layer="21"/> +<wire x1="2.1" y1="-2.24" x2="2.6" y2="-2.24" width="0.2032" layer="21"/> +<wire x1="2.6" y1="-2.24" x2="2.6" y2="-1.54" width="0.2032" layer="21"/> +<smd name="A" x="1.15" y="-2.54" dx="1.3" dy="1.3" layer="1"/> +<smd name="B" x="0" y="3.2385" dx="2" dy="1.4016" layer="1" rot="R270"/> +<smd name="C" x="-1.15" y="-2.54" dx="1.3" dy="1.3" layer="1"/> +<text x="-2.794" y="0" size="0.6096" layer="25" font="vector" ratio="20" rot="R90" align="bottom-center">>Name</text> +<text x="2.794" y="0" size="0.6096" layer="27" font="vector" ratio="20" rot="R90" align="top-center">>Value</text> +</package> +<package name="TRIMPOT-SMD-3MM-CLOSED" urn="urn:adsk.eagle:footprint:39634/1" library_version="1"> +<description><h3>Trimpot - SMD, 3mm Square, Closed-Frame</h3> +<p>Used on e.g. <a href="https://www.sparkfun.com/products/12779">EasyDriver - Stepper Motor Driver</a></p> +<p><a href="http://www.bitechnologies.com/pdfs/22.pdf">Datasheet</a> (22AR10KTR)</p></description> +<wire x1="-1" y1="1.6" x2="-1.6" y2="1.6" width="0.2032" layer="21"/> +<wire x1="-1.6" y1="1.6" x2="-1.6" y2="-1.6" width="0.2032" layer="21"/> +<wire x1="1" y1="1.6" x2="1.6" y2="1.6" width="0.2032" layer="21"/> +<wire x1="1.6" y1="1.6" x2="1.6" y2="-1.6" width="0.2032" layer="21"/> +<smd name="1" x="-0.85" y="-1.65" dx="1" dy="0.9" layer="1"/> +<smd name="2" x="0" y="1.65" dx="1.1" dy="0.9" layer="1"/> +<smd name="3" x="0.85" y="-1.65" dx="1" dy="0.9" layer="1"/> +<text x="-1.778" y="0" size="0.6096" layer="25" font="vector" ratio="20" rot="R90" align="bottom-center">>Name</text> +<text x="1.778" y="0" size="0.6096" layer="27" font="vector" ratio="20" rot="R90" align="top-center">>Value</text> +</package> +<package name="TRIMPOT-SMD-TC33X" urn="urn:adsk.eagle:footprint:39635/1" library_version="1"> +<description><h3>Bourns TC33X Trimpot - SMD, 3mm Square, Open-Frame</h3> +<p>Used on e.g. <a href="https://www.sparkfun.com/products/13899">Shapeoko</a></p> +<p><a href="http://www.bourns.com/docs/Product-Datasheets/TC33.pdf">Datasheet</a> (TS53YL502MR10)</p></description> +<circle x="0" y="0" radius="1.15" width="0.1016" layer="51"/> +<wire x1="-1.45" y1="1.75" x2="-1.45" y2="-1.65" width="0.254" layer="51"/> +<wire x1="-1.45" y1="-1.65" x2="1.45" y2="-1.65" width="0.254" layer="51"/> +<wire x1="1.45" y1="-1.65" x2="1.45" y2="1.75" width="0.254" layer="51"/> +<wire x1="1.45" y1="1.75" x2="-1.45" y2="1.75" width="0.254" layer="51"/> +<wire x1="-1.45" y1="-0.4" x2="-1.45" y2="1.75" width="0.254" layer="21"/> +<wire x1="-1.45" y1="1.75" x2="-0.85" y2="1.75" width="0.254" layer="21"/> +<wire x1="1.45" y1="-0.4" x2="1.45" y2="1.75" width="0.254" layer="21"/> +<wire x1="1.45" y1="1.75" x2="0.85" y2="1.75" width="0.254" layer="21"/> +<wire x1="-1.8034" y1="2.5019" x2="1.8034" y2="2.5019" width="0.0508" layer="39"/> +<wire x1="1.8034" y1="2.5019" x2="1.8034" y2="-2.6289" width="0.0508" layer="39"/> +<wire x1="1.8034" y1="-2.6289" x2="-1.8034" y2="-2.6289" width="0.0508" layer="39"/> +<wire x1="-1.8034" y1="-2.6289" x2="-1.8034" y2="2.5019" width="0.0508" layer="39"/> +<smd name="1" x="-1" y="-1.825" dx="1.2" dy="1.2" layer="1"/> +<smd name="2" x="0" y="1.5" dx="1.5" dy="1.6" layer="1"/> +<smd name="3" x="1" y="-1.825" dx="1.2" dy="1.2" layer="1"/> +<text x="-1.905" y="0" size="0.6096" layer="25" font="vector" ratio="20" rot="R90" align="bottom-center">>NAME</text> +<text x="1.905" y="0" size="0.6096" layer="27" font="vector" ratio="20" rot="R90" align="top-center">>VALUE</text> +</package> +</packages> +<packages3d> +<package3d name="TRIMPOT-PTH-3386U" urn="urn:adsk.eagle:package:39662/1" type="box" library_version="1"> +<description>Trimpot - PTH, Trimpot w/ finger-adjustable knob +Trimpot 10K with Knob (COM-09806) +Datasheet</description> +<packageinstances> +<packageinstance name="TRIMPOT-PTH-3386U"/> +</packageinstances> +</package3d> +<package3d name="TRIMPOT-SMD-5MM" urn="urn:adsk.eagle:package:39663/1" type="box" library_version="1"> +<description>Trimpot - SMD, 5mm Square, Closed-Frame +Used on e.g. IOIO-OTG - V2.2 +Datasheet (TS53YL502MR10)</description> +<packageinstances> +<packageinstance name="TRIMPOT-SMD-5MM"/> +</packageinstances> +</package3d> +<package3d name="TRIMPOT-SMD-3MM-CLOSED" urn="urn:adsk.eagle:package:39665/1" type="box" library_version="1"> +<description>Trimpot - SMD, 3mm Square, Closed-Frame +Used on e.g. EasyDriver - Stepper Motor Driver +Datasheet (22AR10KTR)</description> +<packageinstances> +<packageinstance name="TRIMPOT-SMD-3MM-CLOSED"/> +</packageinstances> +</package3d> +<package3d name="TRIMPOT-SMD-TC33X" urn="urn:adsk.eagle:package:39666/1" type="box" library_version="1"> +<description>Bourns TC33X Trimpot - SMD, 3mm Square, Open-Frame +Used on e.g. Shapeoko +Datasheet (TS53YL502MR10)</description> +<packageinstances> +<packageinstance name="TRIMPOT-SMD-TC33X"/> +</packageinstances> +</package3d> +</packages3d> +<symbols> +<symbol name="TRIMPOT" urn="urn:adsk.eagle:symbol:39631/1" library_version="1"> +<description><h3>Trimming Potentiometer (Trimpot)</h3> +<p>Three-terminal potentiometers, with an adjustable wiper and two adjustable resistors. A pot can be used to create a configurable voltage divider, or as a variable resistor.</p> +<p>"Trimpots" are a subset of potentiometers, usually intended for "set-and-forget" applications. They're often more delicate than standard potentiometers - rated for fewer turns.</p></description> +<pin name="CCW" x="0" y="5.08" visible="off" length="short" direction="pas" swaplevel="1" rot="R270"/> +<pin name="CW" x="0" y="-5.08" visible="off" length="short" direction="pas" swaplevel="1" rot="R90"/> +<pin name="WIPER" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/> +<wire x1="0" y1="-2.54" x2="-1.016" y2="-2.159" width="0.1524" layer="94"/> +<wire x1="-1.016" y1="-2.159" x2="1.016" y2="-1.524" width="0.1524" layer="94"/> +<wire x1="1.016" y1="-1.524" x2="-1.016" y2="-0.889" width="0.1524" layer="94"/> +<wire x1="-1.016" y1="-0.889" x2="1.016" y2="-0.254" width="0.1524" layer="94"/> +<wire x1="1.016" y1="-0.254" x2="-1.016" y2="0.381" width="0.1524" layer="94"/> +<wire x1="-1.016" y1="0.381" x2="1.016" y2="1.016" width="0.1524" layer="94"/> +<wire x1="1.016" y1="1.016" x2="-1.016" y2="1.651" width="0.1524" layer="94"/> +<wire x1="-1.016" y1="1.651" x2="1.016" y2="2.286" width="0.1524" layer="94"/> +<wire x1="1.016" y1="2.286" x2="0" y2="2.54" width="0.1524" layer="94"/> +<text x="-1.524" y="2.54" size="1.778" layer="95" font="vector" rot="R90">>NAME</text> +<text x="1.524" y="2.54" size="1.778" layer="96" font="vector" rot="R90" align="top-left">>VALUE</text> +<polygon width="0.1524" layer="94"> +<vertex x="1.016" y="0"/> +<vertex x="2.54" y="-1.016"/> +<vertex x="2.54" y="1.016"/> +</polygon> +</symbol> +</symbols> +<devicesets> +<deviceset name="TRIMPOT" urn="urn:adsk.eagle:component:39768/1" prefix="VR" uservalue="yes" library_version="1"> +<description><h3>Trimming Potentiometer (Trimpot)</h3> +<p>Three-terminal potentiometers, with an adjustable wiper and two adjustable resistors. A pot can be used to create a configurable voltage divider, or as a variable resistor.</p> +<p>"Trimpots" are a subset of potentiometers, usually intended for "set-and-forget" applications. They're often more delicate than standard potentiometers - rated for fewer turns.</p> +<h4>Variants</h4> +<h5>PTH-KNOB - PTH Trimpot w/ finger-adjustable knob</h5> +<ul><li><a href="https://www.sparkfun.com/products/9806">Trimpot 10K with Knob</a> (COM-09806)</li> +<li><a href="http://www.sparkfun.com/datasheets/Components/General/TSR-3386.pdf">Datasheet</a> +</ul> +<h5>SMD-3MM-CLOSED-FRAME - SMD 3mm Square Closed-Frame Trimpot</h5> +<ul><li>Used on e.g. <a href="https://www.sparkfun.com/products/12779">EasyDriver - Stepper Motor Driver</a></li> +<li><a href="http://www.bitechnologies.com/pdfs/22.pdf">Datasheet</a> (22AR10KTR)</li></ul> +<h5>SMD-5MM - SMD 5mm Square Closed-Frame Trimpot</h5> +<ul><li>Used on e.g. <a href="https://www.sparkfun.com/products/13613">IOIO-OTG - V2.2</a></li> +<li><a href="http://www.vishay.com/docs/51008/ts53.pdf">Datasheet</a> (TS53YL502MR10)</li></ul> +<h5>SMD-3MM-1/10W-25% - 3mm Square Open-Frame Trimpot</h5> +<ul><li>Used on e.g. <a href="https://www.sparkfun.com/products/13899">SparkFun Shapeoko</a></li> +<li><a href="http://www.bourns.com/docs/Product-Datasheets/TC33.pdf">Datasheet</a> (TC33X-2-103E)</li></ul></description> +<gates> +<gate name="R?" symbol="TRIMPOT" x="0" y="0"/> +</gates> +<devices> +<device name="-PTH-10MM-KNOB-1/2W-10%" package="TRIMPOT-PTH-3386U"> +<connects> +<connect gate="R?" pin="CCW" pad="1"/> +<connect gate="R?" pin="CW" pad="3"/> +<connect gate="R?" pin="WIPER" pad="2"/> +</connects> +<package3dinstances> +<package3dinstance package3d_urn="urn:adsk.eagle:package:39662/1"/> +</package3dinstances> +<technologies> +<technology name=""> +<attribute name="PROD_ID" value="RES-09730"/> +<attribute name="SF_SKU" value="COM-09806"/> +<attribute name="VALUE" value="10k"/> +</technology> +</technologies> +</device> +<device name="-SMD-5MM-CLOSED-1/4W-20%" package="TRIMPOT-SMD-5MM"> +<connects> +<connect gate="R?" pin="CCW" pad="A"/> +<connect gate="R?" pin="CW" pad="C"/> +<connect gate="R?" pin="WIPER" pad="B"/> +</connects> +<package3dinstances> +<package3dinstance package3d_urn="urn:adsk.eagle:package:39663/1"/> +</package3dinstances> +<technologies> +<technology name=""> +<attribute name="PROD_ID" value="RES-11156"/> +<attribute name="VALUE" value="5k"/> +</technology> +</technologies> +</device> +<device name="-SMD-3MM-CLOSED-1/8W-20%" package="TRIMPOT-SMD-3MM-CLOSED"> +<connects> +<connect gate="R?" pin="CCW" pad="1"/> +<connect gate="R?" pin="CW" pad="3"/> +<connect gate="R?" pin="WIPER" pad="2"/> +</connects> +<package3dinstances> +<package3dinstance package3d_urn="urn:adsk.eagle:package:39665/1"/> +</package3dinstances> +<technologies> +<technology name=""> +<attribute name="PROD_ID" value="RES-09285"/> +<attribute name="VALUE" value="10k"/> +</technology> +</technologies> +</device> +<device name="-SMD-3MM-OPEN-1/10W-25%" package="TRIMPOT-SMD-TC33X"> +<connects> +<connect gate="R?" pin="CCW" pad="3"/> +<connect gate="R?" pin="CW" pad="1"/> +<connect gate="R?" pin="WIPER" pad="2"/> +</connects> +<package3dinstances> +<package3dinstance package3d_urn="urn:adsk.eagle:package:39666/1"/> +</package3dinstances> +<technologies> +<technology name=""> +<attribute name="PROD_ID" value="RES-12428"/> +<attribute name="VALUE" value="10k"/> +</technology> +</technologies> +</device> +</devices> +</deviceset> +</devicesets> +</library> +</libraries> +<attributes> +</attributes> +<variantdefs> +</variantdefs> +<classes> +<class number="0" name="default" width="0" drill="0"> +</class> +</classes> +<parts> +<part name="IC1" library="fab" deviceset="OPAMP" device="SOT23-5"/> +<part name="GND1" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="U$1" library="fab" deviceset="AVRISP" device="SMD"/> +<part name="R1" library="fab" deviceset="RES-US" device="1206" value="100k"/> +<part name="GND2" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="P+1" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="+5V" device=""/> +<part name="GND3" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="GND4" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="P+2" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="+5V" device=""/> +<part name="C1" library="fab" deviceset="CAP-US" device="1206" value="CAP-US1206 10uF"/> +<part name="R4" library="fab" deviceset="RES-US" device="1206" value="10k"/> +<part name="R5" library="fab" deviceset="RES-US" device="1206" value="10k"/> +<part name="GND6" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="P+3" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="+5V" device=""/> +<part name="C2" library="fab" deviceset="CAP-US" device="1206" value="CAP-US1206 10uF"/> +<part name="R6" library="fab" deviceset="RES-US" device="1206" value="10k"/> +<part name="R7" library="fab" deviceset="RES-US" device="1206" value="1M"/> +<part name="GND7" library="supply1" library_urn="urn:adsk.eagle:library:371" deviceset="GND" device=""/> +<part name="VR1" library="SparkFun-Resistors" library_urn="urn:adsk.eagle:library:532" deviceset="TRIMPOT" device="-SMD-3MM-CLOSED-1/8W-20%" package3d_urn="urn:adsk.eagle:package:39665/1" value="100k"/> +</parts> +<sheets> +<sheet> +<plain> +</plain> +<instances> +<instance part="IC1" gate="G$1" x="78.74" y="63.5"/> +<instance part="GND1" gate="1" x="76.2" y="53.34"/> +<instance part="U$1" gate="G$1" x="76.2" y="35.56"/> +<instance part="R1" gate="G$1" x="76.2" y="83.82"/> +<instance part="GND2" gate="1" x="93.98" y="25.4"/> +<instance part="P+1" gate="1" x="93.98" y="45.72"/> +<instance part="GND3" gate="1" x="63.5" y="25.4"/> +<instance part="GND4" gate="1" x="53.34" y="58.42"/> +<instance part="P+2" gate="1" x="76.2" y="73.66"/> +<instance part="C1" gate="G$1" x="114.3" y="63.5" rot="R180"/> +<instance part="R4" gate="G$1" x="116.84" y="104.14" rot="R90"/> +<instance part="R5" gate="G$1" x="116.84" y="86.36" rot="R90"/> +<instance part="GND6" gate="1" x="116.84" y="78.74"/> +<instance part="P+3" gate="1" x="116.84" y="111.76"/> +<instance part="C2" gate="G$1" x="127" y="86.36" rot="R270"/> +<instance part="R6" gate="G$1" x="134.62" y="73.66" rot="R90"/> +<instance part="R7" gate="G$1" x="58.42" y="38.1"/> +<instance part="GND7" gate="1" x="53.34" y="35.56"/> +<instance part="VR1" gate="R?" x="53.34" y="66.04"/> +</instances> +<busses> +</busses> +<nets> +<net name="GND" class="0"> +<segment> +<pinref part="IC1" gate="G$1" pin="V-"/> +<pinref part="GND1" gate="1" pin="GND"/> +</segment> +<segment> +<pinref part="U$1" gate="G$1" pin="GND"/> +<wire x1="81.28" y1="33.02" x2="93.98" y2="33.02" width="0.1524" layer="91"/> +<pinref part="GND2" gate="1" pin="GND"/> +<wire x1="93.98" y1="33.02" x2="93.98" y2="27.94" width="0.1524" layer="91"/> +</segment> +<segment> +<pinref part="GND3" gate="1" pin="GND"/> +<wire x1="63.5" y1="27.94" x2="63.5" y2="33.02" width="0.1524" layer="91"/> +<pinref part="U$1" gate="G$1" pin="RST"/> +<wire x1="63.5" y1="33.02" x2="73.66" y2="33.02" width="0.1524" layer="91"/> +</segment> +<segment> +<pinref part="GND6" gate="1" pin="GND"/> +<pinref part="R5" gate="G$1" pin="1"/> +<pinref part="C2" gate="G$1" pin="2"/> +<wire x1="127" y1="81.28" x2="116.84" y2="81.28" width="0.1524" layer="91"/> +<junction x="116.84" y="81.28"/> +</segment> +<segment> +<pinref part="GND7" gate="1" pin="GND"/> +<pinref part="R7" gate="G$1" pin="1"/> +</segment> +<segment> +<pinref part="VR1" gate="R?" pin="CW"/> +<pinref part="GND4" gate="1" pin="GND"/> +</segment> +</net> +<net name="+5V" class="0"> +<segment> +<pinref part="U$1" gate="G$1" pin="VCC"/> +<wire x1="81.28" y1="38.1" x2="93.98" y2="38.1" width="0.1524" layer="91"/> +<pinref part="P+1" gate="1" pin="+5V"/> +<wire x1="93.98" y1="38.1" x2="93.98" y2="43.18" width="0.1524" layer="91"/> +</segment> +<segment> +<pinref part="P+2" gate="1" pin="+5V"/> +<pinref part="IC1" gate="G$1" pin="V+"/> +</segment> +<segment> +<pinref part="P+3" gate="1" pin="+5V"/> +<pinref part="R4" gate="G$1" pin="2"/> +</segment> +</net> +<net name="N$1" class="0"> +<segment> +<pinref part="U$1" gate="G$1" pin="MISO"/> +<wire x1="73.66" y1="38.1" x2="63.5" y2="38.1" width="0.1524" layer="91"/> +<pinref part="IC1" gate="G$1" pin="+IN"/> +<wire x1="63.5" y1="38.1" x2="63.5" y2="60.96" width="0.1524" layer="91"/> +<wire x1="63.5" y1="60.96" x2="71.12" y2="60.96" width="0.1524" layer="91"/> +<pinref part="R7" gate="G$1" pin="2"/> +<junction x="63.5" y="38.1"/> +</segment> +</net> +<net name="N$3" class="0"> +<segment> +<pinref part="IC1" gate="G$1" pin="-IN"/> +<wire x1="58.42" y1="66.04" x2="63.5" y2="66.04" width="0.1524" layer="91"/> +<wire x1="63.5" y1="66.04" x2="71.12" y2="66.04" width="0.1524" layer="91"/> +<wire x1="63.5" y1="66.04" x2="63.5" y2="83.82" width="0.1524" layer="91"/> +<junction x="63.5" y="66.04"/> +<pinref part="R1" gate="G$1" pin="1"/> +<wire x1="63.5" y1="83.82" x2="71.12" y2="83.82" width="0.1524" layer="91"/> +<pinref part="VR1" gate="R?" pin="WIPER"/> +</segment> +</net> +<net name="OA_OUTPUT" class="0"> +<segment> +<pinref part="R1" gate="G$1" pin="2"/> +<wire x1="81.28" y1="83.82" x2="93.98" y2="83.82" width="0.1524" layer="91"/> +<wire x1="93.98" y1="83.82" x2="93.98" y2="63.5" width="0.1524" layer="91"/> +<pinref part="IC1" gate="G$1" pin="OUT"/> +<wire x1="93.98" y1="63.5" x2="86.36" y2="63.5" width="0.1524" layer="91"/> +<wire x1="93.98" y1="63.5" x2="109.22" y2="63.5" width="0.1524" layer="91"/> +<junction x="93.98" y="63.5"/> +<pinref part="C1" gate="G$1" pin="2"/> +</segment> +</net> +<net name="N$4" class="0"> +<segment> +<pinref part="U$1" gate="G$1" pin="MOSI"/> +<wire x1="81.28" y1="35.56" x2="134.62" y2="35.56" width="0.1524" layer="91"/> +<wire x1="134.62" y1="35.56" x2="134.62" y2="63.5" width="0.1524" layer="91"/> +<pinref part="C1" gate="G$1" pin="1"/> +<wire x1="134.62" y1="63.5" x2="116.84" y2="63.5" width="0.1524" layer="91"/> +<pinref part="R6" gate="G$1" pin="1"/> +<wire x1="134.62" y1="68.58" x2="134.62" y2="63.5" width="0.1524" layer="91"/> +<junction x="134.62" y="63.5"/> +</segment> +</net> +<net name="N$5" class="0"> +<segment> +<wire x1="127" y1="93.98" x2="134.62" y2="93.98" width="0.1524" layer="91"/> +<pinref part="C2" gate="G$1" pin="1"/> +<wire x1="127" y1="88.9" x2="127" y2="93.98" width="0.1524" layer="91"/> +<pinref part="R4" gate="G$1" pin="1"/> +<pinref part="R5" gate="G$1" pin="2"/> +<wire x1="116.84" y1="91.44" x2="116.84" y2="93.98" width="0.1524" layer="91"/> +<wire x1="116.84" y1="93.98" x2="116.84" y2="99.06" width="0.1524" layer="91"/> +<wire x1="127" y1="93.98" x2="116.84" y2="93.98" width="0.1524" layer="91"/> +<junction x="127" y="93.98"/> +<junction x="116.84" y="93.98"/> +<pinref part="R6" gate="G$1" pin="2"/> +<wire x1="134.62" y1="78.74" x2="134.62" y2="93.98" width="0.1524" layer="91"/> +</segment> +</net> +</nets> +</sheet> +</sheets> +</schematic> +</drawing> +<compatibility> +<note version="8.2" severity="warning"> +Since Version 8.2, EAGLE supports online libraries. The ids +of those online libraries will not be understood (or retained) +with this version. +</note> +<note version="8.3" severity="warning"> +Since Version 8.3, EAGLE supports URNs for individual library +assets (packages, symbols, and devices). The URNs of those assets +will not be understood (or retained) with this version. +</note> +<note version="8.3" severity="warning"> +Since Version 8.3, EAGLE supports the association of 3D packages +with devices in libraries, schematics, and board files. Those 3D +packages will not be understood (or retained) with this version. +</note> +</compatibility> +</eagle> diff --git a/static/designs/10_audio_top.png b/static/designs/10_audio_top.png new file mode 100644 index 0000000000000000000000000000000000000000..e69350a349735e7c4989636fa6893d431e8302cf Binary files /dev/null and b/static/designs/10_audio_top.png differ diff --git a/static/designs/10_sampler.c b/static/designs/10_sampler.c new file mode 100644 index 0000000000000000000000000000000000000000..fdb158d92a0c4d69eb888185c4eb2ddd96075f41 --- /dev/null +++ b/static/designs/10_sampler.c @@ -0,0 +1,241 @@ +// +// sampler.c +// based on hello.ftdi.44.echo.c +// +// 115200 baud FTDI character echo, with flash string +// +// set lfuse to 0x5E for 20 MHz xtal +// +// Neil Gershenfeld +// 12/8/10 +// Erik Strand +// 11/6/2018 +// +// (c) Massachusetts Institute of Technology 2010 +// This work may be reproduced, modified, distributed, +// performed, and displayed for any purpose. Copyright is +// retained and must be preserved. The work is provided +// as is; no warranty is provided, and users accept all +// liability. +// + +#include <avr/io.h> +#include <util/delay.h> +#include <avr/pgmspace.h> + +#define output(directions,pin) (directions |= pin) // set port direction for output +#define set(port,pin) (port |= pin) // set port pin +#define clear(port,pin) (port &= (~pin)) // clear port pin +#define pin_test(pins,pin) (pins & pin) // test for port pin +#define bit_test(byte,bit) (byte & (1 << bit)) // test for bit set +#define bit_delay_time 8.5 // bit delay for 115200 with overhead +#define bit_delay() _delay_us(bit_delay_time) // RS232 bit delay +#define half_bit_delay() _delay_us(bit_delay_time/2) // RS232 half bit delay +#define char_delay() _delay_ms(10) // char delay + +#define serial_port PORTA +#define serial_direction DDRA +#define serial_pins PINA +#define serial_pin_in (1 << PA0) +#define serial_pin_out (1 << PA1) + +#define led_pin (1 << PB2) +#define input_pin (1 << PA5) + +void get_char(volatile unsigned char *pins, unsigned char pin, char *rxbyte) { + // + // read character into rxbyte on pins pin + // assumes line driver (inverts bits) + // + *rxbyte = 0; + while (pin_test(*pins,pin)) + // + // wait for start bit + // + ; + // + // delay to middle of first data bit + // + half_bit_delay(); + bit_delay(); + // + // unrolled loop to read data bits + // + if pin_test(*pins,pin) + *rxbyte |= (1 << 0); + else + *rxbyte |= (0 << 0); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 1); + else + *rxbyte |= (0 << 1); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 2); + else + *rxbyte |= (0 << 2); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 3); + else + *rxbyte |= (0 << 3); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 4); + else + *rxbyte |= (0 << 4); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 5); + else + *rxbyte |= (0 << 5); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 6); + else + *rxbyte |= (0 << 6); + bit_delay(); + if pin_test(*pins,pin) + *rxbyte |= (1 << 7); + else + *rxbyte |= (0 << 7); + // + // wait for stop bit + // + bit_delay(); + half_bit_delay(); + } + +void put_char(volatile unsigned char *port, unsigned char pin, char txchar) { + // + // send character in txchar on port pin + // assumes line driver (inverts bits) + // + // start bit + // + clear(*port,pin); + bit_delay(); + // + // unrolled loop to write data bits + // + if bit_test(txchar,0) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,1) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,2) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,3) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,4) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,5) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,6) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + if bit_test(txchar,7) + set(*port,pin); + else + clear(*port,pin); + bit_delay(); + // + // stop bit + // + set(*port,pin); + bit_delay(); + // + // char delay + // + bit_delay(); + } + +void put_string(volatile unsigned char *port, unsigned char pin, char *str) { + // + // print a null-terminated string + // + static int index; + index = 0; + do { + put_char(port, pin, str[index]); + ++index; + } while (str[index] != 0); + } + +#define input_pin (1 << PA5) + +int main(void) { + // Set clock divider to /1 + CLKPR = (1 << CLKPCE); + CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0); + + // Initialize serial output pins + set(serial_port, serial_pin_out); + output(serial_direction, serial_pin_out); + + // Initialize the input pin. + DDRA &= ~input_pin; + + // Make sure power is getting to the ADC. + PRR &= ~1u; + + // Turn on the ADC. + ADCSRA |= (1u << 7); + + // Use VCC as the reference voltage, and connect the ADC to PA5. + ADMUX = 0u; + ADMUX |= 0b00000101; + + // Make ADC samples "left adjusted" so that we only have to read one register + // to get the 8 most significant bits. + ADCSRB |= (1u << 4); + + // Note: I should configure the ADC's clock divider. + // I don't bother here since neither sample rate nor accuracy is yet a concern. + + // We'll store audio samples here. + uint8_t samples[256]; + uint8_t n_samples = 0; + + while (1) { + // Tell the ADC to record a value. + ADCSRA |= (1u << 6); + + // Wait until the reading is finished. + while (ADCSRA & (1u << 6)) {} + + // Read the result. + samples[0] = ADCH; + + // Write the result (in binary). + put_string(&serial_port, serial_pin_out, "hello.ftdi.44.echo.c: read sample \""); + for (int i = 1u; i <= 8; ++i) { + if (samples[0] & (1u << (8 - i))) { + put_char(&serial_port, serial_pin_out, '1'); + } else { + put_char(&serial_port, serial_pin_out, '0'); + } + } + put_char(&serial_port, serial_pin_out, 10); // new line + } +} diff --git a/static/img/10_amplification.jpg b/static/img/10_amplification.jpg new file mode 100644 index 0000000000000000000000000000000000000000..35e36ae069b823b3203c6e7834833488ea846c79 Binary files /dev/null and b/static/img/10_amplification.jpg differ diff --git a/static/img/10_board.png b/static/img/10_board.png new file mode 100644 index 0000000000000000000000000000000000000000..3f1eaae1678b092872a627776451717c734ab929 Binary files /dev/null and b/static/img/10_board.png differ diff --git a/static/img/10_isp_reuse.jpg b/static/img/10_isp_reuse.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37172584b152c330b69814d05fd5104014358eb6 Binary files /dev/null and b/static/img/10_isp_reuse.jpg differ diff --git a/static/img/10_nonlinear.png b/static/img/10_nonlinear.png new file mode 100644 index 0000000000000000000000000000000000000000..3c9f714b06705f8cc32dd78dbc2c3f3e594ca04a Binary files /dev/null and b/static/img/10_nonlinear.png differ diff --git a/static/img/10_oscillations.png b/static/img/10_oscillations.png new file mode 100644 index 0000000000000000000000000000000000000000..4269e05e32937a44b847f7f0f1a1e5ec0e220f4e Binary files /dev/null and b/static/img/10_oscillations.png differ diff --git a/static/img/10_phono_input.jpg b/static/img/10_phono_input.jpg new file mode 100644 index 0000000000000000000000000000000000000000..12f7430511ad448f4bc14829165cec3b85932b38 Binary files /dev/null and b/static/img/10_phono_input.jpg differ diff --git a/static/img/10_schematic.png b/static/img/10_schematic.png new file mode 100644 index 0000000000000000000000000000000000000000..193728965a5ef0af125ba4b6b9d755b0992e63a6 Binary files /dev/null and b/static/img/10_schematic.png differ diff --git a/static/img/10_square_waves.png b/static/img/10_square_waves.png new file mode 100644 index 0000000000000000000000000000000000000000..0f79c236f538841523dfc076d7f057dd26725ddd Binary files /dev/null and b/static/img/10_square_waves.png differ