Go Down

Topic: How to connect 12-36V Hall effect sensor to Arduino (Read 2778 times) previous topic - next topic



I need to connect an industrial Burkert Water meter which has a hall effect sensor. It si being powered by 24V and has PNP or NPN transistor output.

I will obviously need to add a voltage divider, but am really not certain how to wire this up. Commoning the ground between it and the Arduino, I assume is requried to get rid of mains hum.

Once connected, I will be using it on an interrupt pin, so will I be looking for an falling or rising efge and can I use the internal pullup?

THe item in question is: http://www.burkert.com/products_data/manuals/MA8030-Flowmeter-EU-ML.pdf  and on page 28 is the sensor I am using with both the PNP and NPN outputs.

Many thanks.



Think I have resolved it, UsIng the PNP output with a 3.8K/1K divider connected between the output and Ground.

So using falling edge on interrupt.

For some reason it hadn't worked before.

So Final question, should I join the grounds directly or am I likely to create problems with possible spikes going to the arduino?


It says:
pulse output, NPN and PNP,
open collector, max. 100 mA,
frequency up to 300 Hz, duty
cycle 1/2 ±10%
NPN output: 0,2-36 VDC
PNP output: supply voltage
You need NPN output to work with arduino. Ground connect to ground. Also pull up resistor necessary, try internal arduino resistor, in noisy enviroment better to connect external with lower value, 1 kOhm, or even less , see 100 mA



But why would NPN be better? Will the voltage only go as far as 5V because of the pull up resistor (and not to 24V), meaning I don't need to use a voltage divider? Is that why?

I was wondering about that, but didn't want to fry anything trying! :)


There is no voltage at the output, don't worry. See "open collector". NPN transistor because your arduino using "+" as power and "-" as a ground, same as npn transistor that 'd like to have "+" at collector. PNP 'd be  good if "-" used as power line, quite rarely nowadays.


Thanks... Will no swap it around and dump the divider!!!

Any advantage in optoisolating it do you reckon?


Any advantage in optoisolating it do you reckon?
No, what I can see from Montreal -);  At least, not necessary for sensor itself,  but may be required if cabling / wiring to sensor has long distance, passing close to AC motors, electrical boxes, in short if there is a possibility that wires could pick-up substantial EMI level, ground current or lighting strike.


How could I isolate this? I have some TLP521 optocoupler, datasheet at http://www.farnell.com/datasheets/57439.pdf but am confused if they'll cope with the 24V and 300Hz switching (I think they're fast enough) and how best to wire them in this circumstance, using the NPN or PNP output, resistors needed etc. To ease wiring would be nice to be able to use the internal Arduino pull up.

I realised I have opto-coupled all my Arduino outputs, so if I don't optocouple this, I'll have defeated the whole object as I will have joined the 24V Ground plane to the 5V ground plane..

Thanks in advance.

Go Up