Connect with us

24 hour time delay circuit

Discussion in 'General Electronics Discussion' started by podface, Apr 14, 2011.

Scroll to continue with content
  1. podface

    podface

    3
    0
    Apr 14, 2011
    i need some advice for making a time delay circuit which is a door catch
    im trying to make a circuit that powers a solenoid for a set time and turns off after...say 24 hours. Also the time intervals need to be easily changed.
    im thinking about using a 4060b ic or a pic.

    i was thinking something like this
    http://www.edutek.ltd.uk/Circuit_Pages/24hrTimer.html
    but would it be better with 1 4060b instead of 2

    any help would be appreciated
     
    Last edited: Apr 17, 2011
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,412
    2,780
    Jan 21, 2010
    That circuit looks fine as long as you're not too concerned about 5% or even 10% variance between the calculated and actual intervals.

    A pic could give you a timer as accurate as it's clock, and potentially programmable for any duration that you desire.
     
  3. cizel

    cizel

    2
    0
    Apr 16, 2011
    Maybe this could be usefull, it's a program that creates the code for a PIC and you give it the time you want it to delay. is very simple and easy to use

    I used it for the PIC 16F883

    http://www.mediafire.com/?a9ngrgyomnru44u
     
  4. podface

    podface

    3
    0
    Apr 14, 2011
    im kind of a complete noob with pics so which pic would you recommend that is quite accurate and is easy to program
     
  5. cizel

    cizel

    2
    0
    Apr 16, 2011
    I just have used the 16F883, so i can't tell you the easiest pic to use, this is not that easy because it has 24 pins and there are pics with less pins. Downloading the datasheet http://sklep.avt.pl/photo/_pdf/PIC16F887I_P.pdf?sess_id=053e849f01e8561820c32ce1ab0cdace you can see the different commands to program the pic.
    This is an example program that given a certain number it returns you the square number of the given one

    LIST P=16F883

    ;#INCLUDE <P16F883.INC>

    TRISA EQU 0x85

    TRISB EQU 0x86

    ANSEL EQU 0x188

    ANSELH EQU 0x189

    PORTA EQU 0x05

    PORTB EQU 0x06

    STATUS EQU 0x03

    E EQU 0x21

    H EQU 0x22

    A EQU 0X23



    ORG 000H



    BANKSEL TRISA

    MOVLW 0x80

    MOVWF TRISA

    CLRF TRISB

    BANKSEL ANSEL

    CLRF ANSEL

    CLRF ANSELH



    INI:

    BANKSEL PORTA

    CLRF PORTA

    CLRF PORTB

    CLRF E

    GOTO SUBINI



    SUBINI:

    CLRF H

    CLRF A

    BTFSS PORTA,7

    GOTO $-1

    BTFSC PORTA,7

    GOTO $-1

    INCF PORTA

    MOVF PORTA,0

    MOVWF E

    GOTO POT



    POT:

    INCF H

    INCF A

    MOVF PORTA,0

    SUBWF H

    MOVF A,0

    MOVWF H

    BTFSS STATUS,0

    GOTO SUM

    GOTO SAL



    SUM:

    MOVF PORTA,0

    ADDWF E,1

    GOTO POT



    SAL:

    MOVF E,0 ;0X01 E

    MOVWF PORTB ;0X01 PB

    MOVLW 0x0F

    SUBWF PORTA,0 ;C=0

    BTFSS STATUS,0

    GOTO SUBINI



    END
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,412
    2,780
    Jan 21, 2010
    Also take a look at the PicAXE.

    The chips individually cost more, but easier and cheaper to program. If you want to move up to a real PIC programmed in assembly language or C or PicBASIC later on, you will have some experience that will be valuable.
     
  7. podface

    podface

    3
    0
    Apr 14, 2011
    nice one
    thanks guys
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-