Ds18b20 Problem

OP #5504260
Rate this post
useful
not useful
Hello,

I am trying to use a DS18b20 sensor with a STM32 Discovery board. 
However, I did the mistake of trying to connect the sensor to the PC 
using a RS232 to USB converter instead of TTL to USB. I know that the 
voltage levels for the normal RS232 is way higher than the 3.3-5V range 
of the sensor. I cant find any problems with the Simulink program that I 
am using, but don´t seem to get any response from the sensor. I also 
tried using a program from the following website:
https://www.seanet.com/~karllunt/onewire_stm32f4.html
The scratchpad shows only a sequence of "FF"s. Is it possible that the 
sensor is damaged? Is there any sure way to establish that? I would 
really appreciate if someone can help.
Moderator (Company: Titel) #5504280
Rate this post
useful
not useful
Sappy M. wrote:
> I am trying to use a DS18b20 sensor with a STM32 Discovery board.
> However, I did the mistake of trying to connect the sensor to the PC
> using a RS232 to USB converter instead of TTL to USB.
How did you do that? The DS18B20 has no matching serial interface...

> Is there any sure way to establish that?
Take a scope and measure whether any kind of communication happens at 
all. and post a schematic of your wiring.
OP #5504368
Rate this post
useful
not useful
Hello Lothar,

Thank you for your reply. I used a STM32 board in between, but I was 
trying different things, so I am not sure whether I have already exposed 
the sensor to the overvoltage.
I have attached a schematic of the current wiring, along with the 
simulink programs that I am using. The ´Target´ refers to the 
microcontroller and the ´Host´ to my PC.
I tried with a scope to check the communication, but can´t find 
indication that the communication is running.
Attached files:
Guest #5504537
Rate this post
useful
not useful
Sappy M. wrote:

> I am not sure whether I have already exposed
> the sensor to the overvoltage.

If not shure (and not able to perform a "cross-check" with code, known 
as "did work previously"): assume you did kill the sensor by 
overvoltage.

->Buy a new one.

Maybe, that is a mistake and you wastes the money for one sensor. But 
the effort is much less in comparision to the case you actually killed 
the sensor...
OP #5505395
Rate this post
useful
not useful
Thanks for the replies. So I tried using the scope again. I am indeed 
using it in between the STM32 and DS18b20. It seems last time the time 
scale was too short to see that. I can see that the STM32 is running 
fine. It sends the reset pulse and it reads the sensor as well. But it 
reads only "FF"s and if I convert it to temp I get a value of 32767.5 
degrees. Is this an indication of some fault? Can't find anything in the 
datasheet or in other forums though.

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now