RF circuit

Discussion in 'The Projects Forum' started by jchino28, Mar 3, 2008.

  1. jchino28

    Thread Starter New Member

    Mar 3, 2008
    3
    1
    I'm trying to simulate my rf circuit but i need some help. I designing an RFID project and i need to know how i would simulate a mock RFID tag in PSPICE. The type of RFID card i will use, uses FSK modulation, so it will modulate data at two frequencies within a carrier. Anyone know how i can do this.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could use a PWL (Piece-Wise Linear Points). This is a list of time vs voltage or time vs current. The easiest way to generate the list would be to use a spreadsheet or write a program. It's up to you to choose how many data points you wish your SPICE emulation to churn through.

    Circuitmaker Student has an option in the Signal Generator source to input a filename as an external PWL source. I've looked at Linear Technology's SwitcherCad III/PSpice, but haven't been able to figure out how to import a PWL list from a file yet.
     
  3. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    LTspice has a modulator that should make it very easy. I don't know if Pspice has something similar.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    After some more poking around in LTSpice, I found the waveout.asc and wavein.asc examples in the Educational folder. This is just what you need.

    Copy the waveout.asc model and use it to generate whatever signal you need in a .wav file, then use that .wav file to feed your simulation like has been done in wavein.asc
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    That sounds like a Rube Goldberg way of doing it. If you're going to generate the signal in LTspice, and reproduce it in LTspice, why go through the .wav file? What does that accomplish that you can't do in a single simulation?

    Am I missing something?:confused:

    I suppose that, if the generation sim was very slow, the .wav file method could speed up subsequent simulations of the RFID, but the modulator in LTspice is a behavioral component, so it doesn't slow down a simulation to any considerable degree.

    EDIT: I have used the .wav generation feature to do a before-and-after test of a simple delta-sigma audio A/D.
     
  6. scubasteve_911

    Senior Member

    Dec 27, 2007
    1,202
    1
    Rube Goldberg, that hurts !!!
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I had the wavein and waveout simulations working in mere moments.
    I tried the modulator, but received cryptic error messages when I tried feeding various signals to the FM and AM inputs, and the HELP file was no help in resolving my dilemma.

    So while my interim solution may not be ideal, it was a working, viable and repeatable model - which by the way, you have yet to provide. :rolleyes:

    If you have a better solution, enlighten rather than denigrate.
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Rube Goldberg rocked ;)

    His cartoons were still in the paper when I was a kid. My Grandfather was a Foreman in GE's steam turbine plant, and would read the funny papers as soon as the newspaper arrived, howling with glee at the improbable creations that existed only in Rube Goldberg's mind - and the funny pages. :D
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I'm sorry if I offended you.:( I just couldn't imagine how you generated the FSK waveform that necessitated going through the .wav write/read process. Still can't.:)
    I don't believe you have enlightened us either, except to say you used the .wav writer/reader. How should one use wavein.asc to generate an FSK waveform? Perhaps by using the PWL generator, as you suggested earlier?

    Below is an example of generating FSK, then amplitude-modulating a carrier, using the LTspice modulator.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Great - that's just what the OP needed :)

    OK, in the the waveout.asc is an example (template, if you will) for generating whatever arbitrary waveforms your circuit design might need (please look at the file, in the Educational directory as I previously posted) and wavein.asc is an example on how to utilize those arbitrary waveforms in a circuit design (also in the Educational directory). One could use waveout.asc as a model to build whatever circuit necessary to generate the desired output waveform.

    I did stop searching after I found those examples, but there must be examples somewhere of using the Modulator function. I just have not found them yet.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The two examples I am aware of are \examples\Educational\PLL.asc and \examples\Educational\PLL2.asc. I think they are somewhat helpful, if you play with them. I agree that the help file is not very forthcoming. Here is what the help file says:
    I suppose the .wav tools would be useful if you wanted to use the same source in several different simulations. It might be simpler than copying and pasting a PWL source from one schematic to another, not to mention having the massive PWL string clutter up each schematic.
    I do get a little nauseous just thinking about creating a PWL source that would duplicate the waveform I posted above. I think maybe a program would be about the only feasible way to do it.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    On generating a PWL file - yes, you're right, it wouldn't be practical to try to enter all of that kind of data by hand. I used a PWL file yesterday to reply to another poster in regards to a problem they were having with a relay following the PWM fading of their dome lamp; the off-time increased but the on-time was constant. It was easier to write a quick program to generate the datapoints than it was to try cobbling something together inside the program.

    I saw that copying/pasting a long PWL string might be an option in LTSpice - but that would be a last-ditch desperate move IMHO.
     
  13. jchino28

    Thread Starter New Member

    Mar 3, 2008
    3
    1
    thanks for the info guys.
     
Loading...