Notifications
Clear all

Post your Model Railroads Here

30 Posts
6 Users
6 Likes
9,772 Views
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
 

So, I went searching on Amazon for 74H595 and got no hits. However, did find 75HC595D and 74HC595. Are these all the same? Why major differences in price? The ones I found were: Amazon 74HC595D at only 20 for $8. Are they even cheaper off ebay or electronic stores?

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

Yes, those are the correct ones you found on Amazon.  Sorry for the part number error.  I'll have to start claiming Alzheimers next, which probably won't be as much of a fib as I would like for it to be.

Never trust anything I say.

Always check with someone who has a working brain first. ?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@photo-bud

There are a few things you might want to consider and check before you get too carried away with this.

To begin with you should definitely build a prototype test neighborhood circuit to experiment with and be sure everything works as expected.   I gave you this idea but  haven't tested it out myself first.  There is a possibility that there could be some signal issues over a longer run.   So just something to keep in mind.

You might want to run the 5 volt power lines separate from the shift register signals.   Maybe use a 3 conductor cable for the signals and some heavier gauge wire for the 5 volt power supply.

I drew up a cartoon for you just to give an idea of what I have in mind.

Circuit

The shift register chips can be located inside the structures.   This allows a 5-wire connection for every diorama structure to plug into the neighborhood circuit.  Notice in the center I have a single shift register controlling a traffic light and it can also be used to turn the street lights on and off.  You could put the shift register in a little traffic relay box as part of the diorama.  ? 

This cartoon neighborhood circuit has 6 nodes or shift registers.   So your program needs to send out 6 bytes to control these 6 nodes.   First byte out will end up at the Shop in this cartoon.

Note also that you can manipulate any single unit without affecting the others by simply only changing the byte in the sequence that  you are interested in manipulating.   You would still need to resend all 6 bytes, but when you latch them only the byte you changed would be different.

I hope this works for you.  Keep in mind that this was just a brainstorming idea on my part.  I haven't tested this, and if you have any problems with it I'm going to pretend that we never met.  John who?  I never heard of him. ? 

I'll be claiming to have amnesia if this doesn't work.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

Thinking Ahead:

Ok John, I have more crazy ideas for you. ? 

At first I was hesitant to post these additional ideas, but it might actually be good to think about this while you're still in the preliminary stages. 

First off this idea is kind of totally separate from the previous idea, but not quite.  That is to say that in terms of the micro-controller it will be a whole different aspect.  But in terms of the wiring it could be included in your initial wiring just so it's there for future use. 

In terms of wiring I would add two more wires to your multi-wire cable.   So get a 5-conductor cable, or even 6 or more just to be sure.

This new idea is to also make use of the PCA9685 Servo controller board while you're doing this.

PCA9685

This servo controller board allows you to control up to 16 servo motors using only two more lines from your Arduino via I2C.   You may have seen Bills DroneBot Worshop video on this board.

In any case, with only two more wires on  your "neighborhood loop" you can add the capability of controlling a bunch of servos in the neighborhood as well.

In terms of programming, this would be totally separate from the Shift Register routine.   In other words your program can update the shift registers that we have previously discussed in the normal manner.  But then you will also have the ability to update servo positions on your layout as well.

Being able to control up to 16 servos with only 2 more lines is pretty cool don't you think? ? 

So I'm just mentioning this here for a possible future expansion to your neighborhood circuit capability.  You may as well add the extra two wires in the original wiring so they are there if  you want to add servo actions to  your neighborhood.

I don't want to overwhelm you with too many new concepts.   Get the Shift Regs up and running first.  You can always add the servos later.  I'm only mentioning this now as it might be beneficial to include the extra two wires needed for the I2C bus while you're setting things up initially.     That way they will already be routed through the neighborhood if you decide to add servo actions later. 

I don't want you to be screaming at me later, "Why didn't you tell me I was going to need to more wires before it's all said and done!" ? 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Photo Bud
(@photo-bud)
Member
Joined: 5 years ago
Posts: 89
 
