Jump to content
 

Frog Polarity switching: Relay or Microswitch ?


DGO
 Share

Recommended Posts

16 hours ago, AndyID said:

 

Servos have lousy noise immunity. That's not a problem in a RC boat or aircraft but it's a problem on model railways. The solution is to eliminate the antenna effect on the input to the servo and this is one way to do that.

 

Try as I might I could not make them twitch under any circumstances with this method. I don't know if anyone else has tried it but I'd be interested to hear how they got on.

 

 

 

Andy , I’ve used the opto method to drive the servo line , no twitches 

 

I’ve about 30 driving signals on a big O gauge so plenty of dcc current floating about

 

servos are great , but they are a component of the solution not a complete solution , those that run into problems don’t seem to appreciate that 

  • Like 1
Link to post
Share on other sites

  • RMweb Premium
On 20/07/2020 at 17:49, DGO said:

OK so I've decided to come back to model railways after a short 40 year gap, I've also decided I'm going to switch my turnouts with servos though I've yet to decide on exactly how.

 

You can drive multiple point servos with an Arduino.

If you use on/off switches to trigger the servos, you could use that signal to also operate a relay.

  • Like 1
Link to post
Share on other sites

1 hour ago, Junctionmad said:

Andy , I’ve used the opto method to drive the servo line , no twitches 

 

I’ve about 30 driving signals on a big O gauge so plenty of dcc current floating about

 

servos are great , but they are a component of the solution not a complete solution , those that run into problems don’t seem to appreciate that 

Solenoids just work with a satisfying clunk. You fit them under the point put a couple of switches in your control panel and you have a perfectly reliable and cost effective means of changing points. A complete and simple solution that works. Servos just seem to be a pain so far as N gauge points are concerned .  And what on earth servos “being a component of the solution “ is all about I don’t know.  All you need is to press a button and have the point change; there’s no more to it than that. I’m glad some folk enjoy using servos to change points but so far as I am concerned solenoids are for points and servos for signals. That’s what works for me. 


At our club a few people were dead keen to use servos and pressurised the rest of the crew into agreeing. Two and a half years of pain and delay later we are stripping out MERG and servos and installing solenoids. Maybe a different (and more expensive) servo based solution would have worked better.

 

Link to post
Share on other sites

Sorry I've not replied earlier I only just got a notification there was a reply and have just had to read a page and a half of replies ...

 

OK a few things

 

Firstly I probably (almost certainly) will be using DCC but not to actually switch the points, thus the non dcc forum posting, I will probably be using JMRI and multiple Arduino controllers, so servo control because I'm going to have at least a dozen points on my layout, at £25 per tortoise vs under £5 for a servo it's a no brainer an arduino plus a single control board  can easily run up to 16 servos and you can daisy chain the control boards using an I2C bus 

 

Scale H0m with rack rail ... since no one currently makes an H0m rack rail set of points and if they did it would cost a fortune I'll be making my own

 

Soldering skill wise I'm ok with normal sized stuff I may struggle with tiny surface mount stuff as my eyesight is not quite as good as it once was but I have a steady hand and know one end of the iron from the other 

  • Like 1
Link to post
Share on other sites

  • RMweb Premium
31 minutes ago, DGO said:

Sorry I've not replied earlier I only just got a notification there was a reply and have just had to read a page and a half of replies ...

 

OK a few things

 

Firstly I probably (almost certainly) will be using DCC but not to actually switch the points, thus the non dcc forum posting, I will probably be using JMRI and multiple Arduino controllers, so servo control because I'm going to have at least a dozen points on my layout, at £25 per tortoise vs under £5 for a servo it's a no brainer an arduino plus a single control board  can easily run up to 16 servos and you can daisy chain the control boards using an I2C bus 

 

Scale H0m with rack rail ... since no one currently makes an H0m rack rail set of points and if they did it would cost a fortune I'll be making my own

 

Soldering skill wise I'm ok with normal sized stuff I may struggle with tiny surface mount stuff as my eyesight is not quite as good as it once was but I have a steady hand and know one end of the iron from the other 

I'm slightly confused.

