MLX90614

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

MLX90614

#1 Post by ngc981 » 29 Mar 2016, 21:54

Hoi I am newbie in the forum, i managed to enable the Easyesp on my esp-e12

First compliments, really fancy, create job to all of you, who developed this..

I Am trying to get the MLX90614 active
On Hardware of the EasyESP menu i enabled the SCL => GPi05 => d1 and SDA => GPI04 => D2
On device of the EasyESP i enabled the mlx90614 i expected in the value in the green the read out temperature
but its still 0.00

how ever running the code
of http://www.esp8266.com/viewtopic.php?f=29&t=2865
with the fix in the void setup where wire.pins(4,5) must be wire.begin(4,5) which results in temperature value 23 in the serial display

Question do i mis something that i don't seem a value?

Second question is it possible to draw graphs on the ESP itself, or is the EasyESP only used for move data to domestic systems.
If not does some one have example sketch how to do this

last on which pins to connect the DB18B20 temp sensor en does some have example sketch


Hope some can help me :D

Chris

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: MLX90614

#2 Post by andy » 29 Mar 2016, 22:15

Make sure you enter some value for IDX/Var: This number is used with Domoticz MQTT. You will need an entry there even if you do not use Domoticz. I usually just throw in 110 or 150 or 222 or whatever three digit number strikes my fancy.

As for graphing, no, ESP doesn't do that. You will need to connect to an MQTT broker and feed the data to a separate system. I'm playing with Home-Assistant, a friend of mine is using OpenHab. The fine folks here are happy with Domoticz. Lots of ways to do it, just need to pick one and go with it.

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#3 Post by ngc981 » 29 Mar 2016, 22:52

Thanks, This that is only now the strange thing the value in EasyESP is 1037.55 how ever running the script in the previous note i get a value back of 23 degree. Some one any idea what is going wrong


Chris

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: MLX90614

#4 Post by andy » 29 Mar 2016, 23:48

First things first - did you put an entry in the IDX field? See the image and make sure you put something in the IDX field:
ESPEasy1.png
ESPEasy1.png (59.75 KiB) Viewed 15698 times

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#5 Post by ngc981 » 30 Mar 2016, 07:09

Done, even it past the value to domoticz

[img]
Screen Shot 2016-03-30 at 07.03.30.png
Screen Shot 2016-03-30 at 07.03.30.png (104 KiB) Viewed 15662 times
[/img]


Second screen out put o serial sketch of the following code
http://www.esp8266.com/viewtopic.php?f= ... 614#p29224


Ambient = 21.73*C Object = 23.21*C

Ambient = 21.71*C Object = 23.23*C

Ambient = 21.67*C Object = 23.35*C

Ambient = 21.65*C Object = 23.33*C

Ambient = 21.67*C Object = 23.23*C

any idea of the difference


Chris

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#6 Post by ngc981 » 30 Mar 2016, 07:34

Extra Screen out put of Easy ESP

INIT : Normal boot
WD : Uptime 0 ConnectFailures 0 FreeMem 27216
MLX90614 : Temperature: 1037.55
WD : Uptime 1 ConnectFailures 0 FreeMem 27152
MLX90614 : Temperature: 1037.55
WD : Uptime 1 ConnectFailures 0 FreeMem 26672
WD : Uptime 2 ConnectFailures 0 FreeMem 27072
MLX90614 : Temperature: 1037.55
WD : Uptime 2 ConnectFailures 0 FreeMem 27008

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: MLX90614

#7 Post by kr0815 » 30 Mar 2016, 09:19

Is it an ESP12 ? Maybe GPIO4 and 5 are swapped ?

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: MLX90614

#8 Post by andy » 30 Mar 2016, 17:23

I don't think he's got a GPIO 4-5 swap issue. He's getting the right result from the output of his sketch, so the I²C interface is working.

Look at _P024_MLX90614.ino, line 30 and 31. It takes a value, multiplies by .02 and subtracts 273.15. If you work ngc's result of 1037.55 backwards thru the equation (1037.55 + 273.15)/.02 you get 65,553, or 2^16-1. For some reason the code is reading the max output of the sensor instead of the actual reading.

My coding-fu is weak beyond that. Anyone else know where to go from there?

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: MLX90614

#9 Post by costo » 30 Mar 2016, 19:25