Posted by: Robo Pi

..

I hope this works for you.  Keep in mind that this was just a brainstorming idea on my part.  I haven't tested this, and if you have any problems with it I'm going to pretend that we never met.  John who?  I never heard of him. ? 

I'll be claiming to have amnesia if this doesn't work.

@Robo Pi In the immortal words of Mission Impossible, "As always, should you or any of your IM Force be caught or killed, the Secretary will disavow any knowledge of your actions. This tape/disc will self-destruct in five/ten seconds. Good luck"

Thanks for the heads up on wiring and I'll keep it in mind, but for now, lighting is all I'm concerned about and there is plenty for me to learn and experiment with. With that said, however, the servo board shown does look interesting and leads me into more deep waters. I've already done some initial forays into stepper motor control and servos obviously fill some other niches that I need to get involved with.

Thanks!

Photo Bud (aka John)
The Old Curmudgeon!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

Sixteen servos and wadda git?
Ancient model railroader who's deeper in debt.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@thunderbolt)
Member
Joined: 5 years ago
Posts: 1
 

I started a Facebook group a while ago for Arduino and 3 Rail Model Trains.  The page has grown and includes members from all scales and attempts to cover the basics of applying Arduino technology to model railroads.  Please join our group and see what many people are doing.  


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@thunderbolt

Be sure to tell you MMR group about the 3-wire shift register trick and the 2-wire 16-servo trick.   Those two tricks will really pan out in the MMR world as they can save a whale of a lot of wiring on a layout.  And a single Arudino can control a whole lot of things that way.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@scott-morgan)
Member
Joined: 5 years ago
Posts: 10
 

@robo-pi

Indeed John's layout is coming along just dandy...


   
ReplyQuote
(@scott-morgan)
Member
Joined: 5 years ago
Posts: 10
 

@robo-pi

I'm leaning towards using "Mega Points Controllers" on my layout. I can control 12 servos with one board using DPDT switches. Plus it has an I2C network that ties all the boards together if you need more. I also bought the board that pulls in a relay when the switch points are moved in order to power the frogs with the right polarity. It too connects via network.


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  

@scott-morgan

I just watched this video on the "Mega Points Controller".

That's certainly a convenient way to run servos with manual switches.   But all this board does is allow you to program the range of motion of the servos. 

I don't know if you have any programming experience, but with a simple Arduino UNO, and a second little board that controls up to 16 servos called a PCA9685 board see my post here you can not only control the range of motion of the servos but you can also program the switches to open and closed based on other events.

In other words you can make the railroad fully automated quite easily to where the turnouts are operated entirely by the computer (the Arduino). 

Of course this may not  be what you want.  Perhaps your purpose is to have people "operate" the railroad and in that case you would want them to be responsible for setting turnout in the right position at the right time.

But if you are interested in a fully automated railroad that you can just sit back and watch it run, the Arduino can easily be used to do that.

But of course, this would require programming on your part to write all the programs to make the railroad do what you want it to do.  

But yeah, for manual switching the "Mega Points Controller" is just fine.

I should add here that the Arduino could also do exactly the same thing the "Mega Points Controller" does.   And potentially even make programming the range of the servos easier.

The PCA9685 Servo controller board is also I2C expandable.   One board controls up to 16 servos.  But you can ad pretty much as many additional boards using I2C as you like.   And they could all be controlled by a single Arduino UNO if you want.

Between you and John, I'm going to be tempted to get my trains back out again. ? 

I have everything I need to build a complex HO or G scale model railroad.  Or both if I get carried away. ? 

I actually started building them years ago but then had to move.  I took them back apart and put them in the attic of the new place I moved into.  And that's where they still are to this day.

 

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
 
By the way, what scale are you working in?  I'm guessing HO?
 
