Model Railway Forum

Go Back   Model Railway Forum > Model Railway Construction > Wiring & Electronics > Other


Reply
 
Thread Tools Display Modes
Old 10-10-2017, 11:18 AM   #21
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

Join Date: Jun 2017
Location: Chalfont St Peter
Posts: 314
AviatorAtHeart is on a distinguished road
Default

I'm pretty much on the same boat.....
Moving this week......so I am decorating, I started this morning and I have a 2 bed flat to complete by Thursday/Friday. That's including furniture assembly and all that funky stuff.

I will experiment for sure, just for fun.
If it works out, naturally I'll strip board it, then you guys can all have a copy!
(But you gotta build it yourself!) IF YOU LIKE IT THAT IS!

I've done a bit of quick thinking,
As I don't think I have an AND gate as such I may have to build the 555 version (vs an actual IC)
I have a quad Nand which might not work? (This part is up in the air.....)

But the plan is Schmitt trigger for signal (hex 40106ic)
(Any spare outputs can be simple I/O lights)
Into the and gate (your randomness idea)
And perhaps at least one feed into the 4017 ic.
That should give 10-16 separate lights (but ten will be phased the same, if placed around the layout it should be ok?)

Ps there may be errors in the above thought process! My head is busy elsewhere........
But this is a niggle now!
__________________

You can only drink so much lemonade
AviatorAtHeart is offline   Reply With Quote
Old 10-10-2017, 11:55 AM   #22
chris_db4
Senior Member
 

Join Date: Nov 2014
Posts: 559
chris_db4 is on a distinguished road
Default

Even a software version wont be a true random result, its just the pattern can be varied much quicker.
With a network of logic gates to give different combinations of outputs the biggest issue will be controlling minimum time an output stays in either state so that you don't end up with just little random flashes

https://tinyurl.com/y83mkow2

Last edited by chris_db4; 10-10-2017 at 12:26 PM.
chris_db4 is offline   Reply With Quote
Old 10-10-2017, 11:59 AM   #23
Flashbang
Administrator
 
Flashbang's Avatar
 

Join Date: Jul 2009
Location: SE UK
Posts: 8,366
Flashbang will become famous soon enough
Default

For a simple to use and ready made random LED lighting controller consider the Train Tech LFX Home and Shop light Effects Module. Any gauge DCC/Analogue. Link to item See it working in the video on that page at around 2:58.
__________________
Broken? It was working when I left it!
Flashbang is online now   Reply With Quote
Old 10-10-2017, 12:11 PM   #24
Teedoubleudee
All round good guy
 
Teedoubleudee's Avatar
 

Join Date: Aug 2014
Location: Downham Market
Posts: 3,157
Teedoubleudee is on a distinguished road
Default

Quote:
Originally Posted by Tricky Dicky View Post
...................... Programming is not my strength but the structure of the program would use a random number generator to select which output/s would go high with a second random number generator to determine the delay thus how long the outputs remained high. Terry fancy a challenge?..................................Richar d
Thanks Richard!

I do have a lot of buildings with lights. When I installed them I used individual LDR circuits to switch them on, and as the ambient room light is dimmed slowly they do come on independently. Of course once the ambient light is low enough they all stay on so the effect is over. I have considered random on/off lighting but I would need to almost destroy the buildings (mostly Metcalfe card) to get access to the wiring as I always ensure a leak proof finish. So to get a realistic effect I cover up some of the windows from inside during the build process, and perhaps have separate leds for each floor. A couple of examples attached.
Attached Images
File Type: jpg DSCN2166.JPG (465.9 KB, 10 views)
File Type: jpg IMG_20170923_182205.jpg (871.7 KB, 11 views)
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 10-10-2017, 01:22 PM   #25
chris_db4
Senior Member
 

Join Date: Nov 2014
Posts: 559
chris_db4 is on a distinguished road
Default

looking at it, the AND gates don't really give you any more randomness, it does remove the on/off tick tock effect but that is probably as easily done simply using a monostable 555 by placing one of the LED's further away in another building so it isn't as obvious as upstairs switching to downstairs. A handful of timers with different time settings and the lights being distributed around a bit should work.
chris_db4 is offline   Reply With Quote
Old 10-10-2017, 02:45 PM   #26
Teedoubleudee
All round good guy
 
Teedoubleudee's Avatar
 

