Jump to content
 

Arduino Applications and Programs


Simond
 Share

Recommended Posts

  • RMweb Premium

Thanks for the further responses.

 

We already have a number of MERG servo4 boards in use with the present configuration of the layout and these are currently "driven" direct from some DCC Concepts. The revisions to/rebuild of this part of the layout just add a couple of extra points. We can avoid the need for any extra levers if we go down the route setting option - whereby one lever will operate one of several signal arms depending on the lay of the points - but I'll guess that would complicate any interlocking that we try to introduce.

 

Aside from this (and the changed track layout) the only variations we're considering is to look at the option to be able to detach the lever frame from the layout when not in use and if I can get my head around Fabrice’s sketch introduce at least some (electrical) interlocking.

 

I'd aim to fit the Arduino directly below the lever frame so the wiring of one switch on each lever connects directly to an Arduino input pin and there would be one wire from each output pin to the relevant connection on the servo4s. The majority of the signals and points are within a few feet of the lever frame.

 

I'm also mindful that I cannot guarantee to always be around if something goes amiss with the electrics/electronics and I'm possibly pushing my luck by introducing an Arduino into the equation. Anything more is definitely too far from safety.

 

I have had a thought for the connection between lever frame board and the rest of the layout. A single 25 pin D connector might be insufficient and a second one may see minimal use. Casting my mind back a few years to when printers were invariably hardwired, they used a Centronics cable that had (I think) 36 pins. That would be all that we'd need. I'll investigate whether board mounted male and female connectors of this type are available as that would avoid any loose leads hanging down from the layout.

 

I'm grateful for all the suggestions. I'll update this thread once we have finalised the route we're taking.

Link to post
Share on other sites

There are 37 pin D-sub connectors, and break-out boards are available.   However, 25 pin is much more common, and you'll probably find that two 25-pin or two 15-pin connections could come in cheaper than a single 37 pin.  And two 15-pin arrangements may be simpler to wire up, keeping different connections further apart.   

  • Thanks 1
Link to post
Share on other sites

  • RMweb Gold
On 09/01/2021 at 11:18, Sir TophamHatt said:

Morning everyone

 

