Jump to content
Yavaris Forge

Help with (very) basic signal

Recommended Posts

Yavaris Forge

Hello there,

I acquired some cheap signals on Ebay for my layout and now I'm not sure how to operate them.

Yforge_signal.thumb.jpg.ca230463765aca19b36a585f3c727585.jpg

Basically it would be enough if I had a switch that when I press it changes the color of the signal (green - red - yellow - yellow/green). I don't necessarily want to use an Arduino with sensors or something else as it would be enough for me to just switch the signals by hand. Is there an easy way to do this?

Share this post


Link to post
cteno4

You are going to need some sort of a logic circuit if you want to make the lights cycle thru the colors with repeated presses of the signal button. I’ve not see a premade or even a plan for this sort of hardware ic circuit but it’s possible to do something like this in hardware ic plans may be out there, but then you will need to breadboard the appropriate circuit. Arduino is of course a more flexible solution with little roll or no your own hardware but will need programming to make it so. Arduino Nano’s are like $2 and can directly control a half dozen leds and take a push button input. Pretty simple program and the just clone he whole thing for each one if you want simplest.

 

jeff

Share this post


Link to post
Yavaris Forge
Posted (edited)

Thanks for your answer! Maybe i should get a bit into programming Arduinos then. I don't know how many ports a nano has but maybe i can hook up two or three switches and control two signals at once.

Edited by Yavaris Forge

Share this post


Link to post
NX:
4 hours ago, Yavaris Forge said:

Hello there,

I acquired some cheap signals on Ebay for my layout and now I'm not sure how to operate them.

Yforge_signal.thumb.jpg.ca230463765aca19b36a585f3c727585.jpg

Basically it would be enough if I had a switch that when I press it changes the color of the signal (green - red - yellow - yellow/green). I don't necessarily want to use an Arduino with sensors or something else as it would be enough for me to just switch the signals by hand. Is there an easy way to do this?

 

Signals look always great in layouts!

 

The switch, that you just mentioned, sounds like a good option.

So, LED, resistor and switch in series

 

Cheers,

  • Like 1

Share this post


Link to post
Yavaris Forge

Yes that sounds like a good idea but to rotate through the different signal colors with just one switch you would need at least some bit of a micro controller as far as i know.

I don't want a switch for each individual LED. I've now ordered an Arduino Nano to test how that works out. 

Share this post


Link to post
Madsing

Using an Arduino Nano is the best option.

https://www.teachmemicro.com/arduino-nano-pinout-diagram/

It has 14 (D0 to D13) plus 8 (A0 to A7) GPIO pins. Don’t use D0 and D1 as they are also used to communicate with the PC. That leaves you with 20 pins for the signal LEDs and the switches or sensors to control them. 

  • Like 2

Share this post


Link to post
cteno4

Ah I forgot you can use the second bank as well! I remembered two were reserved for serial.

 

i like the nano, I messed with it a few years back but put lighting automation aside for now as one too many projects! but simple setup for a beginner project and an all in one solution.
 

jeff

  • Like 1

Share this post


Link to post
matt_d10

Ive just started playing with arduinos and have set up an uno to detect a passing train, change a LED to red and then back to green again when the block is clear.

it’s very satisfying teaching yourself basic code and seeing the results! 
There are loads of tutorials online and you could probably just borrow ideas from them.

In it’s simplest form you could set the signal to red with a button and it could cycle back through based on a time delay?

Look forward to seeing how you get on!

  • Like 2

Share this post


Link to post
NX:
13 hours ago, matt_d10 said:

Ive just started playing with arduinos and have set up an uno to detect a passing train, change a LED to red and then back to green again when the block is clear.

it’s very satisfying teaching yourself basic code and seeing the results! 
There are loads of tutorials online and you could probably just borrow ideas from them.

In it’s simplest form you could set the signal to red with a button and it could cycle back through based on a time delay?

Look forward to seeing how you get on!

Which sensor are you using? Cheers.

Share this post


Link to post
matt_d10
10 hours ago, NX: said:

