Connect with us

Help with DS18S20 Dual Temperature Meter

Discussion in 'Microcontrollers, Programming and IoT' started by mtb54703, Nov 29, 2011.

Scroll to continue with content
  1. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    I purchased and assembled the DS18S20 Dual Temperature Meter from ElectronicsDIY.com (http://electronics-diy.com/pic_temperature_meter.php).

    This should be rather simple project but still I'm having some problems with the LCD display and the sensors.

    1) The unit has 6 display mode, irregardless of which mode I have selected the first character on the first line of the display comes and goes (sometimes garbage when present), with the entire line shifting back and forth one character.

    2) The displayed temperature is always 32 or 31 degrees F.

    I've double and tripled checked all the connections - they appear right.

    I've got the board connected to 12v regulated supply.

    Thanks for any help.
     

    Attached Files:

    Last edited: Nov 29, 2011
  2. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    Hi mtb54703,

    Sensors looks to be correctly wired. Can you post a solder side picture?

    Olivier
     
  3. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    Update...

    I brought the board to work with me today and tried another power supply set to output 12v. Similar results as at home.

    Since the power supply was adjustable, I set it to 5v and bypassed the onboard voltage regulator (LM7805) and it worked! Looks like a bad voltage regulator (when I measured it at home, I got 4.95v, but it must have been bouncing).

    Now I get a reading on one input. I swapped the DS18S20s around and still only got one reading - on the same input. So I know both sensors are good.

    Looking at the spec on the DS18S20, it clearly states that when they are run in parasitic mode that the Vdd (pin 3) should be tied to ground. Go figure that was never mentioned in the one page sheet that came with the project.

    I might be in good shape now - will know later tonight.
     
    Last edited: Nov 30, 2011
  4. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    Update...

    Replace the LM7805... Tied pin 3 of both sensors to ground.

    Initial power on with the 12v battery source did not do anything different - one line of black rectangles on the top line of the display.

    Switched over to the 12v power supply - got the splash screen and the temperature readout. The first sensor (top line) was giving a reading, the second second line was still reporting 32 degree F (same as before). So I just let it sit - the display flickered a bit (letters, not the backlighting) and then faded away.

    After a power cycle, the display didn't show anything, repeatedly.

    I'm beginning to think this is a piece of junk. And I've sent several emails to [email protected] but I think they are just going into the bit bucket.

    I'll take it back to work with me tomorrow and try the 5v supply again.
     
    Last edited: Nov 30, 2011
  5. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    Update...

    Hooking it up to 5v bypassing LM7805 the splash screen appears and then the temperature display came up - as before top line was working (valid reading), bottom line was stuck at 32 degrees F.

    I power cycled it a few time - no change.

    I let it sit for a bit... on occasion the top line would shift left one place, then back to the right... so it appears the straight 5v didn't take of that problem.

    One thing to note, each sensor has a 1K pullup on its data line (pin 2). On the working sensor this measures about 1.010K, on the non-working sensor this measures about 0.970K Ohms.

    Also I connected the display to another testboard, it didn't have pins for the backlite, but other wise it behaved correctly. Of course it was probably being used in 8bit mode rather than 4bit mode.

    So there are three issues:

    1) PIC doesn't appear to run unless it's directly connected to 5v bypassing the LM7805
    2) No input from the second DS18S20 even after connecting pin 3 to ground.
    3) Top line of the display shifts left and right one character (loosing first character on the line).
     
  6. duke37

    duke37

    5,364
    772
    Jan 9, 2011
    Perhaps the 7805 is oscillating, try adding a capacitor across the input and output, say 10microF on input and 100nF on output.
     
  7. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    There a capacitor between the ground and the LM7805 - according to the component list it's 100nF.

    Also, poking around at schematics for other temperature meters that use the DS18S20, they all have a 4.7K pullup on the data line to the sensor - this project as 1K.
     

    Attached Files:

    • sch.jpg
      sch.jpg
      File size:
      120.3 KB
      Views:
      523
  8. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    Having gotten totally frustrated with his project (not to mention a bit confused) I recreated it on a breadboard. The PIC was socketed and I had the other pieces necessary less the 10K pot, but found that 2.2K resistor provided the right amount of contrast.

    Power supply is now a 12v 5Ah sealed lead acid battery. Output is 12.44v and the output of LM7805 is 4.99v (it's also 4.99v on the leg of the PIC). I also added a 100uF capacitor on the input side of the LM7805. I brought it to work with me today and will hook it up to scope to check for voltage ripple when I get a chance.

    Otherwise it appears to almost work on the breadboard - both sensors are giving a reading. On the PCB I had tacked the sensors right to the headers, now there is a 4" wire between the leg of the sensor and the input pin of the PIC - I'll play with a bit and see if that really makes difference or not. The sensors are still using parasitic power with a 1K pull up resistor - the pull ups on the PCB were suppose to be 1K but one measures at .987K and the other at .999K, both pull ups on the breadboard are .997K and .995K.

    As for almost working - I'm still missing the character in row 1, column 1, occasionally the first line will still shift left and right one column, and it appears the PIC reboots every once in awhile since the 'splash screen' shows again on the display.
     
  9. OLIVE2222

    OLIVE2222

    690
    25
    Oct 2, 2011
    mtb54703,

    Don' worry about resistor values, they are tolerance applied, having 0.997 K is OK. I am not a Microchip guru but to me the circuit lack a pull-up resistor on reset pin (4), 10K to +5V will be OK, can you try that?
    Olivier
     
  10. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    I can give it a try.

    Looking at the spec on PIC, whether that pin is an input or reset depends on what it was configured as.
     
  11. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    I had a 4.7K handy, that didn't make any difference in the missing character. I'll see if I can round up a 10K.

    Also, I found another 5v LCD display and plugged that into the breadboard, still missing the first character on the first row, with a bit more shifting left/right of the top row of the display. The LCD that came with the display appears to work fine on another development board here at work.

    I'm wondering if the display problem isn't coming down to a timing issue, possible the display isn't the one the firmware was originally written against.
     
  12. mtb54703

    mtb54703

    9
    0
    Nov 29, 2011
    Update...

    So tonight I decided to focus on why the DS18S20s worked on the breadboard, but not on the PCB. After some careful ohming I decided there must be a short of sorts under the header for sensors on the PCB. The reading between pin 1 and pin 2 (data & ground) on sensor 1 was 4.27K Ohms (working sensor) and sensor 2 was 220 ohms (non-working sensor).

    So I unsoldered the header and pulled it off. I replaced the header with 6" wires and ran them to the breadboard were I plugged into the DS18S20s. That did the trick - reading for both sensors!!

    Last problem is the dropping of the first character of row one - comes and goes, causing the row to shift the left, then back to the right.

    For reference, the contact page for Electronics-DIY.com lists five emails: info, sales, bulk, order & support. I've sent a couple emails to all five, but still no reply. Interestingly too, the address given for the seller on my PayPal receipt is a residential address in Flushing, NY.
     
    Last edited: Dec 2, 2011
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-