FSK demodulator in firmware


+ Reply to Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,686


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    i have zero experience with zcd module but reading the blurb it seems to bias the pin to about 0.7 ish volts. the signal is applied through a suitable R, so that when the signal goes negative the bias is removed and a crossing is detected. if your input never goes negative its not going to work afaics. the comparator is the next best choice. you also might be able to drive the timer gate directly through a voltage divider if the modulation is deep enough
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    Yeah, never used ZCD before either, looked to be the perfect solution for this and a good excuse to play with it.

    Problem with the ZCD and my signal is that the bus idles at 35VDC for "long" periods of time and swings +0/-6V from there, not +/-3V around 35VDC.

    I figured I'd just slap a capacitor in series to remove the DC-bias and that did put "idle" at GND but then the resulting signal swings between GND and -6V instead of +/-3V so still no zero crossing. Adding a pullup outside of the series resistor sort of helped but made the zero crossing drift "upwards" during the "message". All in all it just didn't work relaibly.

    Posted on EEVBlog on how to properly remove the DC-bias and was shot down in flames for selecting the ZCD for this application - which I guess was in order since it did in fact not work :-)

    Comparator solution seems to work fine at the moment (these things now even has switchable hysteresis built in) but it has the drawback of being absolute level. For now it'll have to do, this is just an experiment at the moment.

    Unfortunately I don't have the device providing the REAL signal so I kind of have to emulate/test as best as I can.

    Thanks!

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    if you drive a voltage divider after the dc blocking capacitor? You will have a predefined dc level to consider as "0 volts" for the comparator I guess.

    Ioannis

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,686


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    looks feasible in simulations

    Name:  zcd.jpg
Views: 106
Size:  502.4 KB
    Warning I'm not a teacher

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    Thanks Richard, appreciate the effort but (always a but)....
    Problem with the ZCD and my signal is that the bus idles at 35VDC for "long" periods of time and swings +0/-6V from there, not +/-3V around 35VDC.
    If I'm not reading the sim setup wrong (which I might) you have a +/-3V signal sitting on a DC-bias of 32V when, in reality, it is a +0/-6V signal sitting at that 32VDC bias (or 35 but it doesn't matter).

    Try keeping that 32VDC bias but have the signal only swing down from there, and then make bursts, 25 cycles followed by 5 seconds of silence. What happens then?

    Also, and I'm not sure this matters but I think so, it doesn't look like Protues is simulating the true behaviour of the ZCD-pin. If it did you wouldn't be able to measure a signal there (which looks to be Ch. C on the scope) because as long as you have the correct (enough) series impedance the ZCD-peripheral will drive the input pin to a voltage of zero. Weather the signal is above or below GND is determined by if the internal current source or current sink is active.

    /Henrik.

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,686


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    i'm guessing the signal is impressed on to the power line in a "balanced" phantom cailho style. i don't know how to simulate that or how to extract it properly either in any simple way with proteus .
    it doesn't look like Protues is simulating the true behaviour of the ZCD-pin
    entirely possible, i never fully trust that it is fully realistic. it does however look like the zcd would work with an unbalanced ac signal provided the offset and magnitude are adjusted suitably.
    zcd is NOT particularly useful for your project since it cannot drive a timer gate directly or be a capture source
    Warning I'm not a teacher

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    zcd is NOT particularly useful for your project since it cannot drive a timer gate directly or be a capture source
    Oh, but it can. I guess it might depend on the specific device but on the 18F57Q43 I happened to use it certainly could.

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,686


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    more fully.
    zcd is NOT particularly useful for this project since it cannot drive a timer gate directly or be a capture source for any of the pic chips that my crusty old version of proteus can simulate
    Warning I'm not a teacher

  9. #9
    Join Date
    Oct 2012
    Posts
    83


    Did you find this post helpful? Yes | No

    Default Re: FSK demodulator in firmware

    Hi Henrik,
    If having access to the clean modulating sine wave signal is your goal I believe that an old school series circuit made of one capacitor and the primary winding of an high impedance, audio insulation transformer should do the trick.
    The capacitor will eliminate the DC component and transformer will pass only the sine wave. At the secondary winding of the transformer you should have, at scale, a copy of your desired signal to process and monitor as you wish.
    Some minor phase shift might be expected but everything should be affected equally.

    Regards,
    Nick

Similar Threads

  1. RF transmission and FSK modules
    By boban in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 08:19
  2. Replies: 3
    Last Post: - 27th October 2008, 16:08
  3. Firmware only USB (16F84A)
    By shahidali55 in forum General
    Replies: 3
    Last Post: - 23rd September 2008, 13:44
  4. supply FSK COB modules and FSK modules
    By Elsa zhang in forum Adverts
    Replies: 0
    Last Post: - 8th August 2006, 07:40
  5. PicBasic Pro FSK Modem
    By mikep in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th October 2003, 15:21

Members who have read this thread : 14

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