Problems with Pspice

Discussion in 'General Electronics Chat' started by nexusdan, May 12, 2015.

  1. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    First of all, i dont know if this topic is located in the right place.
    (and sorry for my "english")


    I'm doing a project and I have to use ultrasonic sensors. Right now I want to simulate the signal conditioning circuits. In this case, for starting, we have the emitter circuit (transmitter). Explained below:

    Starting from a square wave (clock) 5V, the circuit amplify this signal and send it to the ultrasonic sensor. Easy.

    I'm starting to use Pspice / Schematics program and not dominated much it. My question is how I have to put the circuit to perform the simulation. In particular, how to add, or what I have to do with the component "to be the transmitter sensor" (located to the far right) . How to "close" the circuit for not leave floating components.

    I attache the circuit I could more or less make in the program, but is incomplete.

    (The sensor in question is MA40S4S)

    Greetings and thanks in advance.
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    You could insert a capacitor in place of the transducer. A piezoelectric transducer behaves electrically as a capacitor. Google 'piezoelctric equivalent circuit' for more refined models.
     
  3. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    Thanks @Alec_t for the answer. If i put a capacitor in the place of the transducer, the simulation throws me errors:

    "Node Pin1_emisor is floating"
    "Node Pin2_emisor is floating"
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Weird simulator! To keep it happy, try connecting either of those nodes to ground via a 10 Megohm resistor (which will have negligible effect on currents/voltages).
     
  5. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    Thanks @Alec_t for the answer again. Could you explain me exactly what is the purpose of these capacitors in these circuit?
     
  6. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    emisor2.png is the circuit, for simulating.
    v1111_v3333.png is the signal i really want. It's my clock signal amplified.
    But why the circuit has the capacitors? See the signal that give me in vpin1_emisor.
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    I see no need for them, especially as they are such low value. Who decided to include them?
     
  8. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    Dont know. I saw the circuit in one project, but it wasnt explained this part there.
    Next monday I will test the circuit in the laboratory without them :p

    Thanks!
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Don't expect much output from the transducer. The 7404 gates can provide only limited current.
     
  10. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    My purpose is transmit a square signal (clock signal). Receive it, amplify and convert it to square signal again (because the transducer recieve the signal very low and in sinuoidal form). Finally i want to compare the original square signal with the received signal to calculate the phase shift that exists between them.
     
  11. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    Well, I'm with the receiver circuit now. Then summarize a bit:

    I need to compare two square signals (one that is issued, the reference signal, and one (that will have a time gap) to be received in the distance).

    The idea is that the sensor transmitter (transducer) sends a square clock signal 40khz. Then with the receiver sensor, I receive that signal and I have to prepare it to work. The transducer picks me a 150mV sine signal. Therefore my design consists of a first power amplifier with small gain (x10), and then a second stage with more amplification (also include a band-pass filter 40khz).
    Finally the signal is converted to a square wave crossing detector in the third stage.

    So far the correct theory. And my circuit you can see it in the image attached.

    In graphics you can observe the received signal and the signals from each stage.
    My problem, as you can see, is that there is no "synchronization" between the received signal and the finally obtained (square signal of the comparator output). My question is how could solve the delay that occurs?

    Thing to consider in the design. As power supply signal I only have + 5V (therefore not feed operating symmetrically, + 5v, -5V).

    You can download my schematic files to make simulations from the following link:
    https://mega.co.nz/#!M1ogkJKJ!COYvsXt0TWlXjLQpNzwGpzi8KrIeAERyDoAelyKqyJo
     
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    That might be a problem, since you are effectively supplying only +/-2.5V. The TI datasheet for the TL082 gives no performance figures for supplies less than +/-4V. The TL082 does not have a rail-to-rail output stage.
     
  13. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    And do you know another OP to replace the TL082 for my purpose?

    (one person has told me that if im going to measure phase changes (and not delay), doesnt matter, my circuit could be work)
     
  14. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    I can't recommend one offhand. But could you use a switched-capacitor negative voltage generator to give -5V or so? That would widen the choice of suitable op-amps (and include the TL082).
     
  15. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    In principle, the power is going through an output of an Arduino board (5v or 3.3v). (Arduino board i going to be feed by Power over Ethernet).
    If I couldnt manage it, i would find a -5v power. (I try to minimize components, you know)
     
  16. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    If you switch to the free LTspice - there's a Yahoo Groups LTspice forum with people there who do this stuff every day.

    AFAIK: LTspice and Pspice are very similar, so they may be able to help you anyway.

    Since LTspice is free, it probably has the biggest user base of any of the Spice simulation programmes.
     
    nexusdan likes this.
  17. nexusdan

    Thread Starter New Member

    May 12, 2015
    10
    0
    Well, investigating about my problem.... in fact, there is not problem, cause what I really need is to measure the phase change that occurs when the wind causes the sound to travel faster or slower between the transducers.

    I update my current status of my project. I added a XOR gate to measure this delay in phase. Now I need to convert this square signal to a number, using for example a true-rms converter. Anyone could suggest me any chip for doing that? Or another possibility?
     
Loading...