Temperature sensor

Discussion in 'Embedded Systems and Microcontrollers' started by willy89, Dec 10, 2011.

  1. willy89

    Thread Starter New Member

    Dec 10, 2011
    1
    0
    Hi,

    i am doing a lil project of my own, i would like to control the speed of the motor based on measured room temperature using PIC16F84A. so far i would like to use LM35 as the sensor, can someone help me with how to interface LM35 with PIC16F84A, the motor drive circuit using PWM, the clock speed for MCU. thanx
     
  2. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Greetings! And welcome to AAC!

    Your post, originally found here (http://forum.allaboutcircuits.com/showthread.php?p=430596#post430596), has been moved into its own thread, where it will draw more responses.

    Please refrain from "hijacking" existing threads with tangent or off-topic questions. You can create new threads for new questions using the "New Thread" button on the upper left of the page.
     
  3. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    Does it have to be a PIC16F84 microcontroller or conversely does it have to be a LM35 temperature sensor?
    The two devices are not really compatible, the output of the LM35 is a varying DC voltage so you need a AtoD converter to convert it to a temperature reading and the PIC16F84 is one of the few PICs that does not have a AtoD converter built-in. No doubt you could use an external AtoD but it would be much easier and a lot cheaper to choose a more modern PIC that has an internal AtoD.
    On the other hand you could still use the PIC16F84 and go for a temperature sensor that has the conversion function built-in such as DS18B20.
     
  4. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
     
  5. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    I'd suggest a new uC as well.

    A 16F88 has an ADC module, and 8Mhz internal Oscillator (freeing up 2 I/O pins)

    Otherwise, it is pin compatible with the 16F84

    Newer low pin count (<=28) PICs with more peripherals such as the 16F690 and 16F1827 have a lot of peripherals and memory, but to somebody new to PICs, you may have more problems disabling all of those features to use it as a basic uC.

    If you don't have on already, I'd suggest a PICKit 2 from Microchip (not a clone) for programming. The PICKit 3 is also an option, but as of now, the PICKit 2 has more features, especially if working with mostly the mid-range PICs.
     
  6. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    If you do decide to go for a newer chip than the PIC16F84 you may as well get one that is specifically designed for driving motors and uses the "Advanced PWM" module. It incorporates motor drive features such as half-bridge/full-bridge drivers, programmable dead-band delay and auto shut-down.
    For a low pin count chip take a look at the PIC16F684 or for something with a bit more I/O see the PIC16F1826 and the PIC16F1827 chips.
     
Loading...