LM35

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times

LM35

Post by hypamat »

hi guys,
ive been building a fish tank controller to detect the temperature by using a LM35, its connected to a ADC input, and then the value is read and displayed on the screen, for the moment, however its only showing whole numbers. how do i get it to show a temperature and also determine wether its below say 0.15 degrees? its all fine and dandy with whole numbers, but i cant fathem anything else :( even going in to minus numbers seems difficult?

am i missing a trick here? ive attached the FCF so you can see for yourself :)

thanks in advance,
matt
Attachments
Example.fcfx
(6.08 KiB) Downloaded 262 times

Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times

Re: LM35

Post by Steve001 »

Hi Hypamat,

Have a look here may be of some use

http://www.flowcode.co.uk/mmforums/viewt ... er+project

Steve
Success always occurs in private and failure in full view.

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times

Re: LM35

Post by hypamat »

hello, and thanks for your reply!
unfortunately, I'm a proper newbie to all of this! and just looking through that flow code, just blew my mind! plus its in v5 and I'm running v6 :(

is there a easier way to do this?
thanks again :)
matt

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: LM35

Post by medelec35 »

Hi
What about This post?
The only thing is for simulation you will need to dispabe a break point I accidentally left enabled.
Also You will need to change the F to C.

Martin
Martin

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times

Re: LM35

Post by hypamat »

hello,
just what i was looking for! just got to try and get around it in my head whats going on in that code!

whats the easiest way to convert that to celcius? i have tried adapting the code to show me celcius, but it takes me back to square one with it not giving me a 0.1 decimal place :(


thanks!
matt

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: LM35

Post by medelec35 »

Ho matt.
Should be no need to change formula. Since characteristics of both devices are the same I.e 10 mv per c or f.
Martin

hypamat
Posts: 31
Joined: Wed Jul 16, 2014 11:38 pm
Has thanked: 6 times
Been thanked: 18 times

Re: LM35

Post by hypamat »

brilliant :) is there a easy way to create a if statement that would "detect" if it goes below say 0.1c? as in it can read the .1 increment? sorry, ill leave you alone now haha

matt

Post Reply