Author Topic: Back to the OneWire DS2502 and its programming Voltage (12V)  (Read 393 times)

0 Members and 1 Guest are viewing this topic.

Offline jwhitmore

  • Regular Contributor
  • *
  • Posts: 141
  • Country: 00
  • Software head strays into the Hardware.
Back to the OneWire DS2502 and its programming Voltage (12V)
« on: March 08, 2018, 02:44:16 pm »
This is a project which I keep coming back to as I've never solved the problem of switching the programming voltage (12V) to the DS2502 and turning it off again, without potentially upsetting the uC. I'm sure there is a simple fix for this, possibly a high value pull down resistor? But it's in the beginner section for a reason.

The difficulty is going to be communicating the necessary information, and a question that can be answered, but here goes.

So I have three pins of a uC connected to a "programming" circuit. They're labeled in the schematic:

PD0  - This pin is the uC's connection to the One Wire bus. It has to be disconnected from the One Wire Bus when 12V Programming pulse is applied to the line. (The DS2502 requires a 12V programming pulse to write data to the write once EEPROM.)

Disconnect - This pin controls disconnecting the PD0 pin of the uC from the One Wire Bus when the programming voltage is applied. So when it is High it "turns on" Q2 pulling the gate of Q1 to ground so Q1 is "turned off", disconnecting the uC from the One Wire bus.

Program - This pin controls connecting the 12V supply to the One Wire Bus. When it is high it "Turns on" Q3 shorting the gate of the P Channel Q4 to ground, "turning on" Q4.

At present I've got the two control lines, "Disconnect" & "Program" connected to the uC but not the "PD0" pin, just checking its behavior during the transition from 3v3 to 12V on the One Wire Bus and back again.

When the 12V programming pulse is connected to the One Wire Line it all behaves. PD0 is temporarily pulled to ground but that's not going to harm anything.

The problem is that when I turn off the 12V programming pulse there is a spike on the line. I've separated the two control lines so that I can turn off the 12V connection to the line and after a short pause I can reconnect the uC pin 'PD0' back to the One Wire Bus. I'll try to attach two scope traces to this question with the following key:
PD0           - Yellow trace
Disconnect - Blue
Program    - Pink

At present I have a very short delay between turning off the 12V programming voltage and re-connecting the uC to the One Wire line. It's 272nS according to the scope trace but I've tried longer delays and it makes no difference at all.
So now given that spike I assume that, even though the 12V is disconnected, when the pink line, 'Program' goes low in the scope trace, there is stray capacitance on the One Wire so the 12V charge has no where to go. So is the answer to attach a high value pull down resistor, say 1M, to the DS2502 side of the One Wire bus? That'd mean a pull resistor to the 3v3 on the uC side of the bus and a 1M pull down on the DS2502 side, but is that a problem?

I hope that makes a little bit of sense to the reader.

I'm going to solve this puzzle eventually, with a lot of help :-(

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo