Go Down

Topic: Help with resistors (Read 774 times) previous topic - next topic

Cusso

Hi everybody. I'm new there and I'm a 14-years-old italian, so if I wont understand anything... you'll know why! :D
I need some help with a dynamic resistor-temperature sensor, doing it easy, I need to know the output in volts and Ampere, only knowing ohms and input. Is there any operation to do it?
For example, if I want to do a thermometer, with a led which turns on when the room reach a specific temperature, what should I write there?
 
if (???>temperatura<???)

What have the question marks to turn in?
volts, millivolts, ampere?

Thanks for all the answers


MarkT

It may be good to convert the ADC reading to a temperature (you'll need to find
example code for your thermistor / temperature sensor).

Then the comparison can be in Celsius.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Cusso

thank you. What do you mean for ADC? Sorry but I'm new on microcontrollers

Grumpy_Mike

ADC is Analogue to Digital converter.
Don't other turning it into voltages just use the raw numbers from the analogRead function
Code: [Select]

Val = analogRead(0);
If( Val > 100 && Val < 600) { // then do something

CrossRoads

Analog to Digital Converter
Code: [Select]

if (analogRead(A0)) >= someNumber){  // read the voltage of sensor
// do something
}
else{
// do something elso
}

The result of analogRead will be a number from 0 to 1023.
0 might represent 0C, 200 might represent 50C, 400 might represent 100C, and so on.
You will have to understand how your sensor works and what the numbers represent.
Maybe you will have to do some math to show the results as the temperature you expect.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Cusso

Thank you all! Now I understood! I was a bit idiot not understanding before!!! :smiley-sweat:  ;)

CrossRoads

Happens to the best of us ...
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up