Originally Posted by: Kiko 
Originally Posted by: Holz1 
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