Are you using JMRI to control the Arduino/servo set up or is that your DCC system (to be?)

As I have found you don't need a shield to control servos, a Nano can control 8+ as long as the power to the servos isn't taken from the Arduino, only the digital signal.

I buy my Arduino clones from Aliexpress, very cheap but delivery can be slow although I had an 11 day delivery for my most recent Nanos.

Link to post
Share on other sites

45 minutes ago, melmerby said:

I'm slightly confused.

Are you using JMRI to control the Arduino/servo set up or is that your DCC system (to be?)

As I have found you don't need a shield to control servos, a Nano can control 8+ as long as the power to the servos isn't taken from the Arduino, only the digital signal.

I buy my Arduino clones from Aliexpress, very cheap but delivery can be slow although I had an 11 day delivery for my most recent Nanos.

 

JMRI to control DCC and separate serial interface controlling servos, lights, signals etc the object being that I don't need DCC interfaces dotted about the layout controlling anything else, the DCC will be strictly for the trains

 

Whilst you don't need a shield to control the servos my main station will have maybe 11 points plus some servo controlled animated doors etc so using one of the I2C servo control boards makes it easy to wire up up to 16 servos and they will only use a tiny bit of the capabilities of say a nano, allowing me to potentially add sensor inputs, additional light controls or whatever I want, I'm trying to decide if it's better to use a dedicated nano to run the points and a second to for example control signals with another looking at inputs or if I'm better off using one nano to control some signals a few sensors and a few servos, I'm not sure that it will make all that much difference, save that if I do the latter I can set each nano up identically save for the identity which makes programming simpler, but means that one unit will be performing multiple functions which adds to the complexity of the program.

Link to post
Share on other sites

Quote
Solenoids just work with a satisfying clunk. You fit them under the point put a couple of switches in your control panel and you have a perfectly reliable and cost effective means of changing points. A complete and simple solution that works. Servos just seem to be a pain so far as N gauge points are concerned .  And what on earth servos “being a component of the solution “ is all about I don’t know.  All you need is to press a button and have the point change; there’s no more to it than that. I’m glad some folk enjoy using servos to change points but so far as I am concerned solenoids are for points and servos for signals. That’s what works for me. 


At our club a few people were dead keen to use servos and pressurised the rest of the crew into agreeing. Two and a half years of pain and delay later we are stripping out MERG and servos and installing solenoids. Maybe a different (and more expensive) servo based solution would have worked better.
 


 

What I meant about set is being a component of a solution is that on their own they are not a complete solution to point control , unlike say a Colbalt point motor 

 

using servos requires electronic drive control , you then need to add frog switching either electronically , by relay or physical micro switches 

 

you also need to understand the issue around power sequencing and long live drivers to ensure that they don’t twitch etc. 
 

As I said , they are a “ component “ not a solution 

 

since 1000s are in use happily switching points and signals, including many merg members layouts , I suggest the issues you had may be a function of your setup rather then any fundamental issue with deploying servos 

Edited by Junctionmad
Link to post
Share on other sites

  • RMweb Premium
6 hours ago, Chris M said:

Solenoids just work with a satisfying clunk. You fit them under the point put a couple of switches in your control panel and you have a perfectly reliable and cost effective means of changing points. A complete and simple solution that works.
 

Been there, done that, binned them

I had the misfortune, based on what I read on RMWeb, to equip all my points with Seep solenoids.

Bad move, not reliable enough, they occasionally didn't operate. The quality seemed very variable, some were better and smoother in operation than others.

Even cleaning & lubricating didn't make much difference, some were just freer moving than others.

I also tried H&M point motors, totally reliable and a proper switch as well but rare these days, I only managed to accumulate about 8 of them.

Went to Tortoises, 100% reliable every time.

Link to post
Share on other sites

12 hours ago, Junctionmad said:

Andy , I’ve used the opto method to drive the servo line , no twitches 

 

I’ve about 30 driving signals on a big O gauge so plenty of dcc current floating about

 

servos are great , but they are a component of the solution not a complete solution , those that run into problems don’t seem to appreciate that 

 

That's very good to know.

 

