ds18b20 and 28x problems

Pelle

New Member
Hi
I'am developing a temp and humidity logging system and I have some problem with the ds18b20 sensor. I bought 3 but burned one. The I bought 4 more and none of them work properly. I get some readings that is okay but some times I get wery strange readings. I get things like 84, 35214 (some thing), 1, 85 and so on.

I have two sensor that works fine and I have tried to switch inputpins but that does't help.

What is the problem?

Since this system must be up and running in 2 weeks. I realy need some help. I bougth the sensors from tech-supplies.

Regards
/Pelle
Sweden
 

BeanieBots

Moderator
Some very early PICAXEs had a firmware issue reading the DS18B20 (which I personally never had).
I can't remember the firmware version but there is a simple test.
Not knowing your exact hardware it is hard to suggest the best test but if you can set up a loop with a readtemp command in it so that you can estimate the time taken to make a reading.

loop:
toggle 1
readtemp 1,b0
pause 100
goto loop

If the LED flashes many times per second, you have the old firmware.
If it flashes about once a second, you have the new firmware.

Oops, forgot to mention that the program assumes an LED on pin 1. If your harware won't allow that test, maybe you could devise some other test to get a rough timing for the command. The old is a few milliseconds, the new takes 750mS.

Edited by - beaniebots on 21/03/2006 18:58:47
 

Pelle

New Member
Hi and thanks for the help.

If the firmware is to old why does it work with two of my sensors? I bougth the picaxe this year so I hop it has a new firmware. The editor says that it is Firmware 7.6 Version 6

/Pelle
 

manuka

Senior Member
"Burned one"? What sort of temps are you checking?!! Suggest you detail your setup- supply voltage, measuring environment etc & also try the DS18B20s with a 08M instead- that should get around any firmware hassles. I've never had a problem with DS18B20s on 08M/18A/18X Picaxes & have used scores.
 

BeanieBots

Moderator
I agree with Stan. I've used loads of them with no problem even with the old firmware but others have had problems.
For the full in-depth chat on the firmware issue, read this thread.
http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=1316
If your PICAXEs really are new and came from Rev-Ed, then it is probably not that.
Power supply could be an issue.
What are you using? Voltage etc?
Is there anything else in your circuit such as a motor or hobby servo that might cause noise or pull high currents?
 

Pelle

New Member
Hi Stan
I mounted one the wrong way + to - and - to +.

I have 3 DS18B20 to measure air temp and 2 HIH3610 to measure RH in the air. I have a 4.56v power supply. The readings are sent with the serout to my computer and a Delphi applicatinon proccess the data and return a signal to the Picaxe so it can pull a Relay.

The Picaxe's program is a loop that reads one sensor at the time and then sends all the data at the same time. Then it waits for a serin from my computer.

/Pelle
 

BeanieBots

Moderator
Have you eliminated any possiblity of your software being to blame?
Setup a very simple loop such as:-

Loop:
Readtemp 1,b0
Readtemp 2,b1
Readtemp 3,b2
debug
goto loop

Does such a loop give sensible readings?
What sort of supply are you using? batteries?
Do you have any decoupling capacitors fitted?
 

Pelle

New Member
I have build that supply that is shown in the pdf-manual (7805). I have tried to run the readtemp loop with 1, 2 and 3 sensors and 2 sensors give fine readings and the rest of them give me crap. I tinking of buy a analog sensor. Maybe i can get it up and running before April 1. This is a univerity examwork, so i am in a bit hurry.
 

Michael 2727

Senior Member
I ran one of these up to 12.2V accidentally
twice.
Somke even came off it, it still works fine.
They are fairly tough little sukkers.
 

BeanieBots

Moderator
If you are only seeing 4.56v from a 7805 regulator, then something is probably wrong with your supply. I would guess that it is oscillating which is quite common if there is no high frequency decoupling on both sides of the regulator.
Besides that, there is very little that could be wrong besides an error with the circuit. Both the PICAXE and the DS18B20 are very reliable.
 

Dippy

Moderator
What sort of supply are you 'feeding' the 7805 with?
E.G. Batteries? Crummy noisy cheap mains adaptor? What voltage?

As BB said, 4.56V from a 7805 sounds like you have done something wrong.. or the 7805 is duff. (You didn't 'burn' it when you 'burnt' the other thing did you?)

Have you got electrolytic caps the right way round?
What current is it drawing?
If the components are OK it sounds like you'll have to get back to basics.

I assume you're not feeding the 7805 with 3 or 4 AA 1.5V batteries ???
 

Pelle

New Member
Hi
I was feeding it with a old 7v adaptor. I tried to use 4 AA 1.5V batteries insted of the supply but there is no differens.

Can it be the cables? How long can I use? I have aboute 5-10 meters now.

Why does 2 sensor work fine?
What analog temp sensor can I use?
/Pelle
 

Pelle

New Member
Hi
I was feeding it with a old 7v adaptor. I tried to use 4 AA 1.5V batteries insted of the supply but there is no differens.

Can it be the cables? How long can I use? I have aboute 5-10 meters now.

Why does 2 sensor work fine?
What analog temp sensor can I use?
/Pelle
 

BeanieBots

Moderator
Should be OK with that length of cable but try with short cables even if just to eliminate them.
You really must go back to basics when there is no obvious cause and eliminate as many possibilities as possible.
Only at that stage should you start accepting the fact that the chips might be no good. That is the least likely of all possible causes but must be considered eventually. Also, what is their history? I've seen people connect 9v to a PICAXE, have it fail (what a surprise) and then spend hours messing with the download circuit trying to get them to work again. Once killed, they remain dead!
I know how frustrating it can be trying to get something to work but you must get the basic bits right first. Your power supply is clearly wrong which does not help. Just for now, use 3 batteries to give 4.5v and keep the leads short.
 

manuka

Senior Member
Agreed - &quot;<i>All the way with AAs </i> &quot; should be the motto when prototyping. Stay right away from mains plugpaks/7805s &amp; even bench PSUs until the prototype tamed. 3 x 1&#189; V AAs (hence 4&#189; V supply) are viewed as the Picaxe standard &amp; with power drains ~ mA range these last weeks-months.

Pele - see 08M layouts that may suit =&gt; www.picaxe.orcon.net.nz/bread08.jpg <A href='http://www.picaxe.orcon.net.nz/bread08.jpg ' Target=_Blank>External Web Link</a> &amp; a 433MHz wireless version =&gt; www.picaxe.orcon.net.nz/433rpt.jpg <A href='http://www.picaxe.orcon.net.nz/433rpt.jpg ' Target=_Blank>External Web Link</a>
Stan
 

BarryP

Senior Member
Can You Swap arround the sensors actual location to see if the fault follows ?

Bumped into this today. Only about 2 years old ...
--- DS18x20 EEPROM Corruption Issue on revision B7 die. This effects the popular DS18B20, DS1820S, and DS1822.
----

<A href='http://www.1wire.org/en-us/dept_68.html#item_131' Target=_Blank>External Web Link</a>
May not be your problem but Heh.
 
Top