Goldilocks Analogue Production Test Plan v2

seeed_original.png

Goldilocks Analogue

Production Test Plan v2.0

phillip.stevens@gmail.com

Version History

Date

Version

Comments

Author

8.1.2016

v1.0

Initial version

Phillip Stevens

8.1.2016

v1.0.1

Typos

Phillip Stevens

25.1.2016

v1.1

Production Images

Phillip Stevens

20.2.2016

v2.0

Windows Tests

Phillip Stevens

NOTE: Offline copies (pdf, doc, docx) or paper copies are considered UNCONTROLLED.
The controlled version of this document is available at
Google Docs.


Product Introduction

The core of the Goldilocks Analogue, the ATmega1284p, is an Atmel megaAVR MCU that maintains compatibility with the classic megaAVR Arduino platform.

The external analogue output platform has been optimised to provide dual channel (stereo) output at up to 48k samples per second. To achieve this sample rate the ATmega1284p MCU is overclocked to 24.576MHz.

The MCP4822 12bit DAC provides dual (stereo) channels with output voltage range from 0V to 4.095V, which is fed to both a high current capable TS922A Op Amp and a dedicated TPA6132A2 Headphone Amplifier. These options allow optimal reproduction of audio, and DC level referenced analogue outputs.

The DAC is driven by the ATmega1284p USART1 in Master SPI Mode. This frees up the normal Arduino SPI bus to access the MicroSD card, or either of the two on-board SPI interface memory devices, 23LC1024 256kByte SRAM and AT25M01 256kByte EEPROM, without any timing constraints.

Audio input is managed by a MAX9814 AGC Microphone amplifier. Gain is adjustable from 40dB (default) up to 60dB. Additionally, a level shifted line-in is provided to support AC line level signal input. These signals are connected to the Arduino A7 and A6 pins respectively, and can be sampled by the integrated AVR 10bit ADC capability at maximally 15k samples per second.

The main AP6503 SMPS power supply is rated at 3A, and is filtered by a 2nd order LC network to provide a 5V AVcc. The Goldilocks Analogue also incorporates a CJA1117 3.3V 1A regulator for the MicroSD card, and 3.3V shields. The negative supply for the Op Amp is provided by a LTC1983 -3V inverting charge pump regulator and it is filtered by a 1st order LC network.

Contents

Version History

Product Introduction

Contents

Test Theory - Windows

Test Tools - Windows

Test Procedure - Windows

Connect USB - Test USB-Serial Interface

Connect 7V to 23V DC - Test power supplies

Upload Bootloader Program - Test MCU & I/O Ports

Upload Test / Shipping Program - Test SPI SRAM,  EEPROM, & Micro SD

Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.

Connect Oscilloscope - Test Operational Amp.

Test Theory - Linux

Test Tools - Linux

Test Procedure - Linux

Connect USB - Test USB-Serial Interface

Connect 7V to 23V DC - Test power supplies

Upload Bootloader Program - Test MCU & I/O Ports

Upload Test / Shipping Program - Test SPI SRAM & EEPROM

Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.

Connect Oscilloscope - Test Operational Amp.


Test Theory - Windows

  1. Connect USB - Test USB-Serial Interface
  2. Connect 7V to 23V DC - Test power supplies
  3. Upload Bootloader Program - Test MCU & I/O Ports
  4. Upload Test / Shipping Program - Test SPI SRAM, EEPROM, & Micro SD
  5. Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.
  6. Connect Oscilloscope - Test Operational Amp.

Test Tools - Windows

Hardware

Item

Tool

Qty

Description

1

amd64 Computer

1

with USB interfaces

2

Micro-B USB Cable

1

3

9V 2.1mm Power Supply

1

7V to 23V - 2A

4

Atmel AVRISP mkII

1

or Atmel ICE Basic

5

Multimeter

1

0-24V DC Voltage

6

Smartphone Headphones

1

TRRS with Electret Microphone

7

Oscilloscope

1

100kHz Audio (eg DSO Nano)

8

Micro SD 2GB FAT32

1

Containing some (any) files

Software

Item

Tool

Qty

Description

1

Windows OS

1

Windows 10 Home

2

Arduino IDE

1

v1.6.7 or greater

3

Goldilocks Variant Files

1

v1.0.3 or latest

4

Goldilocks Libraries

4

FreeRTOS, C Time, SPI RAM, DAC

5

bootloader

1

stk500boot_v2_goldilocks_analogue.hex

6

test & shipping program

1

GoldilocksAnalogueTestSuite.ino

Test Procedure - Windows

