USB IR Toy:Self-test documentation

From DP

Jump to: navigation , search

Irtoytest-490x424.png

Contents

Overview

The self-test is intended to be a quick way to weed out bad IR Toys during manufacturing. It tests the IR receiver and transmitter. It also verifies the PIC microcontroller operation: does it connect to a PC and enumerate properly. If so, the crystal (Q1) and caps (C5,6), USB caps (C3), reset resistor and diode (R1, D1), and USB jack (J1) are probably stuck on the board properly.

The self-test is a simple ASCII exchange that requires no software other than a basic terminal emulator. The single character 't' is sent in either upper or lower case. The USB IR Toy will run the self-test and send back a simple message indicating success or failure.

Start the self-test

To use the self-test:

  • Point the IR toy at something white, the IR LED needs to reflect back at the IR detectors during the test.
  • Open a terminal program to the USB IR Toy's serial port and type 't' or 'T'.

Results

If the test is successful the IR Toy will respond 'V101', where 1 is the hardware revision, and 01 is the firmware version. The indicator LED (I) lights for confirmation and inspection. The IR transmitter stays active so it can be checked with a digital camera.

If the test fails, it responds FAXY where X and Y are an ASCII representation of a binary error code described below.

IR demodulator errors

This test attempts to activate the IR demodulator with the IR LED. There are two possible receiver errors, both may happen at the same time.

  • FAX1 - IR receiver error (error bit 0)
  • FAX2 - IR LED error (error bit 1)
  • FAX3 - both errors (error bits 0 & 1)
  • FAX0 - No error (reserved)

Error 1

The infrared demodulator has an internal pull-up resistor that should hold the attached PIC pin high (1). If it doesn't, there could be an active remote control in the area, or a problem with the receiver (RX) or power filter (C4, R3).

Error 2

The self-test starts pulsing the IR LED at 38kHz, the 38kHz IR light should activate the receiver. The connected PIC pin should now be low (0). If the PIC pin is still high, there could be a problem with the IR LED, current limiting resistor (R4), transistor (T1), or transistor base resistor (R5).

This is a common failure if there's nothing to reflect the IR light back to the receiver. Point the IR Toy at a sheet of white paper to verify any failures.

Error 3

Error 1 and error 2.

Error 0

Reserved for future hardware versions.

Frequency detector errors

Reserved for future hardware. Not currently used!!!

This test attempts to activate the IR frequency detector with the IR LED. There are two possible errors, both may happen at the same time.

  • FA1Y - IR receiver error (error bit 0)
  • FA2Y - IR LED error (error bit 1)
  • FA3Y - both errors (error bits 0 & 1)
  • FA0Y - No detector error, demodulator error only

Error 1

The detector has a pull-up resistor that should hold the attached PIC pin high (1). If it doesn't, there could be an active remote control in the area, or a problem with the detector (RX2) or power filter (C3, R6).

Error 2

The self-test turns the IR LED solid on, the IR light should activate the detector. The connected PIC pin should now be low (0). If the PIC pin is still high, there could be a problem with the detector, IR LED, current limiting resistor (R4), transistor (T1), or transistor base resistor (R5).

The detector is not very sensitive. This is a common failure if there's nothing to reflect the IR light back to the detector. Point the IR Toy at a sheet of white paper to verify any failures.

Error 3

Error 1 and error 2.

Error 0

Reserved for future hardware versions.

Command line Utility

This utility is used to test the USB IR Toy during manufacturing.

NOTE: You must update the firmware to the latest version (currently v09).

Test Procedure

  1. Run the utility and connect the IR Toy to a USB port.
  2. Make sure that port is mapped to a virtual com port and take note of the port number.
  3. Make sure to hold the USB IR Toy near something white or a reflective surface.
  4. Hit any key to run the test, and hit ESC to stop

Current Version and Usage

-------------------------------------------------------------------------
IR TOY SELF TEST utility v0.1 (CC-0)
http://dangerousprototypes.com
-------------------------------------------------------------------------
Usage:
  C:\IRToySelfTest\IRToySelfTest.exe  -d device [-s speed]
  Example Usage:   C:\IRToySelfTest\IRToySelfTest.exe -d COM1
          Where: -d device is port e.g.  COM1
                 -s Speed is port Speed  default is 115200
-------------------------------------------------------------------------

Download

Grab the latest source and executable from SVN.