Go Down

Topic: Detect short distance with very small sensor? (Read 579 times) previous topic - next topic

Robin2

Interesting. Does that imply that your rolling stock are hand built too?
Pretty much. The locos use Kato n-gauge tram chassis and the rolling stock is built on Peco n-gauge wagon chassis. The bodies of locos and rolling stock is made from card cut with a Silhouette Portrait computer cutter.

It's much more satisfying to make your own stuff, even if it is crude, compared with using commercial products made in a factory.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.


Grumpy_Mike

How about not a hall sensor, which are a bit insensitive, but one of those magnetometer chips (HMC5883L). I used one in this project and was able to detect the magnet over a 1 foot range.

https://vimeo.com/223453491

Robin2

#18
Dec 14, 2019, 07:39 pm Last Edit: Dec 14, 2019, 07:40 pm by Robin2
Vimeo is not working for me.

Looking at the datasheet I can't make out if the device would work the way I want it to. Imagine that it is slowly approaching the magnet head-on from a distance of (say) 30mm. Could it tell me when the distance had reduced to (say) 10mm +/- 0.25mm ?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

larryd

Micro switch of some kind.

Light reflection at a focused point.



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

zoomkat

What type of coupler is being used, US, European? I remember the ones on my Lionel train set when I was a kid. Is this just for the engine coupler, or is it thru all cars so all cars can be coupled the same? Having researched for suitable wire for for gasoline lantern pricker wire, you might be able to make an electrical contact switch using thin wire. A possible is the very thin brass bristles (easy solder) found on the small detail brushes. These are usually about .005" inches in diameter. These might be embedded in the coupler and stick out a little bit to touch a small piece of exposed metal on the car coupler to complete the circuit.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Robin2

#21
Dec 15, 2019, 10:23 am Last Edit: Dec 15, 2019, 10:25 am by Robin2
This is a poor photo of the coupling. Its a bit like the Peco Simplex coupling and the Hornby couplings that pre-dated tension-lock couplings. The tip of the hook is 2mm long. The coach is 25mm wide.



All the vehicles will have the same sort of couplers but at the moment I am only thinking of detecting the Loco coupling to any one of the vehicles - in other words all the detection equipment will be in the loco and in its tender. The tender will be permanently coupled as it carries the battery.

I have been wondering about wires that might touch something but I think they would get damaged too easily and I think it would be too much trouble to embed things in the tiny couplers. Also I suspect that wires from the coupler to the body would interfere with the working of the coupler.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

wvmarle

If you have a piece of magnetisable metal on that coupler, and a really small magnet on the other coupling, you may be able to detect this magnetic field with a hall effect sensor under the car itself, so a bit away from the coupling itself. The idea is that you can then detect pretty accurately the moment the two come together. The magnet of course would help to hold the couplings together as well - for better or worse.

I have the feeling that distance measurement using magnetic fields would be unreliable, as you're looking for very small variations, which can very well be within the tolerance of the individual magnets. Light reflection at focus point may also need calibration for each individual car.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Robin2

The magnet of course would help to hold the couplings together as well - for better or worse.
Worse, I'm afraid. The system relies on the couplings being very free - both for coupling and uncoupling. And using magnets that attract each other would make it necessary always to orient the vehicles in the same direction - which would be impractical.

Quote
I have the feeling that distance measurement using magnetic fields would be unreliable, as you're looking for very small variations,
That is my own feeling also - and I'm reluctant to spend a lot of time experimenting without advice from someone who has managed fine distance measurement with them.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

dougp

Play along with me.  Mounted inside the tender is a linear actuator to which is attached a short rod.  To couple, the (normally hidden) rod is extended out the back of the tender - think wasp stinger - and the engine reversed.  When the rod is pressed against by the target car the force lifts the hinged actuator mounting plate away from a microswitch, signalling proximity, and, it is to be hoped, successful coupling.  Actuator retracts rod, engine moves forward.
I don't trust atoms.  They make up everything.

No private consultations undertaken!

larryd

Play along with me.  Mounted inside the tender is a linear actuator to which is attached a short rod.  To couple, the (normally hidden) rod is extended out the back of the tender - think wasp stinger - and the engine reversed.  When the rod is pressed against by the target car the force lifts the hinged actuator mounting plate away from a microswitch, signalling proximity, and, it is to be hoped, successful coupling.  Actuator retracts rod, engine moves forward.
$70.00 USD  :o
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

dougp

$70.00 USD  :o
I know, it's salty, but who am I to say?  And, granted, the idea's out there but, it's offered as much to possibly spark a thought as anything else.
I don't trust atoms.  They make up everything.

No private consultations undertaken!

Robin2

#27
Dec 15, 2019, 09:34 pm Last Edit: Dec 15, 2019, 09:36 pm by Robin2
Play along with me.
Thanks for your input. All of the suggestions are really appreciated.

The concept is interesting but the price and the size rule out that particular example. It measures 36 x 21 x 15 excluding the shaft. That's much bigger than my battery which already takes up most of the space in the tender. And I would also need one in the loco body for when the loco couples to a train so as to move tender first. And there is even less space in the loco.

A micro linear servo would be smaller and cheaper but still much too big.

Also, unless the lifting force was tiny it would push the wagon away from the loco.


At the moment I'm thinking of two options that don't have any on-train sensors. {A} Park a wagon (or a train) against a buffer stop and have a detector in the buffer that will report when the loco pushes the wagon against the buffer. {B} A combination of position and time - the train should be where it was left, the loco position can be identified (with an LDR) when it is near the train and then move the loco for T seconds towards the train and hope for the best - it will involve pushing the train backwards a short distance.

If I could have sensors in the loco and tender it would give a lot more flexibility about where things could be positioned and would probably require fewer ground based LDR position sensors. People have been very helpful with ideas and I do apologise if I seem to be offering a problem for every solution.

...R

Two or three hours spent thinking and reading documentation solves most programming problems.

larryd

Quote
I seem to be offering a problem for every solution.
Just like a noob ;)



No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

bluejets

#29
Dec 15, 2019, 11:54 pm Last Edit: Dec 15, 2019, 11:56 pm by bluejets
The hall effect switch might still work ok without any magnetic "interference".

I use 3mm dia x 1mm thick magnets on ignition systems and the Alegro A1120 (or equivalent) and in this instance , as mentioned before I believe, the magnet could be permanently installed on the rear of the hall effect ( epoxy).

This turns it into a metal detection device, Set up so metal piece comes near and you're there (maybe).
Relatively small and easy to conceal in your engine..??

Note that the particular hall effect is a switch (rail to rail or near-to)

Go Up