The following test procedure is provided to test all of the major components of the Goldilocks Analogue. It is not intended to be a diagnostic process however in the event of an error the basic method below can be followed to identify where an issue may be occurring.

  1. Connect USB - Test USB-Serial Interface

Visually inspect the board to ensure that there are no missing components, rotated or skewed components, or solder splash.

Connect the Micro-B USB cable between the Linux PC and the Goldilocks Analogue.

Move the Power Jumper to bridge the POWER USB pin and the centre pin.

P1080266 (2).JPG

TEST - Ensure that the BLUE 5V LED is alight.

Open the windows device manager to ensure that the FTDI 232 USB-Serial adaptor has been recognised by the Windows operating system.

FTDI_Arduino.png

TEST - Ensure that the FTDI 232 Serial (UART) IC USB interface is recognised.

  1. Connect 7V to 23V DC - Test power supplies

Connect a DC power supply capable of providing 2A at between 7V and 23V DC to the 2.1mm Barrel Jack. Nominal is 9V to 12V.

P1080264 (2).JPG

Using a multimeter probe the voltage on the DC POWER Pin shown on the image.

TEST - Ensure that 5V is present on the DC POWER Pin as shown.

Move the Power Jumper to bridge the POWER DC pin and the centre pin. (Opposite position shown in the image above).

TEST - Ensure that the BLUE 5V LED is alight.

TEST - Ensure that the correct voltage is present on each of 3 test points. (5V, 3.3V, & -3V).

  1. Upload Bootloader Program - Test MCU & I/O Ports

Connect the Atmel AVRISP mkII (or Atmel ICE-Basic) to a USB port on the Windows computer.

Then connect the Atmel AVRISP mkII (or Atmel ICE-Basic) to the standard in-circuit programming (ICSP) interface on the Goldilocks Analogue.

Test Environment - Windows 10 PC - Preparation in Advance of Testing

Using the Goldilocks Analogue User Manual, follow the instructions for:


Open the Arduino IDE.

Using the Goldilocks Analogue User Manual, follow the instructions for installing the Goldilocks Analogue Bootloader in ATmega1284p Firmware - Burning ATmega1284p Bootloader

Optional: Windows Command CLI AVRDUDE commands via Atmel AVRISP mkII

avrdude -p m1284p -Pusb -cavrisp2 -u -Uflash:w:stk500boot_v2_goldilocks_analogue.hex:a -Ulfuse:w:0xd7:m -Uhfuse:w:0xd8:m -Uefuse:w:0xfc:m -Ulock:w:0x0f:m

TEST - Ensure that the RED 13 LED flickers during the Arduino IDE programming.

TEST - Ensure that the programming output shows that the action was successful.

TEST - Ensure that the RED 13 LED is flashing on a 1 second cycle.

Disconnect the Atmel AVRISP mkII.

Using the Arduino Serial Terminal set to “No Line Ending” and “38400 baud”, type three exclamation marks, followed by SEND.

!!!

TEST - Ensure that the serial terminal has the following text appearing. See below.

IDE_Bootloader.png

Type a ? with CR into the serial terminal to test that the bootloader is working correctly. The output should be similar to below.

?

IDE_Bootloader_Stats.png

TEST - Ensure that the YELLOW Rx LED flickers when output is being sent to the serial terminal.

Press the RESET button indicated below and ensure that the same results appear on the serial terminal when the commands are entered.

P1080259 (3).JPG

TEST - Following RESET, ensure that the same bootloader text appears on the serial terminal as above when the previous commands are reentered.

OPTIONAL TESTS - Using the below bootloader commands in the serial terminal it is possible to test the MCU RAM, FLASH, EEPROM, and the connectivity of the I/O Ports to each of the Arduino PINs. These tests only need only be performed for the initial production samples, or if there is any doubt about manufacturing integrity.

0=Zero addr

?=CPU stats

@=EEPROM test

B=Blink LED

E=Dump EEPROM

F=Dump FLASH

H=Help

L=List I/O Ports

Q=Quit

R=Dump RAM

V=show interrupt Vectors

Y=Port blink

  1. Upload Test / Shipping Program - Test SPI SRAM,  EEPROM, & Micro SD

Ensure that the DTR switch is in the rightmost position, labeled DTR.

P1080259 (2).JPG

Insert a MicroSD Card of 2 GigaBytes size or greater into the Goldilocks Analogue Card Cage. The MicroSD card should have some files stored on it to allow a directory listing show these files.

Using the Arduino IDE open the GoldilocksAnalogueTestSuite example from the FreeRTOS library, and compile and upload it to the Goldilocks Analogue.

GA_TestSuite.png

TEST - Ensure that the GREEN Tx LED flickers when output is being sent from the serial terminal.

