I am building a DCC servo decoder for my modelrailroad and I have a problem I can't fix...
The servos drive the turnouts however they need to know their endposition.
Most commercially decoder uses software limits for each servo which you have to set manually.
I want to automate the process with some kind of probe that you can connect to the Arduino, the Arduino drives the servo and when the endpoint is reached (read: detected by the probe) the position is saved in the EEPROM.
The problem is the probe... My turnouts their switch rails are connected to the GND, otherwise I could clip a crocodile clip on it and check if the I/O input goes LOW. Does somebody an idea to build a probe?
Do you want something that will be permanently attached to each turnout or do you want something portable that you just attach to a turnout during the setup phase?
If the layout is unpowered during the setup phase could you connect a wire to the point (turnout) blade and another to the running rail so that the Arduino detects a switch close when the blade reaches the running rail? The wires could connect to the rails with crocodile clips.
Another option might be to program in about 120% movement and have some flexibility in the connecting rod from the servo arm to absorb the excess.
It's only for the setup phase of course. I don't want to use buttons to calibrate the servo's end positions.
The problem is that the point is connected to the GND in the turnout, without modifications I can't use that.
I thought about a slide pot that follows the point move...
minitreintje:
It's only for the setup phase of course. I don't want to use buttons to calibrate the servo's end positions.
The problem is that the point is connected to the GND in the turnout, without modifications I can't use that.
I thought about a slide pot that follows the point move...
I think you are getting the jargon mixed up. A "point" and a "turnout" are the same thing - the thing in your photo.
I call the moving rails the "blades" of the point.
If the rails are used to pass power to the loco wheels I can't understand how any of them can be connected to GND. In many situations the moving blades are used to switch power from one direction to the other. Perhaps you can post a diagram showing how yours are wired.
If you use a slide pot don't you have the problem of calibrating it. Are you thinking of having a single pot that you manually move from point to point.
I think you are getting the jargon mixed up. A "point" and a "turnout" are the same thing - the thing in your photo.
His terminology is that which is typically used in the US. Since he's in neutral territory he can take his choice!
Of course you both realize (realise) that you don't just want to determine when the moving parts first strike the fixed parts, you have to go further to apply some pressure so that the flanges don't get in between the two. I hope I am understandable without using any jargon.
In American English: You don't want to stop when the points first strike the stock rails. You have to apply some pressure so that the flanges don't pick the switch when approaching a facing point.
How about a little man holding a lever. The bottom half could be fixed with a pivot point at the hips. This will allow his body to move as the lever moves. Once the points get to the end their travel, the lever will stop. Under momentum his head will want to continue moving (thus flexing the spring that holds it to his body). When the spring gets to the end of it's travel, it will snap the head back into place.
Inside the head you could have a simple ball bearing, dangling from the top of the scull by a thin wire. At this critical point, this pendulum will impact on the inside of the head. This could then feed an interrupt on the arduino.
minitreintje:
It's only for the setup phase of course. I don't want to use buttons to calibrate the servo's end positions.
The problem is that the point is connected to the GND in the turnout, without modifications I can't use that.
I thought about a slide pot that follows the point move...
I think you are getting the jargon mixed up. A "point" and a "turnout" are the same thing - the thing in your photo.
I call the moving rails the "blades" of the point.
If the rails are used to pass power to the loco wheels I can't understand how any of them can be connected to GND. In many situations the moving blades are used to switch power from one direction to the other. Perhaps you can post a diagram showing how yours are wired.
If you use a slide pot don't you have the problem of calibrating it. Are you thinking of having a single pot that you manually move from point to point.
...R
You're thinking in 2rail, the points/blades are their isolated however I have 3rail Marklin. The turnouts are connected with a small black piece of metal.
I will move the pot slide manually.
@everyone
Of course I have to add some pressure on it.
The problem with your approach is that the flanges are permanently electrically connected to the rails in the underside. I don't see a way to separate them without braking the mechanism.
This is not exactly the solution you want, but I faced pretty much the same issue.
This is how my colleagues and I went about it.
http://backo.hr/web/hr/fotografije/fotografije/08-11-2012
The servo is driven to a predetermined position, programmed via computer. The servo positions are held in a decoder that controls 8 servos.
The servo has a magnet on one of its arms that triggers a reed contact which is placed in such a position that when triggered it confirms the servo has turned via a feedback module so that the software running the layout knows that the turnout/point is in proper position.
You could put two of them or limit switches to tell the servo when it has reached the desired position. The original turnout/point mechanism has a plastic spring that provides a bit of pressure and pushes the flanges/moving bits into the rails so accuracy isn't crucial. A few millimeters here or there is fine.
Could you make something (a little block of metal - or wood or plastic with a metal contact attached - which fits snugly between the point blades and moves with them. And make another piece which straddles the non-moving rails (but is electrically isolated from them) and provides a contact point for the moving part to touch when the point blades move to one side (or maybe both sides. What I have in mind is something which snaps in place on a point in a few seconds and provides the contact points for a detector circuit.
Your solution is amazing! Do you have some DXF files or something?
This is better then my idea, the turnouts have then feedback and it's compatible with every Märklin C-rail turnout.
Few questions and some suggestions.
One to show my age – since when remote switches / turnouts ( I really do not care what residents of Upper Wizbangia call them) are controlled by servos? (Perhaps to avoid the “snap” switching?) In my days they operated / snapped using solenoids.( My Z scale remotes are operated that way still)
Electric motors are pretty vociferous when stalled – so why not monitor the current when the end points are reached? Or some kind of clutch to slip – like cordless drills use noways.
And then there is little reflective module used for distance measuring, maybe it would work here from the position of your servo. It would probably not measure the points movement directly. But that seems to be overkill since your initial goal is to determine the mechanical limits to start with.
But you probably need to measure one switch and than use the limits positions on rest of them.
It's a PDF with the 1:1 scale drawing for the main plexiglass board that carries everything. I'm having it laser cut in a local business. I sent them a sketch with the dimension and they did the CAD drawing which I never asked for. I never had the need for it, sorry.
This is the original drawing I sent them. Note that there are a few errors in it and that it's not complete, but it should give you a starting point. If in doubt, use the drawing in the first link since it is more accurate.
The shape fits every Marklin C-track turnout (left, right, straight, curved, three-way, crossing) so, if you are going to replicate it, stay inside those dimensions. Unfortunately there are no mounting holes shown since they are drilled by my colleague. He had a reason he wanted to do that part himself, but I can't remember what it was.
Vaclav,
Solenoids are still used today and that is still the way original Marklin mechanism is made. However we had lots of problems with them and decided to take them all out (which is not a small thing to do since there are more than 300 turnouts on the layout). We tried using Wiessmann turnout motor, but the build quality of it turned out to be utter garbage. So we decided to build our own...
It's a PDF with the 1:1 scale drawing for the main plexiglass board that carries everything. I'm having it laser cut in a local business. I sent them a sketch with the dimension and they did the CAD drawing which I never asked for. I never had the need for it, sorry. kotirano.jpg - Google Drive
This is the original drawing I sent them. Note that there are a few errors in it and that it's not complete, but it should give you a starting point. If in doubt, use the drawing in the first link since it is more accurate.
The shape fits every Marklin C-track turnout (left, right, straight, curved, three-way, crossing) so, if you are going to replicate it, stay inside those dimensions. Unfortunately there are no mounting holes shown since they are drilled by my colleague. He had a reason he wanted to do that part himself, but I can't remember what it was.
Vaclav,
Solenoids are still used today and that is still the way original Marklin mechanism is made. However we had lots of problems with them and decided to take them all out (which is not a small thing to do since there are more than 300 turnouts on the layout). We tried using Wiessmann turnout motor, but the build quality of it turned out to be utter garbage. So we decided to build our own...
Wow.
Is that for real 300 turnouts @ 60 euros each? And it cannot tell the end position ?
I like my "idea" more and more - optical recognition, at worst Bluetooth "senders" for few $ each.
Back to coding.
My suggestion, for what it's worth, is to fit a strain gauge on the linkage between the servo and the tie bar. When sufficient strain/pressure is reached, stop the servo!
Thank you for your designs!
I ordered some hall sensors (2 sensors/servo) to try something out.
@Valcav
They cost about 16 euro in Belgium and they have 2 microswitches to set their endpositions however the switches aren't rated for switching 1,5A @ 16V.
Each decoder controls 8 servos. We buy them in kits which are less expensive.
But I am constantly looking for an alternative and even thinking of making a decoder. Unfortunately my coding skills are not (yet?) good enough to take on that challenge.
Well, there are plans to expand the layout in the next few years, so maybe by then I'll have a working project. For now, all of the track for the current layout is laid down and operational, we are busy on the scenery, car systems, lighting,... so the development of a new system that would replace something that already can be bought off the shelf is not practical and perhaps just as expensive when you consider the time required.
Vaclav, measurement and servo position on one switch will not translate to another one. Servos are different and the position significantly depends on where you place the servo arm in relation to the spline.
Yap, 60 euros seems pretty steep.
I am currently looking for real cheap "railbus" in Z. I was going to build "green wave" demo , but I cannot afford hundreds of $ for simple bus and I'll need more than one to make it "real". I wonder if 3D printers will be used in RR modelling soon. It would be fun.
One more
Can I get a link to see the servo board in some details? The one you posted won't magnify. Are the points pushed to move or pulled?
Are you shooting for "snap" or realistic "switch machine" movement?