Automatic Toilet Flusher


Closed Thread
Results 1 to 40 of 99

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Perhaps Portb.1 is damaged(from 9V??? through the servo???) if only LED2 works as expected.
    Test by replacing LED1 with LED2 and vice versa in your program.
    Or try to move LED1 to another pin e.g. portb.5 just in case portb.1 is not correctly configured(depends on PIC as some pins do other things as well).
    Remember to change the TRIS register also.
    Bill
    Last edited by gebillpap; - 13th February 2008 at 16:07.

  2. #2
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Perhaps Portb.1 is damaged(from 9V??? through the servo???) if only LED2 works as expected.
    Test by replacing LED1 with LED2 and vice versa in your program.
    Or try to move LED1 to another pin e.g. portb.5 just in case portb.1 is not correctly configured(depends on PIC as some pins do other things as well).
    Remember to change the TRIS register also.
    Bill

    Portb doesn't see 9 volts if you took a look at my schematic it has a separate power supply.
    The potentiometer is what connects to the pic from the servo.

    One LED works as expected. The sensor and PIC work together. The code looks OK.

    Are you by chance missing an IR LED? Maybe that is the one not lighting, or on the wrong pin?
    No everything is there and facing right

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The only thing I can say to try now is a different pin for the LED that is not working (or a different chip ) you could have a bad one.

    Sorry I can not be of more help.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    No it's not your fault

    I will try with just a regular switch and then see what happens

    What resistor should I use for connecting a switch to a pin?

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I use a 10K normally. Higher - more resistance- is fine if you do not have a 10K.
    The PBP manual under the BUTTON command has a schematic.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Cool thanks

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Techbuilder

    I saw this and thought about your project.
    https://www.gettoilettunes.com/?gcli...FREcagod0iI2bQ
    A few modifications and...well they would have to be trained to put the lid down.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Automatic 240V / 110V selector
    By The Master in forum Off Topic
    Replies: 5
    Last Post: - 13th October 2008, 01:33
  2. LCD automatic management?
    By ruijc in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th September 2008, 12:24
  3. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 08:57
  4. Automatic turn off
    By AMay in forum Schematics
    Replies: 22
    Last Post: - 6th February 2006, 13:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts