Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

JUnebug with OW device

Status
Not open for further replies.
Tried your new code but still get same temp reguardless of ACTUAL temp.
Still wondering about the math and if it is only reading the temp one time.
I used a sensor that sat in the freezer all night as well as one sitting on the breadboard all night.
Same temps = 85C
I wonder WHY none of the other codes work? or at least display the ROMID#
tried the code that David Barker has in his tutorial = nada
I can't see how 5 sensors don't work. Only one was inserted backwards but still displays same temp, its own ID#.
 
The power on value for the temperature is 85C which means it is not doing the conversion. I have no idea why it isn't working and dont have a DS18B20 to test it with.

The only thing I can think is somehow the supply isn't stable. Are all the solder joints around A3 and A4 good? Could you possibly have a dry joint on A3?

Mike.
 
Will recheck everything over again.
Would think that the other codes should work as well but??
 
85C is the default software reset value.......from what i read you get this value when there is a read error etc. when i was playing with theese sensors i sometimes got it when the temp changed rapidily, i had to slow the readings right down. i will see if i can find the info i had with details of it
 
i have dug a little more... do a google for ds18b20 c error code, seems there are a few reasons for the error but... for the 18b20 the majority of theese errors are caused by using a DS18B20 PARASITIC TYPE, i would double double check you have the non parasite version, yes i know you can use any ds18b20 in parasite mode but there is a version of the sensor that can only be used in this mode. hope its of some use
 
how does one check if its a parasitic type?
I looked at sensor and on the back flat side it looks like it says DS18B20 then the ROM#
on the curved face it has a small round engraved spot with a P in it.
This could be a Parasitic type?
If it is how to read temp?
 
According to the data sheet if I am reading it right is that you can run either method (Parastic or external power)
The problem I am having is I have several code samples and only one actually displays the ROM# and 85C
Using a Junebug with the DS18B20 connected to the CON 3 port (A4, A3, grd)
 
According to the data sheet if I am reading it right is that you can run either method (Parastic or external power)
The problem I am having is I have several code samples and only one actually displays the ROM# and 85C
Using a Junebug with the DS18B20 connected to the CON 3 port (A4, A3, grd)

It depends on what you are using the Pins for.
The sensor has a bus, pwr and gnd connection. It is quite possible the code is using one of the PORTA bits as power.

Do you mean CON4 on the JB schematic. It has RA3 RA4 and GND.

RA4 has the pullup so it has to be connected to the data/bus pin on the sensor.

You can either short the sensor power pin to the data pin for parasitic power or connect it to RA3 making sure that RA3 is an output and high.

Some of this is from memory.
 
Last edited:
On another thread you seemed to indicate that you had dip switch 7 on thus connecting VR2 to RA3. If you have then this will stop it converting. You should only have switches 1 to 4 on.

Mike.
 
I have tried the dip switches both ways
A4 is connected to the data pin.
the way I read the data sheet (it has no mention of parasitic sensor only) but all the sensors are the same.
I have several of the potted sensors ordered so will give it a go again when they arrive.
 
the data sheet for it is here https://datasheets.maxim-ic.com/en/ds/DS18B20-PAR.pdf it shows pin 3 as No Connection, there are loads of forums around witch mention problems with the DS18B20 pasitic type for example CCS :: View topic - DS18S20 & DS18B20 Codes , and i think the P on your sensor does indicate it is parasitic mode only, but i could be wrong on that

there is also a post here https://www.mikroe.com/forum/viewtopic.php?p=62321&sid=2f44a312dfd43c32d0780e52de3b900d and again its the same problem not being able to get any reading except 85C,and it is also the parasitic power only type.
 
Last edited:
I took another look at the flat side and I could make out the part number as 18B20
then below it is what looks like a Rom#
I see no P on flat side.
But the front does definitely has a P
Contemplating E mailing Maxium and ASK
If It is a PAR then the code I am using I guess won't work?
The sata sheet that covers both sensors does not mention two separate sensors?
 
Either I never noticed the -PAR parts or they are new since I last worked with the datasheets. The parts I have are mostly DS18B20+.

But the front does definitely has a P
Then I would feel safe to say it is a PAR part.

At this point I would look at the delays required by the PAR and non PAR parts to see if they differ.

Read the links provided by ghostman and see if there is any help there.

Let us know.
 
apparently the parasite parts have been around a fairly long time, however they are very badly documented by maxim, i came accross them purely by accident. i think from the little i can remember from what i read that your spot on with the timing issues 3v0, but it seems the vast majority of people give up with them and go for the non parasite type, as you can use them in eigther mode with no code change....i will see if i can dig up the posts i found on it

i found this in the datasheet " The 1-Wire bus must be switched to the strong pullup
within 10 μs (max) after a Convert T [44h] or Copy Scratchpad [48h] command is issued, and the bus
must be held high by the pullup for the duration of the conversion (tconv) or data transfer (twr = 10 ms)." alto of the trouble i read about related to the timeing
 
Last edited:
there is also a link here where they seemed to solve the problem in parasite mode, i know its in C but it might give you clue of what to alter CCS :: View topic - Trouble getting a DS18B20 to work in parasite power mode...

sorry to keep posting but i have dug a bit and indeed the parasite version only has a very discrete p on it as an indecation. so it looks like you will have to reread all the data sheet timing info useing the data sheet i posted or................do what it seems most do and get the non parasite version of the sensor
 
Last edited:
I have some of the potted probes ordered.
Hopefully they are NON-PAR types.
I ordered direct from SURE ELECTRONICS.
The TO-92 package sensors I ordered were from Ebay. No indication they were PAR or not.
 
i exspect what you got from ebay were maxim samples, as it seems maxim tend to send out the par sensor more often than not. a few months ago i had some samples from maxim and theese were parasitic type but i never got round to using them.
 
i decide to have a delve into it and from what i can tell according to what ive read it seems the problem is with the switching the power in under 10us, it seems most compilers strugle to do it and return the read in under 10us, anyway thats about as much info as i can come up with. at least you know when you use the new sensors it should work straight off
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top