DS18B20 temperature sensor on pin 3 of 08M?

Emil

New Member
Hey all.

I've just made up a PCB (first since high-school!) designed to run a cooling fan in my AV/TV cabinet. Regulator, IR receiver and fan via PWM all work great. However I've also got a Dallas DS18B20 temperature sensor on the board that's all wired up to Pin 3 on my Picaxe 08M. I'd tried the sensor on a breadboard for testing and all worked fine. But now that I'm working on the final program for my little project I'm getting compile errors when trying to read the temperature on Pin 3. Am I right in guessing that Pin 3 of the 08M can't be used with the Dallas DS18B20 sensor? I can't find anything to suggest this in the Picaxe PDFs but on the Dallas specsheet it does appear that the DS18B20 both sends and receives data via it's "one wire", which would explain why the input-only Pin 3 ain't working for me.
Am I right here? Any assistance would be greatly appreciated :) I spent all yesterday etching, drilling and mounting components on my PCB so I'm a bit bummed out now that it isn't working as planned :(
 

hippy

Ex-Staff (retired)
Am I right in guessing that Pin 3 of the 08M can't be used with the Dallas DS18B20 sensor? I can't find anything to suggest this in the Picaxe PDFs but on the Dallas specsheet it does appear that the DS18B20 both sends and receives data via it's "one wire", which would explain why the input-only Pin 3 ain't working for me.Am I right here?
Absolutely right for the reason you've discovered.
 

manuka

Senior Member
Bugger indeed! A classic reason why breadboards are highly recommended. But you may be able to save the day - just use a NTC thermistor to pin3 & rehashing the code accordingly. For cooling fan control a rocket science DS18B20 is almost an overkill of course (& is quite costly too), & IMHO the broader thermal response of an NTC should be quite adequate for fan control. Phew - with only minor hardware changes (mostly 2 NTC wires instead of 3 DS18B20), that PCB may still do after all!
 

Technical

Technical Support
Staff member
This is explained under 'readtemp' command in part2 of the manual. You can't use 0 or 3.
 

Emil

New Member
Thanks for the responses guys.

Yes, I've managed to now find in the PDF manual where it says not to use pin 3.. I must have read that section a dozen times.... and missed it still! Eh!

I did actually breadboard my design but shuffled it around a bit when I made my schematic/pcb so messed it up :(

I'm not sure about using a NTC on pin 3 as I think that would need a ADC pin, which pin 3 of the 08M isn't. But I've still got a remote controlled fan PCB so should be able to use that for something...

I just received my license to Picaxe VSM so hopefully this will help me avoid similar oopsies in the future :) Next step I just gotta look at how to convert from Picaxe VSM to a PCB package...
 

premelec

Senior Member
Emil - it shouldn't be toohard to cut the trace to pin 3 and take it to a proper pin with a skinny wire soldered... or exchange two pins with two cuts and wires - then just re-write your program or symbol numbers... I've done this sort of thing _too_ many times - but it does work... have fun...
 
Top