Did you position the opto-isolators close to the servos? That seems like the most logical place to put them and it's what I did with my immunity tests but I have sometimes wondered if they might be as effective if they were at the controller end instead. (Handy Hint: People that sell servo point controllers might consider trying that.)

 

I might give it a shot myself, if I ever get around to it :)

Link to post
Share on other sites

8 hours ago, Junctionmad said:

since 1000s are in use happily switching points and signals, including many merg members layouts , I suggest the issues you had may be a function of your setup rather then any fundamental issue with deploying servos 

 

You may well be right, I left it to those who thought servos/MERG was a good idea to set everything up. They tried very hard to make it work but didn't succeed. From what I saw of it the MERG electronics appear to be somewhat flaky.

  • Agree 1
Link to post
Share on other sites

9 hours ago, AndyID said:

 

That's very good to know.

 

Did you position the opto-isolators close to the servos? That seems like the most logical place to put them and it's what I did with my immunity tests but I have sometimes wondered if they might be as effective if they were at the controller end instead. (Handy Hint: People that sell servo point controllers might consider trying that.)

 

I might give it a shot myself, if I ever get around to it :)

Yes the opto is positioned right at the servo. 
 

the whole idea is to decrease the input resistance of the servo control line , that solves almost all issues 

 

 I’ve tried experiments with power sequencing and I’m not convinced it adds anything to resolving the issue 

 

the main point seems to be to allow the control signal to be correctly established  before the servo is powered up. But I’ve found appropriate pull up or down resistors achieve that and power sequencing adds nothing 

 

as a MERG member I can say their various servo boards are as good if not better then anything else on the market 

Edited by Junctionmad
Link to post
Share on other sites

6 hours ago, Chris M said:

 

You may well be right, I left it to those who thought servos/MERG was a good idea to set everything up. They tried very hard to make it work but didn't succeed. From what I saw of it the MERG electronics appear to be somewhat flaky.

Given the merg modules are fine, I suspect the issue was the people involved may not have understood the issues around deploying servos 

Link to post
Share on other sites

On 01/08/2020 at 04:19, Junctionmad said:

Yes the opto is positioned right at the servo. 
 

the whole idea is to decrease the input resistance of the servo control line , that solves almost all issues 

 

 I’ve tried experiments with power sequencing and I’m not convinced it adds anything to resolving the issue 

 

the main point seems to be to allow the control signal to be correctly established  before the servo is powered up. But I’ve found appropriate pull up or down resistors achieve that and power sequencing adds nothing 

 

as a MERG member I can say their various servo boards are as good if not better then anything else on the market 

 

Agreed. I think power sequencing has nothing to do with the problem. The issue is that servos are edge-triggered devices with very little noise immunity at their high-impedance signal inputs.

 

Inserting opto-couplers between the servo pulse source (servo controller) and the servos does two things. The source and the servo are no longer dependent on a solid ground reference. Changes in supply currents can make the relative references bounce all over the place without affecting the signal and any EMI applied to the signal cable is cancelled because it is common-mode noise. It's not unlike the old-fangled current-loop signalling that was used more than sixty years ago.

 

For those reasons I don't think it makes much difference whether the opto-couplers are at the receiving or the sending end. If they are at the sending end, depending on the type of coupler, the rise and fall time at its  output might bit a bit slower if it has to drive a long cable. I think that's about it.

 

Do any of the MERG boards now include opto-couplers? They are really cheap :)

Link to post
Share on other sites

My merg boards do. ?  In that I have a miniature SMD board with the opto close to the servo and a live driver board with the merg servo software 
 

my own view would be that the opto at the servo exposes a low ( lower ) input resistance and this resolves the noise immunity issue 

 

the common mode benefit is rather circumspect since many people will power the servos from the servo board so for the purposes of the servo , it’s a balanced line anyway. 
 

 

Edited by Junctionmad
Link to post
Share on other sites

8 hours ago, Junctionmad said:

the common mode benefit is rather circumspect

 

I think it's always a good idea to remain circumspect in the absence of real data. I'll run some quantifiable experiments but I'm not sure it will make any difference.

Link to post
Share on other sites

  • RMweb Premium

As these opto couplers/isolators seem to perhaps be the simple answer to a lot of users problems re signal interference could I ask, as an electrical numpty, how these are wired and the specs that should be used? For I see that forward voltages range from 1.3v onwards but that 6/8v ones are quite expensive. Are they used like resistors/diodes, just inserted in-line, or is it a bit more complicated than that? Polarity sensitive etc.

 

thanks,

 

Izzy

  • Agree 1
Link to post
Share on other sites

50 minutes ago, Izzy said:

As these opto couplers/isolators seem to perhaps be the simple answer to a lot of users problems re signal interference could I ask, as an electrical numpty, how these are wired and the specs that should be used? For I see that forward voltages range from 1.3v onwards but that 6/8v ones are quite expensive. Are they used like resistors/diodes, just inserted in-line, or is it a bit more complicated than that? Polarity sensitive etc.

 

 

Most opto-isolators consist of four pins, arranged in two halves.   The two halves are "input" and "output". 

 

The input side is a LED, just like any other LED, its polarity sensitive, and needs an appropriate resistor to control current.  It is usually wired between signal (positive) and 0v of the transmitting end of the setup.

 

The output side is a photo-transistor.  Electrically its a transistor switch, with the switching (base) done by the photo-receptor inside the package (illuminated by the input LED).   More likely to be wired between +volts and "signal" of the receiving end, though additional "pull down" resistors to 0v may also be needed. 

 

 

Link to post
Share on other sites

  • RMweb Premium
22 minutes ago, Nigelcliffe said:

 

Most opto-isolators consist of four pins, arranged in two halves.   The two halves are "input" and "output". 

 

The input side is a LED, just like any other LED, its polarity sensitive, and needs an appropriate resistor to control current.  It is usually wired between signal (positive) and 0v of the transmitting end of the setup.

 

The output side is a photo-transistor.  Electrically its a transistor switch, with the switching (base) done by the photo-receptor inside the package (illuminated by the input LED).   More likely to be wired between +volts and "signal" of the receiving end, though additional "pull down" resistors to 0v may also be needed. 

 

 

 

Thanks Nigel. So, how would that relate in wiring terms at a servo, the three wires serving it from the control board? It appears fitting them here might be best as it would reduce/eliminate the wiring picking up any broadcast signal between the opto and the servo if I read things correctly rather than being on the control board when significant wiring distance to a servo may be involved.

 

Izzy

Link to post
Share on other sites

Many years ago now I built some kit for audio use where the mixing took place a long way from the stage. Basically op-amps  (running in something like an emitter-follower mode) reduced the impedance from the 50KΩ of the mics to a few hundred ohms, down a long cable, mixed at low impedance then back up another cable, converted back to high impedance to match the input of the amplifier. Now this was all analogue audio, and a long time ago but it seems to me that something similar is needed for the servos. Thinking about the original applications for most of these servos they are physically close to the signal source, eg radio receiver, and a long way from other sources of interference. We put them at the end of a long cable with lots of stray transformer and motor noise and wonder why we have problems.

Link to post
Share on other sites

38 minutes ago, Izzy said:

 

Thanks Nigel. So, how would that relate in wiring terms at a servo, the three wires serving it from the control board? It appears fitting them here might be best as it would reduce/eliminate the wiring picking up any broadcast signal between the opto and the servo if I read things correctly rather than being on the control board when significant wiring distance to a servo may be involved.

 

Izzy

 

Very roughly like this,  but other parts almost certainly needed, such as pull-down resistors on the servo signal wire. 

Left hand side of drawing takes signal/0v from the servo controller.  Right hand has power at/near servo.  There is no need for the two power supplies to be the same, or the 0v to be common, though a common 0v is the usual arrangement. 

If the 5v to the servo comes all the way from the servo controller, it too may get noise on it.  

 

 

329653627_Annotation2020-08-05103247.png.fb94231299d5c4ac0cbf11b0ff8730de.png

 

 

  • Informative/Useful 1
Link to post
Share on other sites

37 minutes ago, bgman said:

 

