vovabc.blogg.se

Pn2222 transistor npn
Pn2222 transistor npn




pn2222 transistor npn

Of course the temperature as measured by hand is very crude, but the changes of Ic, Vc, and β is significant. I am glad to see that Vc, Ic, and Ib rose, as summarized below. I guess the temperature around the circuit should be higher than 50 degree C, because my hand could not bear it for more that one or two seconds. I then used a hot gun to blow hot air to the 2N2222 circuit.

pn2222 transistor npn

So I adjust the values of Rb and Rc to move operation region from saturation to amplification, where current gain is around 250, similar to the value measured by the multi-meter, as illustrated below. Tidying up messy wiring, getting ready for Hot Sauna Cold Plunge Hot water bath overflows my digital thermometer! So I won't bother for now to find a thermometer for higher temperature.Īctually my calibration plan is to use the DS18B20 temperature sensor to replace my cheapy home use thermometer.Ī more high school student friendly schematic of the 2N2222 temperature sensor. The OP's requirement anyway is to measure the "environment" which I think is approx a range from 0☌ to 50☌. Note 2 - My cheapie digital thermometer for home use overflows somewhere above 50☌. So Vcc and Rb is an approximation of applying a current source to an diode (2N2222 BE junction), and measure Vbc, as advised by Stewart Sunnyskyguy EE75. Note 1 - The Ib column is almost constant, as is Vbe. So I did the preliminary test and measured the three values, Ib (Note 1), Ic, and Vc against temperature from about 3☌ to above 50☌ (Note 2). I'm supposed to use a TMP36 transistor for a class to read the temperature of the environment, but I only have a 2N2222 transistor the Arduino will have an analog read of it, but the numbers won't change even if I heat it up. How can I use a 2N2222 transistor as a temperature sensor?

#Pn2222 transistor npn code

I added one line to code the definition: #define INTERNAL1V1 2 Works quite well with only one unexpected thing- the INTERNAL1V1 constant was not defined even though the Arduino environment knows it is an ATMega328p (using an Arduino Nano). Tested it at 0☌ and 45☌ against a type K bead thermocouple.Īdjusted the 2.0 to 2.2 to reduce the error at the temperature extremes.Īdc *= 1.0532319391 * 0.01 // calibrated voltage in millivolts, 100 summed Wrote the equation for temperature based on the current room temperature and the mV, with an estimate of -2.0mV/K for the Vbe temperature coefficient. In mV compared to a handheld 3.5 digit DMM. Reference set to nominal 1.1V as suggested by summed 100 sequential readings.Ĭalibrated the voltage by adding a multiplier so the reading was accurate I tried this with a single diode-connected BJT (base connected to collector) with a 10K resistor to the regulated (and otherwise unused) 3.3V rail on an Arduino Nano. Unfortunately, the sensitivity is reduced by at least an order of magnitude so better analog circuitry is required. Using matched transistors or multiple (2 or 3) currents with a single transistor allows cancellation of many of the transistor parameters that vary from unit to unit, as well as connection resistance. There are much better ways to measure temperature with a transistor, however the complexity is increased. With a 10-bit ADC and 5V Vref the resolution is about 0.5☌, which is adequate for many purposes. The current drops as the voltage increases (due to the use of a simple resistor as a current source) so the linearity isn't great= 11.2mV/K average at 0.25☌ and 10.5mV/K average at 75.100☌, but for narrow excursions around room temperature it should be fine, or it can be corrected digitally. Or just use an op-amp.Įdit: Here is a simulation result used as a simple Vbe multiplier. If you connect it as a Vbe multiplier, say with 5:1, and average many measurements you might be able to get a usable resolution of about 0.5☌. Sensitivity will be about -2mV/K so with a 5mV resolution ADC you’ll have 2.5 degrees C resolution, not great.

pn2222 transistor npn

It will require calibration (say at room temperature and 0☌ in an ice-water slurry. If you connect the transistor as a diode and bias it with a reasonable current, maybe a couple hundred uA, you can read the voltage.






Pn2222 transistor npn