Shopping Cart

Posts

Troubleshooting Arduino USB Host Shield

USB Host Shield in a test fixture

USB Host Shield in a test fixture


Making electronic devices requires close interaction with parts – reversing supply polarity, overloading inputs, and inadvertently shorting pins with test leads. Consequently, occasional destroying of parts is natural and shall be anticipated. I have been in correspondence with several electronics enthusiasts helping them getting their shields fixed and since their problems look similar to what I see when doing post-manufacturing quality control I decided to share my testing procedure along with some pictures.

In the past, it was customary to include schematic with every electronic device documentation. Complex devices, such as oscilloscopes, spectrum analyzers and other test instruments used to have service manuals containing detailed calibration and repair procedures. At some point, service manuals and schematics disappeared from the documentation for various reasons – equipment users were left to deal with manufacturer’s support or rely on their own reverse engineering skills. With open source movement and general understanding that sharing information is beneficial, manufacturers resumed publishing schematic diagrams of their creations. This article presents next logical step – a service manual for Arduino USB Host Shield, sort of.

Much of the testing is performed using board test sketch, available from examples section on github. Two files are necessary – board_test.pde and board_test.h containing diagnostic messages. The sketch tests 4 major parts of the circuit – SPI interface, general purpose input/output pins (GPIO), quartz crystal oscillator, and finally USB SIE. The main loop is written so that any test can be turned off if necessary by commenting out a single line. GPIO lines are checked using a loopback adapter – a thing that connects GPIN0 to GPOUT0, GPIN1 to GPOUT1, and so on. This test is made optional – if you don’t connect GPIO lines as described, the test will print an error message and continue with the next test. Also, GPIO test is placed between short and long SPI tests. The reason for this is that due to MAX3421E internal organization both short SPI test (reading REVISION register) and GPIO read/write doesn’t require working crystal oscillator, whereas long SPI test (reading/writing any other register) will fail and stop if crystal is defective. Therefore, when I see short SPI and GPIO tests passed and long SPI test fail I know that it’s actually a crystal which is dead, not SPI.

In addition to board test program, you will need a multimeter with thin sharp test leads to measure voltage and resistance between board elements. Some of them are quite small so a magnifier is also handy. Certain steps of the test procedure call for time-base instrument. Modern digital mixed-signal oscilloscope is the best choice, however, since very few people can afford one, a method of visualizing SPI traffic with plain analog oscilloscope will also be demonstrated. Logic analyzer is handy, but optional. For testing USB transactions you will also need some sort of device connected to shield’s USB connector. I usually use USB flash drive as a test device.

The article as well as board test program is written for worst-case scenario, i.e., shield which was built from scratch or came from major rework like MAX3421E replacement due to applying 5 volts to 3.3V pin. The test program works the same way with all four configurations, however, manual tests are shown only for “Simple” configuration, i.e. one with level translators and receiving both 3.3V and 5V from Arduino Duemilanove or similar (no DC-DC converters). Testing other configurations is slightly different and will be noted in the text. Also, “Minimal” configuration calls for specific type of test device – I use digital camera.

Continue reading Troubleshooting Arduino USB Host Shield

Repairing front panel buttons of Tektronix 7904 oscilloscope.

Front panel interconnect board of Tektronix 7904

Front panel interconnect board of Tektronix 7904


I am a proud owner of several Tektronix 7000-series mainframes. Among them, 7904 500MHz 4-compartment oscilloscope is my bench workhorse. The screen is big enough, the bandwidth is adequate for majority of tasks I do, and absence of cooling fan makes it pleasantly quiet. In addition, the instrument is lightweight comparing to other 7000 mainframes and has legs mounted on the rear panel making it possible to put scope on the floor in a vertical position.

I became annoyed by malfunction of right buttons of both vertical and horizontal mode selectors (they failed to lock in place) and decided that my scope deserves some TLC. Besides fixing the buttons I also wanted to replace some dead illumination bulbs with LEDs. Mode switches are dual, with one switch in the pair dedicated to turning light bulb on/off. Bulbs are powered by 5V and dimming is implemented by means of two diode drops. So the 3V LED restricted to 10ma by a resistor shall work fine and even be able to dim a little. In addition, LED power is comsumption about 8% of a bulb.

The front panel buttons are mounted on a narrow PCB (called “A3- Front Panel Interconnect Board” in the service manual) running across the middle of the front panel. It can be easily accessed after removing side panels. There are several cables connected to the board on both sides, it is good idea to mark them before disconnecting. The title picture shows left side of the board (one close to horizontal bay “B”) with my marks on it. After pulling out cables I moved the PCB carefully towards the rear and to the side. The board bends easily and is somewhat accessible form the top of the instrument.

The button assembly is held in place by screws also used to mount upper plug-in guide bars in the plug-in compartment. Picture below shows location of the left ones (holding vertical mode buttons). After unscrewing four Phillips-head screws I pulled the vertical mode buttons out of the chassis, carefully guiding it around cables, structural members and dead mice.

Continue reading Repairing front panel buttons of Tektronix 7904 oscilloscope.