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.