last day (16 days later) » 

8:34 AM
7
A: How can I use a 2N2222 transistor as a temperature sensor?

tlfong01Question How can I use a 2N2222 transistor as a temperature sensor? 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. Am...

 
@Sredni Vashtar, Many thanks for your very important and critical warning. Do you know why some chips have the two terminals inverted? In my long electronics hobbyist life, I have never heard of such a ridiculously dangerous pinout trap, for newbies, ninjas, and even pros alike.
@glen_geek. Ha, many thanks for your instruction, which I think is simple and concise. I must confess I don't know at all your rationale or theory behind. But it so simple, so I guess both me and the OP which I guess is around 16 old student can also blindly follow your tip, and then do some measurement to see if your circuit might lead to anything promising. Then I will study the datasheet or other theories behind, and try to find why you suggest your design. / to continue, ...
I now see our approach is odd, because it is not like the photo transistor, which sort of using CE junction, without electrical but only photo/light input from base. Of course I know I can just use a diode, which according to the (Schottky?) diode equation, is current dependent to temperature. Anyway, I will stop selfie brainstorming, and start experimenting @glen-geek's geek tip..
@glen_geek, now I have set up the test circuit to test out your suggestion of using 1MR for Rb, varying Rc and see how it goes. I have also update the circuit and put it at the very top of my answer. Comments and counter suggestions welcome. Cheers.
@Voltage Spike, Thank you for your advice. Actually some of the suggestions and tests in my answer are out of date, misleading and plain wrong. So I have decided to set up a GitHub page, and place the datasheet summaries there. This way I can make my answer perhpas many times shorter, and only refer to my GitHub page for not too relevant details. Thanks again. Cheers.
@Sredni Vashtar, I agree with you that the vendor packages 2N2222 with pinouts as ordered by the Japanese buyers. I also notice that the new datasheets provide different styles of pin layouts for customers to order.
@Transistor, Ah yes, I am not surprised to discover that the OP is just a 15 year old student and a member of a computer hobbyist club in his school. My thinking is that he might be happy if we guide him to read the datasheets and how he can convert the 2N2222 into a temperature sensor, however crude or non linear his converter sensor it is. I guess even the designer of TMP36 is doing some sort of curve fitting/straighten to make final product linear and accurate. We might explain to the OP, that even if we cannot DIY a temperature sensor with accuracy of 0.5 degree. / to continue, ...
But in many applications, eg, measuring the temperature of warm water in a bath, or even room temperature to control air conditioner/heater, an accuracy of two degrees is acceptable. My objective in making this answer is educational, learning how to read a datasheet, idea of non linearity and how to use software to workaround. Accuracy is never a requirement in my suggested DIY sensor, because it is not supposed as a accurate scientific instrument. / to continue, ...
As you said, grasping concept, doing/learning/appreciating engineering design, trade off, cost benefit analysis, and the joy of DIY/making things or just a toy, even the project ends up a "failure", is important, not accuracy or applicability
 
When you combine a fairly accurate - 2.2mV/'C NTC characteristics of the Vbe with base-collector shorted and then use a common emitter with hFE changing with T you get an inaccurate temperature sensor. -1
but great effort
 
@Tony Stewart Sunnyskyguy EE75, Ah yes, everybody is talking about the magic number Vbe 2.2mV/C°. However, I am just a high school student, and my cheapy multi-meters have a ridiculously tiny current range of 2mA.And the real scientists are talking about the μAs. So the whole world's high school students are weep in the dark.:(
@Tony Stewart Sunnyskyguy EE75, If you watch the videos in my reference list #20, 21, which I suppose are the "best" YTs on this subject, because Google ranks them at the very top. I do think that the alien EE engineers in our neighour galaxy are now LOLing at our high school students weeping in the dark.
 
I don't consider any of those YT's video's as expert design references
 
Ha, yes, the 2.2mV/C° elites are laughing loudly at the YTs, which of course are newbies' sorrows.
 
8:34 AM
actually the tempco increases from -2.0 to -2.2 as the current is reduced to 1uA. Any self heating is undesirable too with small plastic parts @ 0.2'C/mW
 
Ha, so I need to get a volt meter in 10 μA range? You remind me that ages ago, when I was educated in college to become an engineer. I was told that any engineer worth his salt must always remember 6 words by heart: (1) Reliability, (2) Tolerance, (3) Accuracy, (4) Trade off, (5) Benefit, (6) Cost. Ah, I am missing my locking down lunch. Nice chatting with you. See you later.
I remember very vividly, that not too many years after my graduation, I learned many more things that I found very useful in my work, including the following:
(1) Appropriate Technology,
(2) Second Sourcing,
(3) Quality Control and Assurance,
(4) Risk Analysis and Control (MTBF, Black Swan Theory (sort of).
And the very important thing is the following:
(5) Info/Enggr System Analysis and Design(ISAD)
My journey in EE ended abruptly when most of the plants (including FairChild, Motorola, National Semi, Ampex, ...) closed and or moved North. So I switched to software engineering, then to IT, ... from transistor to IC, to MSI, LSI, to uP, to MCU, to SBC, to ...
Long story short, I am all the way back to transistor, to 2N2222, ...
And let me explain my 2N2222 temp sensor development with the following two things:
(1) User Requirement and Constraint,
(2) Functional Spec,
(3) Selection of Development Methodology (WaterFall, Protopyping, ... Agile, ...)
What I am now messing around withe the OP's 2N2222 question is based on the Agile Methodology, which I see it as so called "Rapid Prototyping", or "Meddling Through",..
I also see the OP's question as a case study of PBL (Problem Based Learning) where I don't expect a clean solution. I think it would be nice, if me and the OP failed in all our suggested approaches, because we can "Learn by Mistake", the more mistakes we make now, the more lessons we learn, ...
I am just doing a selfie walkthrough of my electronics journey along a long and winding road, ...
Just brainstorming/thinking aloud, sorry for all the typo mistakes.
I used to tell the newbies that my project development does based on the expert's ideas, and the following is the text book I have been reading:
System Engineering Analysis, Design, and Development: Concepts, Principles, and Practices - Wiley 2nd Ed Charles S Wasson
https://www.amazon.com/System-Engineering-Analysis-Design-Development/dp/1118442261
For students such as the OP, I usually recommend the free 1st Ed eBook, because the basic concepts and recommendations by Prof Wasson are still up to date and very good.
 
 
1 hour later…
10:24 AM
The question needs more specs on range and accuracy not more analysis. Was it for room temp with 0.5' accuracy or -40 to 50'C with 2'C accuracy
The kid was high school
he just needed a current source a transistor as a diode and an amplifier or a $5 DMM
 

  last day (16 days later) »