That's a very open question.
Firstly how often do they have to be checked?
Do they all have to be monitored (Read) continuously?
The question is too hard to answer with the information that you have given.
So, the hall sensor gives a reading between 0-400mV depending on how far the magnet is from the sensor. And I am using the Hall sensor in a chess board on each square and taking the readings from it to see if there is piece present on a square and what type of piece. In order to distinguish between different types of pieces, I am using the analog pins.
Hi, thanks for your reply and very nice guess. Yes, I am trying to build a chess board. My programming, arduino, hardware experience is very low. In-fact just starting to learn about these things through this school project. I am using Hall sensors to detect a chess piece and what type of chess piece. There will be a Hall sensor installed on each square and they give 0-400mV reading depending on where I place the magnet inside the piece.
I tried doing multiplexing in software where I had 8 Hall sensors connected in a row and 8 such rows connected where each of their columns had a common output pin. So, it was using only 16 analog pins. How the multiplexing was working is I powered each row one at a time and then read each column one at a time.
The only issue I had here was the output dropped from 0-400mV to 0-100mV and I was not able to distinguish between the pieces (not able to tell what type of piece is there). And this is why I was thinking of connecting each Hall sensor to its own pin for which I will need 64 Analog pins. But if someone has a solution to figure out why there is a drop in the output of the Hall sensors that can help me too.
Hi,
First you need to establish if your Hall Effect sensor can distinguish 32 different magnetic levels, 32 different chess pieces.
Can you get 32 different magnetic levels and reliably detect it.
Each of your sensors will have to be exactly the same distance away from the base of each piece and the magnet inside positioned exactly at the right height to give the desired consistent flux strength.
Can you please post a link to specs/data of the sensor?
Sounds easy on paper, but more difficult in the real world.
So, I needed to distinguish between 12 different magnetic levels only as there are 6 different types of chess pieces and 2 for each color. And if I use one sensor at a time, I am successfully able to achieve that. The problem only comes when I try to do the multiplexing on the sensors. Here is the link to the senor I am using:
I understand from the datasheet that idle output voltage of those sensors is 1volt,
and voltage will increase or decrease depending on polarity of the magnet.
I would use four 74HC4067 boards with the outputs of the muxer connected to A0-A3.
An Uno, with 2volt Aref made from the 3.3volt pin would give the highest resolution.
Leo..
It certainly can! The digital ports are not designed to supply power. Put a pnp transistor between each row of sensors. Add a 1kOhm between the base and the digital output, and reverse the logic for "power on" from HIGH to LOW.
... 8 transistors, 8 resistors more.
You assumed a hall sensor is a simple switch, and used a switch matrix.
Outputs of powered and unpowered sensors all connected together surely won't work.
Leo..