Monday, April 18, 2016

USB curve tracer for NPN transistors

Curve tracer is an electronic test instrument to analyze the characteristics of transistors and other discrete semiconductors. In this post we construct USB base curve tracer to analyze properties of NPN transistors. This curve tracer is build around Microchip's PIC18F4550 MCU and it use simple Windows based GUI application to plot captured data of a transistor.

In this design PIC18F4550 MCU is used to establish USB connectivity, perform voltage readings and control current/voltage flow into the test subject. To minimize the cost and to make it simple, we use R2R ladder circuit to generate discrete collector-emitter voltage levels for the transistor on test. In each scan session collector-emitter voltage level get increase from 0V to 7.5V in 256 steps. In this design, "tracer" scans the transistor for 7 base current levels which are in between 7µA to 60µA. In viewer application collector-emitter voltage levels are plotted on x-axis and collector current is plotted on y-axis.

Results generated for 2SC945 NPN transistor.

In current firmware, PIC18F4550 communicates with the PC over USB-HID class and because of that this may not need any special device drivers on host terminal. In most of Microsoft Windows operating systems the viewer application may be able to communicate with the device directly. Viewer application bundled in this project package are developed using Microsoft .net framework and it can run immediately on any new PC with minimum amount of prerequisites. Based on our experiences the most recommended operating system for this application is either Windows 7 or Windows 10.

Results generated for 2SD400 NPN transistor.

To get the perfect results we highly recommended to construct this project on PCB. According to our experiences breadboards and veroboards may generate lot of noises and may finally leads to wrong output(s).

This is an open source hardware project and all it's design files, source codes and compiled binaries are available to download at All the content of this project are released under the terms of GNU GPL version 3.0.

Saturday, April 2, 2016

Automatic monitor brightness controller

This is an automatic "monitor brightness controller" based on environmental light conditions. This system use USB port base sensor unit to measure the light level and control monitor brightness accordingly. We design this system to reduce the eye stress by matching the monitor brightness with environmental lighting.

The sensor unit of this system is build around PIC18F2550 8-bit microcontroller. To measure the light level we use LDR with MCU's inbuilt ADC. The control software of this unit is design to work with Microsoft Windows operating systems and it use Windows API's DDC/CI related functions to control the monitors/display devices.

Firmware of USB sensor use 50-point boxcar filter to get the average readout from the ADC and that value is passed to PC over USB HID interface. Thanks to this HID interface this system may not need any special device driver, and it can use in any compatible PC with minimum amount of configuration changes.

Prototype version of Automatic monitor brightness controller sensor unit.

We successfully test this setup on several PC configurations. At the designing stages we mainly use Viewsonic VA1901wm LCD monitor to test this setup.

This is an open source hardware project and all it's source codes, design files and compiled binaries are available to download at All the content of this project are distribute under the terms of MIT Licenses.