Hacking a flow sensor - Hall Effect Sensor help

Thread Starter

marsrovers

Joined Sep 16, 2017
12
Hello all,

I am working on interfacing a Neptune FS-100 flow sensor unit with my raspberry pi.

After taking it apart, I have found inside a Honeywell SS460S Hall sensor (http://www.mouser.com/ds/2/187/honeywell-sensing-ss-360nt-ss-360st-ss-360st-10k-s-794951.pdf) and a 120ohm resistor between V+ and the output pin.

The Neptune control module for their flow sensors say:
In addition to the four sensor ports, the FMM also has a DC24 accessory port and a power supply input. This adds another controllable outlet to your Apex set up. So, for instance, if you do want to make your own ATO and attach our available PMUP or Solenoid Valve, you can do so. Simply add our 36W 24V DC power supply (available separately).
I looked at the data sheet for the hall sensor and i'm trying to make sense of it.

To me, it is saying:
The range of input supply voltages 3-24Vdc.
The output range (Applied output voltage?) is -0.5V to 26.0 V

But it doesn't provide information on input voltage to output voltage.

I have a few questions:
1. How to read/interpret this data sheet
2. How to interact with this flow sensor using my raspberry pi
3. Do I need a 24V power supply? Or can i power this thing off my Raspberry pi 3.3V supply?
4. I tried hooking up the hall sensor with V+ going to 3v3, ground going to ground, and the output pin going to pin 23 with the following test code and my output is pretty erratic regardless of whether i pull up or down the output pin (23). It reads "true" even when there is no magnet anywhere near the hall sensor. When i bring the magnet near it, it doesn't seem to change the output noticeably. I rotate the magnet very slowly trying to find the + or - side and there isn't much of a change. The code :
Code:
#!/usr/bin/python
import os
import RPi.GPIO as GPIO

boardRevision = GPIO.RPI_REVISION
GPIO.setmode(GPIO.BCM) # use real GPIO numbering
#GPIO.setup(23,GPIO.IN, pull_up_down=GPIO.PUD_UP)
#GPIO.setup(23,GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(23,GPIO.IN)

lastPinState = False
pinState = 0

CONTINUE = True


# main loop
try:
     while CONTINUE:
       if GPIO.input(23) == True:
         pinState = True
         print "Pinstate = True!!!"
       elif GPIO.input(23) == False:
         pinState = False
         print "Pinstate = False!!!!!!!"

# if CTRL+C is pressed the main loop is broken
except KeyboardInterrupt:
     CONTINUE = False
     print "\Quitting"


# Actions under 'finally' will always be called
# regardless of what stopped the program
finally:
     # stop and cleanup to finish cleanly so the pins are available to be used again
     print "Cleaning up...."
     GPIO.cleanup()
thanks for your help with this folks!

Screen Shot 2017-09-16 at 7.04.07 AM.png
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Ensure you have a N pole to unlatch, 3.3v is pushing the 3vdc limit a little.
Test the SS460 with a meter first. The output will be 0v to just under 3v with 3.3+ supply.
Max.
 

Reloadron

Joined Jan 15, 2015
7,517
My read is these sensors are a current output sinking device so my guess is an NPN open collector with emitter going to ground. The maximum sinking current is 20 mA. Should that be the case the output would need a resistance going to a +V. This is why no output voltage is shown as output. The voltage would be determined by a V+ supply through a resistor limiting the current.

The actual flow sensor is a paddle wheel type flow sensor and the paddles alternate South and North to latch and unlatch the output. It would resemble the below image:
FP700 Paddlewheel.png

The small plastic paddles have magnets embedded in them. In this case there are 4 paddles so the resulting output would be two pulses per revolution. What is unknown is what the K-Factor for this sensor would be. The K-Factor would be the number of pulses per unit of measure.

1. What is a K-factor Simply stated a K-factor is a dividing factor. The term is usually encountered when dealing with pulse signals although analog K-factors are sometimes used.
2. Pulse Signal K-factors All pulse output type flow meters when they are dispatched by their manufacturer will have a calibration certificate. The calibration certificate will show that the meter has been calibrated over its flow range and noted on the certificate will be the average K-factor for the meter. This K-factor will be given in terms of the number of pulses produced by the meter for a given volumetric flow. (e.g.) 200 pulses per U.S. gallon, 150 pulses per liter etc. This K-factor is the value that is entered into a batch meter or indicator/totalizer in order to give a readout in engineering units.

I suggest you give this a read: Calculating and Using K-Factors

An unknown K factor can be learned by simply running a known amount of in this case water gravity fed through the flow meter and counting the resulting pulses.

That would be my guess as to what you are looking at and there is some speculation in there on my part.

Ron
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
My read is these sensors are a current output sinking device so my guess is an NPN open collector with emitter going to ground.
Ron
That is what the SS400 series are basically as per the OP's pull up resistor.
The output can/should easily be seen on a meter across the load/pull-up.
Looking at my sheet on them they recommend a minimum of 3.8v for reliable operation.
Max.
 

Reloadron

Joined Jan 15, 2015
7,517
Hey Max, how goes it?
The output can/should easily be seen on a meter across the load/pull-up.
Looking at my sheet on them they recommend a minimum of 3.8v for reliable operation.
Max.
Yeah, I would think using a magnet it could be latched and unlatched being read with a meter. I would start there then worry about counting pulses. I wasn't sure the OP was using a resistor so my bad on that note.

Ron
 

Thread Starter

marsrovers

Joined Sep 16, 2017
12
Hey folks! Thanks so much for taking all that time to respond with such detail!

I'm not 100% clear on some of what you all shared but I think I can see what the next step is: connect the flow sensor to something with more voltage than the 3.3, so maybe the 5V supply on the raspberry Pi. Then measure the voltage across the pull up resistor (connecting the +V and output pins)?

Ensure you have a N pole to unlatch, 3.3v is pushing the 3vdc limit a little.
Test the SS460 with a meter first. The output will be 0v to just under 3v with 3.3+ supply.
Max.
Instead of trying to find a magnet that might work, I was using the cylindrical magnet that comes from inside the flow sensor itself. It's all solid color but there is a single white line on it that, my guess, would indicate the south side of the magnet. See images attached of the opened up flow sensor.

That is what the SS400 series are basically as per the OP's pull up resistor.
The output can/should easily be seen on a meter across the load/pull-up.
Looking at my sheet on them they recommend a minimum of 3.8v for reliable operation.
Max.
My read is these sensors are a current output sinking device so my guess is an NPN open collector with emitter going to ground. The maximum sinking current is 20 mA. Should that be the case the output would need a resistance going to a +V. This is why no output voltage is shown as output. The voltage would be determined by a V+ supply through a resistor limiting the current.
Okay, so is this a voltage output device or a current sinking device? I've heard this current sinking concept before but I am a bit fuzzy on it and how one actually implements this with a micro controller like the raspberry Pi to assess the state of the hall sensor. I'm a mechanical/aerospace engineer but I work in hardware. Electronics is my hobby and I'm starting my first big project a good...6 years after my university electronics lab courses!

Thanks folks!

IMG_4106.JPG IMG_4107.JPG IMG_4108.JPG
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Your circuit in #1 shows a sinking input, (switching to GND), another small magnet would detect/indicate the two poles of the impeller magnet.
I am not familiar with that micro but most can use the output and 10k load resistor as an input normally. IIRC the SS400's can sink a 20ma load, so 120Ω on 24vdc would exceed it!.
Max.
 
Last edited:

Reloadron

Joined Jan 15, 2015
7,517
What I was getting at is the sensor uses a current sink out meaning the output of the hall effect sensor looks like the attached image using an open collector NPN transistor. Your paddle wheel has 8 paddles which should alternate N and S similar to my earlier image so 1 full revolution should be 4 pulses out. In the attached using the 5 Volt supply and the 500 Ohm resistor the current should be about 10 mA or 1/2 the allowable maximum of 20 mA.
current sink out.png
Q1 just represents the inside of the flow sensor.

Ron
 

Thread Starter

marsrovers

Joined Sep 16, 2017
12
What I was getting at is the sensor uses a current sink out meaning the output of the hall effect sensor looks like the attached image using an open collector NPN transistor. Your paddle wheel has 8 paddles which should alternate N and S similar to my earlier image so 1 full revolution should be 4 pulses out. In the attached using the 5 Volt supply and the 500 Ohm resistor the current should be about 10 mA or 1/2 the allowable maximum of 20 mA.
View attachment 135204
Q1 just represents the inside of the flow sensor.

Ron
Hey ron, i don't think my paddle wheel has that many poles. In my pictures, you can see the grey cylindrical piece sitting with a snap ring on the shaft of the paddle wheel. This is the magnet. It has only one thing painted on it and that is a line. My guess is this is a '-' for south pole of the cylindrical magnet.



Okay here is what i have done:

Put back together the flow sensor, leaving the back of the circuit board accessible to my multimeter.

hooked +V (red) to a rail that connects to +5V on raspberry pi
hooked ground (blk) to a rail that connects to ground on raspberry pi
Put the flow sensor output pin to an empty rail on a breadboard
The three measurements I will be taking are shown on the image below:

Screen Shot 2017-09-17 at 8.03.01 AM.png

I numbered the paddles, 1 is the paddle that is sticking out where the magnet has the '-' marking on it.
I will take each of these measurements, advance the paddle wheel by one paddle, and take them again. Here is the table below:
Code:
             Paddle:                        V1:               V2:               V3:
                  1                             4.90             1.68              3.25
                  2                             4.90             1.68              3.25
                  3                             4.90             1.68              3.25
                  4                             4.90             1.68              3.25
                  5                             4.90             1.68              3.25
                  6                             4.90             1.68              3.25
                  7                             4.90             1.68              3.25
                  8                             4.90             1.68              3.25
soo..... i don't know whats going on here....
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
If that is a 120Ω load resistor it is way too low, I would use a 470 to 1k.
You only need enough for the micro input pull up.
Use a separate small magnet to test.
Max.
 

Reloadron

Joined Jan 15, 2015
7,517
The sensor OUT should run through a resistor to a +V like shown in the drawing I posted. The passing of a South pole should turn the Output ON and the passing of a North pole should turn the output off (Latch and UnLatch). The output pin should go High/Low as each paddle passes it.

I see Max also posted and I agree a 470 Ohm would be a good start.

Ron
 

Thread Starter

marsrovers

Joined Sep 16, 2017
12
Thanks so much folks! i'm going to try and setup what you are suggesting and post back. I'm confused as to why you folks think it is too low of a resistor? It is what came inside of the flow sensor. I didn't choose it myself.

[edit] i'm concerned about desoldering the 120Ω to put in a stronger resistor in series. is this 100% necessary? or is there something can put inline external to the flow sensor to serve the same purpose?
 

Reloadron

Joined Jan 15, 2015
7,517
Thanks so much folks! i'm going to try and setup what you are suggesting and post back. I'm confused as to why you folks think it is too low of a resistor? It is what came inside of the flow sensor. I didn't choose it myself.
Because 5 Volts / 120 Ohms = 41.6 mA which exceeds the 20 mA maximum shown in the data sheet as the max sink current. Let's let Max build a little configuration as I don't have any sensors to try.

Ron
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
I set up one on a breadboard, 1k resistor load, and measure from common to output, ON=.025v OFF= 3.95.
Incidentally the spec sheet shows different output driven options from TTL to Bi-polar and FET, for TTL they show a 10k load resistor.
Max.
 

Thread Starter

marsrovers

Joined Sep 16, 2017
12
Are you sure of the value? Did you measure it or maybe miss-read the colours?
It is a through hole type so it should be easy to replace.
Max.
Definitely could have misread the colors....but here is a picture.

IMG_3356.PNG

I set up one on a breadboard, 1k resistor load, and measure from common to output, ON=.025v OFF= 3.95.
Incidentally the spec sheet shows different output driven options from TTL to Bi-polar and FET, for TTL they show a 10k load resistor.
Max.
So, did you have it hooked up similar to my circuit sketches? I"m a bit unclear on your terminology.

thank you!
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
I had it set up exactly to your drawing power pins and a resistor from output to +ve.
I measured from Black to Green, incidentally the small button magnet I used tripped the SS400 at ~3/4" away.
I would measure the resistor to make sure.
Max.
 

Thread Starter

marsrovers

Joined Sep 16, 2017
12
I had it set up exactly to your drawing power pins and a resistor from output to +ve.
I measured from Black to Green, incidentally the small button magnet I used tripped the SS400 at ~3/4" away.
I would measure the resistor to make sure.
Max.
So, in light of this info, you put in 5V and got out either a zero potential difference between ground and output or a 3.95V potential difference. But that was with a 1k resistor. My resistor is presumably much smaller, and I was getting 1.68V between ground and out on 5V. Are we assuming this is because of my smaller resistor?

What are the chances that I have just fried this hall sensor based on what we've been over this far?

Just measured the resistor.... had to put my multimeter on the 20kohm setting and it comes out to 10kohms!!!! Wtf....
 
Last edited:
Top