Controlling curtain by temperature

Discussion in 'Embedded Systems and Microcontrollers' started by nagufever, Sep 9, 2010.

  1. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    Can you give a sample code how to program a motor to open and close using PIC microcontroller after getting input from LM35 temperature sensor(too hot and too cold)?and also a sample motor circuit to be connected to the PIC?
     
    Last edited: Sep 9, 2010
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    buy a Hunter Douglas motorized blind with an IR or RF controller and hack into that.
     
  4. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    help on DC motor circuit to be added to the PIC microcontroller.the motor need to move forward and reverse. is there any sample coding to apply?suggestion on which PIC microcontroller is suitable for this project?
     
  5. lihle

    Active Member

    Apr 12, 2009
    83
    3
    man this is a simple project you have to put all your effort towards achieving this . this would help you get more experience to programming and design. anyways i will help you since i have done this before.

    since you want to automate the curtain system. for a prototype just use a stepper motor that runs at 5V connected to Darlington pair transistors that would turn a relay forward and reverse.

    a simple micro controller that you can need to use is the 16f876 since it has the ADC converter. what you can do here is that you set the votages to be under stand as temperature that would then turn the motor to open if it is hot else close.

    having any problems i will give you my code for my temperature incubator project i did sometime back.

    lihle
    " every thing is worth a try"
     
    nagufever likes this.
  6. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    hi,
    the size of the motor i am not sure
    1. the current is 1.5A
    2.The working voltage is 24VDC
    these are the minimum specification for the curtain motor.if can can you suggest DC motor that meet the above specification.
     
  7. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    hi,
    doesn't stepper motor is more expensive than DC motor? and below is the block diagram of my project.Can you suggest what improvement i need to make if i use PIC16F876 as the microcontroler? [​IMG]
     
  8. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    hi,
    stepper motor was lihle idea.i am thinking of using a DC motor with use two relays: one of them can change polarity for DC motor and another is for connecting suplly voltage.Or a H bridge circuit for DC motor control with 2 digital line.is there any other ways to drive a DC motor just to move reverse and forward?
     
  9. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Check out the Somfy line
     
  10. lihle

    Active Member

    Apr 12, 2009
    83
    3
    The reason i cave chosen a stepper motor is because some of the curtains has to be opened in steps as in open up for few centimeters to allow little light intensity. its true you can use the DC motor if you want to fully open it when it is cold and fully closed when cold.

    as for your schematic you its seems okay but what you can use to drive the motor is just a transistor used as a switch to turn on a relay then turn the motor. if you will be using a stepper motor connect 4 darlignton pair transistor aand they do have datasheet for connection.
     
    nagufever likes this.
  11. lihle

    Active Member

    Apr 12, 2009
    83
    3
    what you can do you just connect the out put to four drivers whereby you can use Darlignton pair to drive the motor. also you can try to find datasheet for the steeper motor.
    i have attached the data sheet.
     
  12. lihle

    Active Member

    Apr 12, 2009
    83
    3
    what the receiver for since you didnot mention it before. if you are using the PIC 16f84 i will give you the code since one of the guys i am with is re-doing that using stepper motor and the pic16f84
     
  13. lihle

    Active Member

    Apr 12, 2009
    83
    3
    sorry man i made a mistake you have to use darlignton pair transistor to drive the stepper motor without relays. i got confused with the DC motor that you can use just one transistor to turn the relay which will then turn on the motor.

    lihle
    "if you are wrong you have to be corrected and be willing to accept that"
     
  14. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    the bluetooh receiver is to open and close curtain in emergency time.does anyone have the cluetooth receiver and transmitter circuit?I tried googled and searching in the net, but it is hopeless.
     
  15. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    can you give the code and your curtain system circuit?It is because i need to make some minor adjustments to the block diagram.i might be using either PIC16F877,PIC16F628,or PIC16F2550.
     
    Last edited by a moderator: Sep 12, 2010
  16. lihle

    Active Member

    Apr 12, 2009
    83
    3
    okay man i will get it for you. but my advice is that if you want to build up an reciever and transmitter. for simple purposes you can use the transmitter from a wireless door chime and the receiver.

    i will get the code by the end of the week.
     
  17. lihle

    Active Member

    Apr 12, 2009
    83
    3
    here is the code from one of my friends trying to redo the project i once did. i am doing this since it seems you its urgent. here my friend use a keypad to punch and digit from 1-9 and move the stepper motor in steps.
    the one file is for transmit- what you can do you can burn the program and the attach a transmitter to remotely send the data.

    the othe file is for the receive but currently he is connecting direct wires since he does not have a receiver but the whole system works fine. he is able to open the curtain in four steps.

    sorryb there are no comments i didnt have time to put them.

    further details you can ask some one to read it for you.

    lihle
    'trying is what make us who we are'
     
    nagufever likes this.
  18. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    can you attach the schematic diagram for your curtain project?i want to compare with mine.
    nagufever
     
  19. lihle

    Active Member

    Apr 12, 2009
    83
    3
    sorry man i dont keep schematics or picture but what i can do is to explain. one side there is a stepper motor and on th other side a wheel. when the motor is energised it pulls a string that goes through the wheel of the motor and the wheel at the back.the curtains are two and they meet at the center. the string is attached to the curtain using hooks.

    i wish i could help more but i cant.

    lihle
    ' be ready to face challenges in life'
     
  20. nagufever

    Thread Starter New Member

    Sep 9, 2010
    9
    0
    can anyone suggest where to find bluetooth remote control circuit?i already had a hard time finding it.
     
Loading...