Reverse polarity protection 1-wire DS18B20  temp sensor - Page 1
Forum section: electronics / beginners

author: scott216
author_rank: Regular Contributor
timestamp: March 18, 2014, 01:05:57 pm
content: I discovered by accident that switching ground and Vcc on a DS18B20 temp sensor makes it get very hot! Oops. I'm building a PCB with some of these temp sensors located remotely to the PCB and I'd like to put have reverse polarity protection for them. The data sheet says these are good down to 3 volts. My circuit runs on 3.3 volts (using Arduino Pro Mini). I'm leaning toward putting a diode on the Vcc line to the temp sensor? I think a normal diode with it's 0.7 voltage drop would have too high a drop, but a Schottkey diode should probably work. What do you think?

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 18, 2014, 01:21:50 pm
content: First thought: You can't reverse a 1-wire deviceIf it is about protecting the sensor you could also put a diode over the gnd-vcc connections and put a protection resistor/fuse on your controller board.

author: sleemanj
author_rank: Super Contributor
timestamp: March 18, 2014, 02:23:31 pm
content: See

author: mortos360
author_rank: Regular Contributor
timestamp: March 18, 2014, 02:31:25 pm
content: I dont know much about electronics, but wouldnt something like this:http://www.newark.com/fairchild-semiconductor/mb6s/diode-full-reel/dp/67R2096a small bridge rect. also do the job... or is that a big no no?

author: tszaboo
author_rank: Super Contributor
timestamp: March 18, 2014, 03:15:56 pm
content: http://nandblog.com/reverse-power-supply-connection-circuits/Diode, NFET, PFET, or schottky. Please keep in mind that you will need (most likely)a logic level MOSFET. Something like Si1012CR is good, make sure the VGS is low enough.You should also test, how the sensor behaves, if the communication is on, but the power is off.

author: DmitryL
author_rank: Regular Contributor
timestamp: March 18, 2014, 03:53:19 pm
content: Quote from: scott216 on March 18, 2014, 01:05:57 pmYou can also try putting a diode (it doesn't have to be shottky) "antiparallel" with your sensor. In the worst case scenario you'll short your data/power line with this diode, which should be OK.

author: kripton2035
author_rank: Super Contributor
timestamp: March 18, 2014, 04:03:46 pm
content: Quote from: PA0PBZ on March 18, 2014, 01:21:50 pmas said you can use the "parasitic power" system to have only one wire to the ds1820 and so have no problem of inversing the only wire to the sensor !

author: scott216
author_rank: Regular Contributor
timestamp: March 18, 2014, 04:45:57 pm
content: Thanks for all the feedback. I'm not reversing the 1-wire on purpose, I don't expect it to work like that. I'm just protecting it from heating up if it's wired incorrectly. The 1-wire only draws 4mA when it's active, I have 4 of them, so that's 16mA. If I look at the Vfm vs Ifm chart for a STPS2L60 Shotkey diode the voltage drop is basically zero. Is that right? Seems to me that should work, unless there's some sort of interaction with the 1-wire data that I'm not aware of.

author: sleemanj
author_rank: Super Contributor
timestamp: March 18, 2014, 07:49:51 pm
content: Quote from: scott216 on March 18, 2014, 04:45:57 pmProbably you will find it drops about 0.3v to 0.4vThat is a power device, it's not specified for a few mA.But you can see that the chart bottoms out at about 0.3v, indicating that this is about as low as it's going to get (that is to say, the chart indicates that it can conduct 0A at around 0.3v and below).

author: uwezi
author_rank: Unknown
timestamp: March 18, 2014, 08:55:23 pm
content: The MOSFET solution from the video will probably be very difficult to realize with the low supply voltage of a DS18B20. What you didn't tell us yet is whether you connect the DS18B20 using parasitic power or active power - which is quite important, since you cannot put a series diode into the data wire.

author: scott216
author_rank: Regular Contributor
timestamp: March 18, 2014, 11:07:29 pm
content: Quote from: uwezi on March 18, 2014, 08:55:23 pmI'm using active power

author: Psi
author_rank: Super Contributor
timestamp: March 18, 2014, 11:11:23 pm
content: Assuming you want to protect each sensor IC from being connected backwards to your main PCB...A diode in series with VCC and a 1k resistor in series with DATA should be all that's required to protect the sensor from all possible connection combinations.It's got a digital output so dropping VCC by the diodes 0.4-0.8V isn't going to cause any problems (chip can run from 3.3V).And a 1K resistor in series with DATA limits it to < 5mA if shorted to 5V (without interfering with data coms)If your worried about the diode drop causing problems due to the sensor running from 4.2V and a 5V signal feeding into the DATA pin, it shouldn't be a problem. The resistor in the data line should prevent DATA from being pulled too high.Unless i missed something?

author: scott216
author_rank: Regular Contributor
timestamp: March 19, 2014, 02:13:34 am
content: I put a 1N5819 Schottkey diode inline on the Vcc line and the temperature sensor still worked fine. But when I added a 1k resistor in series on the data line, the sensor stopped working. My Vcc and data pin are 3.3 volts. Voltage drop across the diode is about 0.2 volts. I also have a 2.2k pullup resistor on the data line.

author: kripton2035
author_rank: Super Contributor
timestamp: March 19, 2014, 07:19:17 am
content: IMHO the easiest way is to use connectors like JST where you cannot insert it the wrong way.use an audio cable with ground (shielded) red and white cables to check the olarity when you make the cablesand then it will be impossible to insert the probes the wrong way.

author: uwezi
author_rank: Unknown
timestamp: March 19, 2014, 11:00:58 am
content: Quote from: scott216 on March 19, 2014, 02:13:34 amEven for digital signals, Ohm's law applies and you built a voltage divider between your series resistor and the pull-up. I assume from your description that you have the pull-up on the controller side of the series resistor.Then your DS18B20 will only be able to pull the line to 1/3 of Vcc when drawing its output to zero. Use a weaker pull-up, something like 10k and it should work...

author: Psi
author_rank: Super Contributor
timestamp: March 19, 2014, 11:06:18 am
content: Could also drop the 1K to 470R, 15mA is unlikely to damage the output.

author: scott216
author_rank: Regular Contributor
timestamp: March 21, 2014, 11:44:11 am
content: Quote from: uwezi on March 19, 2014, 11:00:58 amI changed the pull-up to 10k and it worked.