Low voltage - high current AC motor speed control
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Modified circuit.

Try leaving out the DIAC. It's main purpose is to give a well defined breakover voltage to even out the differences between the positive half-cycle switching point ('first quadrant' in datasheets) and the negative half-cycle switching point ('third quadrant'). Without it you may see a difference in trigger point on a scope but it's unlikely to cause trouble with your model train. You will also be able to get much closer to 0° trigger angle than you could with a DIAC in circuit.



Figure 1. Triac phase control for dimmer application.



Figure 2. Triggering modes. Quadrants, 1 (top right), 2 (top left), 3 (bottom left), 4 (bottom right). Source: Wikipedia TRIAC.







simulate this circuit

Figure 2. Onboard triac control.

For onboard control you can trigger the triac directly from the micro-controller (through a suitable current limiting resistor).


Rectify, smooth and regulate the AC input. 
Tap off a zero-cross signal from your AC supply and feed this to the micro. Make sure that however you do this that any high-voltage transients can't damage the input. (Diode from input pin to V+, for example.)
Let the micro figure out when to pulse the triac.
You can now trigger the triac on first and fourth quadrant. It will be happy enough and it should really simplify your electronics.