Arduino ideas, and help

Affiliate Disclosure: We may receive a commision from some of the links and ads shown on this website (Learn More Here)

#81
Perhaps but then again you don't need Arduino to use servo's for turnouts either.

For things such as you built, speedometers and weigh bridges and so forth, it seems great; however, for day to day things such as changing points, lighting - it does over complicate it.

As for the the other things you chose to bring up - your absolutely right, and I stand by what I said about farcebook and the hobby declining. Now I'll add this ... new technology rarely makes things better, it only creates more, over priced, things to fail and/or make people lazier than they have already become.
I've noticed the same thing with my 3d printing. I think that if somebody already has a way of doing it without the technology, then it's going to be a harder sell to use technology. There isn't much that it can do that one couldn't potentially do in other ways. I know there's stuff like vases created by rotating triangles, but the things that one might really want to do could be done in other ways. Which can make it a hard sell for some folks. especially those that aren't good with CAD software and unable/unwilling to learn.

From what I can tell, most of the things that one might use arduino for on a layout are things that are optional or have an already existing option. I just picked up a kit, so I'm not quire sure what I'm going to do with it, but these seem particularly well suited to dealing with accessories.

My initial thought is to use it to run servos on my turnouts. But, I'm also likely to use it for lighting.

No arguments about FB, that's a terrible site and I avoid it wherever possible. The revelations of the last year or two just reinforce the sense that it's not a good idea to involve myself with it.
 

Rabman

Active Member
#82
I've noticed the same thing with my 3d printing. I think that if somebody already has a way of doing it without the technology, then it's going to be a harder sell to use technology. There isn't much that it can do that one couldn't potentially do in other ways. I know there's stuff like vases created by rotating triangles, but the things that one might really want to do could be done in other ways. Which can make it a hard sell for some folks. especially those that aren't good with CAD software and unable/unwilling to learn.

From what I can tell, most of the things that one might use arduino for on a layout are things that are optional or have an already existing option. I just picked up a kit, so I'm not quire sure what I'm going to do with it, but these seem particularly well suited to dealing with accessories.

My initial thought is to use it to run servos on my turnouts. But, I'm also likely to use it for lighting.

No arguments about FB, that's a terrible site and I avoid it wherever possible. The revelations of the last year or two just reinforce the sense that it's not a good idea to involve myself with it.
If you look back on my posts in this section, you will find that I’m using an Arduino with a servo shield to power my servo driven turnouts. I have had the odd servo go a little wonky. Probably because I bought the cheapest ones from China off Amazon. I have been using them for months and all seems to work well. I have two crossovers that switch together as a pair with the push of a button, a 3-way turnout that sets the direction of the track with three push buttons (through two servos). I am quite happy with its operation. In total I bought 20 servos, arduino Mega, motor shield, some metal, some misc items for $100 cdn. So much cheaper than off the shelf items. Took a while to code everything but I was interested in learning.

I am also using DCC++ with an arduino and that was super simple. DCC for $35 Cdn. I use an old Samsung phone to control my locos. Suits my needs.
 
#83
If you look back on my posts in this section, you will find that I’m using an Arduino with a servo shield to power my servo driven turnouts. I have had the odd servo go a little wonky. Probably because I bought the cheapest ones from China off Amazon. I have been using them for months and all seems to work well. I have two crossovers that switch together as a pair with the push of a button, a 3-way turnout that sets the direction of the track with three push buttons (through two servos). I am quite happy with its operation. In total I bought 20 servos, arduino Mega, motor shield, some metal, some misc items for $100 cdn. So much cheaper than off the shelf items. Took a while to code everything but I was interested in learning.

I am also using DCC++ with an arduino and that was super simple. DCC for $35 Cdn. I use an old Samsung phone to control my locos. Suits my needs.
That was one of the things I was thinking about. There's more places on my layout that need multiple switches to switch in coordination than just on their own. The main loop involves having to cross a total of 6 switches each revoluation. Then there's a couple other sets needed to get the trains on and off the module. Being able to reset each side with just a push of a button would greatly improve the flow of the railroad.

Seems like it's a lot easier in the long run to do like you're talking about and set a soft button that can bring those back into alignment with each other.

I've also got 1 turntable that I'll be working to automate. It's on a geneva drive, so it's mostly a matter of cranking until the tracks are in the desired alignment. An extra crank or two would have no impact on final alignment.

For now, I'm setting up most of my turnouts with a manual connection via some styrene piping and piano wire, but eventually, I'm planning on converting them all into something more automatic like you've got.
 
#84
The kit I'm getting has RFID support. I'm going to see if I can get that working for block detection as that would be relatively easy to use for various purposes.
 

Rabman

Active Member
#85
That was one of the things I was thinking about. There's more places on my layout that need multiple switches to switch in coordination than just on their own. The main loop involves having to cross a total of 6 switches each revoluation. Then there's a couple other sets needed to get the trains on and off the module. Being able to reset each side with just a push of a button would greatly improve the flow of the railroad.

Seems like it's a lot easier in the long run to do like you're talking about and set a soft button that can bring those back into alignment with each other.

I've also got 1 turntable that I'll be working to automate. It's on a geneva drive, so it's mostly a matter of cranking until the tracks are in the desired alignment. An extra crank or two would have no impact on final alignment.

For now, I'm setting up most of my turnouts with a manual connection via some styrene piping and piano wire, but eventually, I'm planning on converting them all into something more automatic like you've got.
I can send you my arduino sketch when you are ready for the turnouts. Send me your email address through PM when the time comes. It is too large to post the current version on the forum.

