Model Railway Forum

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


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

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

The op amp idea works!
So, you get the cycle as shown, when it flips, (originally it went dark) half of the LEDs stay on! (Need to tweak opamp as they are marginally brighter now!

When it switches back, you get a reset.
But to get around this, I stuck an extra led in series on the 555 chip.
It sort of balances things up.....

I'll post a link shortly......
It's still a masterful bodge but, see what you think!
__________________

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

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

an op amp is a handy thing. I will just stick with my bits of code, perhaps now I should get some more lights into some buildings so can have them flicker
chris_db4 is offline   Reply With Quote
Old 11-10-2017, 11:13 PM   #43
Gordon H
Member
 

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

Struggling to understand how you are able to design using op-amps, comparators, D Type flip-flops and 555 timers, yet find the notion of the simple shift register solution so overwhelming.
All it needs is a 555 timer, a 74HC164 shift register and a 74HC86 Quad exclusive-or gate. You then get 8 outputs capable of driving a couple of mA for an LED. Just add another 74HC164 (or more) in the chain if you need extra outputs.
However, if you are happy with the solutions you are working on, fair enough.
Gordon H is offline   Reply With Quote
Old 11-10-2017, 11:41 PM   #44
Teedoubleudee
Senior Member
 
Teedoubleudee's Avatar
 

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

Quote:
Originally Posted by chris_db4 View Post
an op amp is a handy thing. I will just stick with my bits of code, perhaps now I should get some more lights into some buildings so can have them flicker
I'm with you Chris.
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 12-10-2017, 06:44 AM   #45
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

Join Date: Jun 2017
Location: Chalfont St Peter
Posts: 307
AviatorAtHeart is on a distinguished road
Thumbs up

Quote:
Originally Posted by Gordon H View Post
Struggling to understand how you are able to design using op-amps, comparators, D Type flip-flops and 555 timers, yet find the notion of the simple shift register solution so overwhelming.
All it needs is a 555 timer, a 74HC164 shift register and a 74HC86 Quad exclusive-or gate. You then get 8 outputs capable of driving a couple of mA for an LED. Just add another 74HC164 (or more) in the chain if you need extra outputs.
However, if you are happy with the solutions you are working on, fair enough.
Good morning all.

Gordon it's simple to understand.
Never fiddled with one!
The odd chips I have, I spent some time over the last year reading up on.
It takes a while for things to sink in!
Normally I have to go hands on, reading is not enough.

Yes, the simple solution may be to buy the chip and code it, then add the various parts as TWD suggests.
But I don't know anything about that either!
So that's a two food learning curve.

I'm happy you took the time to give a brief explanation, I'm also happy that in some strange way, my efforts appear to be heading in the right direction.
(That means I'm learning!)

Naturally I'll continue with it. Just to see it through. Can't say why, I guess it's just the way I am. (Funny in the head)


Looks like I'll be reading up on those items in the near future!
I've done what I have so far, with items I already have in my possession.
Pretty much it's as simple as that!

And as always, I'm having fun with it! Although it's no longer simple.
It is still educational for me.

(Stuck in a happy face, just so we are clear I'm not narked)
__________________

You can only drink so much lemonade
AviatorAtHeart is offline   Reply With Quote
Old 12-10-2017, 08:04 AM   #46
Teedoubleudee
Senior Member
 
Teedoubleudee's Avatar
 

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

Playing with this stuff is the only way to learn AaH and like you say have some fun on the way. Good on you.
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 12-10-2017, 08:36 AM   #47
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

It has been fun.
The 555 is (as described by others) a right of passage for electronics hobby types folks.

Everything starts with that chip! Atari punk, voltage doubler, basic VCO.....etc....etc....
Very widely used. I think because it's easy to get to grips with. Start with a bag of those!
(Sometimes they are sold for less than 10p each.)

The d type flip flop (new to me) this was something I learned about during my "train" career. Really it's quite a new circuit to me, it is basically a pair of 555s (or 556) which switch polarity on the push of a button, or switch. Maybe even a square wave oscillation! (But I haven't checked that) so that and the comparator chip (block detect circuit) are new forays.
Both of these circuits are rob paisleys designs. The former is for a stall motor driver and the latter is used as said for block detection. Easy to wire for either output (covered open circuit or clear open circuit) (Combined you can make a safety switch for points) basic op amps function.....I think?
How I'm wiring this is, if the point is covered, the comparator opens and you can't throw the switch! Protecting both your train and track! The comparator is really a pretty cool thing, it may be a better solution here IF you can drive it with a 555 type timing cycle (or similar RC wotsit)

Op amps......the first circuit I really tried hard to build, MFOS noise toaster. This has 8 op amps (pair of quad chips, LM 324) so I had to really get my head into how these work, I only have a basic understanding so it's far from easy for me, that's all you need though, just enough to get through.......

Find a circuit schematic online that is of interest....source the parts.....
Have fun!
I guess for about 30, you can get a decent selection of parts including a simple power supply & budget Multimeter. That would keep you entertained for months.
__________________

You can only drink so much lemonade
AviatorAtHeart is offline   Reply With Quote
Old 12-10-2017, 09:17 AM   #48
chris_db4
Senior Member
 

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

Having watched the video back, It occurs that rather than a constant alternating pattern once the majority of the lights are on then it could jump to all on, and wait like that for a set time, before going back to random although if the first random number was large then it would be a very short effect hmmmmm
chris_db4 is offline   Reply With Quote
Old 12-10-2017, 09:35 AM   #49
Teedoubleudee
Senior Member
 
Teedoubleudee's Avatar
 

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

I had a formal electronic education (military) starting in 1960 so my first foray in the subjects was built around thermionic valves and found (and still do find) transistor theory strange - rather than imagining electrons being emitted from a hot cathode and passing through (or not) a grid or grids to a welcoming anode, we were told to imagine the movement of "holes" across junctions! Bring back valves I say, at least you knew when they were dead, you didn't burn your fingers when you touched them!

Alas, except for a few simple rules like Ohms law and Kirchoffs law I have forgotten most of everything I learned on the subject all those decades ago. So I'm fairly new to the subject again. However thanks to my later career as a computer engineer I found an interest in programming. At first it was in machine language, literally "ones and noughts", but later with the introduction of the Basic programming language and the brilliant Clive Sinclair's Z81 and Spectrum machines it became available to a much wider audience. Microprocessor chips, like most other electronic components are so relatively inexpensive these day and both are just perfect for blending in with railway modelling, which is why I think many of us have taken up the hobby (again?).

Don't suppose any of the foregoing adds to the thread except to say there is always more than one way to skin a cat! or even randomly light up a building
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 12-10-2017, 10:43 AM   #50
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

Wow twd, you're probably more qualified than me then!
Not so long ago I was pleased when I managed to light a single led!
Then I beamed like a Cheshire Cat observing the function of a reed switch on the same circuit.
I'm only 12 months into electronics (almost 12 months.....)
And I'm nowhere near the 10,000 hour requirement!

With you on valves, although I don't know how they work.....guitar amps, good ones, use valves.
It probably is slightly deviating from the thread proper, but it is still good information, and a warm topic.
Let's face it, what else would we be talking about.....trains!

@chris, that's exactly what yesterday's experiment resulted in, but for some unforeseen reason, Flickr said no to my video. It pretty much works how you explain things.

I'll try again with the upload.......
__________________

You can only drink so much lemonade

Last edited by AviatorAtHeart; 12-10-2017 at 10:54 AM. Reason: (Spelling!)
AviatorAtHeart 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:43 AM.


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