Temperature of the room

Discussion in 'General Electronics Chat' started by Afnan_123_, Mar 5, 2013.

  1. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    Hi everyone,
    please i am doing project about measure the temperature of the room, if the temperature is more than 24 the led will turn on
    i should connect crystal with capacitors for OSC1 and OSC2 pins 13 and 14 of PIC
    can anyone tell what is the suitable value of crystal and capacitors??

    also , can you give me ideas to develop this project??
    View attachment NEW AFNON.zip
     
    Last edited: Mar 5, 2013
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Good news, temperature has units, so it will never reach 24...:p

    Anyway, looking at the PIC's datasheet will give you an answer as to the crystal and capacitors. What PIC are you using? 16F877A?
     
  3. JDT

    Well-Known Member

    Feb 12, 2009
    658
    85
    This depends on how fast or stable you want the PIC clock to be.

    This has nothing to do with measuring temperature.

    What kind of temperature sensor are you going to use?
     
  4. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    i am using PIC18f4550
     
  5. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    LM35 sensor
     
  6. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0

    but the temperature it can reach more than 24 also
    here in my country the temperature today is 28 C
     
  7. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Give page 27 a read of the datasheet, Table 2-2 gives typical capacitance values for different crystals.
     
  8. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    if i use like 20MHZ it will make the device is slow or fast?
     
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I was commenting on your lack of units. We are people of technical knowledge and units are a must to understand each other; is it 24K, 24°C, or 24°F? I assumed you meant 24°C, but without units, my assumption is just that.
     
  10. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It will make the device operate at 20MHz, whether you believe that to be slow or fast is up to you.
     
  11. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    ok,
    but do u have ideas to develop this project??
    like i want serial communication and lapview
     
  12. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    There are lots of types of serial communication. Which are you wanting to use?
    I'd first set up the UART so that I could talk to the computer through the a serial-to-USB converter so that I could print data to a terminal program. A hardware debugger(pickit 3-maybe 2) will help you along also, allowing you to see your register values during program execution.

    Once you get that working, I'd say get the LM35 interface down and give the data to the computer for real-time results. Or peek into the register contents and figure out what values you are getting from the LM35.

    From there, it will just be small changes to the overall project.
    ...that sounds like a type of movie I shouldn't be discussing;)

    If you mean LabView, then... well, I don't know what you are asking for:confused:
     
  13. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    yes i will use pickit 2 to run the hardware via computer
     
  14. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    yes i mean LabView :)
     
  15. electron_prince

    Member

    Sep 19, 2012
    93
    3
    24°C

    For me "slow" and "fast" are 'relative' terms :p
     
  16. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    i am thinking to use RS232 with MAX
     
  17. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    So does that mean you want to createa GUI in LabView? Have you used LabView before?
    You could also create a C# application which offers much more control over the whole program. I do this for almost any project I make that talks to a computer....
    This is because they are relative terms...
     
  18. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    i didn't use LabView before, but what i am thinking is when the hardware measure the temperature then LabView will show graph of the temperature
     
  19. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    From what I understand, LabView can do this, but I haven't used it myself, so someone else will need to jump in regarding that. As far as I know, it would be as simple as dragging and dropping certain predefined modules onto a project space.

    Like I said, writing your own program gives you more control over the working of the program. A custom program can not only graph the data, but timestamp the data, create a comma-separated value file and email you the results. It's just a matter of how comfortable with programming you are.
     
  20. Afnan_123_

    Thread Starter New Member

    Feb 7, 2013
    22
    0
    ok, but please if u have picture of serial communication with pic18f4550?
    because i don't know how to connect RS232 with pic18f4550?
     
Loading...