If it's possible, an electronic circuit with magnetic switches

Carl asked Jun 24,2020
0

Hi,

I'm looking for some help to see if a circuit is possible and how I would go about figuring what parts / power I would need ?

I'm looking to design a circuit which features 7 LEDs ( ranging from 2.2v to 3.4v) the main element I'm wanting to include is to have each LED activate as soon as a magnet is introduced & them turn off as soon as its removed without effecting the other LEDs.

I have seen circuits with 1 LED powered this way using 2x 2032 batteries but what just wondering if there was a simpler way rather than having 7 separate circuits with 7 separate power supplies.

Apologies for the lack of knowledge but just wanting to see if its possible. 

  • Your Answer(5)
Upload photo
You can only upload 5 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
0 / 10000
  • 0

    You need hall effect sensors. You can use the sensors to determine the exact distance you want ( within the range of the sensor ). Here's a sensor i found on LCSC: MH180KUA https://lcsc.com/product-detail/Magnetic-Sensors_MST-Magnesensor-Tech-MST-MH180KUA_C114363.html You can check the datasheet for more info about it. Your circuit would be very simple. You need an ADC that has the same number or more channels than the number of leds. An arduino would be very useful here. You connect 5v and GND to the sensor and its output to one analog input on the arduino. Do this for all sensors. Next connect each led with a fitting current limiting resistor with its anode ( the positive side / the longer leg ) to a digital pin, and the cathode ( the negative side / the shorter leg) to GND. Your code would be very simple as you just need to measure the voltage on the analog inputs. If you need me to i can make a schematic for you, but both the code and schematic are widely available on google. If you want to control the brightness of the led, you dont even need the arduino. Just connect the anode of the led with a current limiting resistor to the output of the sensor and connect power. Just check the minimum/maximum supply voltage for your sensor.

    Carl 2020-07-06 09:58:09Reply

    Thanks.

    Reply
  • 0

    Hi Carl, I think it looks like in the picture. The magnet passes each sensor. Each sensor activates the connected LED and deactivates, when the magnet goes away to the next sensor position. If only one LED lights up at the same time you can use only one current limiting resistor - if not each LED needs an resistor. Hope the schematic helps you.

    Reply
  • 1

    Hi Carl, perhaps this help you: https://www.pcbway.com/project/shareproject/LEGO__R__compatible_2x2_Hall_Sensor_Led_Control.html I use a small Hall Sensor to switch a LED. You want to switch each of the 7 LEDs separate? From a separate Hall sensor then you need 7 of this sensors. You can supply all of them with one battery box. Look at the project here at PCBway and the video to compare if this is what you want.

    Carl 2020-06-25 09:30:39Reply

    Thanks Alexander. Yes, So I'm assuming I'd wire from the battery to the switch then to the led and then in the the other side of the led to the other switch and so on ?

    Reply
Browse other questions tagged or ask your own question.
List of Questions
pause
Ranking Name Answers
1 PCBWay Team 11
2 Engineer 1
3 Engineer 1