Hardware Arduino Help

Can you please suggest how I can connect 64 individual Hall sensors to the analog pins of the Arduino Mega R3 which has only 16 Analog pins.

Basically want a way on how to increase the number of Analog pins from 16 to 64 or more.

Any help will be greatly appreciated. Thank you!!

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.

Hi,

You need an analog multiplexer. Basic a fancy way to call a switch that can be addressed by the Arduino and used for analog signals.

Look here

Sorry about that. They can be read with a delay of 10 milli-seconds from each other.

4 of these might help.

I don't have time to check the specs now as I'm at work.

Any particular reason you want to read them as analog ?
What sensor part number are you using ?

Hi, @aa12345678
Welcome to the forum.

Can you please tell us your electronics, programming, arduino, hardware experience?

Are you making a chess board by any chance?

Have you Googled;

arduino chess board

Thanks.. Tom. :smiley: :+1: :coffee: :australia:

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.

Thanks in advance!!

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.

Tom.. :smiley: :+1: :coffee: :australia:

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:

How did You power the rows? Schematics please. Maybe it can be improved to yield 0 - 400...

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..

Here is the schematics. Yeah if it can be improved to yield 0-400mV reading, that would be ideal. But I have no clue how to improve the reading.

Thankyou for your reply. I will give this a shot if anything else does not work.

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..

Thank you, could you please tell me how to connect the transistor (to which pins)

But it would work with the way you suggested above by using the four 74HC4067 boards?