I'm looking to build an auto shuttle with Arduino, purely on a cost basis compared with an s88 board.  It'll be run using the shuttle feature of an ECoS (don't have yet but plan to buy).

 

 

.........

 

Finally, I am no good with schematic diagrams.

 

 

 

On 09/01/2021 at 13:05, Donw said:

You are obviously a real novice and this is not the place for a proper tutorial so I would look for some tutorials on getting started with Arduinos.

 

On 09/01/2021 at 13:06, Nigelcliffe said:

 

I think you're heading to a crash  ( " I'm no good with schematic diagrams" ,   "dont really know how to use a multimeter" and others ). 

 

However,  if wanting to learn Arduino, buy a beginner's box of bits from somewhere like Elegoo for about £30.  That will have a Uno, breadboard, load of cables, various components and accessories, and a CD containing a load of lessons/tutorials to follow to learn the basics of how it works. 

 

Sorry,  I'm very late to this particular party and I haven't read the entire relevant section of the thread so the questions might have had further answers later on but, as indicated by both Don and Nigel you do need to understand the fundamentals of electronics and the relevant components (switches, resistors, LEDs, diodes etc) and most importantly how very simple circuits are connected and represented in schematics - they may look daunting but certainly in the case of Arduino circuits to do simple tasks (e.g. create an Arduino circuit to flash an external LED) they are not and will just need a little bit of background knowledge and study.

 

The suggestion of online video tutorials etc is very good but I would also add what I consider to be an exceptional source of information on just how flexible the Arduino is, how they can be used to perform almost every conceivable task from the most trivial to the most unlikely and (because it's a book) a source of information that you can assimilate at your own speed.   Well worth  tracking down a copy I would have thought.

 

Good luck!

 

https://www.amazon.co.uk/Arduino-Cookbook-Michael-Margolis/dp/149190352X

 

 

Link to post
Share on other sites

On 16/05/2021 at 12:47, Simond said:

There is another consideration, servos are known for their tendency to jitter, due to received interference from other  electrical things in the area, like locos, on the analog signal wire to the servo. This is probably worse if the analog wires are long, and of course, an electrically noisy loco (eg old motor) will probably be much worse.

 

 

And not only jitter. The worst case is when a burst of interference makes a servo go bananas and it drives to an end position. If there is no elasticity between the servo's horns and the point's tie-bar the servo is quite capable of relocating the point and track or ripping off the tie-bar.

 

For that reason I always drive servos "full swing" (which is usually about 90 degrees) and use something like an omega loop to connect the appropriate hole in the horns to the tie-bar. The other way to do it is to attach the servo to the baseboard with something springy so that the servo's body can rotate if it tries to drive too far.

Link to post
Share on other sites

I rather like the idea of an eccentric or cam on the servo, that effectvely goes through the full angular travel on every operation - this means that the point cannot backdrive the servo, so the servo shouldn't get hot, and the servo can't overdrive the point (or more fragile, signal)

 

I've seen a few but not got my head round making them yet.

 

Ideally wants to be something I can laser-cut - once I have a design, I'd like to use it everywhere!

 

S

  • Like 1
Link to post
Share on other sites

  • RMweb Gold
29 minutes ago, Simond said:

I rather like the idea of an eccentric or cam on the servo, that effectvely goes through the full angular travel on every operation - this means that the point cannot backdrive the servo, so the servo shouldn't get hot, and the servo can't overdrive the point (or more fragile, signal)

 

I've seen a few but not got my head round making them yet.

 

Ideally wants to be something I can laser-cut - once I have a design, I'd like to use it everywhere!

 

S

 

Not dificult to make at all. The problem is where the movement needs to be precise which is what is needed for a tiebar. Ideally for a tie bar you need to set a precise movement for 0 gauge say the blades are set to give 2mm clearance on the open blade then the movement will be 2mm. You also needs a small positive contact pressure to stop the blade opening when contacted by a flange. 

Now if you cut the cam out that will define the degree of movement so you would probably have to allow extra movement and either use an omega loop or a bendy operating arm to absorb any excess movement.

One simple way is to use a flexible operating wire working via a fulcrum that that can allow the full movement of the Servo with the flexible operating arm taking up any excess. There is a video by Dave Fenton (Megapoints) of this on youtube.

It is also practical with this system to turn off the servo if the tension in the flexible arm is insufficient to driveback the servo. 

 

Don

 

 

  • Like 1
Link to post
Share on other sites

Thanks Don, 

 

it didn’t seem difficult, it was more a case of trying to work out the best way to do something that I’m in no hurry for.

 

before the next bout of serious tracklaying, I need to build an extension!

 

atb

Simon

  • Like 1
Link to post
Share on other sites

8 hours ago, Simond said:

I rather like the idea of an eccentric or cam on the servo, that effectvely goes through the full angular travel on every operation - this means that the point cannot backdrive the servo,

 

 

That's true if your servos can rotate through 180 degrees but the ones I have only seem to manage about 90 degrees between the min and max pulse width (one millisecond and two milliseconds) but even that does substantially reduce any backdrive torque to the servo.

 

I did play around with a 3-D printed cam arrangement that even had an adjustable throw. I think I posted it here somewhere but that was quite a while ago :scratchhead:

  • Like 2
Link to post
Share on other sites

Andy,

 

yes, a 180 degree throw would be ideal, I believe there are such beasts, but I guess the cheaper ones will be ~90 degrees.

 

I do think a spring is needed somewhere in the linkage, either an omega loop, or a tortoise-style lever spring, which is certainly easy to make consistently.  Using a lever does offer the option of a moveable pivot that can be clamped as required on the spring

 

I don’t have a 3D printer, though I have access to an Ultimaker at work. A good tool, but surface finish is certainly not good enough to use as a bearing.

 

atb

Simon

  • Like 1
Link to post
Share on other sites

  • RMweb Gold

Using 180 deg rotation on servos is sort extending the spec some will do it fine others seem less happy. However there is no need to use 180 deg rotation. With a cam design you can ensure the thrust to the operating arm is perpendicular to the centre of the cam. Hence there will be no rotational element in the back pressure.

 

Don

Link to post
Share on other sites

10 hours ago, Donw said:

Using 180 deg rotation on servos is sort extending the spec some will do it fine others seem less happy. However there is no need to use 180 deg rotation. With a cam design you can ensure the thrust to the operating arm is perpendicular to the centre of the cam. Hence there will be no rotational element in the back pressure.

 

Don

 

Hi Don,

 

Strictly speaking there would be torque applied to the cam if enough friction was eliminated (e.g. with a roller bearing) but typically there is too much friction to allow any backdrive.

 

Andy

Link to post
Share on other sites

  • RMweb Premium
47 minutes ago, leopardml2341 said:

Does anyone have direct experience of Arduino IDEs for Android?

 

If so which would you recommend?

No

 

Is this what you mean?

https://www.electromaker.io/blog/article/best-android-arduino-ides-for-programming-arduino-with-android

 

 

Edited by melmerby
  • Agree 1
Link to post
Share on other sites

  • RMweb Gold
4 hours ago, AndyID said:

 

Hi Don,

 

Strictly speaking there would be torque applied to the cam if enough friction was eliminated (e.g. with a roller bearing) but typically there is too much friction to allow any backdrive.

 

Andy

 

Actually if the cam at both end points is a constant radius there would be no rotational force with the thrust vertical. Between the two there would be some rotational resistance to the movement of the cam but as the power is being applied to the servo this will easily be overcome.

 

Don

Link to post
Share on other sites

A cam with two points, 90 degrees apart, whose tangents are perpendicular to the radius is certainly possible, but it’s not an eccentric, which means that the follower needs to be shaped to provide clearance.  One of those microswitches with a built-in roller on the actuating arm might be an option, if the linkage could be easily attached.  That would kill a couple of birds with one stone.  Trouble is, that only “pushes”, so your point blades would need to be sprung, or you’d have to arrange another one on the other side, desmodromic style, to “pull”

 

image.jpeg.bab3dd79138303773830cf907f5bf617.jpeg

 

 

Link to post
Share on other sites

  • RMweb Gold
5 hours ago, Simond said:

A cam with two points, 90 degrees apart, whose tangents are perpendicular to the radius is certainly possible, but it’s not an eccentric, which means that the follower needs to be shaped to provide clearance.  One of those microswitches with a built-in roller on the actuating arm might be an option, if the linkage could be easily attached.  That would kill a couple of birds with one stone.  Trouble is, that only “pushes”, so your point blades would need to be sprung, or you’d have to arrange another one on the other side, desmodromic style, to “pull”

 

image.jpeg.bab3dd79138303773830cf907f5bf617.jpeg

 

 

 

I had in mind more of an egg shape. For semaphore signals I would use a weight to return. Well actually the weight would hold it onto the cam all the time . The same could be done with a turnout but would need a beel crank mounted vertically to change the angle of motion. I would probably prefer the flexi operating arm for a turnout to give a modest force to maintain the contact of the closed blade.

 

Don

Link to post
Share on other sites

an idle lunchtime moment on the CAD

 

image.png.6d24eb948195c2879693fb978ed04705.png

 

We have here two construction circles concentric with the 10mm hole (which is clearly oversize for the servo spindle) of 20mm and 25mm.  The stroke of our cam is thus 2.5mm which is also not the right answer to anything but no matter. 

a) If you have a roller follower contacting the cam at "12 oclock" it will be 12.5mm from the axis, and there is no rotational moment applied to the cam provided the roller can roll.  (assumed the roller can only go up and down - no sideways movement)

b) The cam can then turn clockwise 90 degrees, the roller will descend to 10mm from the axis and again, at the rest position, there is no moment applied to the cam.

 

