Model railway preventing derailments on points

Hi, I am new to Arduino. I have a Raspberry pi3 controlling my
layout. I have NCE BD-20 sensors going to AIU's to track trains on JMRI. I am controlling my points through Tortoise motors and Switch 8's. I am using wiThrottle through the iPad.
I would think it should be a very easy task to use an Arduino to cut power to my (DCC) track when a turnout is opened or closed.
Has anyone any experience in using an Arduino to cut power to a block when a point is thrown?
Cheers,
Richard

As you already have a Raspberry Pi controlling things soul it not be better to have the Pi look after this as well?

I really don’t know Mike. I used to think I was good with computers, even though there were none in school when I graduated 40 years ago. lol. Now I know I am lost.
I think it would be easier to have a seperate system. A controller rather than a computer.
Thanks for your reply.

I think it would be easier to have a seperate system.

Most beginners do but they are wrong. The complications of communicating between systems is more involved that simply learning to code better in the first place.

Your Pi knows when the points will change so it is in an ideal position to turn on and off the power to the track either side of sending the command to move the points.

richardvanraay:
I would think it should be a very easy task to use an Arduino to cut power to my (DCC) track when a turnout is opened or closed.

That would be totally against the spirit of DCC.

The proper answer is to send a STOP message to the train that is approaching the turnout if it is set against it.

Even better would be to check if the turnout is correctly set before giving the train an instruction to go.

...R

Have you seen this page:-
Raspberry Pi Model Railway