1

I'm working on a project of my home plants irrigation/hydroponic system(not cannabis!)) just chilies and other eatables). Also I'm trying to recycle modules, wires and other projects' leftovers such as Digispark ATtiny modules. I'd to use it as a slave controller to pass some sensors' data to master-controller. (Sensors are soil pH, moisture sensor, water counter, PIR as a cat detector). Now I'm looking for a way to reuse Digispark USB-connector(3 and 4 pins) as a communication bus. Those pins have pull-up resistors and diodes attached to, so that's why it could be difficult. My goal is to reduce extra components count, reuse old micro-usb wires, connect digispark slave controller using existing USB connector. And optionally save the ability to program digispark via the same connector. I'd like to use 1-wire/i2c protocols for communication, cause it would be better to connect multiple slave-devices on the same bus. So here are a few troubles:

  1. choose of the protocol. I2C sounds better, but the popular library TinyWireS use USI pins to communicate which are different to USB pins. 1-wire looks suitable, and it also have pullup resistors on the bus.
  2. voltage shift on these pins
    How do you think Is it possible to connect multiple 1-wire slave digispark devices on the same bus. Do I need an optocoupler or logic level convertors? Here is a schematic
fortl
  • 11
  • 3
  • It sounds like you're describing a project. I see two actual questions, neither of which, if answered, would seem to satisfy the whole of the thing. What is the overarching question? – timemage Feb 25 '21 at 19:31
  • @timemage fixed the question to be more clear! – fortl Feb 26 '21 at 07:51

0 Answers0