Jump to content

Taillight Operation through Magnet


roadstar_na6

Recommended Posts

G'day everyone,

 

I fitted my Car Train Kyushu KaYa21 with a taillight unit and tail mark earlier because the prototype also had the coaches at the back sometimes, despite Kato being of the opinion it didn't (so they didn't bother fitting it from factory).

Considering I'd like to run it both ways I thought about if there is a possibility to fit some sort of switch in the car that allows me to turn the taillights on or off. Because I don't want to chop around in the underfloor or anything I looked a little bit here and there and after also asking Martijn about it I first found Reed Switches. Those are not practical however since they'd need a magnet to be permanently attached in order to be closed. Further research saw me finding "pre-loaded" Reed Switches, but those are pricy as hell (+5€/piece).

Finally I probably found what I need: a Hall Sensor.

 

So now there would be two approaches to it and I'd like to ask you guys if you could help me determing which one would be better for the job on a DC layout.

 

Method 1:

Just one single hall sensor wired inbetween the led and the pickup strip on one side and to the pickup strip on the other side for grounding.

The question is, what happens to the sensor if power is gone, both if it's a split second or for a few minutes? Because if the switch then reverts back to it's original state it wouldn't really help me, because with DC there are cases where you have 0V track power.

 

Method 2:

Just like Method 1, but with an additonal relais inbetween. So the Hall Sensor operates the relais and the relais operates the light.

I know I'd need a relais that keeps its position when power is gone, but I really don't know if there are relays small enough to hide them in the car and if there is anything else I'd need.

 

If anyone has experience with the hall sensors, please step forward! 😄

 

Thanks in advance 🙂

Jan

Link to comment

Basic hall sensors are purely static devices. They have no memory, no moving part. Their output is high/on when there is a magnetic field and low/off when there is none, and of course when there is no power. So I don’t think that method 1 could work.

Method 2 is an option, but you would need a bistable (latching) relay, along with two hall sensors (one to trigger on, one to trigger off). I do not think that it is easier or cheaper than using a latching reed switch. The operation of latching reed switches is described here https://sensorso.com/reed-switches.html and here https://www.analogictips.com/designing-with-reed-switches-faq/.

Marc

 

  • Thanks 1
Link to comment

Yeah more components would be needed to use a hall sensor and as Marcsays, no memory when powered off.

 

reed switches are pretty simple and cheap. Basically just a simple SPSD switch. Grab some and some small disc, cube, or rectangular neodymium magnets on ebay and play. You probably can have the magnet grip to the reed switch thru the plastic of the chassis bottom. Paint the magnet black and it will look another piece of gear of the undercarriage. May need to place a couple pieces good iron metal next to the reed switch to give good grip for magnet.

 

ive got a few reed switches somewhere here and loads of magnets, I’ll see if I can experiment some this week on some cars.

 

jeff

  • Thanks 1
Link to comment

Thanks for your inputs. 🙂

The issue I see with a latching reed switch is that they seem to open again easily when there's some shaking going on, that's why I think using hall sensors would be better. I actually found something where somebody developed a PCB board for this exact use, but unfortunately in 1 scale 😄

Cost wise there wouldn't be that much of a difference I think and I'd prefer to not have a magnet stuck to the car's underbody for the whole time.

Link to comment

Yep this was the type of circuit I thought would be needed. It won’t have memory.

 

why worry about the magnet being there? Basically like the on/off switch on may tail lights like this.

 

 Jeff

Link to comment
roadstar_na6
On 2/21/2021 at 7:27 AM, cteno4 said:

ive got a few reed switches somewhere here and loads of magnets, I’ll see if I can experiment some this week on some cars.

 

Did you manage to try anything out? 🙂

Link to comment

Paint the magnet blue, Put tine Hall Sensor inside the car. Position the sensor facing the top of the rear wall

A the same place a piece of metal in the inside wall.

 

When you want it on place the magnet on the car. The metal inside will hold the magnet. The Magnetic field will spill over

to the Halls sensor and activate the lights. The Halls sensor has a LED build on the board. You can tap off of it to

your rear lights.

 

You can get creative and place the magnet on the rear of the Moon logo.

 

 

Inobu

 

image.thumb.png.c2345820a93f89f4857285be766b3bbe.png

 

 

Edited by inobu
Link to comment

One issue with the Hall effect sensor is you will need to have a bit more of a circuit to use it. The arduino module will function once it hits like 5v but I think when under a field it will only pass less than a volt. This means you need have the hall module digital output control a gate circuit to control the led power. You’ll also need to rectify the power into the hall sensor and that will add a couple of Volts to the 5v to get going. All good under dcc, but means won’t get your led voltage until you are to like 7v on dc for the hall circuit.

 

https://components101.com/sensors/a3144-hall-effect-sensor

 

the little circuit on the component page above looks to be what is used on the arduino Hall effect modules.

 

jeff

Link to comment

They will run at 3.3 volts it depends how bad he wants it. A lipo battery can run it and add a charger unit.

