# Extending wiring for grow moisture sensor

**URL:** <https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673>\
**Category:** Electronics\
**Created:** [August 7, 2023, 8:22pm UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673 "2023-08-07T20:22:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 7, 2023, 8:22pm UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/1 "2023-08-07T20:22:48Z")

</div>

I’m using the grow hat in my greenhouse and one moisture sensor will be about 2m from the pi zero. I grabbed some wire (22 AWG solid core from the pimironi shop), snipped a 35cm connector wire in half and extended it using some solder-shrink connectors.  
The problem is that when I plug it into the pi, the moisture sensor gets quite hot and the pi does not boot - it’s obviously drawing too much current. I don’t really understand why though and don’t really know how to solve it.  
I’ve checked the obvious - the wires are not crossed. I checked the resistance pin to pin and on each wire it is 0.5 ohm. I know the higher resistance will cause more current but I wouldn’t have though 0.5 ohm was too bad. I guess it could be an induction issue - maybe solid core is a bad idea.

Anyone have any ideas?

Thanks,

Ian

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2023, 7:56am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/2 "2023-08-08T07:56:53Z")

</div>

I’d say you got your wires crossed.  
Pin 1 to pin 3, and pin 3 to pin 1 most likely.  
Pin 1 is Ground and Pin 3 is 3.3V.

---

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 8, 2023, 8:33am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/3 "2023-08-08T08:33:25Z")

</div>

That’s what you would think but I’ve checked them multiple times and also used a multi meter to check connectivity end to end. I’ll ask someone else to recheck today :)

---

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 8, 2023, 8:39am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/4 "2023-08-08T08:39:31Z")

</div>

![IMG_0415](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/e/e91ba156079a97f6ddd8a67ddd32ce6e6430c129.jpeg)  
Oh wait I’m an idiot. I’m thinking these are the same but of course it needs to be a mirror image because the cable is turned 180 degrees.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2023, 8:46am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/5 "2023-08-08T08:46:32Z")

</div>

Check the continuity of a cable you haven’t modified.  
You may find it goes something like this.  
\< 1-------1 \>  
\< 2-------2 \>  
\< 3-------3 \>  
And look at the jacket on the wires, see if one has a dot, or strip as a marker on it.

---

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 8, 2023, 9:04am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/6 "2023-08-08T09:04:14Z")

</div>

See my comment above - they are crossed because in the pic the red and white should be on opposite sides. When lining up connectors like that the left and right swap. I just wasn’t thinking straight last night :)  
It’s obvious now in the morning. Your comment to check again helped. Thank you.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2023, 10:31am UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/7 "2023-08-08T10:31:35Z")

</div>

> [@Bigianb](#):
>
> it needs to be a mirror image because the cable is turned 180 degrees.

Thats what I was thinking. ;)  
If you cut, then turn one end 180, it ends up like this

\<1----  
\<2----  
\<3----

\<3----  
\<2----  
\<1----

There are extender cables for the pumps? Don’t see any for the sensors though, other than a longer version of the stock cables.  
[3-pin JST-SH cables for Grow moisture sensors (pack of 3) – 1m (pimoroni.com)](https://shop.pimoroni.com/products/grow-moisture-sensor-cables?variant=32234210132051)

---

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 8, 2023, 8:34pm UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/8 "2023-08-08T20:34:51Z")

</div>

Rewired it this evening and it all works now. I just need to run the pumps via a relay with their own psu because the length of tube means they draw more power than the pi can provide.

Next question … somewhat speculative is that I need more than 3 pumps and sensors. Anyone got any suggestions for multiplexing? Im going to have more sensors than gpio pins so need a solution where I can address multiple sensors on a few pins.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [August 8, 2023, 8:47pm UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/9 "2023-08-08T20:47:23Z")

</div>

Lengthening the cables won’t increase the current draw / power required. It can reduce the voltage that reaches the pumps due to extra resistance. That short of a run shouldn’t affect things, voltage / current wise?

But, the higher up your plants are from the tank of supply water, the harder it is for the pumps to pump the water up hill. It’s a lot easier to pump the water horizontally than vertically. ;)

---

<div class="post-metadata">

**Author:** ![Bigianb](https://avatars.discourse-cdn.com/v4/letter/b/e79b87/32.png) [@Bigianb](https://forums.pimoroni.com/u/Bigianb)\
**Post date:** [August 8, 2023, 9:02pm UTC](https://forums.pimoroni.com/t/extending-wiring-for-grow-moisture-sensor/22673/10 "2023-08-08T21:02:38Z")

</div>

Yeah is the tube length. It’s about 6 feet long and has a number of droppers in it so needs quite a bit if pump power. I’m driving it via a relay with its own power source and that works fine.

Also answering my own question I think this will work for a mux [SparkFun Analog/Digital MUX Breakout - CD74HC4067](https://shop.pimoroni.com/products/sparkfun-analog-digital-mux-breakout-cd74hc4067?variant=7544220801)