andy wrote:I don't think he's got a GPIO 4-5 swap issue. He's getting the right result from the output of his sketch, so the I²C interface is working.

Look at _P024_MLX90614.ino, line 30 and 31. It takes a value, multiplies by .02 and subtracts 273.15. If you work ngc's result of 1037.55 backwards thru the equation (1037.55 + 273.15)/.02 you get 65,553, or 2^16-1. For some reason the code is reading the max output of the sensor instead of the actual reading.

My coding-fu is weak beyond that. Anyone else know where to go from there?
2^16-1 means all databits are 1, that means no databits at all are read, pullup makes all bits a '1'.

So my conclusion is that I2C is going wrong. It can mean that SDA and/or SCL is not connected at all or SCL and SDA are swapped.

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: MLX90614

#10 Post by grz3 » 30 Mar 2016, 20:33

Hello, use port 0 and it will work...

Ger
Normal user
Posts: 71
Joined: 05 Sep 2015, 18:09

Re: MLX90614

#11 Post by Ger » 30 Mar 2016, 21:44

Port is used as offset for the default i2c address from the MLX90614 (5A)
If you use a standard MLX90614 you must use port 0.
If you have changed the i2c address from the MLX90614 to 5B for example you should use port 1.
On the following URL I found how to change the address http://www.chrisramsay.co.uk/posts/2014 ... 4-sensors/

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#12 Post by ngc981 » 30 Mar 2016, 22:04

AlL First thanks all for your reactions EasyESP already checked the Swap of GPI05 which is on port D1 and GPI04 on port D2 :!: Without succes

I used the following layout of the esp8266-E12
NodeMCU__v1.0_pinout.jpg
NodeMCU__v1.0_pinout.jpg (105.55 KiB) Viewed 15185 times
At grz3, what do you mean with use port 0, (GPI016)? in above layout an which pin is that of the MLX90614.

My connection layout is now

//SDA --- GPIO4
//SCL --- GPIO5
IN the other sketch wire.begin(4,5); //SDA=4, SCL=5

Sorry ist not clear for me :oops:

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#13 Post by ngc981 » 30 Mar 2016, 22:26

By the way my hardware settings i defined
Screen Shot 2016-03-30 at 22.24.07.png
Screen Shot 2016-03-30 at 22.24.07.png (69.07 KiB) Viewed 15183 times
I think its right ore......


Chris

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: MLX90614

#14 Post by grz3 » 30 Mar 2016, 22:31

@ngc981
see my task for MLX... in PORT, use 0 instead of yours 80
my MLX sensor is on i2c address 0x5a
mlx.jpg
mlx.jpg (33.48 KiB) Viewed 15183 times

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#15 Post by ngc981 » 30 Mar 2016, 23:09

Sorry still not, Where to check/Set the adres of i2c

Chris

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614

#16 Post by ngc981 » 30 Mar 2016, 23:14

By tools i found this where to set the Ic2 address

No I2C devices found
I2C Addresses in use Known devices

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: MLX90614

#17 Post by grz3 » 30 Mar 2016, 23:26

in TOOLS -> i2c scan (button) this will scan your i2c... if nothing there, you got problem with connection of MLX to ESP....
my screen looks like this...0x5a - no comment,but it is MLX...
i2c.jpg
i2c.jpg (15.94 KiB) Viewed 15169 times

ngc981
Normal user
Posts: 12
Joined: 28 Mar 2016, 18:58

Re: MLX90614 (Solved)

#18 Post by ngc981 » 31 Mar 2016, 07:10

Grz3 Thanks 0x5a was there after reboot, of E12

It was the port 80 which caused the problem, i had the idea that it was related to the port of domoticz.
But i understand now that its related to E12. But i can't technical place the function of this port variable
to the microcontroller or pin layout of it.

Can some explain.

Anyway it works, Al thanks
Screen Shot 2016-03-31 at 06.58.20.png
Screen Shot 2016-03-31 at 06.58.20.png (61.38 KiB) Viewed 15140 times

grz3
Normal user
Posts: 36
Joined: 21 Feb 2016, 21:47

Re: MLX90614

#19 Post by grz3 » 31 Mar 2016, 08:44

as @ger explained:
Port is used as offset for the default i2c address from the MLX90614 (5A)
If you use a standard MLX90614 you must use port 0.

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests