Hall effect sensor

Hello all

I have not been able to get my head around this small problem. Not enough knowledge yet :o

I have one of these hall switches below (on a DIL breakout board).
Wired it up as the data sheet expains which is pretty basic. 0v, +3.3v and an output, with the 3.3v and output linked with a 47k resistor.

That works fine. Present a magnet, and I get a high signal.

Here is my problem.
My circuit needs to be 3.3v, as most of the planned components are 3.3v and I don't really want to do loads of level shift everything.
The circuit needs negligible current draw while off, as its powered by 3.7v battery.

It will run an Atmega386 (if I get that far!).

This little hall switch will not cope with the load of the ATmega + associated circuitry I don't think, so I planned to simply switch an NPN power transistor I have here (BC547) to supply power to the IC.
Then, early in the code, the processor would put a pin high to keep it's own power on via another transistor.

Does that make sense?

But, all configurations of a transistor I tried failed. I have NO idea how to calculate the correct base value for the transistor, and my electronics manual really didn't help me understand.

I can get it to switch using a 100R resistor on the base, but I only get 2.6v out of the collector. I assume due to losses in the transistor.

How do I get a clean 3.3v switched through to fire up the processor using a hall switch?

I have searched around the RS site and found a few IC's that appear to operate as latching switches, but not exactly sure what I am looking at.

Any pointers greatly appreciated.

The maximum output current is shown as 1mA, so no, it won't power an Arduino.

I don't understand from your description what you are trying to do, but if I were switching 3.3v I would not bother with a bipolar transistor because of the voltage drop. Use a FET. Please post a diagram of what you are trying to do, hand draw is fine.

That part has an open drain output that goes LOW when activated, you should connect to a digital input pin with internal pullup enabled.

:o Try not to laugh too hard

This was my basic idea that doesn't work.

FET? How does this perform compared to a transistor? Unfortunately, I have limited parts here.
Looks like a shopping spree ahead

The centre transistor (now possibly a FET) switches on the processor, and then the processor turns a pin high as its almost first command to keep the supply on.
The pin can then be taken low to turn off the system when required.

My questions are also...

  1. Will that second transistor/FET interfere with the first one (back-feeding etc)?
    I would put a diode on the supply out of the transistor/FET to prevent a back feed, but this will lose me even more voltage.

  2. Will the 47k resistor that the hall switch apparently requires, mess with the base of the first transistor/FET?

  3. Will the ATmega328 fire up quick enough to latch on the power? I have no idea how long it takes between applying power and its first 'high' output signal (lets assume its basically the first command after setting up the routine).

I might be going about this entirely wrong. I have a pack of 10 of these hall sensors, and I would like to use them.

The remit is... magnetic field starts the processor, the processor holds its-self on, and the processor shuts itself down. Minimal current draw while waiting.

I will continue to Google and be baffled by transistor data sheets (not that I am likely to use transistors now)

Just seen the last comment.... There are 2 versions of that hall switch (I have both). One goes high upon presenting a magnetic field, and the other is inverted.
No point surely connecting it to the processor on a pulled high pin if the processor has no power?
I am using it as a power switch effectively

Would one of these be a better solution?

I cannot for the life of me work out from the data sheet what voltage will be switch through the device however. Makes my eyes bleed.

I have been Googling FETS... seems 3.3v is a low voltage to be able to get full switch on.. Or am I wrong on that point?

I am governed by my 3.7v Lipo pack if you are wondering why 3.3v.

You might do better searching for an HES with push / pull output that goes HIGH when activated, then, what you have might work. :slight_smile:

You’re looking to switch the 3.3 volt Arduino on and off with magnet, correct? If so, it need not be complicated or difficult. $0.74 each qty at DigiKey.

uploads/datasheet_KSK-1A66-3.pdf

PS: zero power use when off.

If you want to go low power, start by replacing that hall sensor by a reed switch. That hall effect sensor uses up to 2 mA when active (you need to have it active or it doesn't do anything), so a 2,200 mAh LiPo is drained in just 1,100 hours = 45 days, without the circuit doing anything else.

A reed switch uses NO power at all (physically breaking the circuit) when off. Typical reed switches can carry about 100 mA so that's enough to power an Arduino - just place it in the battery power line.

The convention for drawing circuits is lowest voltage at the bottom of the page. It hurt my eyes reading yours with 3.3v at the bottom.

You need to start again with that design.

First, the suggestion to use a reed switch is a good one, they consume no power and are commonly used as door and window contacts for burglar alarms.

Based on the data sheet you supplied, the HES is active low, so won't turn on the transistor, even if it does, the +3V3 comes from the 47k resistor, not the HES, it will not turn the transistor on enough.

You show the processor pin as 'high on boot'. It is high all the time becasue when the power is disconnected it is the 0v that is not present, meaning the only voltage on the processor is the 3v3, which means the only possible voltage on that pin is 3v3, not 0v.

FETs require a voltage on their gate to control a current between their drain an source. The gate draws negligible current, the drain to source resistance is close to zero, meaning the voltage drop is very tiny. You are correct that using a FET with 3v3 can be an issue, you have to check the voltage required to completely turn the FET on.

There are a number of MOSFETs that switch on just fine at 3.3V (or even less) but I have yet to find one that's not in SOT-23 or similarly tiny package. No TO-92 or TO-220.

PerryBebbington:
The convention for drawing circuits is lowest voltage at the bottom of the page. It hurt my eyes reading yours with 3.3v at the bottom.

Well.. I did say I was new to it all.

Reed switch isn't really ideal. They don't handle getting battered about very well, and this will get bashed about. Plus, jog them hard and they can make contact (I have been down this route). Magnetic triggering is far better for my purpose.

Battery life isn't critical. This thing doesn't need to last for days after charging. A few hours at most probably.

I have found an SMD switch controller - 4 pin. Can't remember the part number off the top of my head.
It's designed to switch on processors etc in phones. 1.7-5.5v range.

I have extensively Googled FETS... Seems a trial and error approach may be my best bet.
SOT-23 devices are fine. I have a decent solder station and a pile of conversion pcbs for various SMD parts to DIL.

Power MOSFETs that switch well at 3.3V include PMV16X, PMV16UN (can handle about 8A), IRLML2502 (can handle a bit less, 4-5A iirc). pMOS IRLML6404 works as well if you need it.
A great small signal MOSFET is the BSS138N (it's the one that's usually used in level shifters).
All SOT23 packages and really inexpensive (I bought them for the equivalent of less than USD 0.04 a piece, the pMOS was a bit more).

OK. Thanks for those.

My question would be that if I used an IRLML2502 for example (pic attached found on Google)... can it switch through a voltage the same level as its gate voltage.. E.G 3.3v through instead of the 12v shown?

All examples I have found shown the IC switching higher level voltages.

IRLML2502.gif

Of course. Or lower. In fact the moment the MOSFET has switched on the drain voltage drops to nearly zero, so you can switch 2V at the drain with a 3.3V gate level. Just stay within the overall limits as given in the data sheet.