DCC programming

I am trying to write a program to control a model railway.

I have an idea that a processor has to be able to inject my various loco numbers and speed into a never ending serial chain of bipolar 50uS and 100uS pulses. (OFFset symmetrical between +15 v and -15V)

I now need Train speed control to complete the system automation.

I am using a separate processor for this (UNO) and having it controlled thro its analogue input terminals by converting 4 PWM outputs from the main processor (MEGA) into DC voltages.

So far I have managed to convert a DC voltage level into a 7 bit code (+ 1 zero bit) after the loco number which I have connected to a dual half bridge.

I need now to generate my DCC loop without the unwanted additional symmetrical pulses generated during read time.

Can anyone help or is the UNO's architecture not appropriate?

A few months ago I asked for a train identification solution. Someone suggested using magnetic reed switches on the track. Thanks for that.Now I've got the spacing right it works very well.

Are you asking if an Arduino could generate the pulses required by a standard DCC system?

If so the answer is YES and it has been done before. Google Arduino DCC controller

If you are trying to develop some non-standard system then you need to describe the system you want to implement.

...R

I'm having a look at CmdrArduino_Controller_IR_LCD_v2_7.

I've had a look in the library but cannot find DCCPacket.h , DCCPacketQueue.h , DCCPacketScheduler.h

Where should I look?

pgramwiseman:
I'm having a look at CmdrArduino_Controller_IR_LCD_v2_7.

I've had a look in the library but cannot find DCCPacket.h , DCCPacketQueue.h , DCCPacketScheduler.h

Where should I look?

You need to post a link to the page with the library.

...R

I'm not clear on what you mean by link.

A link to the web page where you got the library - the equivalent of this link

...R