Which have also been know to fail !

 

 Its a mechanical device therefore some are always going to fail - any device will fail, even the American Space Shuttles have failed.

 

BTW - always better to quote enough of a post to make the quote looks sensible and contextual - the discussion and my post said nothing about reliability.

Link to post
Share on other sites

As Nigel has shown is the way to go to eliminate pickup of noise on the signal wire. The opto isolator must be close to the servo, but the supplied lead on the servo should be short enough to not need cutting any shorter. Just fit a 3-pin header near to the opto isolator to plug the servo in.

 

The servos have a high input impedance which makes them prone to picking up interference, so the pull down resistor is essential between signal and 0V at the servo. This is a key component to reducing the interference. The lower the resistance that you can get away with the better from an interference suppression point of view, but reducing the resistance does have implications on power consumption from the 5V supply (most likely not a problem) and the maximum current rating of the transistor in the opto isolator. You should be able to use a 100R pull down resistor without any problem (50mA).

 

There should be no issue with interference pickup on the 5V suppy or the 0V supply when using this arrangement. The transistor in the opto-isolator connects the signal wire to 5V when it is on, and the 100R resistor clamps the signal wire to 0V when it is turned off and both situations are local to the servo so making for a low loop impedance for the interference. Any interference will have to overcome the load of the 100R resistor when the transistor is turned off and this is not going to happen unless the interference is very excessive, in the same way that no interference will be sufficient to light the LED in the optoisolator.

 

I have never had to go to the effort of installing optoisolators to remove interference problems, but doing this will fix the problem as long as it is not related to dodgy servos or controller problems.

Link to post
Share on other sites

  • RMweb Premium
37 minutes ago, Nigelcliffe said:

 

Very roughly like this,  but other parts almost certainly needed, such as pull-down resistors on the servo signal wire. 

Left hand side of drawing takes signal/0v from the servo controller.  Right hand has power at/near servo.  There is no need for the two power supplies to be the same, or the 0v to be common, though a common 0v is the usual arrangement. 

If the 5v to the servo comes all the way from the servo controller, it too may get noise on it.  

 

 

329653627_Annotation2020-08-05103247.png.fb94231299d5c4ac0cbf11b0ff8730de.png

 

 


Many thanks Nigel, that is most helpful.

 

 

7 minutes ago, Suzie said:

As Nigel has shown is the way to go to eliminate pickup of noise on the signal wire. The opto isolator must be close to the servo, but the supplied lead on the servo should be short enough to not need cutting any shorter. Just fit a 3-pin header near to the opto isolator to plug the servo in.

 

The servos have a high input impedance which makes them prone to picking up interference, so the pull down resistor is essential between signal and 0V at the servo. This is a key component to reducing the interference. The lower the resistance that you can get away with the better from an interference suppression point of view, but reducing the resistance does have implications on power consumption from the 5V supply (most likely not a problem) and the maximum current rating of the transistor in the opto isolator. You should be able to use a 100R pull down resistor without any problem (50mA).

 

There should be no issue with interference pickup on the 5V suppy or the 0V supply when using this arrangement. The transistor in the opto-isolator connects the signal wire to 5V when it is on, and the 100R resistor clamps the signal wire to 0V when it is turned off and both situations are local to the servo so making for a low loop impedance for the interference. Any interference will have to overcome the load of the 100R resistor when the transistor is turned off and this is not going to happen unless the interference is very excessive, in the same way that no interference will be sufficient to light the LED in the optoisolator.

 

I have never had to go to the effort of installing optoisolators to remove interference problems, but doing this will fix the problem as long as it is not related to dodgy servos or controller problems.

 

Thanks. With Nigel’s post I think I can now try a bit of experimenting. 
 

Izzy

Link to post
Share on other sites

The opto wired to active pull up with a resistor for pull down , is the best option as the default unpowered position will be low input 

 

place the opto within the standard servo cable distance 

 

noise on the 5V is balanced by the same noise on the OV , so my recommendation is to feed servo power And GND , from the servo control board, and hence in effect implement a balanced line. The alternative is bussing around gnd which isn’t as good. 
 

in my experience , the solution is excellent 

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...