Automatic Toilet Flusher


Closed Thread
Results 1 to 40 of 99

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?
    Yep, at roughly 25mA per pin, at MOST! Try to draw any more than that, and you'll end with a pin that won't supply squat.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    Doesn't RBO and RB1 and so fourth supply 5+ to the pin?
    In your case RB0 is an input so it is looking for 0 volts to 1.2 volts for a LOW and 3.6 volts to 5 for HIGH. It is best to use a pull up or pull down resistor so the pin will be 0 or 5 and not floating around. Another part or two but I like using external pulls and not rely on the internals.

    So, when the sensor is sending its high signal to the PIC and connected to the PIC, what is the voltage.

    Try making the pin high or low with out the sensor.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Ok so I tried it with an led and it was working so I am guessing it is the servo
    the potentiometer must be broken in the servo

    When I get the new servo in the mail I will try it out

    thanks everyone

    by the way once everything works I will put up a "How to" for this automatic toilet flusher
    once I am done.

    Just in case anyone else wants to build it

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


    Did you find this post helpful? Yes | No

    Default

    Glad you found the problem!

    Just curios, what servo are you using?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Well I still don't know if it is the servo
    because when I compiled and programed it
    the led was supposed to stay on and the other was supposed to be low
    unless it made contact, then the other led that was low now becomes high and the other led that was high before now becomes low.

    Here is the code

    LEDSW var PORTB.0
    LED1 var PORTB.1
    LED2 var PORTB.2

    TRISB=%00000001

    Loop:
    If LEDSW=1 then
    High LED1
    LOW LED2
    else
    LOW LED1
    HIGH LED2
    endif
    Goto Loop

    End

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


    Did you find this post helpful? Yes | No

    Default

    And....what happens. Does anything light up? Did you try LEDSW HIGH by running a jumper to the +5 bus?

    Might help to know the voltage output of the sensor. Possible it needs conditioned before the PIC. Even it the voltage is correct the current may not be high enough to over come the pull down resistor.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    One LED stays on until the sensor makes contact
    but the other one does nothing.

Similar Threads

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