Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help with a school project

Status
Not open for further replies.

Kurek147

New Member
Hello,
So basicly i started learning about electronics 2 moths ago so i know only the basic stuff. Now im supposed to do my first project and i thought of making a simple temperature based device. The idea is that when the temperature is lets say 21 C a white diod will light, if it is 1 degree colder 1 blue diod will light, one degree warmer 1 red diod will light and so on. I was thinking of using 3 blue and 3 red diods. So my idea of making it work was to use a NTC thermistor + an operational amplifier. the thing is im not sure if it will work and can i use the same NTC to all the diodes or i need 7 diffrent ones?
As I said before I really know little about electronics so if there is a simpler or a better way to make it please tell me :) i also wanted to add one 7seg display so it would show how many degrees is under or over the 21C but i think it is still too complicated for me :(

P.S Its my first thread on this forum so sorry if i posted it in a wrong place :p
 
I'd stay away from the LCD for a little while if this is your very first project. Just because it probably requires a microcontroller to control the LCD.

The 3 LEDs is a bit difficult to do. 2 would be simpler. Because in electronics it is easy to tell if something is above or below, but it is very difficult to tell if something IS something else. Usually it ends up being if it's below "desired value+a little bit" and above "desired value - a little bit" then you can consider it that value. But you already have those two and are treating them as different LEDs.

Making 2 LEDs would need 2 comparators- one for each LED to say if it is above or below. To make the third one to tell if it is "around 21 degrees" you would need 2 more comparators to say if it is within a certain margin of 21 degrees. You would also need an AND gate to combine the output from both comparators (you can use an op-amp as a slower comparator if you just wire it up like a comparator with no feedback).

A thermistor isn't even a voltage so you use it as one resistor in a resistive divider. Thermistors are very high resistance which means they are not good at driving loads (ie. it is like a battery with a very high internal resistance...it burns off a lot of the energy it tries to output inside itself). So you would probably need to buffer it with an op-amp and amplify it, or do whatever signal conditioning you wanted to do with it. But you only need one thermistor (thermistors of the same kind are never exactly the same anyways so if you multiples for the same thing you might get 2 slightly different temperature readings at once)

My suggestion is to use a row of LEDs (different colours if you want...blue for the cold end, red for the hot end). Have each LED be driven by a comparator, and each comparator has a different reference voltage. WHenever the temperature (respresented by the voltage output from the op-amp ) gets above a certain value, light up the LED. THat way you get a bar graph for temperature that gets shorter or longer as it gets colder or warmer. It's simple, and it looks nice.

How much do you know so far anyways? It was a bit of a pain to write the above post because I wasn't sure if you understood things like source impedance (the battery with high resistance example, and high resistance sources being bad at driving loads example) and comparators, op-amps, how they are similar and how they are alike.

Also, do you understand what a thermistor is? It is a resistor that changes value with temperature like a variable resistor controlled by temperature. The difference between a PTC and NTC? PTCs increase resistance with temperature, NTCs decrease resistance with temperature. They aren't made exactly the same way and don't behave as complete opposites so they are better for different applications (ie. temperature sensing, shutting down something when it gets too hot, slowing down the current spike when something first turns on but then allowing more current to flow after it is on) But it is non-linear (double the temperature and you will get a change in resistance that is different. Linear ones do exist, but they are called RTDs and are more expensive, but really REALLY accurate (in fact all temperature standards are referenced to Platinum RTDs- the most stable, linear, and accurate of all).

And if you do, then I suppose you understand how you can use a thermistor as the lower resistor in a resistive divider to convert the resistance into a voltage? The thermistor's resistance changes, but the top resistor of the divider stays the same, which means the ratio of the divider changes changing the voltage output of the divider. You can measure this change in voltage and calculate backwards to figure out the resistance and thus temperature.

Last note, like I mentioned, thermistors are non-linear. So it's easiest just to use preset thresholds since you look at a graph beforehand to get the resistance at a temperature and build your circuit to match. If you start having too high resolution (like a 7 segment display) then you need to somehow build that entire graph into your circuit (usually in software and a microcontroller) rather than just 10 thresholds you picked from the graph beforehand.

THis is all really simple stuff...it's just wordy and I have no pictures.
 
Last edited:
Thanks a lot for the help, at least now i have some ideas of what i need to do. The thing is that electronics are a new and a "experimental" subject in my school so we have a class of 6 people and even the teacher seems to be a self learner who knows just some basic stuff. Thats why i didnt learn about some of the things you were talking about, but i allready looked it up :) the only thing i was wondering was what did you mean with "a row of LEDs"? you mean to put those 3 LEDS in a row and let them to be driven by diffrent comparators or connect more LEDs?
 
Just a row...a bunch of LEDs physically positioned into a line:

FREEZING: |
COLD: ||
WARM:|||
HOT: ||||
BOILING: |||||

You could use 3 LEDs, or more. I'd use at least 5, just because then it looks like a real temperature meter and you have better resolution. Sort of like an illuminated bar that gets longer as it gets hotter.

Example:
Above 10C, the leftmost LED lights up.
Above 15C, the two leftmost LEDs light up
Above 20C , the 3 leftmost LEDs light up
Above 25C, the 4 leftmost LEDs light up.
etc...

So you'd have 4 comparators, each one with a reference voltage for 10C, 15C, and 20C, and 25C (calculated from the ratio of the resistive divider, the supply voltage for the resistive divider and the thermistor graph). So that above each said temperature, the comparator outputs a "HI" signal that is used to drive an LED (don't forget the current limit resistor for the LED...do you know how to drive an LED?).

You're circuit would need a voltage regulator anyways, and you can run some of it's accurate output through different resistor dividers to reduce it in order to produce your voltage reference to feed into the comparator. You can do this because, for the most part comparators and opamps draw "zero" current into their inputs so the divider output voltage will not be skewed (imagine if it did draw some current through the output, more current would be flowing through the top resistor than the bottom resistor because while all current flows into the top resistor, some of it will flow out the output and some into the bottom resistor. Which means different output voltage. THis is why you shouldn't use a resistor divider to power something...voltages changes with current draw. Anyways.).

And also, which input (+ or -) you decide to feed the reference and temperature into as well as the type of thermistor (PTC or NTC) and whether it is used as the upper or lower resistor in the divider will affect whether or not the comparator will output HI or LO when the temperature exceeds (or is below) the threshold. You should be able to figure it out...

To start with...a resistor divider with an NTC resistor as it's lower resistor will output a LOWER voltage as it gets hotter. THis is because as it gets hotter, the thermistor resistance becomes smaller and since it is the lower resistor, this makes the divide ratio larger so the output is smaller because it's divided by more. Can explain what happens if you have a NTC in the upper leg? How about a PTC in the lower leg? A PTC in the upper leg?
 
Last edited:
You could make it using a window comparator (window discrimininator) which normally outputs three conditions: within, above and below window.

Within window would be the neutral temperature, above the higher and below the lower temperature from the reference temperature (neutral).

Boncuk
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top