Help with pic 12f629


Closed Thread
Results 1 to 40 of 53

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Some testings show the minimum time for 3 pushes is ... around 78 ms !!! @ 10ms debounce time and a Pause 0 for scanning ...

    so, I really doubt any finger could do that !!!

    Quote Originally Posted by gutisie View Post
    And about the button...what type would you use?...I am absolutly clue less.....and desperate...and tyre...and bald....and...etc...

    Any way....Ir sensors?...proximity switches?....
    so What moves the button ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Sep 2010
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Hi Ace,

    Thanks for your reply.

    The button is pressed by the piston on a gear box. As i said on other post, my actual reading is 15 to 20 cycles per sec. And i need to stop the piston, after 3 cycles.

    I have some Ir sensors. But putting them inside the gearbox or some where around, it is not a good idea.

    Hence, buttons is the best for my application i think.

    Thanks.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by gutisie View Post
    Hi Ace,

    , my actual reading is 15 to 20 cycles per sec. And i need to stop the piston, after 3 cycles.

    Thanks.
    20 c/s is 50 ms ... 3 cycles are 150 ms ...

    electronics works for 80 ms per 3 cycles ...

    SO ... if your switch is a good quality / low inertia one... it Works !!!

    but, of course ... if it works in oil ... ( gear box ...)

    magnetic detector looks to be THE thing ... I think telemecanique also have nice proximity switches that can reach 50 or 100 Hz ... ( I have some home ...)

    at least it's no more an electronics problem ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Why not a mag/prox sensor on a connecting rod or gear.
    Maybe even find a gear that is 3/1??
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Sep 2010
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    20 c/s is 50 ms ... 3 cycles are 150 ms ...

    electronics works for 80 ms per 3 cycles ...

    SO ... if your switch is a good quality / low inertia one... it Works !!!

    but, of course ... if it works in oil ... ( gear box ...)

    magnetic detector looks to be THE thing ... I think telemecanique also have nice proximity switches that can reach 50 or 100 Hz ... ( I have some home ...)

    at least it's no more an electronics problem ...

    Alain
    Thanks guys for your reply.

    So Alain, telemec?...ummm....I think they dont sell m5 or less like omron...any way...there are a bit expensive.

    Could you guys put me a link of a good button for this application?, Ebay?...thanks.
    Regards.

  6. #6
    Join Date
    Sep 2010
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Hello All,

    After trying with different sensor, and switches, I have found out that the reason for the strange behaviour, or mal functioning of the code, it is due to the excess of current supply.

    I have notice that when you have the "finger" on any of the conections, the systems works!!, but if you remove the finger, starts to go nuts again.

    So at the moment i am supplying from 3v = 2xAA bateries. I will put a LM317 to allow only 250ma to go through.

    See if that helps.

    I will post my results.

    Best regards.

    And thank you all for your help.

  7. #7
    Join Date
    Sep 2010
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    Hello All,

    I have put the voltage regulator, configured as a corrent regulator, allowing to pass only 250 mmA to the pic.

    Still does not work....if i put the finger on any conection...no problem, it works. But as soon as i remove my finger fron the conection, it goes dead.

    Why?...i thoght it was because the current, but this experiment has proved that it is not that. Hence, i am starting to believe that it may be because configuration in the pic.

    After having a closer look at the code, i notive pull ups where enable, should not that option be of sice i have pull up resistors in the circuit as shown, ?/...or is it the other way around?..

    Any body please?

    Ace?...

    Best regards.

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


    Did you find this post helpful? Yes | No

    Default

    Sounds like you need a capacitor across VDD/VSS.
    You posted a schematic earlier but said this is what I have with this and that exception and you also said your were using the software to set the configs.

    If we knew what the configs are set to and how the chip is connected it may help.
    Dave
    Always wear safety glasses while programming.

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