I want to install a circuit that controls model railway colour light signals.
A photo electric cell is installed between the tracks and when a train passes over it, the signal changes to red. Once the train has passed the cell, the light will change back to green after a pre-set time.
I believe that the unit that I need is a
" Sindax DC5V 1 CH Infrared Sensor Reflection Trigger Reciever Relay Module"
Does Core Electronics have a circuit similar to this one that would do the job please ?
Adjustable time and sensitivity are both on this board.
Thanks for any help that you can offer,
Kind Regards, Max.
Firstly, welcome to the forum! Thanks for posting.
I’m fairly sure that we don’t carry a board that specifically performs this function, however, I’d imagine this would be quite easy to rig up with a small Arduino, ESP32, or RPi Pico with an LDR and an appropriately rated relay breakout board, and that way you can easily edit or add functionality by changing a few lines of code. Let us know if you have any questions about setting that up and we can run you through it
That being said, I’d check with your local Jaycar too if you’re looking for a prebuilt solution, I don’t know personally whether they carry any boards that meet the specs you’re after, but it’d be worth a look.
All the best with the project!
Thanks for your welcome and your offer to help.
I have a RPi Pico, so I would like to start with that. If you could recommend what other parts I would need and a circuit, I would be grateful. I would enjoy building a unit myself rather that buy the ready to run board.
thanks my issue has been fixed.
For the sensing portion of the design I’d use an LDR much like your original board (You’ll have to connect this in a voltage divider configuration, this tutorial shows the wiring.
If you just need some LED’s I’d check out our PiicoDev RBG module, to get that connected you’ll also need an expansion board and a PiicoDev cable.
As for powering the Pico, there is an onboard regulator to take in 5V or a LiPo can be used!
Let us know if you have any questions!
Thanks, I have an LDR for the sensor, I need help with a circuit with a relay, adjustable timer and adjustable light sensitivity (resistors ?) as shown in the original photo posted.
Hoping that you can help. Thanks again.
You could implement your adjustable timer and adjustable light sensitivity in software.
By connecting a potentiometer between your 3.3V rail and an ADC input you can create an adjustable input that you can map to different timer values.
If your LDR is already connected as an analog input then adjusting the light sensitivity would just be a matter of changing the thresholds your code is triggered by.
Thanks for the reply. Sounds good.
Sorry, I don’t know what an ADC is.
I suppose what I really need is a diagram.
I appreciate your help
An ADC is an Analog to Digital Converter. The Pi Pico has them built-in so effectively just the analog input of the Pico.
I don’t have a diagram to hand at the moment but I’ll try and draw something up later if someone else doesn’t find a suitable one to link you to first.
Thanks Trent. I will appreciate that if you have time.
Thanks for jumping in with that tutorial, that’s a better put-together guide than what I would have done in MS paint.
You are most welcome, Trent.
A bit off topic, but the latest (April) issue of Silicon Chip magazine has a model railway semaphore with red/green LED. Might be of interest.
Thanks Alan, I will get a copy !