The R10 cannot be more than 10 as the point at which it is tangent to the flat on the cam must also be tangent to the 25mm construction circle or a) is no longer true

 

The R10 cannot be smaller than 10 as the ramp profile would be outside the 25mm construction circle - this would give an "over centre" effect with appropriate springing in the linkage

 

The grey 3.54 dimension shows that if you have two roller followers, one either side of the cam, so it can "pull and push" they need to be independent because the distance between them will increase to 23.54 at mid stroke, whereas it will only be 22.5 at the ends of the stroke.

 

It'll work fine with a single follower and a spring or gravity (a very effective, fatigue-free and cheap spring) return

 

The guys who designed Ducati valve gear didn't have Solidworks...

 

 

Edited by Simond
Link to post
Share on other sites

  • RMweb Gold
48 minutes ago, Simond said:

an idle lunchtime moment on the CAD

 

image.png.6d24eb948195c2879693fb978ed04705.png

 

We have here two construction circles concentric with the 10mm hole (which is clearly oversize for the servo spindle) of 20mm and 25mm.  The stroke of our cam is thus 2.5mm which is also not the right answer to anything but no matter. 

a) If you have a roller follower contacting the cam at "12 oclock" it will be 12.5mm from the axis, and there is no rotational moment applied to the cam provided the roller can roll.  (assumed the roller can only go up and down - no sideways movement)

b) The cam can then turn clockwise 90 degrees, the roller will descend to 10mm from the axis and again, at the rest position, there is no moment applied to the cam.

 

The R10 cannot be more than 10 as the point at which it is tangent to the flat on the cam must also be tangent to the 25mm construction circle or a) is no longer true

 

The R10 cannot be smaller than 10 as the ramp profile would be outside the 25mm construction circle - this would give an "over centre" effect with appropriate springing in the linkage

 

The grey 3.54 dimension shows that if you have two roller followers, one either side of the cam, so it can "pull and push" they need to be independent because the distance between them will increase to 23.54 at mid stroke, whereas it will only be 22.5 at the ends of the stroke.

 

It'll work fine with a single follower and a spring or gravity (a very effective, fatigue-free and cheap spring) return

 

The guys who designed Ducati valve gear didn't have Solidworks...

 

 

 

That would work Simon my only concern would be should the servo over run  (possibly due to some phyical shift in the servo the  pointy bit on the out circle would push the operating arm beyond its limit. I would round off the pointy bits to the outer circle and the inner circle  keep any roller movement within the limits. that was what I was thinking about with an egg shape not a true egg shape.

 

Don 

Link to post
Share on other sites

Yes, I think you’d want the ramp to end on circles of at least a few degrees to allow for jitter, over travel, etc.

 

it’s probably not the approach I’ll use, like I said, no hurry.

 

cheers

Simon

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...