Join Date: Aug 2014
Location: Downham Market
Posts: 3,157
Teedoubleudee is on a distinguished road
Default

If I WERE going to do it, my preferred way would be one of THESE with one of THESE and one of THESE (16 way version to control 32 separate light groups) .

It's all Richard's fault!
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 10-10-2017, 07:35 PM   #27
Chuffchuff
Member
 

Join Date: Nov 2016
Posts: 54
Chuffchuff is on a distinguished road
Default

Wow ! I was not expecting all the preceding as advice ;-) ! Thanks,

my last venture into electronics was building a single valve radio Heathcote school boy kit . Which to my credit did work, although did seem to smoke a bit. EL84 seems ingrained into my brain as an output audio valve.?

Seems I have some catchup to do ;-)

Reading post with Electronics for Dummies, in the other hand.

Rgds
Chuffchuff is offline   Reply With Quote
Old 10-10-2017, 09:59 PM   #28
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

Join Date: Jun 2017
Location: Chalfont St Peter
Posts: 314
AviatorAtHeart is on a distinguished road
Default

This has been a pretty entertaining evening (for me)

Although there are many ideas floating around now, I will still add what I've discovered.
Purely because it's all new to me, and it was quite enlightening.

The hex Schmitt trigger, CD40106 BE from Texas Instruments.
Most of my experiments centre around this IC.

You can get a simple delayed on.......logic state I from this chip.
6 times=6different delays, each out can run at least 3 LEDs (maybe more, unchecked)
Very simple circuit, one electrolytic cap and one resistor per channel.
(That would cost about 3 for all components except veroboard)

The only issue is once the delayed on sequence completes, that's it, you're stuck in logic state I until you power down.

So.........
What happened next!
(After a bit of fiddling I discovered you must break the + feed to the 40106 to reset, breaking the - results in all LEDs returning in on state after closing switch)

Then,

Yesterday's circuit was still on the breadboard, I took a feed from the output of the 555 chip (pin 3).
Used this to provide the+Vcc for the 40106.
What happens now, you get the same slow rate switching as per yesterday's experiment (using 220uF cap, otherwise all else is the same as cad mans original circuit)

When the LEDs switch state on the 555circuit it resets the Schmitt trigger.
(One led on only, then one led on which feeds cycle on Schmitt trigger, repeat)

I have only rigged up 3 channels on the 40106, my next thought is use a 556IC
(Basically a pair of 555 timers in a single package)

-------------------
Half the Schmitt trigger is fed by half of the 556, repeat on opposite side.......
Edit (This can not work) Vcc can't be split
But you could feed a second 40106
Work in progress!
-------------------


Still follows a pattern but 6 channels with at least 3'leds each+ the pair per half of a 556 = at least 22 LEDs that switch on/off.

I'm using (set at) 9v power supply (switch mode wall wart) 1A max.
Could use a battery?
Might run at less V.

To change the RC time constant? On 40106
You can use either one capacitor and a selection of resistors
Or a selection of capacitors and one resistor
Or a combination of both........
This makes it versatile but not truly random.

Link to vid will follow shortly.......
https://flic.kr/p/ZgLMGE
__________________

You can only drink so much lemonade

Last edited by AviatorAtHeart; 10-10-2017 at 11:48 PM.
AviatorAtHeart is offline   Reply With Quote
Old 10-10-2017, 11:22 PM   #29
Gordon H
Member
 

Join Date: Oct 2016
Posts: 52
Gordon H is on a distinguished road
Default

For generating psudo-random numbers with conventional logic, one of the usual techniques is to employ a serial-in parallel-out shift register and exclusive or gates. The exclusive or gates are connected to a combination of the shift register outputs and the final gate output is fed back into the shift register serial input.
See: https://en.wikipedia.org/wiki/Linear...shift_register
Gordon H is offline   Reply With Quote
Old 10-10-2017, 11:27 PM   #30
Teedoubleudee
All round good guy
 
Teedoubleudee's Avatar
 

Join Date: Aug 2014
Location: Downham Market
Posts: 3,157
Teedoubleudee is on a distinguished road
Default

Glad you are having some fun there AaH. Thinking about it, what with components being so cheap especially if bought in bulk from China, one could build loads of these circuits and put one in every building. With long on/off times and slightly different values you could achieve something approaching a random effect. Do publish your finished circuit when complete so others can have a go.
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 01:21 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.