Device Testing

Testing of the A/D Converter and the LEDs

A test was performed to see if the A/D converter on the pic was working correctly. The LEDs light up from left to right based on the value that was read from the A/D converter. Click here to see a movie clip of the test results...

 

Mouse Testing:

The mouse was taken apart and rewired enabling us to determine the USB consumption. It is important that we had sufficient power to operate the mouse and voice detection device simultaneously. It was determined that the mouse uses 29mA in the "light dim mode", and 52mA when the mouse is tracking (the LED gets brighter). These values are much lower than what we had initially predicted. The remaining 148mA (USB max is typically 200mA) is more than sufficient to operate the voice detection device.

Figure 1. Mouse testing setup


Analogue Circuit Testing:

The analogue filter was hooked up to a function generator and an oscilloscope in order to ensure that it had a reasonable frequency response. Initial tests revealed that the filter had:

  • a peaked at 1.5KHz
  • 3dB points at 500Hz and 4 KHz
  • 8dB points at 400Hz and 5.8KHz

At 120Hz the signal was virtually non-existent. In order to ensure that lower voice frequencies were not filtered out (an that the 60Hz white noise was completely eliminated), we changed several of the filter parameters. The final frequency response is as follows:

  • 1.3 KHz peak
  • 3 dB at 460 Hz and 3.6 KHz
  • 6 dB at 305 Hz and 5.2 KHz
  • 12 dB at 180 Hz and 8.7 KHz
  • 18 dB at 134 Hz and 11.4 KHz

Results indicate that the aliasing components/ noise levels are at an acceptable level.

This following is the results of the analogue signal circuit simulated in Micro Cap 7. As you can see only frequencies 150Hz- 4500Hz are passed into the pic to be processed.The 60Hz noise and 10000Hz (or greater) aliasing noise was filtered out.The second plot represents aliasing noise.We used a 4th order high-pass and a 4th order low-pass (resistor –capacitor-op amp) filter to accomplish this.


(Click on the plot it see a PDF version )

As you can see from the above similation, the anologue filter has 3db frequencies at approximately 150Hz and 4500Hz (typical human voice frequency range).


Software Testing:

A program was written to determine the low pass filter coefficients.

(Click here to view the code for the testing program)

The output of the program is as follows:

Results:
4 sample/cycle:
First order 3DB ratio = 0.7509617805480957
First order 6DB ratio = 0.5857863426208496
Second order 3DB ratio = 0.864356517791748
Second order 6DB ratio = 0.7667346000671387

8 sample/cycle:
First order 3DB ratio = 0.5857863426208496
First order 6DB ratio = 0.35640573501586914
Second order 3DB ratio = 0.6944746971130371
Second order 6DB ratio = 0.5298819541931152

16 sample/cycle:
First order 3DB ratio = 0.3318209648132324
First order 6DB ratio = 0.20199346542358398
Second order 3DB ratio = 0.4498744010925293
Second order 6DB ratio = 0.3215975761413574

32 sample/cycle:
First order 3DB ratio = 0.1793208122253418
First order 6DB ratio = 0.10701799392700195
Second order 3DB ratio = 0.26179075241088867
Second order 6DB ratio = 0.1777663230895996

64 sample/cycle:
First order 3DB ratio = 0.09365320205688477
First order 6DB ratio = 0.055086612701416016
Second order 3DB ratio = 0.14140748977661133
Second order 6DB ratio = 0.09343862533569336

128 sample/cycle:
First order 3DB ratio = 0.04792070388793945
First order 6DB ratio = 0.02794027328491211
Second order 3DB ratio = 0.0734248161315918
Second order 6DB ratio = 0.04789304733276367

256 sample/cycle:
First order 3DB ratio = 0.02424764633178711
First order 6DB ratio = 0.01407003402709961
Second order 3DB ratio = 0.037416934967041016
Second order 6DB ratio = 0.024243831634521484

4 sample/cycle:
First order 3DB ratio = 1.5537397589683533

8 sample/cycle:
First order 3DB ratio = 2.414218051433563

16 sample/cycle:
First order 3DB ratio = 5.02737563085556

32 sample/cycle:
First order 3DB ratio = 10.15314115381241

64 sample/cycle:
First order 3DB ratio = 20.355483129024506


 

>>Back to the Top<<