Categories
Statistics
Flag Counter
Since 08.08.2014
Counts only, if "DNT = disabled".

Your IP is 44.206.248.122
ec2-44-206-248-122.compute-1
Info
Valid HTML 4.01 Transitional Creative Commons Lizenzvertrag
rss
เราจะทำแบบวิศวกรผู้ยิ่งใหญ่
We love the King
19. March 2024
Your valuable opinion :
4.5 stars

Avg. 4.53 from 19 votes.



Arduino-Shield-TANACHAI.php    29744 Bytes    04-08-2020 10:53:22


Arduino/Genuino Transistor Curve Tracer


Shield "TANACHAI"



This is a somehow easier to reproduce version of the Curve Tracer Project. It has the form-factor of an Arduino UNO (Leonardo), using very standard components. And yes, I saw that there are already similiar projects out there in the endless universe web, but they are all limited to 5V. What finally came out is a (THT) soldering exercise, a programming exercise and a course on transistor / amplifier components / circuits. Suiteable to fill one year of teaching electronics :-)


ARDUINO/Genuino 'TransistorCurveTracer' Shield



The plan was to design a very universal shield which does not rely on smd parts, so every homebrewer is able to build it. As the availablity of dual dac in a dil-8 case is getting smaller and smaller, we used the MCP4822 E/P which has (only) 12 bit resolution. If you zoom in (as for e.g. diodes) a lot - the steps of 6.6 mV become clearly visible. Some 'smooth = True' mayst be necessary ... Also necessary is, that the user knows what he(she) is doing, as the voltages are not measured, but set. If the load is large enough, this is no problem - just to mention the limitations right at the beginning :-)




✈ The "Shield"




The shield houses all the components necessary for this project. A DC/DC converter built around a MC34063A generates a voltage of approx. 30 V. It is designed to deliver a current of max. 150 mA. Two 8/10/12 bit DAC's are used (together with a rail to rail opamp, AD822) to produce a voltage from 0 V to 27.0336 V. Whilst the Gate/Base drive is directly powered by the opamp, an additional transistor forms something like a "power stage" which shall handle currents up to approx. 100 mA. In order to increase reliability, we used a heatsink for it. The current is sensed by a 1Ω 1% resistor, amplified by a MCP6271 (48x) and finally read by the analog port of the UNO. The shield is capable to be controlled by a computer via the usb port. An external power supply 12 V / 1 A is necessary.

In order not to "forget" one type, we hacked together an overview. Some more commonly used types are measured in detail - to verify the functionality and correctness of this thing. The numbers in the field "connections" refer to the numbers on the shield.


# ? TYPE SYMBOL CONNECTIONS NOTE DATASHEET
1 go JFET N-CH
0: GND
1: DRAIN
2: GATE
3: SOURCE
V2 < V3 J309, J310
2 go JFET P-CH
0: GND
1: DRAIN
2: GATE
3: SOURCE
V2 > V3 MMBF5460
3 go MOSFET N-CH
DEPLETION
0: GND
1: -
2: -
3: -
ID@UDS: +
UGS: +/-
RARELY
USED
CPC3980
4 go MOSFET P-CH
DEPLETION
0: GND
1: DRAIN
2: GATE
3: SOURCE
ID@UDS: -
UGS: +/-
RARELY
USED
CSD25483F4
5 go MOSFET N-CH
ENHANCEMENT
0: GND
1: SOURCE
2: GATE
3: DRAIN
ID@UDS: +
UGS: +
POWER
AMPLIFIER
IRF7842
6 go MOSFET P-CH
ENHANCEMENT
0: GND
1: DRAIN
2: GATE
3: SOURCE
ID@UDS: -
UGS: -
POWER
AMPLIFIER
IRF7240
7 go BIPOLAR NPN
0: GND
1: EMITTER
2: BASE
3: COLLECTOR
Ibe > 0 BC849
BF199
8 go BIPOLAR PNP
0: GND
1: COLLECTOR
2: BASE
3: EMITTER
Ibe < 0 BC859


And yes, two port devices can also be measured. A selection is put together here.


# ? TYPE SYMBOL CONNECTIONS NOTE DATASHEET
9 go DIODE
SILICIUM
(GERMANIUM)
DIODE SILICIUM
0: GND
1: ANODE
2: -
3: CATHODE
V1 < V3 1N4148
1
0
go DIODE
SCHOTTKY
DIODE SCHOTTKY
0: GND
1: ANODE
2: -
3: CATHODE
V1 < V3 BAT43
1
1
go ZENER
DIODE
ZENERDIODE
0: GND
1: ANODE
2: -
3: CATHODE
V1 < V3
V3 < 22V
BZV85-C9V1
1
2
go RESISTOR
RESISTOR
0: GND
1: LEAD1
2: -
3: LEAD2
R < 99 kΩ MBE/SMA 0414
1
3
go VOLTAGE
DEPENDENT
RESISTOR
VARISTOR, VOLTAGE DEPENDENT RESISTOR
0: GND
1: LEAD1
2: -
3: LEAD2
V < 22V SIOV-S05K11