Do you have any pictures of your layouts?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@scott-morgan)
Member
Joined: 5 years ago
Posts: 10
 

@robo-pi

This is the vid that I watched over and over before I sent out any money. I did buy the 12 relay driver board as well to power my frogs. I like the fact that instead of using the SPDT switches, you could use a digitalwrite pin whatever from an arduino low or high to position the turnouts. If you look into the other vids you might agree that these boys have made a gallant effort to meet the needs of several RRers. I concur with you that adjusting the servo travel is really quite convenient with the board. I am tied up with logistic problems with the RR club at the moment, but I am highly anxious to get it moving. The 3 memories is what sold me on this board plus I could use an Arduino Mega and that 16 channel board and do the same thing, BUT I am not good enough to write the code to do it.

Enjoy, even though his voice gets old quick. Nice day today isn't it neighbor?


   
ReplyQuote
(@scott-morgan)
Member
Joined: 5 years ago
Posts: 10
 

@robo-pi

I do have the boys running HO, however at our last show at the Kinzua Bridge Visitors Center included N, HOn30, HO with DC and DCC, O scale kids M&M loop, Lionel 6x16 layout with Prewar loop and American flyer S scale inside the space where the dogbones are, and finally G scale. we had over 500 come through the door and made $24 in our donation jar. The boys from Denmark were a great help. They loved the Lionel stuff. I'll dig up some photos when I get a chance. If I forget, please remind me. Cheers!!!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @scott-morgan

I like the fact that instead of using the SPDT switches, you could use a digitalwrite pin whatever from an arduino low or high to position the turnouts.

This is true, you always have the option to automate later if you so choose.  The MegaPoints servo controller board certainly appears to have enough functionality already programmed into it.

I've had the dream of building a G-scale model railroad in my front yard.  The big hold up is simply the cost of the track.  For everything I want to do it would cost me over $1000 in track.   I can't afford to put that kind of dough into model railroad.  I even looked into just buying aluminum rails and making my own track, be even that only cut in about half, and would then require a lot more work on my part.  Plus everyone on Model railroad boards was telling me that I'd be sorry if I used aluminum and to go with the brass.  They say the aluminum oxides and become insulated overnight and that all I'd be doing is sanding the track down all the time.   At first I thought I'd just build a maintenance train to sand it own track down.  But even after considering that I chose to abandon it. 

I didn't give up altogether.  Instead I decided to go with homemade wooden track.  Yep, that's right.  Wooden track with wooden rails.   No electric in the track at all.  And I would convert the trains over to battery power.  I actually came up with this idea myself and got laughed off the Model Railroad forum. ? 

But then, much to my shock and amazement I found a YouTube video of another guy who did precisely that.   And he had his trains up and running on his wooden rails.   So I figured it can't hurt to give it a shot.  Start with just a small oval and see how that works.  If it works then just keep building.

I actually have the ties cut.  Well, almost cut.  I cut up an oak log on my sawmill and cut it into 1/2" square strips of wood.   Then I ran those through a surface planer to get them all precisely the same size.   So I have those cut and ready. ? 

But I haven't found the time to build the actual track yet.   I have it all planned out, and even drew up some track drawings.  They might be on this computer, let me check,...

I found some,... 

Here's some pictures I drew up in Sketchup for making the wooden track.

All Pics

I even designed a special router jig for cutting the groove on curved sections to accept the rails.

Router Table Complete

I have no clue if any of this would even work.  And that's part of the reason I'm not pursuing it aggressively.   But if it did work it would be quite cool and save me $1000 on track. ? 

I guess I haven't given up on this entirely since I just cut the oak ties this spring.  I was cutting oak logs on the sawmill and got ambitious and cut one up just for ties.   And I even planed those ties down!  So I have the ties.

I least I have something done toward it.   Too many dreams, not enough life.   I really would like to at least make a large oval with some 8 foot long straight sections.    If I got that much up and running that would probably be worth making a video on.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Page 2 / 2