Pages: [1] 2   Go Down
Author Topic: Anyone could hel me?  (Read 1716 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

anyone has a program to turn on the ligt when the temperature is 20ºC and turn off the light when is 25ºC  (i have an Arduino UNO sensor temperature rele...)
At the same time i want to activate the servo when the light turn off and discativate the servo when the light is on
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you able to read the temperature sensor? Are you able to convert the analog reading to a temperature?

If so, then turning an LED on when the temperature is between 20 and 25 degrees is simple:
Code:
if(tempC > 20.0 && tempC < 25.0)
  digitalWrite(ledPin, HIGH);
else
  digitalWrite(ledPin, LOW);

Quote
At the same time i want to activate the servo when the light turn off and discativate the servo when the light is on
Doing this is more complicated. What kind of servo is it? If it is a normal servo with a 0 to 180 degree sweep, then you need to define what you mean by "activate it".

If it is a modified servo that has been turned into a continuous rotation servo, then it isn't a servo. You need to define how you want the servo to move when the temperature is below 20.0 or above 25.0.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not able to do anything!  Ican't even make the seervo work whit a example preogram
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And what exackty I need to read the tempertur sensor and how to convert reading to temperatur?
What elements are necessary
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And what exackty I need to read the tempertur sensor and how to convert reading to temperatur?
What elements are necessary
Well, first you need a temperature sensor. Have you got one? Which one?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes
It's a simple restience (temperatur sesor of 240k) i'd buy in a electronic shop
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
t's a simple restience (temperatur sesor of 240k) i'd buy in a electronic shop
They are all simple, but they are all different. If you can't be more specific, I can't help you.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

NTC 270k
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're up to 15 posts. You can post links now.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any help with the sensor
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=post;num=1294186279;title=PostReply
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You're up to 15 posts. You can post links now.
Useful links, that is. Like to the sensor you have. You are really trying my patience, you know.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://es.wikipedia.org/wiki/NTC

sorry
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't read spanish, and I doubt that you bought the sensor from wikipedia.

Connect one end of the thermistor to +5V. Connect the other end to an analog pin. Connect a resistor from the analog pin to ground.

Measure the resistance of the thermistor to get an approximate value for the other resistor.

Use analogRead to read the value of the pin. Since the NTC is approximately linear, you need to determine the value that analogRead returns when the thermistor is in ice water (0 C) and in boiling water (100 C). Those two values will allow you to determine the temperature corresponding to any other reading.
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah, I see... you are asking about the same here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294188664 just with way less information...

And you really should try to make some better subjects, either "HEEEELP!!!!" or "Anyone could hel me?" says anything at all about your actual problem.

Quote
I'm not able to do anything!  Ican't even make the seervo work whit a example preogram
Start by making that work, if your hardware is already failing at at known working code, it will also fail with your experimental code.
« Last Edit: January 05, 2011, 10:47:46 am by bld » Logged

captain-slow.dk | non contagious!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First of all dude ull have to do a bit more explanation, especialy about servo.

Now as i understand u want to measure temperature with an NTK resistor, so ur best bet is to do a voltage splitter with NTK and another resistor, measure analog reading or voltage at 20 degrees and at 25 degrees. Now if the value is below or above (depending how u connected NTK) those analog values, u turn the light off.
Also the resistor has to have enought high resistance for good resolution.
« Last Edit: January 05, 2011, 11:14:29 am by GregaG87 » Logged

Pages: [1] 2   Go Up
Jump to: