No output from MLX90371 Triaxis Hall Effect Sensor

After much research I decided to deploy the Melexis MLX90371 Rotary Hall Sensor in my designs for the Heritage Flight Simulation Spitfire Mk.IX

The whole idea with this was that they would be easy to use as they give an analog signal right off the bat and they have a through the hole design, so easy to solder.

Well I received 12 of the little suckers off Digi-key the other day and set about to test them. I simply used an Arduino Mega and set the sensor up on a breadboard, connected as per the datasheet. I used the standard ReadAnalogVoltage sketch. It should be pretty simple, there is a 5V input lead, an analog out lead and 2 ground leads, one of which remains floating (not connected). So you should simply be able to use them as a drop-in for a potentiometer right?

Seemingly not. Despite my best efforts with different sizes and strengths of magnets it only gives a constant 2.48V output. I contacted Melexis who referred me to Digi-Key who said it should work. It doesn't...

Anybody else here played with these yet?

Here is the example sketch:

/*
  ReadAnalogVoltage
  Reads an analog input on pin 0, converts it to voltage, and prints the result to the serial monitor.
  Graphical representation is available using serial plotter (Tools > Serial Plotter menu)
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.
*/

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5.0 / 1023.0);
  // print out the value you read:
  Serial.println(voltage);
}

Which option code did you buy?

And also, did you also buy the programmer?

Paul

Hi Paul,

Thanks for your response.
I have the MLX90371GVS-BCC-100-SP-ND
According to the data sheet, that should be working in analog by default. PWM is an option through programming.
I do not have a programmer but that would defeat the object if they are not usable straight out of the box.

The layout I used is attached.

image1.jpg

image2.jpg

image3.jpg

I have also tried it with a 10k pull-up resistor between the Out and VDD, the voltage reading remains unchanged to magnetic input (various sizes tried, mainly 9mmD by 3mmT rare earth).

rstausebach:
I have also tried it with a 10k pull-up resistor between the Out and VDD, the voltage reading remains unchanged to magnetic input (various sizes tried, mainly 9mmD by 3mmT rare earth).

Have you looked at the output with an oscilloscope?

Paul

Hi Paul,
Alas, I do not have access to such a machine....

But I just starting looking at making one with an Arduino :slight_smile:

So I have set up an oscilloscope on an Arduino Mega and get the following result - a constant voltage line no matter what magnetic field is applied.

To show that the oscilloscope works I also include some traces from the same setup but using a Linear Hall Efffect Sensor, the Allegro A1302.

Thinking about the Melexis, I cannot imagine how it would represent the TriAxis functionality with only one analog output. Maybe their whole concept around this is ill-conceived....

Well my question has been answered. After failing to get an answer from Digi-Key (Melexis had I requested that I contact them as one of their distributors), I went back to Melexis and put it strongly that users were being let down through lack of information.

This was the response from their technical staff:

We regret to hear you were disappointed in the service provided by our partner and are currently checking why they were unable to assist.

In the meantime our Melexis engineers have had a look at your query and below you can find their feedback :

Hello,

The output mode is indeed set to analog by default, as stated on section "11. End-User Programmable Items" of the datasheet (see "AOUT_MODE_NORMAL" parameter). In the same section, you'll see that "CLAMPLOW" and "CLAMPHIGH" are by default set to 50 %VDD. This means the output will remain equal to 50 %VDD regardless of what the sensor is measuring. Therefore, in order to start using the sensor, you should at least program "CLAMPLOW" and "CLAMPHIGH" to different values (10 and 90 %VDD, for example).

After changing these parameters, the output of the sensor will vary linearly with the measured field, between CLAMPLOW and CLAMPHIGH.

P.S.: In order to program the sensor, you will need a PTC04 programmer and a DB-HALL06 daughter board.

I hope this helps.

Kind regards,

I have responded as follows so it will be interesting to see whether Melexis will actually come to the party and make these units availble in a usable format:

Thank you for that information from your engineers. Regarding that information herewith my observations:

I find that not clearly stating in the datasheet (that the units are not usable without programming), ignorant at best, deceitful at worst.
There can be no excuse as to why these units are not supplied in a usable state, i.e. to have the ClampHigh and ClampLow values set at generally optimal levels, with the option for further refinement through programming should the user wish.
Selling these units with a setup that renders them useless therefore forces the user to purchase the programming units. The quote I have on these from Digi-Key are as follows:
PTC04ND: US$1141
PTC04DB: US$260
DB-HALL06: US$296
So whichever way you look at it, a user is in for a cost of US$556 or $1,437

Is it the intent to make these units exclusive to industrial use, ignoring the potential market for makers and hobbyists and other smaller users?

Simply by shipping the Dimm4 Analog units with optimal clamping values, this market can easily be tapped.

In the meantime, I feel a little done in by having 12 of these units which are unusable. Furthermore, I have spent significant time incorporating the units into my designs for our simulator. Designs which will now have to be redone to incorporate more conventional solutions, as I cannot expect purchasers of my product to all have programming boards before they can use it.

Kind regards,

Yes, their data sheet is lacking in some specifics. But, if a company is selling a device and also selling a programming unit, the assumption must be the programmer is there for a reason. That is why I asked in the beginning if you also have the programmer.

Paul

Right....

No matter the assumptions required, shipping them with a useless datarange (effectively 0 with the high and low both fixed at 50%), just makes no sense and excludes anyone else from using them. :frowning:

Perhaps ask if you can send them to Melexis so they can 'unlock' them for you. If you are lucky they just might send you a bunch of freebies as it would work out cheaper for them to send out new devices rather than have a technician receive your devices, test, reprogram, repackage and ship them back to you.

rstausebach:
Right....

No matter the assumptions required, shipping them with a useless datarange (effectively 0 with the high and low both fixed at 50%), just makes no sense and excludes anyone else from using them. :frowning:

Actually, it makes perfect sense.

Perhaps you are not old enough to remember the VERY sensitive analog meter movements ALWAYS had a shorting wire between the terminals except when you were using it.

Your devices are just as sensitive to stray magnetic forces that may very well destroy the factory calibration. No one can predict what will happen during shipping. Many air shipments are x-rayed. Container shipping may get examined with beams of gamma rays.

Paul

Thanks Paul,

While I may soon be called a senior citizen I confess my background is mechanical engineering, not electronics. So no, I don't recall those :slight_smile:

I note what you are saying, however would the same then not hold true for say an Allegro A1302 which is a linear Hall Effect sensor I am using with no problems?

rstausebach:
Thanks Paul,

While I may soon be called a senior citizen I confess my background is mechanical engineering, not electronics. So no, I don't recall those :slight_smile:

I note what you are saying, however would the same then not hold true for say an Allegro A1302 which is a linear Hall Effect sensor I am using with no problems?

I think that is comparing apples to oranges. The A1302 is not programmable. It is also soon to be obsolete and unavailable.

Paul