TEST - Ensure that the programming output shows that the action was successful. See above.

If required, press the RESET to obtain the serial output below, commencing with “Hello World!”.

GA_TestSuite_Output.png

TEST - Ensure that the serial terminal has the correct text appearing. See above. Directory listing will depend on the actual size and contents of the SD card used for testing.

TEST - Ensure that the SPI SRAM test result is PASSED.

TEST - Ensure that the SPI EEPROM test is PASSED.

TEST - Ensure that the SD card is seen as present and all SD card Information and files are correctly read and listed.

GA_TestSuite_Output2.png

TEST - Ensure that the Time output in the serial terminal continues to increment. Note that the actual time will be incorrect. The test is to ensure that the seconds increment.

  1. Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.

Connect standard TRRS (CTIA/Apple/Smartphone) headphones to the 3.5mm connector on the Goldilocks Analogue.

trrs-diagram3.jpg

Make a noise (say “one two”) into the microphone and check that there is an 8 second delay before hearing the sound in the headphones. There will be some background noise but the sound should be clear and recognisable.

TEST - Ensure that your sound (echo) can be heard in the 8 second delay loop.

  1. Connect Oscilloscope - Test Operational Amp.

Connect the oscilloscope to GND and then to each of the Op Amp outputs A and B in turn. When hearing a sound, ensure that a sound waveform can be seen on the oscilloscope. The waveform should be up to and within the range of 0v to 4.096V DC.

P1080267 (2).JPG

TEST - Ensure that both the Op Amp outputs A and B are biased around 2V DC.

TEST - Ensure that both the Op Amp outputs A and B are showing the audio waveform.

END - OF - TESTS


Test Theory - Linux

  1. Connect USB - Test USB-Serial Interface
  2. Connect 7V to 23V DC - Test power supplies
  3. Upload Bootloader Program - Test MCU & I/O Ports
  4. Upload Test / Shipping Program - Test SPI SRAM & EEPROM
  5. Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.
  6. Connect Oscilloscope - Test Operational Amp.

Test Tools - Linux

Hardware

Item

Tool

Qty

Description

1

amd64 Computer

1

with USB interfaces

2

Micro-B USB Cable

1

3

9V 2.1mm Power Supply

1

7V to 23V - 2A

4

Atmel AVRISP mkII

1

or Atmel ICE Basic

5

Multimeter

1

0-24V DC Voltage

6

Smartphone Headphones

1

TRRS with Electret Microphone

7

Oscilloscope

1

>100kHz Audio (eg DSO Nano)

Software

Item

Tool

Qty

Description

1

Linux OS

1

Tested Ubuntu 14.04.03 LTS

2

avrdude

1

v6.2 required for ICE Basic

3

moserial

1

Or cutecom or equivalent

4

bootloader

1

stk500boot_v2_goldilocks_analogue.hex

5

test & shipping program

1

GA_TestSuite.hex


Test Procedure - Linux

The following test procedure is provided to test all of the major components of the Goldilocks Analogue. It is not intended to be a diagnostic process however in the event of an error the basic method below can be followed to identify where an issue may be occurring.

  1. Connect USB - Test USB-Serial Interface

Visually inspect the board to ensure that there are no missing components, rotated or skewed components, or solder splash.

Connect the Micro-B USB cable between the Linux PC and the Goldilocks Analogue.

Move the Power Jumper to bridge the POWER USB pin and the centre pin.

P1080266 (2).JPG

TEST - Ensure that the BLUE 5V LED is alight.

Open a linux terminal window, and use the lsusb command to ensure that the FTDI 232 USB-Serial adaptor has been recognised by the linux operating system.

lsusb

lsusb_FTDI.png

TEST - Ensure that the FTDI 232 Serial (UART) IC USB interface is recognised.

  1. Connect 7V to 23V DC - Test power supplies

Connect a DC power supply capable of providing 2A at between 7V and 23V DC to the 2.1mm Barrel Jack. Nominal is 9V to 12V.

P1080264 (2).JPG

Using a multimeter probe the voltage on the DC POWER Pin shown on the image.

TEST - Ensure that 5V is present on the DC POWER Pin as shown.

Move the Power Jumper to bridge the POWER DC pin and the centre pin. (Opposite position shown in the image above).

TEST - Ensure that the BLUE 5V LED is alight.

TEST - Ensure that the correct voltage is present on each of 3 test points. (5V, 3.3V, & -3V).

  1. Upload Bootloader Program - Test MCU & I/O Ports

Connect the Atmel AVRISP mkII (or Atmel ICE-Basic) to a USB port on the linux computer.

Using the linux terminal window, use the lsusb command to ensure that the Atmel AVRISP mkII has been recognised by the linux operating system.

