Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 12:50:13 12:50


Login with username, password and session length


Pages: [1]
Print
Author Topic: MAX31850K (1-Wire) issue  (Read 7566 times)
0 Members and 1 Guest are viewing this topic.
burgic
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 9
-Receive: 24


WWW
« on: December 02, 2021, 07:57:20 07:57 »

Hi guys,

I am struggling for a few days with the MAX31850K (Cold-Junction Compensated, 1-Wire Thermocouple-to-Digital Converters) so I was hoping that some of you might have experienced the same issue
The chip is soldered on my custom PCB (I am not using a development board/kit) and it is controlled by STM32G030 MCU.

The current results are following:

- Readout of device 64-bit serial number works fine and as expected (it starts with 0x3B.... and this byte exactly tells the device type)
- Every data that I am getting from the device is always correct as I always check the CRC
- The hardware address which is the part of the configuration register within the scratchpad is also ok and the value as expected

The issue is the following: The temperature that I am getting back is always zero, but not only that, there is no error bit set (please check the datasheet page 13, table 2). So, even though I disconnect the probe, at least I shall have the open-circuit bit set, but this never happens. So, the temperature data (first 4 bytes of the scratchpad) are always 0, but the rest of the data is always correct and the CRC is also correct.
So, when you have a second look, you shall see that what I am actually reading out (each time that I request a temperature conversion and read scratchpad) is the default  (reset value) of the scratchpad.

Considering the text above, I concluded that the communication with the chip is definitely working ok, so I do not suspect any issues in the 1-wire library, especially because I am using it for years with DS18B20 with no issues at all. I also concluded that initialization, MATCH ROM and SEARCH ROM commands are also working flawlessly and that all data that I receive has a valid CRC so I am really receiving what the device has sent me.

Why in temperature data of the scratchpad there are no error flags set whenever you deliberately create one, I do not know. On the other hand, why always reading all zeroes is also very strange.
Additionally, I have 3 types of K probes, they all work when connected to a multimeter, but nevertheless, even without a probe, the chip is misbehaving.

I tries to google for solution, but unfortunately didn't find anything to help.
I am open for suggestions and ideas. Any idea, how much crazy may sound, could actually help.

Cheers!


Posted on: December 02, 2021, 07:54:46 07:54 - Automerged

I forgot to mention that MAX31850 is working in external power mode. It is not in parasite power mode.
Logged
Wilksey
Cracking Team
Senior Member
****
Online Online

Posts: 413

Thank You
-Given: 161
-Receive: 2549


« Reply #1 on: December 02, 2021, 07:26:47 19:26 »

Have you tried a different chip?  Could be that it was damaged in shipping or during soldering.

Do you have a dev board or breakout board from a known working one to compare?  Or at least check your code is working (do you need to initiate a "read probe" before reading back the data for ex?)

You say it "misbehaves" when no probes are connected, do you mean it still reads all 0's?  Is that what it is meant to do with nothing connected to it?

I am not familiar with the chip you mentioned but I have been using the Dallas Semi / now Maxim 1Wire parts for years.

Can you post your schematic / code for checking?

EDIT:
Just seen your 2nd post, must be to do with power supply, in parasitic mode have you made the connections like in Figure 1 on page 11 of the datasheet?
« Last Edit: December 02, 2021, 07:31:29 19:31 by Wilksey » Logged
burgic
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 9
-Receive: 24


WWW
« Reply #2 on: December 03, 2021, 08:11:24 08:11 »

Quote
Or at least check your code is working (do you need to initiate a "read probe" before reading back the data for ex?)

Hi Wilksey, after reading this part of your post carefully, I've noticed in my code what I was doing wrong. After issuing convert temperature, I didn't wait till conversion is completed and therefore it was always interrupted by issuing reset command prior to reading the scratchpad. I've added a way how to check if conversion is complete and now it seems to be working as expected.
On the other hand, why are my DS18B20 working for so many years with the same library  Shocked I'll have to cross-check the DS18B20 datasheet to see if this worked before by luck or actually this part is different between the chips.

Thank you very much for your assistance! Smiley

Cheers!
Logged
Wilksey
Cracking Team
Senior Member
****
Online Online

Posts: 413

Thank You
-Given: 161
-Receive: 2549


« Reply #3 on: December 03, 2021, 04:17:47 16:17 »

Glad you got it working, it might be that the newer chip works differently, however you said it was working with external power, so could it perhaps be that the chip was "browning out" with parasitic power and having to reread / convert when it came back?  The register working wouldn't change with different power supplied, unless the sequence is different between internal and external power?
Logged
burgic
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 9
-Receive: 24


WWW
« Reply #4 on: December 09, 2021, 09:04:20 09:04 »

Hi Wilksey,

sorry for the late reply.
There's been some kind of misunderstanding. I didn't say it was working in external power mode but it is the mode that I intend to use. I pointed out that device is not in parasite power mode which shall imply external power mode  Smiley

Cheers!
Logged
Wilksey
Cracking Team
Senior Member
****
Online Online

Posts: 413

Thank You
-Given: 161
-Receive: 2549


« Reply #5 on: December 09, 2021, 10:07:49 10:07 »

Quote
I forgot to mention that MAX31850 is working in external power mode.
Well this is the part of your message that I thought indicated it was working with external power.
Logged
burgic
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 9
-Receive: 24


WWW
« Reply #6 on: December 09, 2021, 10:28:58 10:28 »

Ah, my bad. This is what I wanted to say: "I forgot to mention that MAX31850 is connected/configured to work in external power mode."  Smiley
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC