Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline IBtrain  
#1 Posted : 14 January 2022 20:13:45(UTC)
IBtrain

Canada   
Joined: 25/05/2013(UTC)
Posts: 80
Location: Nanaimo BC
Hi

Nico Teering designed and developed the DCCNext based on an Arduino.

Does anyone have any advise/tips on how to have DCCNext
DCCNext web site
switch a Marklin Turnout?

In his manual
Mardec manual
he has two options;

1) is to use MOSFETs to control the turnout
MOSFETs.jpg

here the MOSFETs uses DC volts to switch the turnout.
Problem; not only does Marklin use AC volts but the Marklin yellow wire is also connected to one side of the small lantern and the other side to the brown "O" on the rails. Would this cause a short circuit?

2) is to use a relay. Here the relay is used to power the frogs.
Relays.jpg

I tried connecting the brown "O" AC volts, to the center pin of the relay and one of the blue wires from the M turnout to the normally open on the relay and the same on another relay for the second blue wire. But I was not having success, the relays were cycling back and forth a few times and then would stop. I was using DC volts to power the relays (i.e. the lower part of the relay in the photo.)

Any help or advise would be appreciated

Thanks,
Kai.





Marklin K-track, Ecos 50200, RocRail
Offline DaleSchultz  
#2 Posted : 14 January 2022 20:26:42(UTC)
DaleSchultz

United States   
Joined: 10/02/2006(UTC)
Posts: 3,973
for the case of AC with mosfets why not run the supply through a diode so it is half wave rectified?
or use a DC source.
Dale
Intellibox + own software, K-Track
My current layout: https://cabin-layout.mixmox.com
Arrival and Departure signs: https://remotesign.mixmox.com
Offline IBtrain  
#3 Posted : 14 January 2022 21:43:36(UTC)
IBtrain

Canada   
Joined: 25/05/2013(UTC)
Posts: 80
Location: Nanaimo BC
Originally Posted by: DaleSchultz Go to Quoted Post
for the case of AC with mosfets why not run the supply through a diode so it is half wave rectified?
or use a DC source.


Hi Dale
Thanks for the reply.
I only know the basics of electronics so pardon my ignorance.

For the MOSFETs you are saying use a diode on the brown "O" wire and another diode on the red "B" wire (from a Marklin transformer) before they connect at the GRD and VIN pins on the MOSFETs?
I imagine the direction of the diode is important?

In Niko's diagram, do you know why there is a diode connect between the V+ and V- before going to the solenoid?

About using a DC source, my concern is the internal wiring of the lantern.
If I use a DC source to the MOSFETs I thing I would have to cut the yellow wire before it connects to the lantern or else it would get two sources of volts.
internal wiring of turnout.jpg
or am I not understanding it correctly?


Thanks,
Kai



Marklin K-track, Ecos 50200, RocRail
Offline DaleSchultz  
#4 Posted : 15 January 2022 03:56:34(UTC)
DaleSchultz

United States   
Joined: 10/02/2006(UTC)
Posts: 3,973
The yellow and brown wires would be what you use to power the MOSFETs

Here is what I was thinking to let only the positive half of the AC signal through:

halfwave.png

Yes, the orientation is important.

If you are new to electronics, I suggest reading through the guide I made for using LEDs at
https://cabin-layout.mixmox.com/2019/10/modelling-with-leds.html
as it goes over the fundamentals of the diodes and rectifying the AC current that you need here also.

The incandescent light in the turnout lantern is not a full short, it either has enough resistance (being an incandescent) or has a resistor if it is a LED type. However, since current is only supplied during switching the light will be off most of the time, unless you isolate it from the yellow wire and feed it power separately.

I think the diodes across the MOSFET outputs are there because they are driving coils in the turnout, and the coils send a reverse pulse back after switching, so typically one places a diode across the coils to direct the reverse voltage to the other pole. It is commonly called a flyback diode.


Dale
Intellibox + own software, K-Track
My current layout: https://cabin-layout.mixmox.com
Arrival and Departure signs: https://remotesign.mixmox.com
Offline IBtrain  
#5 Posted : 15 January 2022 07:21:20(UTC)
IBtrain

Canada   
Joined: 25/05/2013(UTC)
Posts: 80
Location: Nanaimo BC
Originally Posted by: DaleSchultz Go to Quoted Post
The yellow and brown wires would be what you use to power the MOSFETs

Here is what I was thinking to let only the positive half of the AC signal through:

halfwave.png

Yes, the orientation is important.

If you are new to electronics, I suggest reading through the guide I made for using LEDs at
https://cabin-layout.mixmox.com/2019/10/modelling-with-leds.html
as it goes over the fundamentals of the diodes and rectifying the AC current that you need here also.

The incandescent light in the turnout lantern is not a full short, it either has enough resistance (being an incandescent) or has a resistor if it is a LED type. However, since current is only supplied during switching the light will be off most of the time, unless you isolate it from the yellow wire and feed it power separately.

I think the diodes across the MOSFET outputs are there because they are driving coils in the turnout, and the coils send a reverse pulse back after switching, so typically one places a diode across the coils to direct the reverse voltage to the other pole. It is commonly called a flyback diode.


Hello Dale
Wow this is great.
This looks like something I can do. Adding the drawing really helps a lot.ThumpUp
I read through your link, great information, lots to take in Confused but you explained it very clearly. (I hope there is no test Laugh )
Thanks for sharing that.

What I don't fully understand is why does the red wire only need a diode. Doesn't the black (ground wire) also cycle but in the opposite phase to the red wire? It seems like from your drawing the black (or brown wire) remains 0 volts and only the voltage in the red wire cycles between +16 and -16 volts.

That's clear about the flyback.

If I do want to keep the light connected and on all the time, is there not a way of having the blue wires from the solenoid contact the brown (ground) wire through a relay as in the other setup? If the brown wire just remains 0 volts (i.e. ground or massa). It should work for AC or DC, but I must be missing something?

Thank you for your input.

Cheers,
Kai



Marklin K-track, Ecos 50200, RocRail
Offline DaleSchultz  
#6 Posted : 15 January 2022 17:12:18(UTC)
DaleSchultz

United States   
Joined: 10/02/2006(UTC)
Posts: 3,973
I think a single diode will stop the reverse flow as the whole thing is a circuit. You can add one in the ground wire too if you like, it will reduce the voltage by another 0.6V

The "0V massa" label may be a bit confusing - in AC it will actually be -16V and all voltages are only relative to something else... so may diagrams label something as 0V but it just means other DC voltages are relative to that...

In my layout I uses a common "ground" and my digital and 16V AC are all relative to that. (In fact I think my house is also on that same ground!)

I don't know if a MOSFET can handle AC power, I have never tried that or looked it up. There is one way to find out!
There is an important bit of information you need to find out about the output from the DCCNext module... - does it hold the power on all the time or does it produce a momentary power blip?

Assuming the module is putting out a short pulse, I suspect you will need to isolate the light circuit from the MOSFET outputs. I think the MOSFET will remove both positive and negative power after switching. If it holds power on all the time for one or the other turnout directions, it will probably burn the Märklin solenoid out! But the light will stay on!

Test that with a voltmeter or small light.

And yes, there is a test - you will test your new knowledge yourself. If you get smoke you failed :-) (or had a bad teacher)

BTW just last week I implemented a pulse output for RemoteSign ESP modules designed for switching turnouts, etc. The software is working but I have not physically tested it on a turnout. I think relays would be a good way to go as they can switch on and off again after 100ms.
Dale
Intellibox + own software, K-Track
My current layout: https://cabin-layout.mixmox.com
Arrival and Departure signs: https://remotesign.mixmox.com
Offline IBtrain  
#7 Posted : 16 January 2022 06:33:52(UTC)
IBtrain

Canada   
Joined: 25/05/2013(UTC)
Posts: 80
Location: Nanaimo BC
Originally Posted by: DaleSchultz Go to Quoted Post
I think a single diode will stop the reverse flow as the whole thing is a circuit. You can add one in the ground wire too if you like, it will reduce the voltage by another 0.6V

The "0V massa" label may be a bit confusing - in AC it will actually be -16V and all voltages are only relative to something else... so may diagrams label something as 0V but it just means other DC voltages are relative to that...

In my layout I uses a common "ground" and my digital and 16V AC are all relative to that. (In fact I think my house is also on that same ground!)

I don't know if a MOSFET can handle AC power, I have never tried that or looked it up. There is one way to find out!
There is an important bit of information you need to find out about the output from the DCCNext module... - does it hold the power on all the time or does it produce a momentary power blip?

Assuming the module is putting out a short pulse, I suspect you will need to isolate the light circuit from the MOSFET outputs. I think the MOSFET will remove both positive and negative power after switching. If it holds power on all the time for one or the other turnout directions, it will probably burn the Märklin solenoid out! But the light will stay on!

Test that with a voltmeter or small light.

And yes, there is a test - you will test your new knowledge yourself. If you get smoke you failed :-) (or had a bad teacher)

BTW just last week I implemented a pulse output for RemoteSign ESP modules designed for switching turnouts, etc. The software is working but I have not physically tested it on a turnout. I think relays would be a good way to go as they can switch on and off again after 100ms.


Hi Dale.
Thanks for all this info.ThumpUp
I'll have to look it over in the next few days and get back to you.
Not looking forward to the test, but got my fire extinguisher ready...Scared

Cheers,
Kai





Marklin K-track, Ecos 50200, RocRail
thanks 1 user liked this useful post by IBtrain
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2022, Yet Another Forum.NET
This page was generated in 0.440 seconds.