Author Topic: One Wire Sensors  (Read 13768 times)

Taranabas

  • Newbie
  • Posts: 10
    • View Profile
One Wire Sensors
« on: December 15, 2017, 09:03:50 AM »
Has anyone managed to/found any resources for interfacing Dallas Semiconductor One Wire sensors to a Tri Plc? It would be a really nice way to save I/O on a Nano as you'd be able to connect many sensors to one input. As far as I can tell, this is not possible with the current firmware - but perhaps this is something that could be implemented in the future or as a module interfacing to the 2x5 header similar to the the I2C module?

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:One Wire Sensors
« Reply #1 on: December 15, 2017, 02:15:52 PM »
I would suggest using a low cost micro controller such as an audrino based system.  Interconnect the audrino and the PLC via RS232/RS485.

Have the audrino handle all of the one-wire, I2C, SPI ... communicators. The audrino can handle this stuff fairly easily.

The PLC doesn’t get involved with the bit fiddling but just gets the data it needs from the audrio via the serial interconnect.

Gary D*ckinson

Taranabas

  • Newbie
  • Posts: 10
    • View Profile
Re:One Wire Sensors
« Reply #2 on: December 15, 2017, 03:06:18 PM »
That is precisely what my plan of attack is, but it feels like a pretty roundabout way of doing it. Incidentally, for anyone who's interested in doing this, there's a pretty Arduino sketch for handling One-Wire here: http://www.cupidcontrols.com/2014/10/moteino-arduino-and-1wire-optimize-your-read-for-speed/
« Last Edit: December 15, 2017, 03:09:10 PM by Taranabas »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:One Wire Sensors
« Reply #3 on: December 15, 2017, 06:31:33 PM »
Thank you for your suggestions.

If you are using the FMD PLCs, or developing a SmartTILE-Fx based custom PLC you could use the I2C interface (require the I2C-FRTC module for FMD) to interface with other electronic components that support the I2C interface. I2C interface is a much more popular, faster and more robust communication interface than 1-wire.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS