PreLab5 Temperature-Cntrlled Fan (Due Oct 16) GOAL The gal f Lab 5 is t demnstrate a temperature-cntrlled fan. INTRODUCTION The electrnic measurement f temperature has many applicatins. A temperature-cntrlled fan typically wrks like this: (1) A thermistr measures the temperature t prduce a vltage. (2) An Arduin Un measures the thermistr vltage and cmputes the resulting temperature. (3) If the temperature exceeds a set pint, the Un sends a digital HIGH utput. If the temperature is belw a set pint, the Un sends a digital LOW utput. (4) The digital utput cntrls sme transistr switches that perate a 12V DC brushless fan. Fig. 1: Blck diagram f the temperature-cntrlled fan. Mre details regarding the thermistr will be discussed during the Lab5 tutrial. What is a thermistr? It s a THERMally sensitive resistor, which means its resistance changes with temperature. Hw is that pssible? A thermistr is typically made frm a ceramic semicnductr (e.g. manganese xide). Recall that in a semicnductr, the atms have tightly bund cre electrns and lsely bund valence electrns. Sme f these valence electrns are freed by thermal energy and mve thrughut the material. The liberated electrns leave behind vacancies called hles, which can als mve thrughut the material. Higher temperatures prduce mre f these free carriers that can cntribute t the flw f electrical current. Thermistrs that behave like this, where HIGHER temperatures result in a LOWER electrical resistance, are said t have negative temperature cefficient, r negative tempc. Neat! Hw t use a thermistr? There are many kinds f circuits that incrprate a thermistr. Even the humble vltage divider wuld wrk, where ne resistr is an rdinary resistr while the ther is the thermistr. It is nt the best circuit, since the vltage utput des nt depend linearly n temperature. But that s OK, because we will use a micrcntrller (e.g. Arduin Un) t use sme frmulas t cnvert the measured vltage int temperature. Hw d we d this? The type f thermistr circuit determines hw the measured vltage V M is related t the thermistr resistance R T. Next, a fancy empirical equatin called the Steinhart-Hart equatin is used t cnvert R T int the crrespnding temperature. Nice! 1
DESIGN REQUIREMENTS It s gd t start with the cnstraints. Thermistr: Pwered by +5V and GND (these will cme frm the Arduin Un). We are using a 10 khm thermistr (this means the thermistr resistance R T = 10 khm at 25 C). Arduin Un: Analg Input: 0 t 5V (this means it cannt measure vltages utside this range). Digital Output: 0 and 5V, max current = 40 ma. Digital HIGH shuld turn n the fan, while a digital LOW shuld turn ff the fan. Fan: Vltage rating = 12V DC (min = 7.2V, max = 13.8V) Free running current = 710 ma (this is the current when the fan is happily at full speed) Starting current = 2350 ma (when the fan is initially at rest, mre current is needed t get it ging) THERMISTOR CIRCUIT We will frm a vltage divider using a 10 khm thermistr and an rdinary 10 khm resistr. The basic idea is that temperature will affect the vltage divider utput that is measured by the Arduin Un. As shwn in Fig. 2, there are tw pssible cnfiguratins fr the vltage divider. Suppse we want the measured vltage V M t increase with higher temperature. See the curse website fr the thermistr data sheet. TASK 1: Decide if the thermistr shuld be the tp r bttm prtin f the vltage divider. Make sure t explain why yu chse a particular cnfiguratin. NOTE: V M des nt always have t increase with temperature. It really depends n the applicatin. TASK 2: Derive an expressin fr the thermistr resistance R T in terms f the measured vltage V M. Remember that we eventually want t btain temperature. Hwever, ur circuit prduces a vltage V M! We therefre need an equatin t cnvert V M int thermistr resistance R T. Then we can apply the Steinhart-Hart equatin t cnvert R T int temperature. Hint: First derive an expressin fr the measured vltage V M based n yur chsen vltage divider circuit. Then use yur pwers f algebra t slve fr R T. Fig. 2: Vltage divider circuit with the thermistr RT (a) n the bttm (b) n NOTE: The Steinhart-Hart equatin will be discussed in lab. the tp. 2
BJT SWITCH DESIGN The digital utput frm the Arduin Un will cntrl a transistr switch. We ll start with a BJT switch and then cnsider a MOSFET switch later. Yu will build and test bth types during lab. TASK 3: Chse the apprpriate transistr t perate the fan (Fig. 3). Sme cmments: Yu must chse either a TIP31 (single BJT) r TIP120 (Darlingtn). The fan will perate in free running mde mst f the time, s use the free running fan current as yur target. The pwer supply is V CC = 12V. Keep in mind the limits f the micrcntrller utput! Fr yur chsen BJT, yu must cnsider max I C, V CE, and T J (assume typical transistr parameters)! Shw all wrk! RB (a) Q1 RB Fig. 3: Fan is perated with a transistr switch made frm (a) single BJT (b) Darlingtn. is the digital utput frm the micrcntrller. (b) Q1 TASK 4: Chse a standard 5% value fr the base resistr R B. Sme cmments: Use typical cnditins fr yur chsen transistr. TASK 5: Cmpute the typical values fr lad vltage, base current, and current rati I C /I B. Sme cmments: Assume the free running current f the fan remains the same, regardless f fan vltage. The fan will perate under a fairly wide range f vltages (see Design Requirements). TASK 6: Simulate yur BJT switch circuit. Use a 17 hm resistr as the lad. This is a hrrible apprximatin f the fan, but it is sufficient (and super easy) fr this prelab assignment. Let cme frm a 5V DC pwer surce. Use a DC Operating Pint analysis t determine the lad vltage, base current, and current rati I C /I B. Hw d yur simulatin values cmpare t yur answer t TASK 5? 3
MOSFET SWITCH DESIGN MOSFET switches have the advantage f zer DC gate current. Hwever, they need sufficiently large V GS t prperly turn n! This is usually nt a prblem fr small-signal MOSFETS, but pwer MOSFETs typically require V GS 10V. TASK 7: Chse the apprpriate transistr Q2 t perate the fan (Fig. 4). Sme cmments: Yu must chse either a BS170 r IRF520. Fr nw, assume the applied 2 is high enugh t prperly turn n the MOSFET. Make sure t cmpute the fan vltage under typical Q2 cnditins! T d this, assume the lad current is 710 ma. Then cmpute the vltage acrss Q2 s R DS,ON. This will let yu determine the fan vltage. Fig. 4: Lw-side MOSFET switch t perate the fan. TASK 8: Design a 5V-t-12V lgic level shifter. Sme cmments: There are many ways t design a lgic level shifter. Our applicatin requires the fan t turn n when the Un digital utput is HIGH. Therefre, we want = 5V t prduce 2 = 12V. This means we need a NON- INVERTING lgic level shifter. Fig. 5 shws fur pssible methds. Fr each methd, explain whether it will wrk r nt fr ur applicatin. Yu must cnsider bth = 0V and 5V. Fr example, write smething like When = 0V, then is fully ff because V GS = 0V. This causes s V GS t becme. Assume the NMOS and PMOS transistrs have V GS threshld prperties like the 2N7000 and ZVP3306 transistrs, respectively. Pick ne methd and explain yur ratinale (there is mre than ne crrect answer). TASK 9: The ttal pwer cnsumed by the lgic level shifter shuld be less than 10 mw. R D can be either 1 khm, 10 khm, r 100 khm. Which R D values are OK? Shw all wrk! 2 Q2 2 2 2 Q5 2 (a) (b) (c) (d) Fig. 5: Lgic level shifters using varius cmbinatins f MOSFETS. (a) NMOS fllwed by PMOS (b) PMOS fllwed by NMOS (c) tw NMOS (d) NMOS fllwed by a CMOS inverter. 4
TASK 10: Simulate yur MOSFET lgic level shifter and fan switch in Multisim. Let cme frm a DC pwer surce. is the input t the lgic level shifter. The lgic level shifter s utput serves as the input t the fan s MOSFET switch. Use a 17 hm resistr as the lad. This is a hrrible apprximatin f the fan, but it is sufficient (and super easy) fr this prelab assignment. Use a DC Operating Pint analysis t determine the lad vltage and current fr = 0V and 5V. Hw d yur simulatin values cmpare t yur answer t TASK 7? Please submit: Answers t all TASKS and tw Multisim schematics. (End f PreLab5) 5