1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

coding using pic 16f877a with tsop4p38(proximity sensor)

Discussion in 'Microcontrollers' started by ripingz, Feb 18, 2012.

  1. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,903
    Likes:
    502
    Location:
    Cleveland, OH, USA
    It is still wrong. Pin 1 of each 555 needs to be connected to ground.

    As a suggestion, try to make your schematics a little clearer, like the one in the LTSpice file I presented early on. Connections that go all over the place may be electronically accurate and may simulate correctly, but are difficult for humans to read. If you had rearranged and simplified your schematic, I suspect you would have noticed the absent connections to ground.

    John
     
  2. ripingz

    ripingz New Member

    Joined:
    Feb 18, 2012
    Messages:
    56
    Likes:
    1
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,903
    Likes:
    502
    Location:
    Cleveland, OH, USA
    The connections now look correct to me.

    You still have to adjust the timing resistors (all resistors except R5 and R6) to get the right frequencies.

    John
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ripingz

    ripingz New Member

    Joined:
    Feb 18, 2012
    Messages:
    56
    Likes:
    1

    oooh my god...i still have to modifide the resistor.....huhu.....are they any formula to calculate the frequency by referring the ohm value...
     
  6. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    5,903
    Likes:
    502
    Location:
    Cleveland, OH, USA
    The answer is yes, the values can be calculated. Recall posts #16- 19 n February (http://www.electro-tech-online.com/...tsop4p38-proximity-sensor.125460/#post1039796).

    The circuit functioned properly in simulation at 5V. Then you tried some other voltages and, as expected, the frequencies were off. Now that you seem to have settled on 5V for your supply, the frequencies may be OK as designed. Nevertheless, I gave you a procedure to adjust the resistors to get the correct frequency. Most important will be the resistors affecting the 38 KHz oscillator.

    At some point, you need to breadboard this unit to get it working. In the past, that seemed to be a stumbling block, but I don't see how that step can be avoided if you want to demonstrate something. You already have the simulations for the transmitter. It just needs to be fine tuned to make it work with the receiver under the conditions in your laboratory.

    I don't believe you have a model for the receiver. We have not seen anything about the code you intend to use to interpret the received results into distance. That is a lot of work to get done in the next week.

    John

    Edit: Here's another link to decoupling/bypass capacitors: http://www.electro-tech-online.com/threads/article-the-basics-of-bypass-capacitors.124940/
     
    Last edited: Apr 8, 2012

Share This Page