Introduction: HALL MULTIPLEXER
(Updated May 24 2019, future updates will follow)
Hi. I read on another forum , (can’t remember which?), of this guy who seeked for a smart way of measuring the level of some ”liquid” in a large, (deep), tank?
The problem for him was that of the need of up to 40pcs. of sensors, and what kind’f ones? He asked about using them ”HALL-effect” sensors. Thus the problem was the cable’ing. There would be 40+ leads. Well, this wakened me up to think about this! Just for curiosity I started to exam the behavery of them Halls, (no direct need for me of this but… when a Nerd like me stumbles ower such a thing, you just can’t leave it be). I came up with the obvious solution of having a multiplexed scanner.
So, ALLWAYS, start with a search for allready existing solutions. There are +++ of them both Hall- and multiplexings of all kind. To combine these two. I made two versions of these.
The 1’st one I call the: ”Stand Alone”, The 2’nd one I call the: ”Prosessor Controlled”
I have NOT made a PCB of neither of them YET, (read later in the text, why not yet), only schemas for them both and PCB-layout for the ”Stand Alone”. Never the less, I have tested the function of the ”Stand Alone” on a break-out unit.
Step 1: Stand Alone Multiplexer
Here I’m using them familiar 4017 decade counter and the 555 as an oscillator I started with a HALL-unit with the sensor SS49S, (a breakout), and Mosfet’s 2N7000.
I’ve attached them tech. info of these as PDF and as BMP files at the end, allso the PCB layouts
My ”IDEA” was to conect the ”Source” of the FET to the HALL-sensor GND to energisize it. And now getting the read-out of the HALL when a magnet activates it.
Conecting the 555 output 3 to CLK pin 14 on 4017 and the Q9 (count number10) pin 11 to the RESET pin 15 of the 4017 to acchive a continous looping of the 4017. Conect the Q0 (count number 1) pin 3 of the 4017 for sensor 1 to both FET GATEs for T1 and T1.1 via a resistor, (a resistor maybe not needed, but put it there anyway),
The 1’st FET T1 DRAIN conects to the GROUND of the HALL sensor, thus activating it. Then the ”signal” from the HALL, gives ”0V” if a magnet is approaxed the sensor. The HALL signal conects to the 2’nd FET T1.1 SOURCE.
The DRAIN of the FET T1.1 conects to LED1 Kathod. The Anods of all LED's are tied together and conects to +5V via one resistor (only one LED will be lit at a time, so only one resistor is needed)
I allso have a BUZZER conected parallel to the LED #8 thus giving alarm at the lowest level.
And voi'la. The LED will lit when a magnet is close enough the sensor (but NOT quite the way I'd like it to do)
The same goes for all them sensors respectively T2 & T2.1, T3 & T3.1... etc.
Make the oscillator 555 to run with some 10KHz and "blinking" is not noticeable.
*I'll update later on the values of the RES's & CAP for the 555 oscilator.*Me not getting it to compute, WHY?? It kind’f worked, but after an iteration, (with some changes), of dozen’s of times, I halted, had a coffee, a cig. (I know, don’t), and a brainstorm of my own.
Gee… me reading them tech.specs, (like reading the bible, with a high respect to it),
The results came clear to me by accepting the ”facts”. The tech. specs. of them components are absolutely ”correct”, my conections are allso all right, so…
MY BAD! (I know that You knew that.)
The HALL-sensor SS48E is a ANALOG sensor.
With a Vcc +5V and no magnetic flux, the output is exactly ½ the Voltage 2,5V. Depending of the Polarity of the magnet when approaxing the sensor, the output goes either towards +5V or towards GND.
That was my dilemma. I just couldn’t get a ”clear” +V or 0V. I’ve ordered another sensor ”3144” which is a ”LATCHING” type having a Open Collector output This sensor has a operating voltage of 4,5 to 24V. Haven’t got these yet, thats why I haven’t ordered them PCB’s either, need to test these first.
I'm pretty sure someone will comment like: "Why to multiplex this at all?. Can't you just go straight forward to lit them LED's from the inputs of the sensor?".
Fair enough. Actually I, as discribed, started this thing from to get down the "lead's" count to them sensors, and with this solution it doesn't do that so much. Actually I started with the "Prosessor Control" but when running this path I stumbled ower this solution allso, (keep in mind: I never intented to build this for my own use, but just for the interrest of things). So, this "Stand Alone" is just a "thing" but it may give some ideas for someone to their own builds.
Then I started to think if there's "ANY" benefits of using this kind of a solution?
I came up with something: "If the sensors are on a far distance from the control unit, there might be issues with them impedances. The sensors are "Open Collector" type and with a suitable pull-up resistor you can get more definitive levels. Actualy I made this Ible for the HALL-sensors, but you could use just any kind of a sensor/switch.
UPDATE: May 24,
I did use 47K resistors and a 0.1uF (100nF) cap.to the 555. Haven't checked out with the oscill. the frequence, but by eye-sight it seems about OK., no noticeable "flickering".*
I got them "Latching" Halls. I tie'd up together them "signals" (outputs) of the sensors out there on the line. They allso are tied up together on the PCB board. You can to this because they are Open Collector outputs and only one of them is activated at a time.
Runs perfect. I tested it with a Neodyme magnet, 20x10x3mm in size and
NO obstacles in the way. In the free air it worked just so, so... from a distance of ~30mm. It certainly worked absolutely fine with a distance < 25mm.
Now you need a 10P cable, (10P= 10leads, 1 lead for each sensor to the Latch, +1 lead for the Vc +5V (common) and 1 lead for the Return signal (common). You can use a 10P "flat-cable" a.k.a. a "ribbon-cable" with matching IDC-conectors to the wireing to the units.
You'r gonna need a small PCB for each "sensor" unit including: the "sensor" itself and the IDC-conector. I'll make a layout of this later and will update it.
PLEASE COMMENT, because I don't find a interrest in continuing this if it doesn't interrest anyone!!
Step 2: Prosessor Control
The ”Prosessor Controlled” unit. NO TEST’s done YET.
You could call this kind’f a I2C line. Here I use a ”Attiny 84” prosessor, (any Controller will do). together with the 74HC595. The ”Main idea” here is that I only need 4 wires, (+ two power lines which can be jumpered out there).
The 4 wires are: DATA, CLOCK, STROBE (LATCH), RETURN. You could tie the STROBE (LATCH) together with the CLOCK-line in the receiving end thus having one line less to draw, but this solution would make you to in the program to concider some, because now the ”outputs” in the receiving unit will follow the CLOCK. This is NOT recommended because if you ”daisy-chain” more receiving units You easyly lose the control in the program of ”where are we going?"
Step 3: The RETURN Path
The RETURN path.
Because the ”Latching” sensor 3144 has an ”open collector” output, they all can be ”tied up” together thus needing only one line.
Ewery ”remote unit” scans for 8 HALL senors. You can use several remote units in a ”daisy-chain” setup.
It’s recommended to put a ”dummy-load” to the wery last units last (the 8’th), sensor.
Doing this you can in your program confirm that the DATA has run through all units.
NOTE: if the main-control unit is far away, you need line-drivers for the signals, (I don’t have info ower these?).
The RETURN path may need an extern ”pull-up” resistor of say some ~10's of Kohms, (the prosessor built-in Pull-Up resistor is quite ”HIGH” of impedance and maybe not be good enough here).
I will come back later on when I’ve got them ”Latching Halls” and have tested them.
After testing them I’ll make them final PCB-layouts and update this ible. Then I’ll place an order, (to recieve them takes a couple of weeks), and after that I’ll update this again. I’ll allso make a program to this
Step 4: The Hardware
Gee.. I allmost forgot the solution of the mechanical part of the usage.
Honestly, I have it in my head only. It goes something like this, (I have NO pics or scethch of this):
You have a floater, ball, cylinder (to prefer), or ….. To this floater you attach a magnet or magnets, (with a cylindric floater you can attach several magnets, thus getting a ”overlapping” function).
Its best to have the floater in a ”tube” or on a rail to acchive a constant distance to the sensors.
Make another ”tube”, (isolates from the liquid), and there attach them sensors with a distance from each other.
1. By place'ing them sensors with a certain distance you can acchive the magnet(s) to activate two (or more) sensors at a time. This way you kind’f get double ”sensitivity”.
2. Having magnets (several) reaching ower the distance between two sensors you can have quite a long distance covered. I’ll make a picture of my suggestion and update it later on. I attach here the layouts that I have for now, don’t follow them blindly, (as said, I don’t have them, yet), and them tech. data of the components. I don’t have a BOM, because I had all this stuff allready, but all the components are wery common and easy to get allmost anywhere: e-bay, Bangood, Ali, etc.
Please comment this My ible so I get feedback of if I’m on a track of something?
Feel free to send me questions either via this forum or directly fo me: firstname.lastname@example.org