I am not familiar with the turntable drive you are referring too. But I am sure with some trial and error you can make it work. An indexing system would make it easy to adapt to the arduino.

Block detection has been done as well. There are a few YouTube videos when the modeller has automated train operations with an arduino. You can also use infrared sensors or magnetic read switches with magnets on the equipment.
 
#86
I can send you my arduino sketch when you are ready for the turnouts. Send me your email address through PM when the time comes. It is too large to post the current version on the forum.

I am not familiar with the turntable drive you are referring too. But I am sure with some trial and error you can make it work. An indexing system would make it easy to adapt to the arduino.

Block detection has been done as well. There are a few YouTube videos when the modeller has automated train operations with an arduino. You can also use infrared sensors or magnetic read switches with magnets on the equipment.
I was contemplating using RFIDs because in addition to that stuff, you can also use it to have the layout know what car it is. I'm not sure how well it would work, but I think there's a bit of stuff you could do with that that you couldn't otherwise do.

It's going to take 12-20 days for the kit to get to me. In the mean time, I found this interesting video on lighting that folks might be interested. I don't think it's been linked before.

 

Rabman

Active Member
#87
The lighting video was interesting.

A caution on the rfid is the range of it. If you have rolling stock on adjacent tracks (2-1/2” away), I would be concerned about picking up a railcar on the adjacent track. You will need to test for that. I am not sure of the range, it may not be an issue.
 
#88
The lighting video was interesting.

A caution on the rfid is the range of it. If you have rolling stock on adjacent tracks (2-1/2” away), I would be concerned about picking up a railcar on the adjacent track. You will need to test for that. I am not sure of the range, it may not be an issue.
In terms of the distance, it's mostly a matter of how much power you give the sensor. Basically the sensor is what powers the ID tag and the less power you give the sensor the less distance it will effectively power the tag and the distance the tag will transmit over. 2.5" shouldn't be an issue at all, if you've got the power set low enough. You can also shield the sensor so that it's not able to see anything to the sides, just forward and reverse on the track which should keep that problem to a minimum. The local buses use an RFID system and you have to get it quite close for it to read. In that case, they have the power up a bit higher than needed because they're not concerned with confusing different passes.

The main possible issue is having the RFID trigger at the right time when a train enters a block and not have the case where it enters the block, is detected a bit later and another piece of rolling stock is doing the same thing from the other end.
 
#90
Let us know how it works out.
I will admit that your concern is something that has crossed my mind, but since I'm getting a kit that has the necessary pieces, and this is probably the only thing I can think of doing with it that wouldn't creep me out.

I suspect that with an appropriate amount of shielding and power that I can get the thing to know which cars are on a segment of track. The unknown here is really whether this is sufficient for block detection, or whether I also need to use something else.

But, if I can get this to work, that would open up a fairly wide array of possible uses including triggering specific animations appropriate to a car or just directing specific locomotives to specific sidings.

EDIT: It looks like a passive RFID setup has a typical maximum distance of about 5-10cm, which is roughly 2-4 inches. I think with either a directional antenna or some shielding to the sides, that the range shouldn't be much of a problem as far as wrong track goes.
 
Last edited:
#94
I've ordered a whole mess of servos off aliexpress, for like $18 including shipping. I'm probably going to just build myself a set of 3d printed holders for the track and servo, that hold everything in place nicely for install.
 
#96
Hope you bought extra servos. You will probably need spares.

The printed holder may simplify things.
I probably will, but some of my switches already have manual throws, so if I have issues with some of these, I'll just skip those.

The ideal here is that I'll have them set up so that if the servo ever fails, I'll be able to easily pop it out and install a new one. And that's going to take a certain amount of planning as I won't necessarily know what the size of the new one would be or even if I'd need to replace one.

Once, I've got one turnout figured out, then I'll start worrying about the others. I'm likely to order more at some point, as I'd like to try my hand at doing some animations for the layout. Although, in n-scale, that's somewhat limited. But, it would be kind of cool to have a waterbuffalo on the tracks that has to get out of the way.
 

Rabman

Active Member
#97
Where are you getting the 3D printed mounting brackets from?

I ordered 20 and needed 14. A few were duds but most worked. Have a few spares.

I like the idea of animations.
 
#98
Where are you getting the 3D printed mounting brackets from?

I ordered 20 and needed 14. A few were duds but most worked. Have a few spares.

I like the idea of animations.
I think I may not have been clear. My intention is to have all of my turnouts use these motors, but I've got several that already have manual throws that I won't remove until I've verified that I have an appropriate servo to work.

I've got enough that I can cover the ones that are essential with spares, but I didn't want to sink a bunch of money on spares where I could just use the existing throws.

Animations have me intrigued, but with n-scale, I'm sure it's going to be pretty limited. I'd like to incorporate elements inspired by Dutch zoekboeks .
https://www.nytimes.com/2018/07/14/opinion/sunday/dutch-childrens-books.html
With miniature stories going on. But, I'm sure due to the scale, that animation possibilities will be somewhat limited in terms of realism and complexity. Much of it will probably be more in terms of sound and lighting. But, I think there's some stuff that could be done with motion.

I've always been a sucker for that sort of thing going back to when I was a kid reading books like Where's Waldo, The Borrowers and various other books with tons of little details to be discovered if you look long enough and carefully enough.
 



ModelRailroadForums.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com

Top