usb hub/leads as a I2C transport medium

Hi

Please forgive my ignorance of hardware, and electronics, I have a couple of questions that my late night browsing has failed to answer..

I have a project in the making to automatically water conservatory plants based on a resistance check of a number of 2 x SS soil poles diy sensors.

currently it uses an 8x relay board to switch the pumps on and off for different areas, it works but is overkill so i am looking at using tp120 transistors to switch the pumps on and of instead. reducing the box size considerably too.

im currently using a usb hub that i have soldered +ve wires to each ports +ve solderpad for switching and have joined up the -ve solderpads on a common ground wire to supply power to the pumps which are all fitted with usb plugs. (DC pumps 5-9v 3w)

the hub is nice as it also has built in switches to turn on power when thats supplied over the common +ve in solderpad too :) so i can simply water an area independently of the controller by flicking a hub switch too..

But when i look at all the TP120 examples and how to pages i find instead of switching on the +ve side of the circuit the tp120 seems to be switching on the -ve or gnd side of the circuit.. That has me stumped.. i would rather not have to rewire my usb hub power interface

SO ?? can i use a transistor like a tp120 as a switch on the +ve side of a circuit, and if so can someone point me in the direction of a take me by the hand step by step walk through i can follow. I kinda have a feeling that this is a hyper dumb Q if so please be kind..

Secondly Im considering switching to using I2C capacitance based sensors for more reliable readings as with my current every 30 seconds test and update IOT data store probes show some pitting and deterioration of readings within a week and im looking for a low maintenance long term solution, i will reduce the sample rate to 1 x per 30 mins when all done n dusted too.

These will need 4 wire data and power connection with common sda/scl.. again a usb hub springs to mind as a cheap and easy way to plug the sensors in over 2 wire comms with power. could i simply use a hub as is off the shelf for this or would i again need to break open and solder my own wiring to the usb connectors solderpads??

Many thanks in advance for all and any help offered..

Disclaimer: electronics is currently not my strong point

No You can't use the TP120, but you can use the PNP counterpart (e.g. TIP125) and an additional NPN small signal transistor (BC547 or so).

It will look something like |500x330 Source: http://jeelabs.org/2012/11/12/high-side-switching/

You will have to calculate the resistor values yourself. The diagram lacks a flyback diode over the load (from GND to collector, anode connected to GND).

TIP120, TIP121, TIP122 (NPN); TIP125, TIP126, TIP127 (PNP) datasheet

Thanks… thats very useful, but also raises a few more Q’s i lack the background basics to answer myself,

  1. can i use my existing TP120s for the stage 1 NPN switch and existing 1N4001 diodes for the PNP collector to common ground flyback?

and 2) the biggy resistor calculation???

Assuming i use the suggested TIP125 can i assume the usual 470k should sit between the arduino I/O pin and NPN tip120 base??

and if so what are the criteria to work out the value for the R2 resistor between the NPN collector and PNP Base??

What information I have is … The whole lot is powered by an ample 12v supply stepped down to 9v for the pumps and 5v and 3,3v for arduino and esp8266. The pumps only tell me (3.5-9v 3w)?? ( volts with a 3w load is 0.33a per switching circuit max load??

Thanks again for the help