Jump to content

Help with (very) basic signal


Yavaris Forge

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?

Link to comment

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

Link to comment
Yavaris Forge

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
Link to comment
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
Link to comment
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. 

Link to comment

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
Link to comment

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
Link to comment
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.

Link to comment
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
Link to comment

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

Link to comment
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.😅

Link to comment
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
Link to comment
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
Link to comment
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😅

Link to comment

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
Link to comment
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.

Link to comment

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
Link to comment
On 10/22/2020 at 11:41 PM, Yavaris Forge said:

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.

How did it go?

  • Like 1
Link to comment
Yavaris Forge

I was busy doing other stuff and I have to admit that I lost track of the project. I will look into it again in the next few days.

Link to comment
Yavaris Forge

So I tested the sensor today and found out that the infrared light it emits doesn't get reflected from the underside of my models as well as I hoped it would be. Could have thought about that beforehand actually. But it does work most of the time. I will test it with the rest of the fleet when I actually build it into the layout.

The easiest way now would be to attach the signal to the digital outputs of the arduino. My signals, however aren't wired right for the use on arduino as they have a common anode and different cathodes and that doesn't work with digital pins. So I will have to work around that with the analog pins as I did some time ago.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...