Parallel port directly output DCC? - Model Train Forum - the complete model train resource
Model Train Forum - the complete model train resource  

Go Back   Model Train Forum - the complete model train resource > Model Train Workshop > DCC Forum (Digital Command Control)
Forgotten your password?


Reply
 
Thread Tools Display Modes
Old 04-17-2008, 05:59 PM   #1
th1alb
Hobo
 
Join Date: Apr 2008
Posts: 5
Parallel port directly output DCC?

The DCC-MB project still requires a quite complicated board to generate DCC.

Wouldn't a parallel port be fast enough to generate DCC compatible signals by itself?

Then a much simpler booster design could be used, ultimately creating the cheapest command station, provided the software is competent.
th1alb is offline   Reply With Quote
Old 04-17-2008, 07:09 PM   #2
Lownen
Brakeman
 
Lownen's Avatar
 
Join Date: Mar 2008
Posts: 191
Images: 4
th1alb;

Welcome!

First, DCC is a serial protocol, not a parallel one. But serial port chips are designed to operate at a constant baud rate. DCC is not a simple square wave like most digital signals. DCC is a +/- signal whose amplitude (voltage) depends on the scale of the locomotives being driven. Most starter sets are +/-14v for HO and N scale, though in actuality this is on the high side for N scale.

The signal is +/- so that it will be the same, except for phase, regardless of the way that the locomotive is facing on the rails. For this reason DCC cannot use a "high" for one and a "low" for zero; reversing the loco on the rails would change ones to zeros and vice versa. Instead DCC uses varying pulse widths to represent ones and zeros. Narrow pulses are ones and wide pulses are zeros.

I have never heard of any Digital Signal Processor (DSP) chip designed to be programmable to handle this type of signal. I may very well be wrong, but I believe it is unique to DCC applications.
Lownen is offline   Reply With Quote
Old 04-17-2008, 09:41 PM   #3
th1alb
Hobo
 
Join Date: Apr 2008
Posts: 5
thanks lownen,

i looked into it myself further by reading some of the standards. i now understand that timing is very critical and perhaps the serial or parallel port cant supply that. What I thought was that I can through software turn a certain pin on a port off or on, and by that i mean +/- 11V or something in that area.

I guess the first objective would be to program a decoder. That way you barely need any current and perhaps what ever port you are using is sufficient.

My next try would be a sound card. I'm sure it can produce a signal that would resonate with dcc.
th1alb is offline   Reply With Quote
Old 04-17-2008, 10:15 PM   #4
Lownen
Brakeman
 
Lownen's Avatar
 
Join Date: Mar 2008
Posts: 191
Images: 4
Quote:
Originally Posted by th1alb View Post
My next try would be a sound card. I'm sure it can produce a signal that would resonate with dcc.
Remember, you're trying to create a square wave. You might succeed by over-driving a sound card so that you get a clipped signal, but it sounds kind of awkward to me. And remember, frequency doesn't actually vary... it is pulse width. Maybe it's more accurate to say that frequency varies on a pulse by pulse basis. I'm not sure if you can alter a sound card's output on a pulse by pulse basis. Let me know if you figure out a way. A $10 sound card is an interesting alternative to a $150 starter unit.
Lownen is offline   Reply With Quote
Old 04-18-2008, 08:19 PM   #5
th1alb
Hobo
 
Join Date: Apr 2008
Posts: 5
Thats what I'd say. Even if it is a week signal, I'm sure a booster would be easy to build.

Still not forgetting about the possibility that i can invert a pin on a computer port quick enough (what is it, about 50 microseconds for the "1" bit?).

I'll have to look into it...
th1alb is offline   Reply With Quote
Old 04-18-2008, 08:34 PM   #6
Lownen
Brakeman
 
Lownen's Avatar
 
Join Date: Mar 2008
Posts: 191
Images: 4
th1alb;

Here's the NMRA DCC Standards page. You can download .pdf files with all the specifications here.
Lownen is offline   Reply With Quote
Old 04-19-2008, 08:07 AM   #7
th1alb
Hobo
 
Join Date: Apr 2008
Posts: 5
Digital Command Station components shall transmit "1" bits with the first and last parts each having a duration of between 55 and 61 microseconds.

Let's go with 61 microseconds and multiply by two in order to get the duration of a complete electrical cycle of this signal.

Take 1000000 microseconds that are in one second and devide by (61 * 2) to get the required frequency of roughly 8197 Herz.

If I used 55 microseconds instead of 61, my required frequency could reach 9090 Herz.

In my calculations I am using the "1" bit because it has the shortest period.

I'm still researching what frequency I can run with either a parallel or serial port. From what I found so far however, 10kHz should be no problem when using a real time operating system. I have also read references of 330kHz.
th1alb is offline   Reply With Quote
Old 05-12-2008, 06:47 PM   #8
th1alb
Hobo
 
Join Date: Apr 2008
Posts: 5
Just want to add the following link:
http://homepages.paradise.net.nz/~rd...c/boostr-2.htm

It appears this is what I had been looking for, a booster directly hooked up to the PC. However I already ordered half the parts of DCC-MB's controler circuit.
th1alb is offline   Reply With Quote
Old 01-25-2012, 12:20 PM   #9
star2doc
Hobo
 
Join Date: Jan 2012
Location: Miami, Florida
Posts: 1
Even though a sound card would not output a square wave, it should be possible to simply over amplify and clip the wave form so it becomes a square wave. As to the problem of changing the frequency on each pulse, why not have the computer generate the wave form for the sound card to play? A wav file could be generated in advance with the proper frequency variations. Then the sound card would simply play this wav file in an endless loop. An op amp with positive feedback driving a transistor output stage would work as a booster.
star2doc is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


» Visit These Sites:
LGB World

Or Our European Train Website ModelRailForum




All times are GMT -5. The time now is 06:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2008-2013 Model Train Forum