Electronics > Projects, Designs, and Technical Stuff
looking for design ideas for 50kHz tone demodulator
(1/3) > >>
JeanF:
Hello,

what kind of circuit would you use to decode an asynchronous bit stream, at 9600 baud, which is on-off modulated on a 50kHz carrier? With negative logic, i.e. carrier on = 0 and carrier off = 1.
The two output wires are isolated from everything else, I suspect they are using an output transformer. The pulses are about 12V peak to peak. I connected some resistors of different values and found that the output impedance must be about 150ohms.
I’d like the input of the decoder/detector to be galvanically isolated as well, in order to avoid frying my board if someone disconnects the cable at the remote end and connects 230V right across it or whatever, but this can be discussed.

I’m looking for inspiration and/or ideas, not just to make the circuit work (it already does) but to learn along the way. You’ll find what I came up with at the end of the post :)

Thank you ! :)






A bit more context, for those interested:

The utility installed a smart meter at home, which comes with a “tele-information for clients” output port (they call it “TIC”). The previous generation of electronic meters already had that feature. But now with the new meter, the data format was changed. They added timestamps to the data, there are more data fields, and the baud rate is now 9600 instead of 1200.

There are many posts on French forums talking about “TIC”, with Arduino / Raspberry Pi interfacing examples, but almost all of them were posted before the protocol upgrade.

Most of the times people are using variations of this design:
https://hallard.me/blog/wp-content/uploads/2015/07/montage-de-base.jpg

With the two diodes the positive and negative going pulses are transmitted. I think the trick is the slow reaction time of the optocoupler, which, when you hold your tongue at the right angle, stretches and filter the pulses just enough to be decoded by your casual Arduino or FTDI board. But you have to adjust the series resistor to stay just at the edge of saturation, which is not very practical.

Well, it may kind of work at 1200 baud, but at 9600 baud it became very unreliable. One of the USB to serial boards that I have received data but with many errors, the other USB adapter did not decode anything at all.

That’s why I wanted to make a more reliable decoder. I breadboarded the circuit attached to this post and it seems to work OK, but I would like to hear your comments, suggestions or ideas for other designs.

One of the other designs, using a fast optocoupler to trigger a monostable multivibrator: http://bernard.lefrancois.free.fr/schema2.htm

I also looked at the LM567C, but the datasheet says “Fastest ON-OFF Cycling Rate : f0/20” so I think it would not be appropriate for 9600bps, as the carrier is at 50kHz.

Thank you for your ideas and comments :)
coppice:
I just timed the pulses with a timer on an MCU.
hamster_nz:
Have you thought about rectifier, low pass, then opto?

That would get rid of the 50kHz (or 100kHz when rectified) before the opto....
moffy:
Use a 220pF capacitor for C1 instead of the 10nF. Change R2 to 4.7k. See if that works. The 100 ohms in series with the optocoupler is too small and should be changed to something like 1k.
JeanF:
Thank you all for your replies.

coppice,
yes but I can't directly connect the output port of the source device to a MCU input, it's AC and the levels are too high

hamster_nz,
I'll give that a try next week when I get back home. Would this be an improvement? Is it better practice in general to filter the signal as early as possible? I was afraid that by doing so the output impedance of the filter, seen by the input of the opto, would be too high and there would be not enough current in the opto's LED (5-15mA as per datasheet). I could add a buffer but that increases the number of components upstream of the isolation barrier, and it would need an isolated supply.

moffy,
sorry I don'te quite get what you mean here. Changing C1 to 220p without changing R3 would shift the cutoff frequency of the RC filter to about 723kHz which is too high, and changing R2 to 4k7 would just increase the output impedance of the opto. Could you please elaborate?
About the 100R resistor, it seemed low for me as well, but as per the source impedance measurement I made, I thought 1k would have been too high. I probed across the resistor and I measured about 7.5mA peak which seemed OK. I will try with a pot and measure what's the maximum value before the receiver stops decoding, though.

I hope nobody is too offended that a beginner like me posted here in "projects" instead of in "beginners". As I was looking for design ideas, I thought is was OKish. In fact I have posted another thread in the beginners section, regarding the choice of values for R and C in the filter. (beware if you read both threads, I had the component designators mixed up)

Thank you again!
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod