Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me fix a PIC16f84 thermometer with DS18B20 sensor

Status
Not open for further replies.

Bogdan123

Newbie level 4
Newbie level 4
Joined
Oct 2, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
botosani
Activity points
1,316
pic16f84 thermometer

Hello again. I built this thermometer on this page www.coolcircuit.com/project/digitemp/, but it doesn't work properly. The LCD display only shows me TEMP: but doesn't show the sensor temperature. I note that the sensor is a DS18B20. Can someone help me to see what is not working properly?
 

Re: pic16f84 thermometer

i have temp display on lcd & 1 o\p controller throue relay. its based on pic 16f 676. if req. pl mail me on [ {shivendrakumarsahu77@yahoo.com} {shivendrakumarsahu@gmail.com}]
 

Re: pic16f84 thermometer

Hi,

The circuit shown is using the DS1820 sensor, I assume you mean you have the DS18B20 sensor, although vitrually identical the B version has a greater resolution etc that may be the reason it does not work.

Whenever I see a Pic 16F84 chip being used I usually assume the circuit is 10 years old, so many of the components use could be obselete.
Chips like the 16F628 are the modern equivalent of the 84.

Those Dallas sensors are tricky to get working at the best of times, why not used a humble NTC, very cheap and available, plus many pic circuits on the web.
 

Re: pic16f84 thermometer

In main(), try removing the \n from the second printf() call, so the code becomes:

Code:
      lcd_putc("\f");
      printf(lcd_putc,"Temp   :");
      printf(lcd_putc," %u.%u'C",temp,temp_dec);
      delay_ms(1000);

The \n in the original code causes the code to start writing to locations in the LCD driver memory which would normally be used for the 2nd line on a 2-line display, but which could also be used for the right-hand half of a 1-line display depending on the driver being used.

Given you're able to get the "Temp :" printed OK, it sounds like the LCD module you're using has a driver which is command-compatible with the one used by the coolcircuit developer, but which maps the character positions differently - by removing the \n I'm assuming your LCD maps the entire line onto a single contiguous block of memory...
 

Re: pic16f84 thermometer

Thank you for your posts. I'll make the changes ans see.
 

Re: pic16f84 thermometer

I've managed to compile the program, and now it shows the temperature, but it shows like 72 degrees C. Maybe the delay is wrong for DS18B20. Online I've found out that: "The primary specification difference between the two parts is the temperature conversion time: DS1820 = 500ms (max) and DS18S20 = 750ms (max)." The file called ds1820.c can be modified thus the sensor to show the right temperature?
 

Re: pic16f84 thermometer

Hi,

Cannot help with your C code, but you have suddenly mentioned a third sensor - the DS18S20 in to the post.

A quick search came up with this info which might help.


Quote:
There are 3 digital temperature sensors, so be sure to get the correct one. There is the 1820, 18S20 and 18B20. The 18S20 is the successor to the 1820, and does not drift over time. The 18B20 does offer faster conversions, but for me, the 18S20 more more readily available, and suits my applications fine. Be aware that the 18B20 does require different methods of temperature conversion then that described in this manual for the 18S20.
 

Re: pic16f84 thermometer

thank you for your post. what you have told me takes me in a deeper fog, because I have no programming experience, and I don't know what to do next.
 

pic16f84 thermometer

Hey is this thread still active...

Only I too could do with some help and advice...

I'm using a 16F684 with a DS18B20
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top