✈ The Sketches #1 (Arduino and Spreadsheet)


Just as a proof, that "this thing" works.




The very first sketch. It is intended to test both DAC's. For setting this thing up and / or troubleshooting. You should see a sawtooth at port 2 and port 3. DC to approx. 27.034 V. The frequency is about 2 Hz. Do not load the outputs too much, there is no protection ...


This sketch ist suiteable to measure two-port devices such as zenerdiodes, diodes or resistors. Modify the sourcecode and then upload it. It will output columns of data which then may be copy / pasted into a csv file to be analysed with the spreadsheet of your choice. The power limitation is to protect the BC141 (0.8W) or BC140 (4W). In case it should reach a treshold, the sweep-loop will be aborted. ("break"). Below are some examples (excel). Scale is always y in [mA] and x in [V]. We averaged 64 values, but C5, C6 and C7 were not yet optimised at that time ...

A 470 Ω resistor, 5 W
A Zenerdiode, 22 V


A Schottkydiode (1N5711)
TL431 with 6.6 mV (12 Bit) steps :-(




This sketch ist suiteable to measure three-port devices such as npn transistors. Modify the sourcecode and then upload it. It will output columns of data which then may be copy / pasted into a csv file to be analysed with the spreadsheet of your choice. The base drive was 0 µA - 125 µA - 250 µA - 375 µA - 500 µA. The picture below shows a test fixture in action, suiteable for TO-39, TO-92, TO-5 and similiar sizes.

The very first transistor to be tested : A BC141-16.


Test Fixture FOR TO-39, TO-92, TO-5 and similiar devices.




✈ The Sketches #2 (The very elegant Solution)


Is currently under development ...



The Arduino/Genuino sketch expects serial data like B20000\n or C25000\n. This will set the base/gate DAC level to 20 V (20'000 mV) or the collector/drain level to 25 V (25'000 mV). When measuring bipolar devices, the base current may be calculated with the assumption of a base-emitter voltage of 0.65 V (1.3 V for darlington transistors) and the base resistor of 27 kΩ. Sending an I\n will cause the sketch to answer with the current measured by A0 in mA.


/* ///////////////////////////////////////////////////////////// 

ARDUINO TRANSITOR CURVE TRACER "TANACHAI"
https://www.changpuak.ch/electronics/Arduino-Shield-TANACHAI.php
Software Version 3.1, 
26.05.2016, Alexander C. Frank

// ///////////////////////////////////////////////////////////*/ 

// GLOBAL LIMITS BY DESIGN
// = GainDAC * GainOpamp * Reference, Millivolt
const unsigned int MaxVoltA = 27034 ;        
const unsigned int MaxVoltB = 27034 ;       
unsigned int Voltage ;
unsigned int Current ;
float U ;
float I ;
// DAC PINs
int CS = 11;
int SCLK = 12;
int SDAT = 13;
int LOAD = 10;
// USER INTERACTION
char Buffy[10] ;
int BuffyPointer ;                
byte byteRead ;
char Command ;

// ///////////////////////////////////////////////////////////// 

void UpdateDACA(unsigned int VoltageA) {
  unsigned int pointer = 0x8000;
  if (VoltageA > MaxVoltA) VoltageA = MaxVoltA;
  // NO NEED TO CHANGE , AS DAC's WITH LESS BITS IGNORE THE LSB's
  unsigned int DACA = (int)( VoltageA * pow(2, 12) / MaxVoltA );
  DACA |= 0x1000;   // GAIN = 2, DON'T SLEEP, Write to DACA
  digitalWrite(CS, LOW);
  for (int i=0; i < 16; i++) {
    if ((DACA & pointer) > 0) 
      { digitalWrite(SDAT, HIGH); }
        else { digitalWrite(SDAT, LOW); }
    digitalWrite(SCLK, HIGH);
    digitalWrite(SCLK, LOW);
    pointer = pointer >> 1;
  }
  digitalWrite(CS, HIGH);
  digitalWrite(LOAD, LOW);
  digitalWrite(LOAD, HIGH);  
}

// ///////////////////////////////////////////////////////////// 

void UpdateDACB(unsigned int VoltageB) {
  unsigned int pointer = 0x8000;
  if (VoltageB > MaxVoltB) VoltageB = MaxVoltB;
  // NO NEED TO CHANGE, AS DAC's WITH LESS BITS IGNORE THE LSB's
  unsigned int DACB = (int)( VoltageB * pow(2, 12) / MaxVoltB );
  DACB |= 0x9000 ;   // GAIN = 2, DON'T SLEEP, Write to DACB
  digitalWrite(CS, LOW);
  for (int i=0; i < 16; i++) {
    if ((DACB & pointer) > 0) 
      { digitalWrite(SDAT, HIGH); }
        else { digitalWrite(SDAT, LOW); }
    digitalWrite(SCLK, HIGH);
    digitalWrite(SCLK, LOW);
    pointer = pointer >> 1;
  }
  digitalWrite(CS, HIGH);
  digitalWrite(LOAD, LOW);
  digitalWrite(LOAD, HIGH);  
}

// ///////////////////////////////////////////////////////////// 

void Info() {
  Serial.println("\nARDUINO TRANSISTOR CURVE TRACER 'TANACHAI'");
  Serial.println("V2.0, 09.05.2016, BY CHANGPUAK.CH");
}

// ///////////////////////////////////////////////////////////// 

void MaiSaab() {
  Serial.println("\n\nYOUR COMMAND WAS NOT RECOGNISED.");
  Serial.println("PLEASE TRY AGAIN.");
  delay(99);
}

// ///////////////////////////////////////////////////////////// 

void ReadInput() {
  boolean ende = false ;
  BuffyPointer = 0;
  while ( ( Serial.available() ) || ( ende == false ) ) 
      {
      byteRead = Serial.read();
      if ( byteRead == 10 ){ 
        ende = true ; 
        Buffy[BuffyPointer] = '\n';
        BuffyPointer++;
        }
      // 0..9, A..Z
      if (( byteRead > 47 ) & ( byteRead < 91)) { 
        Buffy[BuffyPointer] = byteRead;
        BuffyPointer++; 
        }
      }   
}

// ///////////////////////////////////////////////////////////// 

unsigned int  EvaluateBuffer() {
  unsigned int aux = 0 ;
  BuffyPointer = 1;
  while ( Buffy[BuffyPointer] != '\n' ) 
    {
    aux = aux * 10 + Buffy[BuffyPointer] - 48 ;
    BuffyPointer++;
    }   
  return aux ;
}

// ///////////////////////////////////////////////////////////// 

void setup() {
  Serial.begin(9600);
  pinMode(CS, OUTPUT);
  pinMode(SDAT, OUTPUT);
  pinMode(SCLK, OUTPUT);
  pinMode(LOAD, OUTPUT);
  digitalWrite(CS, HIGH);
  digitalWrite(SDAT, LOW);
  digitalWrite(SCLK, LOW);
  digitalWrite(LOAD, HIGH);
}

// ///////////////////////////////////////////////////////////// 

void loop() {
  
  ReadInput();
  Command = Buffy[0];
  switch (Command)
    {
      case 66 :
        // "B" SET BASE/GATE VOLTAGE 
        Voltage = EvaluateBuffer() ;
        UpdateDACB(Voltage) ;
        break;

      case 67 :
        // "C" SET COLLECTOR/DRAIN VOLTAGE 
        Voltage = EvaluateBuffer() ;
        UpdateDACA(Voltage) ;
        break;

      case 73 :
        // "I" READ VOLTAGE AT A0 
        // Serial.print("I=");
        Current = 0;
        for (int i=0; i<32; i++) {
          Current = Current + analogRead(A0);
          delay(1);
        }
        Serial.println(Current,DEC);
        break;

      case 63 :
        // "?"  
        Info();
        break;

      default:
        MaiSaab();
        break;   
    }
}
// ///////////////////////////////////////////////////////////// 
// END OF FILE.
// ///////////////////////////////////////////////////////////// 


On the computer side, a python script does the hard work. You can load a configuration file for almost every transistor. It is very easy (text-editor) to knit your own one's, reflecting your very special needs. The python script is currently under development, the picture below reflects the so far achieved functionality ...


Arduino Transistor Curve Tracer - Python GUI


Some more notes : It is necessary that you have loaded a configuration file, as there are more parameters which have to be known to the script, as you may be able to change on the gui.




✈ Downloads & More :-)








✈ Max from Berlin designed a case for that thing !




Max from Berlin designed a nice case for this shield. He even wants to share his work with you. Download the zip file below his picture ...


ARDUINO/Genuino 'TransistorCurveTracer' Case






✈ Matus from Slovakia generated the Gerber Files necessary




Matus generated a Gerberfile with holes. Obviously Beta Layout forgot that.
Hvala Slovaška !






✈ Share your thoughts



The webmaster does not read these comments regularely. Urgent questions should be send via email. Ads or links to completely uncorrelated things will be removed.


Your Browser says that you allow tracking. Mayst we suggest that you check that DNT thing ?

 
t1 = 6459 d

t2 = 229 ms

★ ★ ★  Copyright © 2006 - 2024 by changpuak.ch  ★ ★ ★

PRchecker.info Impressum