Just depends on how far he wants to go. 

 

If you want lights a stuff just go to DCC its easier to add stuff in the long run.

 

Inobu 

 

 

Link to comment

The specs say min 4.5 for the Hall effect chip and nominally at 5v and then Max at 22v. Still the issue it only passes less than a volt so you can’t run the led off that output you would then need a gate circuit then to turn power to led on/off. 
 

jeff

Link to comment

This will run on Pin 1 of a Raspberry Pi which is 3.3 volts.

The LED lights. I know 100%.

 

I used the board to build a tester for Lionel's Odyssey speed control. It has a magnet on the flywheel.

I added a battery to run it and the Red LED lights up each time the magnet passes.

 

 

 

image.png.cf41697fb045b1f8826c418a716605c6.png

Link to comment

Actually you you may be able drive an led with the output of the 3144 sensor by using a pull up resistor on the output. But with rectifying and the sensor it will need min of 6v to drive the circuit.

 

jeff

Link to comment

Ok mystery solved there are some 3.3v hall sensors, the one you used must be a 3.3v unit. That would give just enough to power the led. Most of the arduino modules are the 5v units.

 

jeff

Link to comment
roadstar_na6
7 hours ago, inobu said:

Paint the magnet blue, Put tine Hall Sensor inside the car. Position the sensor facing the top of the rear wall

A the same place a piece of metal in the inside wall.

 

When you want it on place the magnet on the car. The metal inside will hold the magnet. The Magnetic field will spill over

to the Halls sensor and activate the lights. The Halls sensor has a LED build on the board. You can tap off of it to

your rear lights.

 

You can get creative and place the magnet on the rear of the Moon logo.

 

 

Inobu

 

image.thumb.png.c2345820a93f89f4857285be766b3bbe.png

 

 

 

That's not the KaYa21 tho 😉

 

Going DCC just for this is not really an option, I just want a quick and simple method to have power cut to the LED when the coach is not at the end of the train.

Link to comment
41 minutes ago, roadstar_na6 said:

 

That's not the KaYa21 tho 😉

 

Going DCC just for this is not really an option, I just want a quick and simple method to have power cut to the LED when the coach is not at the end of the train.

It came up in the search assumed it was....but the idea has the same premise.

The time and effort it takes

Link to comment
roadstar_na6

If it works with reed switches then that'd probable be okay with me reading how much it'd need to work with hall sensors. 😄

 

I'll just wait for a report from Jeff how good it works 🙂

Link to comment

I’ll try to get this done here this weekend. I used reed switches a long time ago with magnets (pre neodymium being common) for some things on my trains as a kid but I can’t remember what for now for the life of me!

 

went digging into Hall effect sensors and potential circuits for some fun uses on the layout. The bipolar latching hall sensors are cool but are more expensive and require a gate circuit added as they pass very little current.
 

did find that you couldn’t use the 3.3v hall sensors with track power as it looks like all of those have a max voltage of like 3.7v, meant to be used in controlled low power ic circuits. That’s why it was functioning in inobu’s lipo battery situation. Also the 3.3v ones max out at around 1ma passed current so it’s going to be a dim led, but actually probably ok for a tail light. You could put a power regulator in to chop off excess, but more circuit needed then. Some of the 5v ones let you feed up to 20+v so you could use them with 12v, but with rectifying you loose 1.4v so would need like around 6v to get to led voltage. The regular arduinos sheds seem to mainly use the 5v halls as 5v more common and no issues of overvoltages from messing around and they also can pass up to 25ma.

 

ahh the fun of playing with 0-12v! But dcc is not an option here for a long time either and trading one headache for many others in many respects. Not a good ROI for me now.

 

jeff

Link to comment

Interesting. Hall effect. My lesson of the day. I bet I could find a use for this somewhere. What components are needed for this? Is an android/rasberry Pi necessary?

 

 

Link to comment

Yes easy with arduino, a few different shields out there for easy interface. There are digital and also analog to measure strength of field applied. Basically like a transistor that usually is designed to open when field is applied and allow some current through. Bipolar ones are like latching switches and One pole opens and the other pole closes the gate (as long as power remains applied). Outside of arduino you may need some more circuitry to do something like led on/off switch depending on what you are doing and power source, etc.

 

jeff

  • Thanks 1
Link to comment

so i spent 45 minutes looking for the tiny bag of reed switches in the boxes and boxes of components and such and no joy. im putting it aside for tonight and ill try again and look thru the resistor boxes in case i accidentally tossed them in there at a glace looking like a resistor! i may also have them with a project i think i was playing with them with my grand nephew's stuffed whale my wife knitted and i made a sound box for it and i was experimenting on fun ways to turn the power on/off. sorry my chaos here can be daunting at times! i did find some other tiny bags of parts i had been looking for like spring loaded probe tips and needle probes!

 

i did order another pack anyway in case i cant find mine.

 

ill keep on it,

 

jeff

  • Like 1
  • Thanks 1
Link to comment

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
×
×
  • Create New...