Jump to content
 

AndyID

Members
  • Posts

    5,533
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by AndyID

  1. in 1982 we moved from Paisley to Mesa, Arizona with three children ages 5, 3 and 2. (I was working for ITT in Tempe). We decided to return to Paisley for Christmas 1983 so the grandparents could see the kids. We were flying AA, Phoenix - Dallas - Gatwick. Unfortunately, the Phoenix - Dallas flight was delayed and we missed the connection to Gatwick. A very nice man at the AA desk put all five of us in FIRST on the next flight! I was telling the kids to eat that caviar stuff because they might never get it again, but they only wanted hamburgers. We took the train up to London to catch a train from Euston to Glasgow Central and we were crossing London in a cab. We were going to have a bit of a wait at Euston, so I said to my wife "Look, that's Knightsbridge! Why don't we stop off at Harrods at pick up some things for the parents?" She thought about it for a minute but decided the children were too tired after the long flight, so we decided to relax at Euston and get something to eat. Shortly after we arrived at Euston, all hell broke loose. Policemen were running all over the place. The date was December 17th, and Harrods had just been bombed.
  2. Of course, you will include at least two motors and a differential. The low gear mode should be good for shunting
  3. Yes, the elk here are more like red deer, but the deer don't look familiar at all. Poor things must be having a serious identity crisis. No wonder they just stare into headlights. The moose are not scared of anything - including the huge (and extremely fast) freight trains heading up to Marias Pass. Speaking of freight trains, I assume the "Boeing fuselages falling into the river incident" was well publicized in the UK. I've rafted down that part of the river. The trains really have to crawl there because of the gradient and the curves. One hot axle box, or a broken rail, and you're toast. I considered nipping over and trying to get a few pics, but the media had the incident very well covered. I wonder if anyone has incorporated it into their layout yet?
  4. I should have asked if she was really Anne Elk.
  5. Another soaker rolling in from the Pacific today. Undeterred, I took the dogs for their daily 1.5 miles, but it turned out to be a bit more than that as is was necessary to avoid a moose that was happily chomping on a bush at the side of the road Of course, Torri (the Cairn) went nuts as soon as he saw it. I think it was a lady moose (moosette?) but you don't want to mess with any sort of moose, so we executed a swift U-turn. Somebody ran into a moose on the highway near here last week. Their car was destroyed and they were lucky to survive the crash.
  6. Your photos are bringing back nostalgic memories of a time when you could go anywhere in the Glasgow area by tram.
  7. That's a good way of explaining it. Thanks!
  8. Jock, The infamous Shona and Torri at (this was several years ago) If you have not seen this, it's worth a look Andy
  9. Hi Gordon, The throw is determined by the "length" of the constant radius bit of the cam. To increase the throw, you increase the angle between the low and high bits of the cam. A bit more explanation: The cam has three "levels". At the low point (smallest radius) the "normally closed" contact must be connected to the common terminal. At the high point (greatest radius) the "normally open" contact must be connected to the common terminal. When the actuator is pressing against the "middle level" (a constant radius section of the cam that can be as long or short as you like) thanks to the hysteresis, the microswitch contacts remain in whatever state they were in before the motor started turning the cam. If I'm not explaining this very well, let me know and I'll post some drawings or something. I'd like this to be well understood because I think lots of people would be able to build inexpensive and very reliable point motors based on this principle. Andy
  10. Hi Simon, You have it right. The electronic bits are discarded. The bits of the servo that are retained are the motor and the gear train. The lack of sophistication is, I think, a major advantage! (Please see my blog for more info. on servos) The only tricky bit is positioning the microswitch actuator relative to the cam, but that can be done either by bending the actuator arm slightly, or adjusting the mounting of the microswitch. I'll try to post some photos of the "production" version next week, after I take care of my tax return. I also have some ideas about how to construct a much simpler version that many people would be able to construct quite easily, but that still needs a bit of testing and explaining. Best Andy
  11. Hi Jock, Ah yes - that's Torri (short for Torridon no less) and although he does look a lot like a Westie he is a wheaten Cairn Terrier. He's usually on the receiving end of it from Shona! As I understand it, Cairns were the original breed. I think Westies and Scotties came later. The story is that Cairns get their name because they caught rats that lived in the stone cairns the crofters created when they dug rocks out of their fields. Best Andy
  12. Yeah! It finally stopped raining, but now I'm getting the "evil eye" from Shona. I think she wants to go for a walk. (Shona is a Scottie, and a bossy little so-and-so she is too.)
  13. I was beginning to wonder if I had invented the thing about trains on Weetabix boxes until I found this http://www.cerealoffers.com/Weetabix_Ltd/Weetabix/Weetabix_Workshop/Trains/Railway_Models_Series_17_Set_3/railway_models_series_17_set_3.html
  14. I was wondering about that too. I'm pretty sure I could get it over with my little tractor/backhoe and a winch. Unfortunately, the tractor is in Idaho.
  15. Thanks everyone! Beautiful morning here. Still frosty at night, but no snow. It's not been a good year for skiing. AndrewC - Yes, Sandpoint is a great spot. We live in a lakeside community in Rockford Bay 15 miles south of Coeur d'Alene. It's a wee bit different from Paisley where my wife and I grew up!
  16. "Really couldn't face the day without my Weetabix." Do they still print locomotives on the box that you can cut out and make a 3D model?
  17. Thank you Laurence. It's almost dark here now, so I better get back downstairs and finish installing the laminate flooring in the spare bedroom. The instructions say to acclimate it before you put it down, but I'm a bit nervous because it's only been acclimating for about two years.
  18. It just occurred to me the chickadees don't like getting coconut stuck in their teeth!
  19. "Possibly! Bluetits are allegedly quite clever." Yes - come to think of it, weren't they responsible for ripping the tops off milk bottles and pinching some of the cream? (Some of the younger members will have no idea what I'm talking about.)
  20. Good morning from north Idaho! (although it's actually coming up for 3pm here) I've been trying to get the local chickadees to feed on inverted half coconuts the same way that blue-tits do (at least they used to) in the UK. Chickadees are quite capable of feeding while hanging upside down, but so far, they are showing no interest in the coconut. You don't find a lot of coconuts growing in the UK, so the blue-tits must have learned to eat them. Maybe chickadees are just slow learners?
  21. MOD: Please merge with an existing topic if appropriate. Here is yet another servo point-motor hack. As you can tell from the pix, I'm not kidding when I say "hack"! I would not go as far as calling it as a prototype - it's more a "proof of concept". I have a version that uses 3D printed parts and a much smaller micro-switch rather than the finely crafted plywood and gigantic micro-switch you see here. The "production" version has the micro-switch mounted alongside the servo body rather than at right angles to it, and the actuator bears on the underside of the cam, but it's a lot easier to see what is going on with this version. "But, how does it work?" I hear you ask - or more likely you don't. This is how you connect it. It's very similar to a light that's controlled by two switches. When you flip the panel switch, the motor starts and keeps going until the cam flips the micro-switch. When that happens, as both motor connections are now at the same potential (either 0 volts or plus volts), the motor stops. When you flip the switch the other way, the motor reverses until the micro-switch flips in the other direction at the other end of the cam rotation. The micro-switch does not immediately flip when the cam starts to rotate because its actuator arm is pressing against a segment of the cam that has constant radius and positions the actuator at its mid-point. This works because of the hysteresis produced by the over-center "snap switch" inside the micro-switch. The actuator always has to move beyond the mid-point of its travel before it will snap into the other state. The advantage of this method is that there is no current draw at all when the motor reaches the end points, and it is completely immune to electrical interference. Also, no momentary switches are required, so the panel switch position indicates the point setting. It works best on 1.5 volts. To make it easy to set up, I cut the end stops off the final gear in the servo, but that is not essential. For automation, a relay or electronic buffer could be used instead of the panel switch.
  22. AndyID

    Preventing Servo Buzz

    Hi Izzy, My version of the hacked servo does not rely on motor stall. The microswitch cuts off the power at the limits so there is no need for momentary switches. The control switch and the microswitch are connected a bit like the two-way light switches at the top and bottom of a staircase.
  23. A 90 degree servo shaft rotation is highly appropriate for driving the ailerons on a model aircraft. The motion produced at the aileron through a crank linkage will be proportional to the rotation of the servo shaft, but if the servo were to even approach 180 degrees of rotation, the motion would no longer be proportional and the mechanism would tend to lock. In the case of points, we don’t really care about proportional motion. In fact, if we can make the servo rotate through 180 degrees and convert that rotation into linear motion at the point tiebar, when the servo reaches the extremes of its travel (we could call them Top Dead Center – TDC, and Bottom Dead Center – BDC) the tiebar will not be able to exert any rotational force (torque) on the servo shaft. This is the same effect you see in any sort of engine where the pistons drive a crank of some sort or another. Also, as the servo approaches TDC and BDC, the mechanical advantage increases (less linear motion for a given change in rotational angle), so the force exerted can increase at the extremes of travel. At TDC and BDC, because no torque can be transmitted to the servo shaft, the servo is able to reach its desired position. As the error is effectively zero, the drive pulses stop and there is no buzzing. Obviously this means that the connection between the servo and the tiebar must allow the servo to rotate through 180 degrees, and to make the connection without a lot of precision engineering, there probably needs to be some compliance (spring) in the connection. Compliance in the connection is a problem when the servo only rotates through 90 degrees because the spring exerts a torque at the servo shaft at the end positions, but that cannot happen with 180 degrees of rotation. I will post more on the mechanical connection later. To produce 180 degrees of rotation I am using an Atmel ATiny44a microcontroller programmed to continuously produce short and long pulses. The short or long pulse stream is directed to the SG90 servo through a single pole (no center off) changeover switch. I should be able to connect a large number of servos to the same microcontroller each through its own switch, but I have not actually tried that yet. In some situations it will probably be a good idea to insert some sort of logic buffer between the microcontroller pulse outputs and the switch inputs. The short pulse width is nominally 0.56 milliseconds and the long pulse is nominally 2.448 milliseconds. These are nominal because the ATiny is running on its own internal clock. (An external crystal might not be a bad idea.) To slow the servo’s travel, the pulse repetition interval is 74 milliseconds. At that interval, the motion is still quite smooth, although there is a slight pulsation during the rotation. It’s quite practical to use an even longer interval, but the motion will not be very smooth. I have tested this with ten SG90s, and they all rotate through 180 degrees, but that’s not exactly a very large test sample. If we were prepared to alter the values of some of the components in the servo’s pulse-stretcher circuit to shorten the pulses it would be possible to slow the servo even more, but as the components are surface mounted on a teensy-weensy circuit board, I’m not even going to try it! There is a servo connected to my “pulse generator” on the table beside me, and every so often I can hear it “tick”, and sometimes there are a few “ticks” in sequence. There is no perceptible rotation at the servo shaft when this happens. From time-to-time, the servo is detecting a small difference between the input pulse width and the internal monostable pulse width. Consequently, it tries to correct that error by sending a very short pulse to the motor. I think this effect is a consequence of a small amount of “jitter” in the internal monostable pulse, and it seems to only happen when the servo is receiving long pulses. That tends to reinforce the theory. It may well happen during short pulses too, just less often. The clock source in the ATiny might also tend to wander around slightly so that could also be a contributing factor. Personally, I don’t think it’s a problem, but some people might be less tolerant. If I get around to testing with a crystal oscillator, I will report whether it makes any difference or not. There is another solution, but that would mean surgery on the servo’s circuit board to increase the servo’s “dead band”. Braver souls might try this; I don’t plan to. Going very tangential for a minute, I have actually “hacked” a couple of SG90 servos to operate as point motors by throwing away the electronics and only using the motor and gear train. The trick is to add a microswitch driven by a cam on the servo shaft. The switch is positioned to take advantage of its hysteresis such that it only changes polarity at the “ends” of the cam. It works really well, and it’s 100% immune to noise. It only needs a single-pole changeover switch to operate it, but it’s not all that simple to make a cam that won’t interfere with the servo’s actuator horns. I also found that it works best from a 1.5 volt power supply. If anyone is interested, please let me know.
  24. Interference and Buzzing Based on what I have seen, I believe the “going bananas” problem and the “buzzing” problem result from two different effects. The first is caused by electromagnetic interference/radiation (EMI/EMR) and the second is more commonly to do with the mechanism that transmits force and motion to the point tie-bar. Unfortunately, if we are not careful, in trying to solve the one, we might make the other worse. From the description of how the servo controller chip works, if enough EMI energy is coupled into the servo input, the internal monostable will trigger and launch the servo into a cycle. During the cycle it will attempt to reduce, or eliminate, any error between its current position and the latest demand position it “thinks” it just received. If, by a complete fluke, the EMI happens to produce an input pulse width that is about the same as the monostable pulse width, the servo might just “twitch” slightly. The more likely result is that, thanks to the pulse stretcher, it will swing wildly through many degrees, and as EMI often comes in a burst of events, several cycles will launch and the servo will attempt to cancel the error for each one and swing erratically until the EMI subsides. To make matters worse, the servo does not have a large amount of noise immunity while the input is in the “low” state. That’s not a criticism of the device. In the environment for which it is intended, its noise immunity is quite sufficient. The problem is that model railways can produce a lot of EMI from many sources, and if there is a long wire connecting the input of the servo to the servo controller, it will act as an excellent antenna and collect all the EMI energy it can. The buzzing problem that many people have encountered isn’t really so much a problem with the servo itself. Buzzing occurs, either because the widths of the pulses driving the servo are not stable enough (which, in most cases, is not very likely), or (much more likely) the servo can’t quite get to the point of cancelling out the error because of mechanical “back pressure”. When that happens the servo will try valiantly to get to the position demanded, and it won’t quit trying until it does. It’s very desirable to set the servo up so that it maintains pressure between the selected point blade and the stock rail. Unfortunately, maintaining that pressure means that the servo has to keep trying to get to a position it can’t quite get to, or does get to but is then repelled slightly because of compliance (springiness) in the mechanical connection. Even over-center springs won’t necessarily help because they can drive the servo beyond the precise position required. It’s not difficult to observe this situation. Just connect a servo to a stable pulse generator and try to force the servo to a slightly different position with some finger pressure. (Not too much; you don’t want to strip the gears.) The servo will keep fighting back, and if the pulses are set to arrive 50 times a second, you will hear and feel a 50 Hz buzz. To overcome this we could adjust the input pulse widths very precisely for each point so that the servo positions the blades at the “just right” position where there is almost no gap between the blade and the rail and there is no pressure exerted on the rail. There are a couple of snags with this. It’s a bit of a pain to have to customize the settings for each point, and it assumes that everything will stay constant over time. Unfortunately, as the monostable in the servo is not clocked from a highly stable crystal circuit, it is susceptible to the effects of temperature and component ageing, and random noise within the servo itself. This means that, even if you precisely set the pulse widths at the controller to prevent a servo buzzing, there is no guarantee that it won’t start buzzing at some point in the future. Another possible solution to the buzzing problem is to have the controller only send pulses to the servo for a limited time after the point direction has changed and rely on the considerable mechanical friction in the servo’s gear train to maintain the desired position. The problem with this approach is EMI. Should EMI launch a servo cycle, the servo won’t return to the desired position. It can remain in some indeterminate position indefinitely until the next real position update. Consequently, this method of eliminating the annoying buzzing problem can lead to a much more serious functional problem. What’s a person to do?!
  25. AndyID

    Servo Operation

    The SG90 is a PWM (Pulse Width Modulation) controlled servo, so the width of the pulses applied to its control input determine the position that the internal controller drives the servo to. Pulse widths are between 1 and 2 milliseconds, and are applied every 20 milliseconds (50 pulses per second). The servo assumes a nominal center position when the pulse widths are 1.5 milliseconds. The nominal extremes of position are plus and minus 45 degrees at the maximum and minimum pulse widths (1 and 2 milliseconds.) At least, that’s the usual information about how to use these devices in their typical RC (radio- control) applications, and that makes a lot of sense. Radio-control requires proportional displacement of rudders, steering etc. applied through various rods and cranks, and the servos need to be able to exert approximately constant forces (torques) throughout their expected range of travel. They also need to be able to respond as quickly as possible to the signals received - any delay or sluggishness is not a good thing when you are trying to fly a model aircraft. Neither of these are particularly important for controlling the points on a model railway, and in some respects, they actually make it difficult to apply these devices as point motors. We need the servo to operate in a much more sort of “binary” mode. In reality, it’s possible to achieve plus and minus 90 degrees of travel (180 degree rotation), and there is no particular reason why it is necessary to apply a pulse as often as 50 times per second. The SG90 incorporates a KC5188 control chip. There is a data sheet for this device available on the Web, but it does not say too much! However, it seems to embody the same features as the old Signetics NE544, so I think it’s not unreasonable to assume that it’s a close functional equivalent, and the KC5188 data does seem to confirm that. The NE544 provides a bit more information, but it is not exactly comprehensive either. Here’s a brief word description of how the things work (as best I can understand): When the control input pulse goes “high” it triggers a monostable that produces a nominal 1.5 millisecond pulse when the servo is in its center position. The servo has a potentiometer on its shaft that alters the duration of the monostable pulse so that it is either greater or less than 1.5 milliseconds in proportion to the displacement from the center position. Over the expected 90 degree rotation, the pulse width adjusts from 1 to 2 milliseconds. The servo motor is driven when there is a difference between the duration of the input pulse and the monostable pulse, and the direction that the motor is driven in depends on whether the input pulse is longer or shorter than the monostable pulse. The particular direction is stored in a flip-flop. So far, so good (I hope). The sneaky bit is that there is a “pulse-stretcher” that produces a pulse to drive the motor. That drive pulse is proportional to the difference between the monostable pulse width and the input pulse width. If there is no difference, or only a very small difference, the motor does not receive any drive pulse. When the difference between the durations is at a maximum, the motor receives a substantial drive pulse to accelerate the motor rapidly. The smaller the difference (sometimes referred to as the error) the shorter the drive pulse.
×
×
  • Create New...