Author Topic: Hall effect LED switch control Circuit board breakdown  (Read 1876 times)

0 Members and 1 Guest are viewing this topic.

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Hall effect LED switch control Circuit board breakdown
« on: August 07, 2025, 08:13:44 AM »
0
I have been wanting to develop home made magnetically operated lights for my P70 fleet for a while.  No, I don't like any of the commercially available designs having batteries inside the car so let's not go there please.

Came across this item from a Facebook Reel of a magnetically operated LED circuit board.  Looked interesting and so I found the link for two different versions on ebay.  They are quite expensive and I think I can recreate the circuit much cheaper:

The UK based version has a single LED in the center of the device and a battery underneath:

https://www.ebay.com/itm/285680543333



The China based version has pre assembled multi LED options:

https://www.ebay.com/itm/187389654370



The goal is to create a pill-sized solder-up circuit version (no circuit board) like the two pics below, with the ability to light three to four LED's in parallel on a flexible contact strip (third picture) and an underbody remote 3v battery holder for easy replacement (which I already have):





I think I have found the hall effect sensor on Digikey but I am not sure if I should use a latchable (on/off?) style switch and  am not sure what the terminology in the listing means (push/pull, sensing range (etc.): https://www.digikey.com/en/products/detail/diodes-incorporated/AH1911-W-7/9674237

Need Help: I cannot determine the second large (5 leg) component on either board.

I like the idea of the CAP on the UK version.  I also like the idea of an appropriate resistor for reasonable brightness on the China version.

Since I cannot see the traces, I can only partially decipher the circuit.  Looking for some help there after we figure out the missing component.
















John "Lemosteam" LeMerise

Sumner

  • Crew
  • *
  • Posts: 847
  • Gender: Male
  • Respect: +2411
    • My Home Pages....
Re: Hall effect LED switch control Circuit board breakdown
« Reply #1 on: August 07, 2025, 12:06:17 PM »
0
The following link is a pretty good description of a latching Hall Effect effect with a simple circuit.  There are links there at the bottom to other types of Hall Effect types....

https://www.allegromicro.com/en/insights-and-innovations/technical-documents/hall-effect-sensor-ic-publications/latching-switch-hall-effect-ic-basics

Of note...the one they are talking about is limited to 20mA which could be a problem with 3-4 LED's depending on how bright you want them.  I'm happy with some indicator LED's at 5mA and how bright they are there.  That Hall Effect could power 4 LED's at that rate but would be on the edge.  With a more complicate circuit you could up that with the LED current not flowing through the Hall Effect.

About the end of my knowledge on this  ;)

Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 35198
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6605
    • Coming (not so) soon...
Re: Hall effect LED switch control Circuit board breakdown
« Reply #2 on: August 07, 2025, 04:31:38 PM »
+1
Those 3-lead sensors contain a hall effect sensor an a small logic chip which interprets the sensor's reading providing one of many possible output states.

I'm not 100% up on the various options, but here is how I interpret things:

I believe omnipolar operation means that the sensor will respond to magnetic field of either North or South polarity.

There are some latching Hall effect sensors which will turn on sensing South magnetic field, and off when sensing North magnetic field.

Open Drain output is basically the same type as function outputs of DCC decoders. It means that when active (ON) the output provides low resistance to the ground/common pin.  When in the OFF state. the output is "floating" which means high resistance to ground. That is the best type of output to use when powering things like LEDs (with an appropriate current limiting resistor - same as with DCC decoders).

Push-pull output in the ON state provides low resistance path to ground, but when off it is not floating but it will be connected (through the internal transistor) to the positive voltage pin.  Not optimal for using it for controlling LEDs.

Non-latchgin means the output is in an ON state only for as long as the magnetic field is present.

Latching is like push-on/push-off switch.  When it senses magnetic field it will turn on, and stay on when the magnetic field is removed.  When it senses magnetic field again it will turn the output off and stay off when the magnetic field is removed.

The Digikey part you linked to has maximum output current 1mA which is not really enough for most LEDs (single or multiple). For comparison, a DCC decoders function output can usually handle 100mA or more.

Also, since you are going to power the circuit for the rails, none of these sensors will keep their last (ON) state after power loss, so you will have to wave a wand over them to turn them back on when you power up the layout.
« Last Edit: August 07, 2025, 04:34:10 PM by peteski »
. . . 42 . . .

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #3 on: August 07, 2025, 05:12:43 PM »
0
Pete, this will be powered by a 3v battery, remotely under the body using a connector inside the car if the roof has to be removed.

