Model Railway Forum

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


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

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

https://flic.kr/p/ZjdFAs

Changing the cycle using op amp NE5532P
Output from 555 pin 5 output.
Then it gets complicated!
A drawing may help, I'll get around to it!

(Pot refitted into 555 timing circuit to speed up experiment)
Longest compete cycle approx 1:34seconds, although this could easily be changed
__________________

You can only drink so much lemonade

Last edited by AviatorAtHeart; 12-10-2017 at 11:52 AM.
AviatorAtHeart is offline   Reply With Quote
Old 12-10-2017, 12:40 PM   #52
Tricky Dicky
Senior Member
 

Join Date: Jan 2011
Location: West Yorkshire
Posts: 544
Tricky Dicky is on a distinguished road
Default

As others have said microprocessors are the way to go these days, very versatile and they keep the component count down. There is still plenty of use for a lot of the stuff you have been learning but a lot of hardware functions can be much easily done in software. I suspect that the circuit FB pointed at has a microprocessor at its heart. I would advise you do make space on your learning curve for microprocessors. Whilst the ability to code will greatly assist in using microprocessors you will be surprised how with very simple code you can achieve complex things. Once you master the IF - THEN - ELSE loop all sorts of possibilities open up.

There are several different types out there, the only one that I am really familiar with is the Picaxe family of microprocessors (no connection to the company). Whilst not the fastest or the best, if all you want is to blink a few LEDs move various motors and make some sounds they are more than up for it. As an introduction to microprocessors they are probably ideal cheap to get into and well supported. Rev. Ed the parent company is mainly a supplier to the education market and there is a lot of easily understood material available free. Also free (I always like the sound of that word) is the software to do the programming. If writing lines of code worry you then try the free (there we go again) flowcharting software although graduating to using their version of BASIC will prove advantageous in the end. Link below.

www.picaxe.co.uk

Richard
Tricky Dicky is offline   Reply With Quote
Old 12-10-2017, 12:45 PM   #53
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

Spot on!
Not sure who's being helped now!
Everyone.......
Gotta love that.
__________________

You can only drink so much lemonade
AviatorAtHeart is offline   Reply With Quote
Old 12-10-2017, 01:00 PM   #54
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

Chris. I just watched that pic axe video link on you tube.

Certainly looks far simpler!
But I don't have one
No fun for me........

Other items I may need a pc or Mac!
A mac is on the cards but......I can't save!

After reading what I have here, I may look into it more seriously.
I mean, route planning. That would be a simple affair. If you can code?

(Although I want to experiment with a diode bridge, purely for learning)
Hate to say it but this thread is more exciting than my own build!
__________________

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

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

It is simple on the outside and complex on the inside.

As with all chips the limited current and voltage makes what you can do directly more difficult. However interface circuits are pretty straight forward.
If you do go down the route, a PC is the best option although they do have software that will run on a MAC, the coding isn't that difficult and the manuals are very comprehensive giving a good page at least to how each instruction works. 'My' random output is the example from the manual

my longer term plan is to use one to control a passing loop. it will brake on DC both pieces of track. wait till both are occupied and then switch the points and restore DCC.
chris_db4 is offline   Reply With Quote
Old 12-10-2017, 01:40 PM   #56
Gordon H
Member
 

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

Quote:
Originally Posted by AviatorAtHeart View Post
It has been fun.
That is the main thing.

Quote:
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.
Actually, that action is more properly described as a 'T' Type flip flop, where 'T' means 'T'oggle. A 'D' Type copies its input 'D' to its output 'Q' when it is clocked, so latches the 'D'ata presented to it.
Most 'D' Type devices have true (Q) and complement (/Q) outputs, and it is a simple matter to create a 'T' Type using a 'D' Type by connecting its '/Q' output back to the 'D' input. Then when it is the clocked, the output(s) will alternate each time.
By cascading identical copies (stages), you can create binary counters as each successive stage divides the incoming rate by a factor of two.
If instead of this you cascade the 'D' Types using their 'Q' outputs you create a shift register.
Gordon H is offline   Reply With Quote
Old 12-10-2017, 02:49 PM   #57
Teedoubleudee
Senior Member
 
Teedoubleudee's Avatar
 

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

Quote:
Originally Posted by chris_db4 View Post
........................my longer term plan is to use one to control a passing loop. it will brake on DC both pieces of track. wait till both are occupied and then switch the points and restore DCC.
I did that on one of the first "experiments" I made when returning to the hobby. A layout that would (I didn't finish it) have a single track only visible from the front with a hidden passing loop at the back. One coal train with full wagons in one direction and a train of empties going the other way. I even bought two industrial locos so it looked like the same train going to/from the colliery. Two 12v relays and a pair of reed switches in the track did the trick.
__________________
If I agreed with you, we'd both be wrong
Teedoubleudee is offline   Reply With Quote
Old 12-10-2017, 02:59 PM   #58
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

Quote:
Originally Posted by chris_db4 View Post
It is simple on the outside and complex on the inside.

As with all chips the limited current and voltage makes what you can do directly more difficult. However interface circuits are pretty straight forward.
If you do go down the route, a PC is the best option although they do have software that will run on a MAC, the coding isn't that difficult and the manuals are very comprehensive giving a good page at least to how each instruction works. 'My' random output is the example from the manual

my longer term plan is to use one to control a passing loop. it will brake on DC both pieces of track. wait till both are occupied and then switch the points and restore DCC.
Yes I appreciate it's more complex on the inside. Less spaghetti than my design!

Good and honest to admit your example is from the instructions! Not many blokes read instructions! Thumbs up from me. What it does, is show another example. I'm quite surprised (as twd said) of how many ways there are!

Good luck with the passing loop! I'm going to try the diode bridge on my next board.....rectifier circuit, vs a dpdt switch. If it works I can have my switched siding back! (And I can connect both boards together and run giant trains!)
Obviously that's a good thing.........

Talking of voltage, the circuit I was fiddling with gives different results with lower voltages. Erratic below 5v which I think is to do with the Schmitt trigger.
Works well @7.5v but then I don't fully understand what happens with all the components in the circuit when I do this.

Noted about the pc, but it has to be a mac for me!
(Photographer/output=mac) easy formula.

Maybe I'll do some sideline reading on the pic axe. Just in case!
__________________

You can only drink so much lemonade
AviatorAtHeart is offline   Reply With Quote
Old 12-10-2017, 03:05 PM   #59
AviatorAtHeart
Don't ask, I don't know!
 
AviatorAtHeart's Avatar
 

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

Quote:
Originally Posted by Gordon H View Post
That is the main thing.



Actually, that action is more properly described as a 'T' Type flip flop, where 'T' means 'T'oggle. A 'D' Type copies its input 'D' to its output 'Q' when it is clocked, so latches the 'D'ata presented to it.
Most 'D' Type devices have true (Q) and complement (/Q) outputs, and it is a simple matter to create a 'T' Type using a 'D' Type by connecting its '/Q' output back to the 'D' input. Then when it is the clocked, the output(s) will alternate each time.
By cascading identical copies (stages), you can create binary counters as each successive stage divides the incoming rate by a factor of two.
If instead of this you cascade the 'D' Types using their 'Q' outputs you create a shift register.
I answered this! But.....not sure where it went?
You know what your talking about.

It sounds familiar, in fact it sounds like the stuff I've read on creating half (or double) of a frequency for note/scale formulation.
I have some 40192 binary up/down which I think I got for creating a keyboard scale.
(Now I think about it, it may have been for a clock divider?)
I'll have a look at these more......

That info I have regarding the d type is how it was described in the article. It may well be wrong, so thanks for your explanation!
It's a shame the webpage is down because it had loads of interesting stuff and I barely scratched the surface of its content.
Cogeca.rob paisley.
Hopefully it will appear again soon!
__________________

You can only drink so much lemonade

Last edited by AviatorAtHeart; 12-10-2017 at 03:09 PM.
AviatorAtHeart is offline   Reply With Quote
Old 13-10-2017, 12:19 AM   #60
Gordon H
Member
 

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

Quote:
Originally Posted by AviatorAtHeart View Post
That info I have regarding the d type is how it was described in the article. It may well be wrong, so thanks for your explanation!
It's a shame the webpage is down because it had loads of interesting stuff and I barely scratched the surface of its content.
Yes, I tried to find it to see why/whether he had called it a D Type, but could only find a web archive version of the site, where sometimes it was referred to this way, but having looked there again, most of the designs are correctly indicated as 'SR' flip flops (Set/Reset) using two inputs.
The archive I found was here:
http://web.archive.org/web/201410041...56Stall08.html
though I suspect there may be more than one version of the archive as I can't see a 'D' reference on this page anywhere now.
Gordon H 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 08:38 PM.


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