# Probably an easy problem to solve for you veterans



## Mike_P (Dec 30, 2016)

** Update: this issue is resolved***

This is my first try with any model trains and it's a simple oval layout with two blocking sections and two power supplies, just like this: http://www.ross-crain.com/rr_basic_wire/wire10-4.gif

It's an N scale train that is powered by an Arduino with a motor shield (2 motors with two separate power supplies). When the train passes over a magnetic reed switch, it slows down into the station and then triggers another Arduino to play a sound file. 

Here's the issue, the sound is playing while the train crosses from one block to the next (crosses power supplies). It seems that when the train makes that connection between blocks (closes the circuit) that it causes the sound file to be distorted. This means there is some kind of feedback through the power supply right? If I remove the train before it crosses that insulation point, the sound file plays fine. 

I got some advice to try this "The Diodes are put in series with the track power supply leads to prevent feedback between the track power supplies as the train tender contacts traverse the gap between the blocks" but I couldn't get my train to move once I did that with 12V-1A diodes going to each outer rail. 

I thought a video would be best to explain the issue so you can hear it. Please disregard the absolute mess under the table. That will all be cleaned up tidy once the project is complete :





Thanks in advance for any advice you guys can give me. I've spent about 20 hours trying to solve this through process of elimination with no luck. 

-Mike


----------



## J.C. (Dec 24, 2016)

not having the foggiest what a Arduino is , ill ask it the thing activated by current draw on that section ? if so is the cars are lighted that might try to reactivate system, tried a similar thing with a pickax never got it to work.


----------



## 1905dave (Sep 18, 2016)

That wiring diagram really doesn't make any sense. Why do you have two blocks with separate power supplies? What are you trying to do with that set up? 

Why don't you use one power supply and two blocks? Why even have two blocks? Why not one block with the reed switches controlling one speed controller?


----------



## Lemonhawk (Sep 24, 2013)

You do realize that as the wheel of the truck crosses the gap, its the same as a short between the 2 power supplies. So the questions is can you operate without the gaps and with a single power supply? Where are the Arduino's?


----------



## Mike_P (Dec 30, 2016)

*SOLVED!*

I solved it! Woke up in the middle of the night with an idea. Just tried it out and it worked. Completely unrelated to what we've been talking about too. I was sending a Serial Print command from one Arduino to the other and, somehow, that was causing interference. As soon as I removed it, the interference was gone! 

By the way, that diagram was the closest that matched my setup but I technically don't have two power supplies. I have an Arduino motor shield with two separate motor drivers that operate each block so I should have been more clear about that. 

Thanks guys! I'll be sharing my project here in the near future as it starts to come together.

-Mike


----------



## The New Guy (Mar 11, 2012)

Mike_P said:


> ...technically don't have two power supplies. I have an Arduino motor shield with two separate motor drivers that operate each block so I should have been more clear about that.


Hey Mike, glad you figured out your issue.

I'm curious on this point. perhaps you could clarify for me.

The motor shield connects to the motor directly? as in on board? so it's an open source decoder?

I'm hung up on the "two separate motor drivers". The motor shield is the "driver", correct?



arduino.cc said:


> The Arduino Motor Shield allows your arduino to drive DC and stepper motors


I don't understand either the redundancy or the parlance.

However I did fall a lot as a child. and have never stayed @ a holiday inn express.
just explaining my deficiencies.


----------



## Lemonhawk (Sep 24, 2013)

So essentially you have 2 DC throttles (the shields) that are external to the DC loco's, they replace the power packs in the diagram. This allows you to "Automate" the operation based on engine position feedback to the Arduino's.


----------



## Mike_P (Dec 30, 2016)

Lemonhawk said:


> So essentially you have 2 DC throttles (the shields) that are external to the DC loco's, they replace the power packs in the diagram. This allows you to "Automate" the operation based on engine position feedback to the Arduino's.


Exactly correct!


----------



## Mike_P (Dec 30, 2016)

*Update*

Since you guys were patient with me, here's an updated video showing one train perform a complete loop:


----------

