Moderators: grovkillen, Stuntteam, TD-er
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#1
Post
by LaurB » 17 Oct 2020, 10:15
Hi, I'm having problems with the MLX90614 sensor. Temperature readings are 1037.55. I have tried using 100kHz and 400kHz I2C speed, the result is the same.
Code: Select all
160566 : Info : MLX90614 : Temperature: 1037.55
160604 : Info : MLX90614 : Temperature: 1037.55
170566 : Info : MLX90614 : Temperature: 1037.55
170603 : Info : MLX90614 : Temperature: 1037.55
180567 : Info : MLX90614 : Temperature: 1037.55
180604 : Info : MLX90614 : Temperature: 1037.55
- Capture.PNG (14.86 KiB) Viewed 9455 times
The sensor seems to be ok, I tried it on an Uno and the readings are ok.
I'm using ESP_Easy_mega_20201016_normal_ESP8266_4M1M binary file on a Wemos D1.
Any ideas?
Thank you!
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#2
Post
by LaurB » 17 Oct 2020, 10:38
I forgot to mention that the I2C scan detects the sensor.
- Capture.PNG (4.05 KiB) Viewed 9453 times
I tried with a NodeMCU, the same results.
-
Ath
- Normal user
- Posts: 3494
- Joined: 10 Jun 2018, 12:06
- Location: NL
#3
Post
by Ath » 17 Oct 2020, 13:06
You don't have other sensors attached? (The screenshots are very minimal)
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#4
Post
by LaurB » 17 Oct 2020, 13:55
Only one MLX is attached
Task 1
- Capture.PNG (26.5 KiB) Viewed 9431 times
Task 2
- Capture1.PNG (26.77 KiB) Viewed 9431 times
-
TD-er
- Core team member
- Posts: 8739
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
-
Contact:
#5
Post
by TD-er » 17 Oct 2020, 14:25
Hmm can you attach another sensor on the I2C bus so maybe that one has internal pull-up resistors?
Or maybe you can set the boot state of the I2C pins to be using the ESP's internal pull-up resistors? (since the Arduino sketch does seem to work)
I notice there is no I2C address setting in this plugin, but in the past I've seen some (older) plugins that may use the "port" setting also as an offset for the I2C address.
Maybe you need to adapt the port value to make it use the correct I2C address.
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#6
Post
by LaurB » 17 Oct 2020, 16:47
The sensor isn't showing on the i2c scanner anymore and it's not working with Uno either. I think that the problem was the sensor from the start.
Unfortunately I don't have another one to replace it.
-
Ath
- Normal user
- Posts: 3494
- Joined: 10 Jun 2018, 12:06
- Location: NL
#7
Post
by Ath » 17 Oct 2020, 17:33
You can try to add a couple of pull-up resistors to the I2C bus (by default D4 & D5), then do an I2C scan again to see if that helped in making it work again.
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#8
Post
by LaurB » 17 Oct 2020, 18:48
Ath wrote: ↑17 Oct 2020, 17:33
You can try to add a couple of pull-up resistors to the I2C bus (by default D4 & D5), then do an I2C scan again to see if that helped in making it work again.
I tried with two 2k2 resistors, no luck.
The sensors is mounted on a small pcb and it looks like it has it's own resistors.
- 20201017_194217.jpg (95.72 KiB) Viewed 9391 times
I uploaded an i2c scanner on an Uno and it didn't detected nothing.
-
Ath
- Normal user
- Posts: 3494
- Joined: 10 Jun 2018, 12:06
- Location: NL
#9
Post
by Ath » 17 Oct 2020, 19:13
Is that sensor compatible with 5V? As you connected it to an Arduino, that mostly use 5V logic, you may have broken it if it only supports 3.3V...
The on-board I2C pull-up resistors you can check/measure out with a simple multimeter.
-
Ath
- Normal user
- Posts: 3494
- Joined: 10 Jun 2018, 12:06
- Location: NL
#10
Post
by Ath » 17 Oct 2020, 19:25
TD-er wrote: ↑17 Oct 2020, 14:25
I notice there is no I2C address setting in this plugin, but in the past I've seen some (older) plugins that may use the "port" setting also as an offset for the I2C address.
The address is 0x5A by default, where the unit number is added to:
Code: Select all
byte unit = CONFIG_PORT;
uint8_t address = 0x5A + unit;
No clue on how to change the address of the device though.
-
LaurB
- Normal user
- Posts: 33
- Joined: 05 Aug 2019, 13:22
#11
Post
by LaurB » 17 Oct 2020, 19:26
3 volt logic.
Stupid mistake.
Who is online
Users browsing this forum: No registered users and 92 guests