Audio Prototyping - Jacob-Dixon/MysticWhip GitHub Wiki
##Prototype Picture, Schematic and Board Layout
##Hardware and Software Inputs
###Hardware
||Input Name||Description of Signal||Expected Range|| ||Power||This input provides power to the audio circuit||5V with minimal sway|| ||RX data line||This is the recieve data line from the MCU.||5V square wave logic||
###Software
||Function Name||Description of expected outputs||Input Parameters||Return Value|| ||Serial.write(VOLUME_{Value})||This function changes the output volume of the SOMO-II||8 byte string Volume value (0 to 30)||Command Success byte string|| ||Serial.write(SLEEP,8)||This function puts the SOMO-II to sleep||8 byte string corresponding to sleep.||Command success byte string|| ||Serial.write(WAKEUP,8)||This function wakes up the SOMO-II||8 byte string corresponding to wakeup||Command success byte string|| ||Serial.write(PLAYSONG{X},8)||This function plays a specific audio track||8 byte string assigned to track||Command success byte string|| ||Serial.write(PAUSE,8)||This function pauses the current playing track||8 byte string assigned to pause||Command success byte string|| ||Serial.write(STOP,8)||This function stops the current playing track||8 byte string assigned to stop||Command success byte string||
-
The power input nominally holds steady at 5V even as the load changes with time (speaker).
-
The RX serial data line is an active low connection that operates on 5V square wave logic.
Below is a picture of a Play/Pause Command sent to the audio controller:
This is the play next song command sent over the serial RX line from the MCU:
##Hardware and Software Outputs
||Output Name||Description of Signal||Expected Range|| ||Audio Out - PWM||Sinusoidal signal with only the positive portion. V_pp of 5V||0 – 5V|| ||Audio Out - DAC||Sinusoidal signal with positive and negative components. V_pp of 20 mV||-20 to 20mV_pp|| ||TX data line||This is the transmit serial line with respect to the audio controller.||5V square wave logic|| ||Serial.write(QUERY_VOLUME,8)||Serial UART, This function asks the SOMO-II for the current volume||8 byte string|| ||Serial.write(QUERY_SONG,8)||Serial UART, This function asks the SOMO-II for the current song||8 byte string||
Below is a picture of the DAC output taken at a test point. This is a sinusoid signal what a varying amplitude (based on the volume of the audio):
This is the output of the PWM output of the audio chip. The amplitude of the signal depends on the volume of the song at a certain time.
##Testing and Debug points
###Hardware Test Points
||Test Point Name||Description of Signal||Range of Values|| ||Audio playing test LED||This testing LED is setup on pin 8 of the SOMO module. This pin allows a visual feedback||1.LED on = Play 2.LED off = Not playing|| ||Play/Stop Command sent from MCU LED||This testing LED is setup on pin 13 of the MCU. This LED provides visual feedback to the user to let them know the state of the MCU.||1.Play Command Sent (LED on) 2.Pause/Stop Command Sent (LED off)|| ||TX (respect to MCU)||This is the serial transmit line from the MCU to the audio chip. This debugging probe point will allow me to watch the data line and verify the bits sent over the line correspond to the commands sent.||0-5V square wave logic|| ||RX (respect to MCU)||This is the serial receive line from the audio chip to the MCU. This debugging probe point will allow me to watch the data line and verify the bits sent correspond to the expected response from the audio chip.||0-5V Square wave logic||
###Software Debug Locations===
||Debug Location||Description of signal and debug statement method||Expected outputs.|| ||Button de-bounce activate loop||When the button is held down for a long enough period of time (example, 10 clock cycles), the program will trigger the set of events that correspond to pressing the button||1. Serial write back to the debugging console. 2. Expected button action||