8085 - temperature sensor control motor

Discussion in 'Embedded Systems and Microcontrollers' started by gsan, Mar 10, 2008.

  1. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    Problem solved. Thanks for helping.
     
  2. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    This has GOT to be a school project! Only a school would use such an ancient chip.

    You'll need to use either an 8255 I/O port, or some 74xx377s and 74xx244s as output and input latches.

    You will probably need an A/D converter for your temperature sensor, unless you get a digital-type; but that will have its own problems.

    You will need to read the sensor, test the data, and filter it. Then you need to take action on the filtered data, depending on your design: are you controlling the motor, or is this just a "go/no-go" design?

    Look into implementing these ideas, then get back to us here with what you've done.

    --Rich
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
    I have many ideas. Which temperature sensor are we talking about? Could you define your requirements in some greater detail? What is the servo motor supposed to do when the temperature rises? How about when the temperature drops? Why are you using such an antiquated obsolete part? What development tools do you have available? Why are you out of ideas -- you haven't even gotten started yet?
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    There is some uncertainty in your post. Do you really mean to design a temperature sensor? Or do you just need to turn on a motor when a temperature has reached a defined level? That is a job for a thermostat, not an 8051.
     
  5. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    Problem solved. Thanks for helping.
     
  6. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Does the servo motor have a spec sheet that describes how to drive it? Lacking one on hand, can you go to the manufacturer's site and get a spec sheet?

    In this case, the 8051 will be reading the temperature sensor. When the program determines the value is high enough, then the 8051 will move the servo motor.

    First, learn how to operate the hardware. Then you can write the program to do so.
     
  7. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    (beenthere -- gsan is using an 8085 microprocessor!)

    gsan -- You will need to collect the data sheets for the sensor, the ADC, and the servo motor. The information in there will determine the specifics of your design. A simple picture of what you are about to do is:

    [sensor]---[ADC]---[Buffer]---[8085]---[Latch]---(Motor)

    The 8085 will read the ADC, and convert the number read into some action to send to the motor.

    --Rich
    P.S. -- Did your teacher specify a sensor and servo, or are you to choose your own?
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The 8085 does make life easier. See the above as the way to go.
     
  9. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    Problem solved. Thanks for helping.
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  11. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    Problem solved. Thanks for helping.
     
  12. RiJoRI

    Well-Known Member

    Aug 15, 2007
    536
    26
    Here is where you will earn your salary! ;)
    1) What is the crystal frequency for the 8085?
    2) The 8085 will divide that that frequency by some number to give the cycle time.
    3) The manual will tell you how many cycles each instruction uses.
    4) Write a subroutine to waste time:

    WASTE_TIME:
    ; Assumes count is in BC
    DCR C
    JNZ WASTE_TIME
    DCR B
    JNZ WASTE_TIME
    RET


    Remember, when you do a comparison, the Zero flag is set if the values are equal; and the Carry flag is set if one value is less than another (look it up, I'm at work and do not have my 8085 manual). Also, not-equal + not-less-than == greater-than.

    Also, a schematic of your project will help us help you with coding: are you using an 8255, or a latch and a buffer; are you using the I/O ports or memory-based I/O; how much decoding of the address lines are you doing? Without this information, all coding help will be rather vague.

    HTH,
    --Rich
     
  13. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    Problem solved. Thanks for helping.
     
  14. gsan

    Thread Starter Member

    Mar 4, 2008
    12
    0
    anyone can help me?
     
Loading...