Author Topic: Reliable long 1-wire driver  (Read 1452 times)

0 Members and 1 Guest are viewing this topic.

Offline LukeWTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
Reliable long 1-wire driver
« on: November 14, 2018, 02:00:39 pm »
Maxim's application note here has much detail on reliable 1-Wire networks with relatively long cables - capacitive loading, reflections, etc.

https://www.maximintegrated.com/en/app-notes/index.mvp/id/148

Appendix A's "Improved CPU Bus Interface" shows a circuit for reliable operation, but it uses two microcontroller port pins.

Ideally, I want a circuit that can be a "drop in replacement" in series with a single data line, in a pull-up 1-Wire bitbanging arrangement - I don't want to change the code or use an extra GPIO pin. Is there any way to realistically get rid of it?

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9935
  • Country: us
Re: Reliable long 1-wire driver
« Reply #1 on: November 14, 2018, 02:35:25 pm »
Not with that circuit.  The FET does the signalling by pulling the signal line low but it's not possible to sense the line state.  So, the top pin is used to sense and the bottom pin is used to drive.

Just guessing...
 

Offline LukeWTopic starter

  • Frequent Contributor
  • **
  • Posts: 686
Re: Reliable long 1-wire driver
« Reply #2 on: November 15, 2018, 01:04:22 am »
Does anybody have a code example (PIC, AVR, Arduino, whatever) that can support 1-wire in these multi-pin configurations in large networks?
 

Offline JVR

  • Regular Contributor
  • *
  • Posts: 201
  • Country: be
Re: Reliable long 1-wire driver
« Reply #3 on: November 15, 2018, 10:22:33 am »
LINBus not what you are looking for?
 

Offline kony

  • Regular Contributor
  • *
  • Posts: 242
  • Country: cz
Re: Reliable long 1-wire driver
« Reply #4 on: November 15, 2018, 03:20:32 pm »
Seconding the LIN suggestion. It is very resillient and well prooven. With bit of modification of the protocol, you can even add slaves IRQ. I have used it for modular system of actuators and sensors in past, and it made it very flexible for customisations, yet robust.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: Reliable long 1-wire driver
« Reply #5 on: November 15, 2018, 05:41:55 pm »
Does anybody have a code example (PIC, AVR, Arduino, whatever) that can support 1-wire in these multi-pin configurations in large networks?

You would just have to modify the existing code to use a separate input port and output port for writing and reading instead of using the same... doesn't seem that hard :)

Edit:
I don't want to change the code or use an extra GPIO pin

Those two statements seem a bit contradictory...  ;D
Unless... you don't have access to the original code. In which case you'd have to rewrite the whole software anyway. :-//
« Last Edit: November 15, 2018, 05:47:58 pm by SiliconWizard »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Reliable long 1-wire driver
« Reply #6 on: November 21, 2018, 03:37:29 am »
The first thing I would do to improve reliability is replace the pull-up resistor with a current source.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf