I give up what is a one voltage and what is the zero voltage

A hall effect will drop to half input Voltage with a + (north?) gauss (2.5v at 5 VDC supply) and to 1 VDC with a - (South?) gauss. do I have to flip fields (Flip the magnet or use another opposite magnet for a zero or will the 2.5 be low enough? A big latching button is $1.88 (16.79 for nine). Buttons in general suck. I was trying to come up with a neat cheap switch. Hall effect $0.13 apiece (100 for 12.99), $0.12 (100 stick round magnets 11.99 for 100) should I use an optoisolator $0.32 or a 1 bit in a quad tri-state at $0.72 (14.72 /20) to drive an LED that draws 37.5 mA (at 3 VDC is 112 mW) (says it is a three-watt light, makes the light of a 3 watts filament bulb?)

i want to drive 4 LEDs the quad would not be wasted

i'm using a nano

Hall effect what ?

These go from 0v to 5v:


Note the open collector.

Use the internal pull-up or this circuit:


49E sensor is $0.13The SS49E is a linear hall-effect sensor. It can measure both north and south polarity of a magnetic field and the relative strength of the field.

The output pin provides an analog output representing if a magnetic field is present, how strong a present field is, and if it is a north or south polar field. If no magnetic field is present the SS49E will output a voltage around half of the source voltage. If the south pole of a magnet is placed near the labeled side of the SS49E (the side with text etched on it), then the output voltage will linearly ramp up towards the source voltage. The amount of the output voltage increase is proportional to the strength of the magnetic field applied. If the north pole of a magnet is placed near the labeled side of the SS49E then the output voltage will linearly ramp down toward the ground voltage relative to the strength of the magnetic field. For example, if you power the SS49E with 5V and there is no magnetic field present then the sensor's output will be around 2.5V. In the same example, if you place the south pole of a strong magnet near the labeled side of the sensor, then the output voltage will go up to around 4.2V and if you placed the north pole of a strong magnet near the labeled side of the sensor, then the output voltage will drop to around 0.86V.

You can easily use the SS49E with a microcontroller (such as Arduino) or single board computer (SBC). Just provide power to the GND and VCC pins of the SS49E and connect its output pin to an analog input on your microcontroller or SBC, which you can then measure the analog voltage of to calculate the sensor's measured data. missed the next paragraph

So why use a Hall-effect sensor? Hall-effect sensors are immune to most environmental disturbances that may affect optical or mechanical devices, such as vibration, moisture, dirt or oil films, ambient lighting, etc. Also, they are a simple way to measure the presence of a magnet and even electrical current running through a conductor.

Need to debounce? i think not.

Assume the output is connected to the A0 input on the Nano.

You can monitor the output of the device for the voltage changes.

Write your code so when the input reaches a certain voltage, you do what’s needed.

Add hysteresis as needed.

Why did you settle on an analog device rather than digital ?

it was cheap so a hassle to use but no contacts. Switches have contacts and using magnets as a computer interface is a lot cooler. For a lock, take away the magnets. I'm just looking for something different. the hall effect 13 cents, two magnets 24 cents for 37 cents. switch a good one can cost $15.00 the cheapest I found was $1.80. none are what I really wanted the hall effect can be more what I want. something more dramatic than just a button.

I use the A3141 shown in post #4, about 100 for $10.00

I will look it up. I had not looked on eBay just Amazon. Sometimes after hours of research, I forget to look around. Thank you. an interesting solution to a physical switch. After looking for a D cell battery holder they want $2.50 for the one I want, I decided to get 1.5" square wood panels, use two, drill four holes in the corners, and get some batt contacts and glue the panels to 4 dowels. cheaper than 50 cents apiece. much prettier than plastic. With these two cost-saving devices I'm making a 17 dollar design to 5 dollars. I'm hoping to use them in my hobby Arduino security system. I want to run a blog about while you cannot afford to have the security system you want installed, you can make it yourself. the TV burglar's system is a compromise you do not need to make. why depend on one Active IR sensor that if it trips it calls the police. I want more sensors more logic and i want to squirt the trash piggies.


The A3141 can be purchased at Amazon too.

Somehow I missed it. I have not yet committed to a final design but I like the idea of hall effect instead of contacts. Using 4 battery holders at $2.50, $10.00 of the projected $17.00 cost, the uncool conman switch can be replaced at around 40 cents with something unique and distinctive. thus developing the human interface for my system use.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.