loading

I had a hard time finding "plug&play" info and codes, pinouts, etc. regarding the KY-013 Analog Temperature Sensor. I'm not a programmer for I just do a lot of trials & errors, mostly errors, but I finally got something going quite good. Well, good enough for me..
Here's how to get the temperature reading (in °Celsius) displayed on the Nokia 5110 LCD with an Arduino Uno (or compatible).
I will not explain anything, such as datasheets info, why this line there in the code, how to switch from Celsius to Faraneight (and so on for ever..) but rather show the pinouts & the code (below). There should be a free picture of my set-up included in this instructable. Not a nice one, I give you the point, but we're here for something more important than watching pictures. This is not Pinterest... ;)

Step 1: The Force "itself"

<br>

-PINOUT FOR THE KY-013-
1-The pin near the "S" is the signal

2-Middle pin is grounded

3-Pin near the "-" is to 5Vcc -If you switch the Ground with the 5Vcc, the temperature will rise instead of dropping and vice-versa. Don't ask, it's like that. I even asked my GF but she does'nt know what the heck I'm talking about. I have the only woman who does'nt know everything in this world... Maybe it's something wrong in the code, but it works. If someone can provide any info about that, fell free to share the secret..

-PINOUT FOR THE NOKIA 5110 LCD SCREEN-

(all pins are Digital.)

8-(Ground) = If you need this info, put your Arduino stuff in it's original box and get a refund.

7-(Light) = I use a 220 Ohms resistor from this pin to the ground. (Backlight is optional, but usefull when it's dark, like let's say, at night, or if you're sitting in the fridge, door closed, to check how cold your beer is or any other scientific situations.)

6-(Vcc) = To 5V pin. Some say this LCD is 3.3V, some say 5.. I say "it works just fine this way."

5-(CLK) = Pin 7

4-(DIN) = Pin 6

3-(DC) = Pin 5

2-(CE) = Pin 4

1-(RST) = Pin 3

From here you'll need to use the Force.

I hope (I know..) that this should (will) help. Once again, I'm open for comments, greetings, donations, signed blank checks,cash or even Paypall. If you want to send me a life-size poster of Samantha Fox, I'll p.m. you my adress. Have fun, enjoy.
Comments are more than welcome.

<p>Change line 16 from<br>Temp = log(((10240000 / RawADC) - 10000));<br>to<br>Temp = log(1000.0 / (1024.0 / rawADC - 1));<br>and you won't need to reverse polarity. KY-013 is a pull-up module.</p>
<p>Awesome brother :),</p><p>Anyway, u must change 1000.0 to 10000.0</p><p>Temp = log(10000.0 / (1024.0 / rawADC - 1));</p><p>u made my day!</p>
<p>LoL... the temperature will rise when switching + &amp; -... did you feel how hot the sensor becomes then? :)</p>
<p>No, not at all.. It did'nt do much with this, I ripped it appart the same day. One of my first arduino project, so when it worked, I changed project. <br> But why would you invert the + with the - on the thermistor? </p>
<p>I have no clue why you would wanna do that... to melt the pcb? lol</p><p>Just dont do it..</p>
<p>Ok I reassembled it to check.. .. not really.. but.. warm.. or hot..?.. I did'nt noticed that before your comment.. I think it's the resistors on the board that gets hot, my fingers are too big.. But all in all, this circuit is simply a variable resistance with a reff. resistance.. And it's a next to zero amp value.. </p>
<p>I remember using thermistors a few years ago. Lot's of fun! </p>
<p>Finding a way to make it work is just as (if not more) funnier than the application itself.. It's great to know how things work.</p>

About This Instructable

3,984views

14favorites

License:

More by C-modifié:Starvation Tower (for cats)  1" air-canon QEV (almost) invisible rubber-band gun 
Add instructable to: