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 Holz1  
#1 Posted : 25 April 2024 14:24:55(UTC)
Holz1

Netherlands   
Joined: 08/01/2020(UTC)
Posts: 17
Location: Zuid-Holland, Den Haag
Hello everyone
Has anyone by chance a working model of a Märklin semaphore wingsignal such as the 7040, which is activated by an INFRARED gate?

How must it work?
The infrared gates (5 Volt DC) triggers a ONE-shot monostable multivibrator and the OUTput trigger is passed through an TRIAC optocoupler and Thyristor.

The OUTput of the Thyristor switches the solenoid coils 16V AC. The OUTPUT must be max < 1 seconds in order to prevent burning the soleniod coil/relay.

At the same time the infrared gate is triggered, a parallel circuit must be triggered. After 30 seconds this circuit must switch back the wingsignal (TRIAC opto and Thyristor)

I already made a couple of circuits "TRIAL & ERROR" but all these examples gave me not the correct solution, however those newly TRIAL built circuits were of additional benefit.

I am looking forward to your news
Regards
Henry
Offline Kiko  
#2 Posted : 25 April 2024 20:21:12(UTC)
Kiko

Canada   
Joined: 13/02/2017(UTC)
Posts: 62
Location: Ottawa, ON
Originally Posted by: Holz1 Go to Quoted Post
Has anyone by chance a working model of a Märklin semaphore wingsignal such as the 7040, which is activated by an INFRARED gate?

Hello Henry,

I use Viessmann semaphores, but the basic electrical principles should be similar. Even though I don't trigger my semaphores via infrared -- I used Tain Controller to manage all signalling on my layout -- they still need to be "pulsed" to change aspects.

My layout is all digital -- Marklin and DCC. I use Arduinos to capture DCC commands and provide control signals to my semaphores. I developed a circuit and manufactured PC boards to make my life easier since I have over 40 semaphores on my layout. I've attached the circuit diagram of this principle.

I hope this helps. Let me know if you need anything else.

Cheers,
Andry
Wiring - Semaphores (Arduino Controlled).pdf (620kb) downloaded 29 time(s).


Andry
// Marklin HO K track; ECoS; TrainController Gold; Marklin & ESU decoders; Arduino controlled Switches, Semaphores & Accessories (DCC); Win 11 //
thanks 1 user liked this useful post by Kiko
Offline Holz1  
#3 Posted : 26 April 2024 10:13:15(UTC)
Holz1

Netherlands   
Joined: 08/01/2020(UTC)
Posts: 17
Location: Zuid-Holland, Den Haag
Originally Posted by: Kiko Go to Quoted Post
Originally Posted by: Holz1 Go to Quoted Post
Has anyone by chance a working model of a Märklin semaphore wingsignal such as the 7040, which is activated by an INFRARED gate?

Hello Henry,

I use Viessmann semaphores, but the basic electrical principles should be similar. Even though I don't trigger my semaphores via infrared -- I used Tain Controller to manage all signalling on my layout -- they still need to be "pulsed" to change aspects.

My layout is all digital -- Marklin and DCC. I use Arduinos to capture DCC commands and provide control signals to my semaphores. I developed a circuit and manufactured PC boards to make my life easier since I have over 40 semaphores on my layout. I've attached the circuit diagram of this principle.

I hope this helps. Let me know if you need anything else.

Cheers,
Andry
Wiring - Semaphores (Arduino Controlled).pdf (620kb) downloaded 29 time(s).




thank you very much!! The "solidstate relay" you posted is what I described as OUTPUT for momentary switching and resetting of the semaphore wingsignal.
I know that a lot of Viessmann semaphores have so called built-in "end or limit switches" which the Märklin signs do not have. The same is with the Märklin M turnouts. (1 pulse <1 sec = switch etc.)

You made a sketch for the Arduino UNO /MEGA.
With this software you have covered the hardware which I described to make it possible to obtain a single switching pulse from an IR gate regardless how long the IR gate is covered by a passing train. It only gives 1 triggering pulse less then 1 second.

Do you have such a circuit available with IC's logic gates? I looked also at Talking Electronics website and other model railroad sites. Solutions with NE555 timers I studied but I am not able to make a working circuit because the technical knowledge, I do not have.

Is it possible that this ARDUINO software, you have written, that this software can be put into an ATTINY85"?
The sequence for the ATTINY could be:
1. IR gate --> 1 pulse= <1 sec
1.1 OUTPUT start rising wing signal
1.2 start timer (NE555)
1.3 END timer (after a delay of 25-30 sec)
1.4 timerpulse < 1 sec
1.5 OUTPUT start lowering wing signal
1.6 WAIT for NEXT pulse

Offline Kiko  
#4 Posted : 26 April 2024 20:52:07(UTC)
Kiko

Canada   
Joined: 13/02/2017(UTC)
Posts: 62
Location: Ottawa, ON
Originally Posted by: Holz1 Go to Quoted Post
Do you have such a circuit available with IC's logic gates? I looked also at Talking Electronics website and other model railroad sites. Solutions with NE555 timers I studied but I am not able to make a working circuit because the technical knowledge, I do not have.
Is it possible that this ARDUINO software, you have written, that this software can be put into an ATTINY85"?

Hello Henry,

Regarding your question fo IC logic gates, I personally don't have something available off hand, however if you search the web, there are tons of examples with schematics, parts lists and applications for such timers.

As for the ATTINY question, I'm not sure why you would go this way. You'd need a lot more peripheral circuitry to make this work as opposed to getting an Arduino, which already has all your inputs, outputs, drivers, etc. -- all on one board -- and very easy to program. I might not understand your specific situation because you have not provided any details on your particular setup. How do you control your trains? Is it analog or digital, command station, sensors, two-rail or three-rail, etc. With your sequence example, I'm not sure you have covered all possible occurances. What happens if a train stops over the IR gate? How does a train behind your stopped train know that the block it's going to enter is occupied? There are lots of unknowns and I'm not sure how you are addressing these issues.

I might be misunderstanding your concept, so please excuse me.

Andry
Andry
// Marklin HO K track; ECoS; TrainController Gold; Marklin & ESU decoders; Arduino controlled Switches, Semaphores & Accessories (DCC); Win 11 //
Offline Holz1  
#5 Posted : 27 April 2024 11:14:49(UTC)
Holz1

Netherlands   
Joined: 08/01/2020(UTC)
Posts: 17
Location: Zuid-Holland, Den Haag
Originally Posted by: Kiko Go to Quoted Post
Originally Posted by: Holz1 Go to Quoted Post
Do you have such a circuit available with IC's logic gates? I looked also at Talking Electronics website and other model railroad sites. Solutions with NE555 timers I studied but I am not able to make a working circuit because the technical knowledge, I do not have.
Is it possible that this ARDUINO software, you have written, that this software can be put into an ATTINY85"?

Hello Henry,

Regarding your question fo IC logic gates, I personally don't have something available off hand, however if you search the web, there are tons of examples with schematics, parts lists and applications for such timers.

As for the ATTINY question, I'm not sure why you would go this way. You'd need a lot more peripheral circuitry to make this work as opposed to getting an Arduino, which already has all your inputs, outputs, drivers, etc. -- all on one board -- and very easy to program. I might not understand your specific situation because you have not provided any details on your particular setup. How do you control your trains? Is it analog or digital, command station, sensors, two-rail or three-rail, etc. With your sequence example, I'm not sure you have covered all possible occurances. What happens if a train stops over the IR gate? How does a train behind your stopped train know that the block it's going to enter is occupied? There are lots of unknowns and I'm not sure how you are addressing these issues.

I might be misunderstanding your concept, so please excuse me.

Andry



Hello Andry
Thanks for taking the time and help me with the search for a solution.
First of all the Marklin semaphores are used for a visual enhancement of a model railway layout.

The only thing the semaphores have to do is rising and lowering the arms. No switching and blocking tracks or otherwise.

What does an INFRARED gate do:

The IR gate sends a digital signal when the train passes the IR gate. This signal is a continuous HIGH signal.
In LOGIC terms: HIGH= 111111111111111, as long as the train is passing the IR gate.

When the train has passed (the back-end of the train is not blocking the IR gate anymore) the IR signal is LOGIC LOW= 0.

I am looking for a circuit that changes the continuous HIGH=1111111111 into a single pulse HIGH= 1 for rising the arm of the semaphore, and a timing component (NE555) which activates a trigger-pulse after 20-30 seconds in order to lower the arms.

Of course I found a lot of material but as already explained I made a lot of circuits on “trial and error” basis but to have a circuit working, this “is a couple of different and other sleeves” .

So the circuit is I think a NON retriggerable ONE-SHOT MMV which detects the IR signal on the rising edge and sends a pulse (less then 1 second) to the SSR and the semaphore coils.

The timing component is a NE555 which must be activated.

This could be done in 2 ways:
1. Start counting when IR gate “rising edge” is HIGH ( logic 1)
After 20-30 seconds: STOP counting: OUTPUT signal: lower arms

2. Start counting on “falling edge” LOGIC 0
After 20 seconds : STOP counting: OUTPUT signal: lower arms

Re: Attiny85> One could programme the ATTINY85 with INPUT the IR signal and a timing component.
The OUTPUT of the ATTINY85 is passing the signal to a SSR (as you have drawn) to switch the coils.

After the timing has elapsed, a new signal is given and the arms are lowered.

I have programmed an ATTINY85 with a levelcrossing bell sound (see CKT-Tinybell Rail Road crossing bell circuit by Nathan D Holmes) This gives a very fine and realistic bellresult.

I have made also a Marklin M levelcrossing with moving booms working. In post https://www.marklin-user...n-level-crossing-project (made by mr. Howard Ryan) he describes in his post how to use micro-motors controlled with leaf-switches.
So first I am looking for hardware solutions and after that I can always use Arduino.

Thanks again for yr cooperation
regards
Henry
Offline Kiko  
#6 Posted : 27 April 2024 17:01:45(UTC)
Kiko

Canada   
Joined: 13/02/2017(UTC)
Posts: 62
Location: Ottawa, ON
Originally Posted by: Holz1 Go to Quoted Post
The only thing the semaphores have to do is rising and lowering the arms. No switching and blocking tracks or otherwise.

Hello Henry,

That was a good explanation of what you want to accomplish. There’s still the question of whether your layout is analog or digital. If it’s analog, then there won’t be any need to provide digital addresses to each semaphore and no need for a DCC decoder. Based on the description that you have provided, I’ll assume that it’s an analog layout.

It would be quite easy to accomplish exactly what you’re after with an Arduino and the TRIAC circuit that I have already provided. If your layout is analog, then you won’t require the “DCC Shield” that is mounted on the Arduino. All the “DCC Shield” does is decode DCC addresses to figure out which semaphore to activate on the Arduino.

For an analog layout, your IR gate would be an input to the Arduino and for a 2-aspect semaphore, you would need two outputs from the Arduino to each semaphore (one for “red” and one for “green”).

For more realistic operations, I would do the following:
- When an IR gate signal goes HI, the sketch (software) in the Arduino would pulse the corresponding output to trigger a “red” signal.
- When the IR gate signal goes LO, a timer would be triggered. Once the timer expires, the Arduino would pulse the corresponding output to trigger a “green” signal.

The above logic would ensure that a semaphore is “red” for as long as a train is activating the IR gate. This would solve the issue if a train is stopped over the IR gate, and will be more realistic if you run long and short trains – the semaphore will react accordingly.

That’s all that there is to this. Three pins required on an Arduino and the TRIAC circuitry that I already sent you. No additional complicated circuitry and no external 555 timers required.

Let me know if this makes sense and if there’s anything else that you need.

P.S. Just as an example, I’m attaching a video of how I implemented an Arduino and stepper motor to control my crossing gates.
Crossing Gate Video: Crossing Gate (Stepper Motor)


Cheers,
Andry

Level Crossing (Stepper Motor) 1.jpg Level Crossing (Stepper Motor) 2.jpg
Andry
// Marklin HO K track; ECoS; TrainController Gold; Marklin & ESU decoders; Arduino controlled Switches, Semaphores & Accessories (DCC); Win 11 //
thanks 1 user liked this useful post by Kiko
Offline Holz1  
#7 Posted : 28 April 2024 10:01:48(UTC)
Holz1

Netherlands   
Joined: 08/01/2020(UTC)
Posts: 17
Location: Zuid-Holland, Den Haag
Originally Posted by: Kiko Go to Quoted Post
Originally Posted by: Holz1 Go to Quoted Post
The only thing the semaphores have to do is rising and lowering the arms. No switching and blocking tracks or otherwise.

Hello Henry,

That was a good explanation of what you want to accomplish. There’s still the question of whether your layout is analog or digital. If it’s analog, then there won’t be any need to provide digital addresses to each semaphore and no need for a DCC decoder. Based on the description that you have provided, I’ll assume that it’s an analog layout.

It would be quite easy to accomplish exactly what you’re after with an Arduino and the TRIAC circuit that I have already provided. If your layout is analog, then you won’t require the “DCC Shield” that is mounted on the Arduino. All the “DCC Shield” does is decode DCC addresses to figure out which semaphore to activate on the Arduino.

For an analog layout, your IR gate would be an input to the Arduino and for a 2-aspect semaphore, you would need two outputs from the Arduino to each semaphore (one for “red” and one for “green”).

For more realistic operations, I would do the following:
- When an IR gate signal goes HI, the sketch (software) in the Arduino would pulse the corresponding output to trigger a “red” signal.
- When the IR gate signal goes LO, a timer would be triggered. Once the timer expires, the Arduino would pulse the corresponding output to trigger a “green” signal.

The above logic would ensure that a semaphore is “red” for as long as a train is activating the IR gate. This would solve the issue if a train is stopped over the IR gate, and will be more realistic if you run long and short trains – the semaphore will react accordingly.

That’s all that there is to this. Three pins required on an Arduino and the TRIAC circuitry that I already sent you. No additional complicated circuitry and no external 555 timers required.

Let me know if this makes sense and if there’s anything else that you need.

P.S. Just as an example, I’m attaching a video of how I implemented an Arduino and stepper motor to control my crossing gates.
Crossing Gate Video: Crossing Gate (Stepper Motor)


Cheers,
Andry

Level Crossing (Stepper Motor) 1.jpg Level Crossing (Stepper Motor) 2.jpg

Yes Andry, this is a smooth operating levelcrossing. Great to see this!!!
I will enclose also a link to my Youtuup of my levelcrossing. (and other modules) @Marklinlevelcrossing

Let me explain other details which will give you an inside:
My hobby is micro electronics but it is not my profession nor that I have any education in this field. So all I have is reading, reading, trying and soldering. Sometimes something burnes and it smell like "H....."Cursing ! So TRIAL and ERROR with a lot of ERRORAngry .

The only railway track I have, are 4 seperate modules of approx. 2.2 mtr each with a double track. Because of lack of space in house, I hung these tracks along my wooden fence in the garden (in summertime). Every evening the modules had to be disassembled and the next morning (only by good weather circumstances) assembled again. (5 years ago was the last time the modules were placed)

In winter, the modules were placed in the attic. A couple of weeks ago I mounted some shelves in a spare room in our house where I can place the modules.
The "trainfever"Woot took hold of me, because I made several visits to my friend and saw his layout, and I liked to start with my tracks again.
But everytime I want to start, my friend has a request for making modules. Now he has the Marklin M semaphores. He had also a Viessmann 4900 semaphore (with end switches) so I made a monostable relay time-delayed on 5 Volts DC and OUTPUT 16V AC: It functions.

I have 2 friends how have large railway layouts: 1 friend has a layout measuring 4x10 meters with additional mountain tracks and 3 level-track: When 1 train starts its trip, it takes approx 5 min to finish.

The other friend has a much larger layout in his attick: L-shape 15x5 and 12x4 meters. They run both Fleischmann. On both tracks I made several appliances and modules such as the Marklin M Levelcrossing 7192 with moving booms.

Both friends equipped theire layout with DIGITAL controlled equipment however the Analog possibilities are still present. So when they ask me, can you make a module for me, I will look into my arsenal of components, make a diagram and solder the modules and they function (or not Confused ).

So further to the twin coil driver, I have found something on GITHUB: it is the circuit with a 74LS123 Dual re-triggerable Monostable Multivibrator with "rising and falling edge-detection" .MRCS-Twin-Coil-Driver-Schematic.png

I will make new diagram and place the component on a breadboard for "trial and error" . I will come back to you.
Thanks again




Offline Holz1  
#8 Posted : 03 May 2024 16:24:38(UTC)
Holz1

Netherlands   
Joined: 08/01/2020(UTC)
Posts: 17
Location: Zuid-Holland, Den Haag
Good afternoon Andry

I looked through my posts at Marklin User.net and I found a post with respect to the Marklin turnouts for switching them with Arduino.
I wrote a sketch back than, but I haven't done nothing with it anymore.

The sketch was a trial and with the knowledge I now have, it could not function the way I programmed it.

One of the forum members answered my request how to switch the turnouts: So he sent me a circuit with the MOC and Thyristor!
Also he posted a sketch for Arduino but in order to prevent I have to discover a wheel again........BigGrin

Is it possible for you to send me the arduino sketch for switching the semaphores?.ThumpUp
I will give it a try.
Maybe you have also the solution to have the IR gate trigger at rising edge and when the train has passed the gate, wait 20 seconds for the falling edge to trigger the wingsignal back.

I am looking forward to yr news

regards
Henry


Ps I built the circuit which I have posted, but is still under constructionConfused Mad
Users browsing this topic
Guest
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-2024, Yet Another Forum.NET
This page was generated in 0.689 seconds.