0
\$\begingroup\$

The 1-wire bus data line is connected to a microcontroller pin (through a level shifter) with open drain configuration. The bus is pulled up to 5 Volts (DVDD) with a 4.7k resistor. The communication works but unstable due to a high level of noise measured on the long (~20-30m) bus wire, so I decided to add a low-pass filter circuit to the bus. My question: should I add the filter in between the microcontroller pin and the pull-up, or should I keep the pull-up next to the open drain pin, and add the filter after this circuit (as it is currently on the schematics below)?

The Schematics: enter image description here

\$\endgroup\$
  • \$\begingroup\$ The level shifter will make the signal weaker, the 4k7 pullup is weak, and the rc filter might make it worse. Some have the 1-wire bus working up to 10 meters, so 30 meters might be too long. Start with a good shielded cable, for example a cat5 cable. Try a pullup resistor of 2k2. Try without the level shifter. Maxim has many things to read. Here is an overview of the application notes: maximintegrated.com/en/an_prodline2.cfm/prodline/21 and this one is about long distances: maximintegrated.com/en/app-notes/index.mvp/id/148 \$\endgroup\$ – Jot Apr 10 at 8:17
  • \$\begingroup\$ I was connecting directly the bus to the micro without a level shifter, running on 3.3V with a stronger pull-up. However it was even worse, this is why we moved to 5V with a level shifter. The stronger pull-up is a good idea, I will try to decrease from the 4.7k. On the other hand I still want to add the opportunity for a filtering circuit (as I plan the PCB), so the question above is still open ;) \$\endgroup\$ – balas Apr 10 at 11:38
  • \$\begingroup\$ There should be pullup resistors on the microcontroller side as well. When the microcontroller pulls a signal down, it has to pull down the signal from both sides of the level shifter, so it must have enough pull down current for the resistors r2 to r5. The 5v level can have more noise but the level shifter makes the signal weaker. It is all very trivial. Can you give numbers how unstable it is? If only 1 in 3 is bad, then you can ignore those. Do you use three wires for the 1-wire bus? Then you can add decoupling capacitors to 5v and gnd at the sensors. \$\endgroup\$ – Jot Apr 10 at 14:04
  • \$\begingroup\$ It remains stable for hours and then gets unreliable and needs a full power cycle to recover ~ in every 5 mins. The symptom is that the bus starts floating around 1.7 - 2 Volts, sensors may just go into a continuous reset. In these situations even the power circuit drops from 5Volts to ~2 Volts. I use 3 wires (GND, VCC and Data) in Cat6, not using the parasitic mode. I suspect the whole problem can be caused by the high level of noise as there are huge pumps in the room. Measured a noise on the wire sometimes about 1-2 Volts amplitude with a scope. \$\endgroup\$ – balas Apr 10 at 16:31
  • \$\begingroup\$ That is a serious problem. You might need a more robust industrial communication. For example with twisted pair, rs485 with error recovery in software. Perhaps you can turn off the power for the 1-wire for a while and try again. A length of 10 meters is already long for 1-wire and a length of 30 meters in such an environment is asking too much. I don't know if the rc-filters will help. If I would try a rc filter, then I would use a single rc filter close to the cable. \$\endgroup\$ – Jot Apr 11 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.