So it sounds like I need a latching style that can handle more amperage. Noted, and thanks for all the explanations.

If you linked to the China item, the unit must be designed to handle up to 6 led’s on its circuit because the listing has an option for 1 to 6 led and the cost rises, 3 v battery.

Sumner, I will watch the video , but in order to assemble the bits properly, I need a schematic for the circuit.

Still not sure what the 5 leg device is. All of the hall sensors on digikey had three leads.
John "Lemosteam" LeMerise

Sumner

  • Crew
  • *
  • Posts: 847
  • Gender: Male
  • Respect: +2411
    • My Home Pages....
Re: Hall effect LED switch control Circuit board breakdown
« Reply #4 on: August 07, 2025, 08:00:39 PM »
0
The link I posted shouldn't be a video and has a schematic....



Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #5 on: August 07, 2025, 08:14:37 PM »
0
@ Sumner, I can’t help but think that the circuit above is missing the large component U1 in the second image above. I feel it might be important to the device, and I want to make sure that the device works as intended, and that I purchase all of the components I need.
John "Lemosteam" LeMerise

Sumner

  • Crew
  • *
  • Posts: 847
  • Gender: Male
  • Respect: +2411
    • My Home Pages....
Re: Hall effect LED switch control Circuit board breakdown
« Reply #6 on: August 07, 2025, 10:36:38 PM »
0
My guess is that two legs of the five-legged component are there just to hold the component down and not connected to anything.  Not positive though.

Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 35198
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6605
    • Coming (not so) soon...
Re: Hall effect LED switch control Circuit board breakdown
« Reply #7 on: August 07, 2025, 10:39:54 PM »
0
The larger component could be an integrated circuit (IC) which provides latching circuit (it probably uses a non-latching 3-leg Hall effect sensor) and an output capable of greater current capacity.  It could be a custom-designed IC. Just a speculation without having the item on-hand to evaluate it.

EDIT:  Looking over those PC boards and the component labeling, it is possible that the 5-lead chip is the latching Hall sensor (U1) and Q1 is simply a transistor "amplifier" which is controlled by the low-amp output of the Hall sensor and which is capable of switching higher current (as in multiple LEDs).
Transistors (like many Hall sensors) are 3-lead devices and they are usually labeled Q#.
« Last Edit: August 07, 2025, 10:46:23 PM by peteski »
. . . 42 . . .

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #8 on: August 08, 2025, 07:05:50 AM »
0
OK I found this online and I believe the circuit represents what I want to do.  It is designed for 12v, what would I do the devices to scale it down to 3v or would it not matter?



Like always, I am overthinking the concept by trying to mimic the button boards above.
John "Lemosteam" LeMerise

peteski

  • Crew
  • *
  • Posts: 35198
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6605
    • Coming (not so) soon...
Re: Hall effect LED switch control Circuit board breakdown
« Reply #9 on: August 08, 2025, 11:28:41 AM »
0
Not sure what you mean by overthinkinig.  That schematic  shows pretty much the minimum circuit required to do what you want (similar to those ready-to-use devices you mentioned in your initial post).

That diagram is valid for using a 3-lead latching Hall effect device and a MOSFET transistor "amplifier" to increase the current sinking capability.  But if used as shown (using 12V) the LEDs would release their magic smoke instantly when they are fist turned on (no current limiting resistors are being used.

Depending on the specs for the MOSFET transistor, this circuit should work, and if using a 3V Lithium button-type battery you can get away with not using the current limiting resistors for the LEDs (since the battery cannot provide high enough current to overpower the LED.

Another thing to consider is that a transistor acting as a switch does drop some voltage across source/drain (or with bipolar transistors across emitter collector), With only 3V power source might not be enough voltage to fully light up white LEDs.
. . . 42 . . .

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #10 on: August 08, 2025, 12:06:45 PM »
0
Not sure what you mean by overthinkinig.  That schematic  shows pretty much the minimum circuit required to do what you want (similar to those ready-to-use devices you mentioned in your initial post).

That diagram is valid for using a 3-lead latching Hall effect device and a MOSFET transistor "amplifier" to increase the current sinking capability.  But if used as shown (using 12V) the LEDs would release their magic smoke instantly when they are fist turned on (no current limiting resistors are being used.

Depending on the specs for the MOSFET transistor, this circuit should work, and if using a 3V Lithium button-type battery you can get away with not using the current limiting resistors for the LEDs (since the battery cannot provide high enough current to overpower the LED.

Another thing to consider is that a transistor acting as a switch does drop some voltage across source/drain (or with bipolar transistors across emitter collector), With only 3V power source might not be enough voltage to fully light up white LEDs.

I really do not want a supernova in the cars either so the simple circuit helps with that, right?

Is there a different transistor I could use to reduce the amount of drain then?

At 3V is the transistor even needed, and I see no need for a capacitor either as in Sumner's diagram either?
John "Lemosteam" LeMerise

peteski

  • Crew
  • *
  • Posts: 35198
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6605
    • Coming (not so) soon...
Re: Hall effect LED switch control Circuit board breakdown
« Reply #11 on: August 10, 2025, 04:39:51 PM »
0
I really do not want a supernova in the cars either so the simple circuit helps with that, right?

Is there a different transistor I could use to reduce the amount of drain then?

At 3V is the transistor even needed, and I see no need for a capacitor either as in Sumner's diagram either?

The way you power your LEDs and control their brightness is unconventional and foreign to me.  When I want to reduce the LED brightness I use  . . . a series connected resistor. Depending on the battery's internal resistance, and a voltage drop of other components for brightness control is not something I would consider using.  I can only try to explain how things work and what I would recommend. I guess you will just have to experiment to find out what works.  Fortunately, none of the components you're using are expensive, and with those button-cell batteries, damage is unlikely, so just go at it and see what works and what doesn't.

I found a 5-pin version of the Hall effect switch for you:  https://www.digikey.com/en/products/detail/rohm-semiconductor/BU52025G-TR/1679713 . Looking at the data sheet it only uses 3 pins, so you can just as well use any 3-pin Hall effect switch.  This is also only rated for 1mA maximum output current.  You could try connecting your LEDs directly to the output. In the worst case, you will blow the sensors output. No big loss at the couple of bucks it costs.  If you want to build the circuit you found, this should be a suitable MOSFET transistor to use:  https://www.digikey.com/en/products/detail/panjit-international-inc/PJA3402-R1-00001/14660340 You will also need a 10K resistor.  Here is a link to a small SMD 1206 10k resistor: https://www.digikey.com/en/products/detail/panasonic-electronic-components/ERA-8AEB103V/3070742 . Smaller sizes are also available (like 0805 or 0603, but those would be more fiddly to deal with).

The capacitor you mentioned is there for decoupling the power feed into the Hall effect switch.  If you look at the data sheets, manufacturers recommend using it in their sample circuits.  It is not mandatory. Usually 0.1µF It is there to smooth any noise present on the power supply feed.

Since you will be using a 3V power supply, you will likely get away building the circuit as shown on the schematic (no current limiting resistors in the LED circuit).

Good luck!

. . . 42 . . .

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #12 on: August 10, 2025, 08:23:22 PM »
0
I wish I had recalled making the lights in the picture below. Based on the brightness in the car, it appears that all I have to do is relocate the battery below the car, and replace the manual micro slide switch with either a tactile switch pressed through a hole in the floor, or the Hall switch (preferred). Getting the battery out of the roof is the prime objective.

I think I will remove one led though.

One question, will the hall switch drain too much from the circuit if I go with that?






John "Lemosteam" LeMerise

peteski

  • Crew
  • *
  • Posts: 35198
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +6605
    • Coming (not so) soon...
Re: Hall effect LED switch control Circuit board breakdown
« Reply #13 on: August 10, 2025, 08:54:24 PM »
0
I see that you are using yellow/amber LEDs. Those have working voltage of around 2V (unlike white LEDs which require 2.8 to 3V. Again, the small batteries internal resistance limits their current to apparently the brightness you like.

The Hall effect switches do consume some current at all times, but the standby current is relatively low  (single-digit micro Amps).

To simplify things, how about keeping the mechanical switch but relocate it to the floor, near the battery?  That way you have a simple lighting circuit with no need to open the car up to turn the lights on.
. . . 42 . . .

Lemosteam

  • Crew
  • *
  • Posts: 6383
  • Gender: Male
  • PRR, The Standard Railroad of my World
  • Respect: +4778
Re: Hall effect LED switch control Circuit board breakdown
« Reply #14 on: August 11, 2025, 08:21:48 AM »
0
Did that once before, but that is the point of the mag switch right?  No touch on and off.

Then there is this style battery, 110mAh, which is rechargeable.



https://www.mouser.com/ProductDetail/Seiko-Semiconductors/MS920SE-FL27E?qs=svcOMVC6qXRyPFUHJUTFXQ%3D%3D&srsltid=AfmBOopV3KeMftqP1S14gj2lw-Qgvg2GhK4T30uywaKaUg1W1xQiAA4V
John "Lemosteam" LeMerise