Then connect the Atmel AVRISP mkII (or Atmel ICE-Basic) to the standard in-circuit programming (ICSP) interface on the Goldilocks Analogue.

Open a linux serial terminal program (cutecom or moserial or similar) and open a serial session with /dev/ttyUSB0 at 38400 8n1.

moserial.png

Using the linux terminal window, use the following avrdude program command to program the ATmega1284p fuses and to program the bootloader .hex file to the Goldilocks Analogue.

For Atmel AVRISP mkII

avrdude -p m1284p -Pusb -cavrisp2 -u -Uflash:w:stk500boot_v2_goldilocks_analogue.hex:a -Ulfuse:w:0xd7:m -Uhfuse:w:0xd8:m -Uefuse:w:0xfc:m -Ulock:w:0xcf:m

For Atmel ICE

avrdude -p m1284p -Pusb -catmelice_isp -u -Uflash:w:stk500boot_v2_goldilocks_analogue.hex:a -Ulfuse:w:0xd7:m -Uhfuse:w:0xd8:m -Uefuse:w:0xfc:m -Ulock:w:0xcf:m

TEST - Ensure that the RED 13 LED flickers during the avrdude programming.

avrdude_1.pngavrdude_2.png

TEST - Ensure that the programming output shows that the action was successful.

TEST - Ensure that the RED 13 LED is flashing on a 1 second cycle.

Disconnect the Atmel AVRISP mkII (or Atmel ICE).

Using the serial terminal type three exclamation marks, followed by CR.

!!!

TEST - Ensure that the serial terminal has the following text appearing. See below.

bootloader.png

Type a ? with CR into the serial terminal to test that the bootloader is working correctly. The output should be similar to below.

?

bootloader_2.png

TEST - Ensure that the YELLOW Rx LED flickers when output is being sent to the serial terminal.

Press the RESET button indicated below and ensure that the same results appear on the serial terminal when the commands are entered.

P1080259 (3).JPG

TEST - Following RESET, ensure that the same bootloader text appears on the serial terminal as above when the previous commands are reentered.

OPTIONAL TESTS - Using the below bootloader commands in the serial terminal it is possible to test the MCU RAM, FLASH, EEPROM, and the connectivity of the I/O Ports to each of the Arduino PINs. These tests only need only be performed for the initial production samples, or if there is any doubt about manufacturing integrity.

0=Zero addr

?=CPU stats

@=EEPROM test

B=Blink LED

E=Dump EEPROM

F=Dump FLASH

H=Help

L=List I/O Ports

Q=Quit

R=Dump RAM

V=show interrupt Vectors

Y=Port blink

  1. Upload Test / Shipping Program - Test SPI SRAM & EEPROM

Ensure that the DTR switch is in the rightmost position, labeled DTR.

P1080259 (2).JPG

Using the linux terminal window, use the following avrdude program command to upload the GA_Test.hex file to the Goldilocks Analogue.

avrdude -pm1284p -cwiring -P/dev/ttyUSB0 -b38400 -D -Uflash:w:GA_TestSuite.hex:a

avrdude_3.png

TEST - Ensure that the GREEN Tx LED flickers when output is being sent from the serial terminal.

TEST - Ensure that the programming output shows that the action was successful. See above.

If required, press the RESET to obtain the serial output below, commencing with “Hello World!”.

serial_3.png

TEST - Ensure that the serial terminal has the correct text appearing. See above.

TEST - Ensure that the SPI SRAM test result is PASSED.

TEST - Ensure that the SPI EEPROM test is PASSED.

TEST - Ensure that the Time output in the serial terminal continues to increment.

  1. Connect TRRS Headphones - Test DAC, Headphone & Microphone Amp.

Connect standard TRRS (CTIA/Apple/Smartphone) headphones to the 3.5mm connector on the Goldilocks Analogue.

trrs-diagram3.jpg

Make a noise (say “one two”) into the microphone and check that there is an 8 second delay before hearing the sound in the headphones. There will be some background noise but the sound should be clear and recognisable.

TEST - Ensure that your sound (echo) can be heard in the 8 second delay loop.

  1. Connect Oscilloscope - Test Operational Amp.

Connect the oscilloscope to GND and then to each of the Op Amp outputs A and B in turn. When hearing a sound, ensure that a sound waveform can be seen on the oscilloscope. The waveform should be up to and within the range of 0v to 4.096V DC.

P1080267 (2).JPG

TEST - Ensure that both the Op Amp outputs A and B are biased around 2V DC.

TEST - Ensure that both the Op Amp outputs A and B are showing the audio waveform.

END - OF - TESTS

Picture1.png