Maker Pro
Maker Pro

Receiving low frequency square wave fm question

L

Lukos

Jan 1, 1970
0
I am looking at circuit design to use for model railway DCC design,
specifically how to design a circuit to receive and decode it.
The data is transmitted serially as FM data at approx 9600bps on a
differential (RS485 I think) line where a 1 bit is a positive and
negative half cycle of no more than 64uS and a 0 bit has half cycles
in excess of 70uS.
The current designs I have seen use a PIC to decode the data by
sampling 22uS time slices and using the number of time slices to
calculate whether the current data is a 1 or a 0 but this appears
overly complicated since the data cycles are of a defined duration.
Does anyone know if there is an IC (or combination of ICs) that can be
programmed simply to receive this type of FM data and decode the bytes
which could then be passed in parallel to a PIC for the functional
decoding? You can assume that the electrical line is already received
to produce a TTL signal of the incoming data (i.e. between 0 and 5v
instead of differential). I have seen many flavours of UARTs but these
don't seem to work with modulated signals, only with unmodulated
serial data.

Thanks in advance

Luke
 
J

J.A. Legris

Jan 1, 1970
0
I am looking at circuit design to use for model railway DCC design,
specifically how to design a circuit to receive and decode it.
The data is transmitted serially as FM data at approx 9600bps on a
differential (RS485 I think) line where a 1 bit is a positive and
negative half cycle of no more than 64uS and a 0 bit has half cycles
in excess of 70uS.
The current designs I have seen use a PIC to decode the data by
sampling 22uS time slices and using the number of time slices to
calculate whether the current data is a 1 or a 0 but this appears
overly complicated since the data cycles are of a defined duration.
Does anyone know if there is an IC (or combination of ICs) that can be
programmed simply to receive this type of FM data and decode the bytes
which could then be passed in parallel to a PIC for the functional
decoding? You can assume that the electrical line is already received
to produce a TTL signal of the incoming data (i.e. between 0 and 5v
instead of differential). I have seen many flavours of UARTs but these
don't seem to work with modulated signals, only with unmodulated
serial data.

Thanks in advance

Luke

This is exactly the sort of application for which a PIC (or other
simple uC) is suited. It couldn't be much simpler.
 
A

Anthony Fremont

Jan 1, 1970
0
Lukos said:
I am looking at circuit design to use for model railway DCC design,
specifically how to design a circuit to receive and decode it.
The data is transmitted serially as FM data at approx 9600bps on a
differential (RS485 I think) line where a 1 bit is a positive and
negative half cycle of no more than 64uS and a 0 bit has half cycles
in excess of 70uS.
The current designs I have seen use a PIC to decode the data by
sampling 22uS time slices and using the number of time slices to
calculate whether the current data is a 1 or a 0 but this appears
overly complicated since the data cycles are of a defined duration.

Well, it's a little more complicated than that. 0 bits can be stretched
into extremely ugly shapes and 1 bits aren't whole lot better. It'd be
pretty tough to do this without a microcontroller. I'm not saying it
couldn't be done, but I'd bet that any single chip solution you find that
can "just do this" is going to be a pre-programmed micro of some sort. All
in all it's a pretty ugly way to do things IMO, seems like they could have
come up with something a little more backwards compatible.
Does anyone know if there is an IC (or combination of ICs) that can be
programmed simply to receive this type of FM data and decode the bytes
which could then be passed in parallel to a PIC for the functional
decoding?

Yes, a micro can be programmed to do this, but you already know that.
You can assume that the electrical line is already received
to produce a TTL signal of the incoming data (i.e. between 0 and 5v
instead of differential). I have seen many flavours of UARTs but these
don't seem to work with modulated signals, only with unmodulated
serial data.

I'm curious as to why that is. Are you hacking something? ;-)
 
L

Lukos

Jan 1, 1970
0
I'm curious as to why that is. Are you hacking something? ;-)

No, it was just I didn't want someone to waste their time explaining
about the decoding of the bus into a TTL digital system since I
already know how to do that with RS485 receivers etc.

I want to build my own accessory decoders since the pre-manufactured
ones are quite pricey for what they are and you need loads of them for
a reasonable sized layout. Also I am trying to build some memory wire
point motors which cannot be driven directly from a standard accessory
decoder - I will use a regulator configured as a constant current
source for each wire.

Thanks for everyone's help - a PIC it is then : )

Luke
 
A

Anthony Fremont

Jan 1, 1970
0
Lukos said:
No, it was just I didn't want someone to waste their time explaining
about the decoding of the bus into a TTL digital system since I
already know how to do that with RS485 receivers etc.

I want to build my own accessory decoders since the pre-manufactured
ones are quite pricey for what they are and you need loads of them for
a reasonable sized layout. Also I am trying to build some memory wire
point motors which cannot be driven directly from a standard accessory
decoder - I will use a regulator configured as a constant current
source for each wire.

Thanks for everyone's help - a PIC it is then : )

That's what I would likely do. Aren't there any cheap pre-programmed PICs
out there? I looked a little, but didn't find anything. Heck nowadays you
can even find OBDII interface chips (PICs) for under $20, but I guess even
that might be pretty steep for you if you need a bunch.

From what I've been able to find, you won't need any specialized level
converters just to receive data. It looks like four diodes to recitify the
voltage from the tracks for a power supply and you can pick the DCC straigh
off one of the rails. You might like this page:
http://technology.niagarac.on.ca/staff/mcsele/dcc.htm
 
P

Paul Burke

Jan 1, 1970
0
Lukos said:
I am looking at circuit design to use for model railway DCC design,
specifically how to design a circuit to receive and decode it.

You might want to look at the UK Model Electronic Railway Group:
http://www.merg.org.uk/

They produce kits for various DCC functions, and I'm sure if you join
you can participate in the designs.
 
Top