I am trying to make a Model Railway train base board - this is not DCC.
This board would receive transmissions from a handheld device via 43 mhz.
(The handheld is completed on breadboard).
The train wheels pick up the power from the rail tracks which is normally 12v 2amp. it would power the L298n IC - where I am having some issue is how do I power the Nano from here - do I need to use a DC-DC converter or would a MOSFET do.
or
can i run the nano on 12v thru VIN.
It is a bad idea to run 12V into Vin. The on board 5V regulator is not heat sinked so will provide limited current before it over heats and shuts down. The best is to use a 12V to 5V DC-DC converter (step down or buck converter) and connect that to the 5V pin of the Nano.
Correct. And only limited current will be required in this case.
I would build your first prototype using the Nano's built-in regulator (Vin) and measure for yourself how much current is drawn from the 12V and find out whether the Nano's regulator gets hot. You will need to do this on the workbench so you can monitor the circuit. Warm is ok. But if it's too hot to hold your finger on, then you need to consider the buck regulator suggestion instead.
I would also consider a more modern and efficient motor driver. L298n is old and inefficient and will generate quite a lot of heat.
Seldomly. Intermittent contact now and then is to be expected.
Your advice about a quite large bulk capacitor is perfect. A serial resistor of some 10 ohm, before the cap, would help to keep cut downs, from the power supply, away.
As space is a issue what motor driver would you suggest. I have looked online and cannot figure it out.
I will test the voltage for the nano using vin.
The power throttle is on a encoder, nano so I could go down a bit on voltages.
One which comfortably exceeds the stall current of your motors.
The voltage will be 12V, you already told us that. The question was what will the current be? If you are not confident about the difference between voltage and current then you are not ready to attempt this project.
I should clarify something. I agree with @groundFungus. Generally this is a bad idea... unless you understand the limitations of the Nano's regulator and the demand your circuit will make on it. Based on your schematic (which needs improvement, by the way) I think the regulator will be ok, but should be tested carefully.
Pololu carries some pretty small (0.4" x 0.5", 0.6" x 0.8"). Like has been said, look for one that can comfortably provide the motor stall current, breifly and running current continuously and is rated for the motor supply voltage.
Avoid, please, the ancient technology L293 and L298 drivers.
You would have to find how bad power loss can get and have a large enough capacitor to provide enough energy for the arduino not to reboot during this time. Trial and error I guess… (or measure how much current is needed say for 100ms and size the cap for that hoping you’ll never loose power for more than 100ms)
Bravo, finally someone likes diagrams! Made my day! Even though you are not using DCC, you should look at some locomotive decoder designs - your project has so many things in common, and you could learn from 25+ years of ideas.
Before DCC in North America, there was the "Chubb" system invented by, I think, Bruce Chubb. It worked with analog tones sent over the rails, similar to DTMF.