Hello,
I am programming a MLX90395 TSSOP 16 package 50mt sensor for a project. I used the MLX90395 library created by Adafruit on Arduino IDE and I am using the Arduino Uno board for the MCU interfacing and using I2C communication. I have my wiring (from the sensor to the board) based on the recommended application diagram wiring with the MLX90395 in TSSOP16 located in the MLX90395 datasheet. I am only using one die, the rest of the pins for the 2nd die are floating (nothing connected to them). I ran the demo code in order to test out if I am able to get any measurements, but it is not working. The serial monitor stops at printing "starting Adafruit MLX90395 Demo", It does not get to the "no sensor found ... check your wiring?" and it does not get to "Found a MLX90395 Sensor with Unique id 0x". It seems it is getting stuck at the if statement right after "starting Adafruit MLX90395 Demo". So I was wondering if I could get any help regarding this issue to start reading some magnetic field values and getting the demo code to work. FYI: I tried commenting out the if statement and everything else shows on the serial monitor but nothing is getting measured, i.e the value is always 0 for x,y,z no matter how close the magnet is.
MLX 90395 Library and demo Code
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MLX 90395 Library and demo Code
The board we sell uses the MLX90393, not the MLX90395.
You'll need to compare the datasheets for those two devices to see how their I2C registers and commands overlap.
You'll need to compare the datasheets for those two devices to see how their I2C registers and commands overlap.
- kareemelrufaie
- Posts: 4
- Joined: Thu Jan 26, 2023 6:22 pm
Re: MLX 90395 Library and demo Code
I thought that at first, but their seems to be 2 different libraries made, one for the mlx90393 and one for the mlx90395. I attached the link for the mlx90395 adafruit article as well as the github link for the MLX90395 library.
https://blog.adafruit.com/2020/10/15/ey ... -adafruit/
https://github.com/adafruit/Adafruit_MLX90395
I am using the MLX90395 library and its demo code, is it perhaps labelled wrongly?
Thank you
https://blog.adafruit.com/2020/10/15/ey ... -adafruit/
https://github.com/adafruit/Adafruit_MLX90395
I am using the MLX90395 library and its demo code, is it perhaps labelled wrongly?
Thank you
- kareemelrufaie
- Posts: 4
- Joined: Thu Jan 26, 2023 6:22 pm
Re: MLX 90395 Library and demo Code
Hey,
I also had another question. Is it possible the demo code does not work because I am using an arduino uno board as opposed to an adafruit MCU? I noticed in the adafruit article I sent for the MLX90395, they are using an adafruit MCU board and not an arduino board. Is that maybe the reason why the the code does not work?
I also had another question. Is it possible the demo code does not work because I am using an arduino uno board as opposed to an adafruit MCU? I noticed in the adafruit article I sent for the MLX90395, they are using an adafruit MCU board and not an arduino board. Is that maybe the reason why the the code does not work?
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MLX 90395 Library and demo Code
Ah.. my mistake. Thank you for the link.kareemelrufaie wrote: ↑Fri Jan 27, 2023 9:15 am I thought that at first, but their seems to be 2 different libraries made, one for the mlx90393 and one for the mlx90395. I
That shouldn't make any difference. The code should work on an Uno without any problems.kareemelrufaie wrote: ↑Fri Jan 27, 2023 11:25 am Is it possible the demo code does not work because I am using an arduino uno board as opposed to an adafruit MCU?
Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.
- kareemelrufaie
- Posts: 4
- Joined: Thu Jan 26, 2023 6:22 pm
Re: MLX 90395 Library and demo Code
Hey Mike,
I got it to work. It turns out it was one of the capacitors that was connected incorrectly. Because of that, it didnt allow power to flow through to the sensor.
Thank you for the help
I got it to work. It turns out it was one of the capacitors that was connected incorrectly. Because of that, it didnt allow power to flow through to the sensor.
Thank you for the help
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MLX 90395 Library and demo Code
Glad to hear you got things working. Happy hacking!
Please be positive and constructive with your questions and comments.