Which sensor are you using? Cheers

I’m using reed switches and very small

magnets under the train. Mainly because I had them to hand, but the system works as intended. IR may be a better long term solution.

  • Like 1

Share this post


Link to post
maihama eki

If you want simple, you could wire it up to a 3 position slide or toggle switch (SP3T). I don't know how your signal is wired out, but I assume there is either 3 wires for each light and a common or 3 pairs of wires.

image.thumb.png.be2abb637466aec1e1481f8bbd59c97c.png

Share this post


Link to post
Yavaris Forge

I'll try to do it with an Arduino first, maybe I'm going to use some sensors in the future too. If that fails these switches really are a good solution in my opinion. But the ones I found online are more expensive than an Arduino Nano.😅

Share this post


Link to post
NX:
3 hours ago, maihama eki said:

If you want simple, you could wire it up to a 3 position slide or toggle switch (SP3T). I don't know how your signal is wired out, but I assume there is either 3 wires for each light and a common or 3 pairs of wires.

image.thumb.png.be2abb637466aec1e1481f8bbd59c97c.png

 

2 hours ago, Yavaris Forge said:

I'll try to do it with an Arduino first, maybe I'm going to use some sensors in the future too. If that fails these switches really are a good solution in my opinion. But the ones I found online are more expensive than an Arduino Nano.😅

 

 

A switch is a simple and good solution.

However,  probably arduinos are a best fit since they are more versatile.

 

If you want to try something unnecessary complex and fun, you could play with some 555 timer module and relay modules (i.e. latch and unlatch relay).

Modules cost more but it is interesting to think and find the way of achieving the signal functionality with relays.

 

01.thumb.jpg.af317a93b204aec014caba04548e4724.jpg

  • Like 1

Share this post


Link to post
Yavaris Forge

Okay so the Arduino arrived yesterday and i hooked it up to my PC today to see if it works. The standard test program where the onboard LED is blinking works fine but so far i haven't been able to put together a circuit with spare LEDs i had laying around. I will have to do some proper research on Arduino basics😅.

  • Like 2

Share this post


Link to post
Yavaris Forge

Finally some new progress! I had a few exams coming up and didn't have much time for other stuff but today I hooked one of my signals up to the arduino and got it working. I wrote a rather simple program with some delays so the signal is now changing its color. Next step would be to add a button to simulate a sensor on the track.

I still haven't figured out how I am going to control the signal. I could just use a button and press it when the train drives by but that is going to get annoying I guess. So the easiest would be to place sensors on the track but i don't know if there are any sensors that don't involve magnets under the train or housings to hide light barrier diodes.

Funny how i said in the beginning of this thread how i didn't necessarily wanted to use an arduino and here I am thinking about sensors and stuff😅

Share this post


Link to post
cteno4

You can use a photoresistor in the roadbed looking up to sense. Works well except if you want night running. You can even have a loop to check the Phototresistor level at startup to set the open state and then look for resistance increase for a trigger. This way room light level does not matter (except of course dark!)

 

cheers

 

jeff

  • Like 2

Share this post


Link to post
Madsing

I’d recommend using an infrared sensor with its LED integrated in a module such as the TCRT5000 (search for it on AliExpress for exemple). The output can be directly connected to the Arduino. A while ago, I used two of them to make a speed measurement sensor (described here: https://shin-yukari.weebly.com/blog/train-speed-measurement), they work very well.

  • Like 2

Share this post


Link to post
Yavaris Forge

Thanks you two! @MadsingThis should work in the dark as well because on LED emits light and the other detects it, right? So maybe i can build it into the trackbed so i won't need some kind of housing to hide it. Given that these things are quite cheap I'll buy one and when that arrives in a few weeks I'm gonna test if it works for me.

Share this post


Link to post
Madsing

Yes. Correct. I confirm that this IR sensor works equally well in the dark. I have not tried to insert it into the track (between sleepers) because I wanted to use it on an elevated track, but this must be possible too.

  • Like 1

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...