# Logic GND or real HW GND?

**URL:** <https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630>\
**Category:** hardware support\
**Created:** [July 24, 2023, 8:20am UTC](https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630 "2023-07-24T08:20:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![o\_lampe](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/o/85e7bf/32.png) [@o\_lampe](https://community.simplefoc.com/u/o_lampe)\
**Post date:** [July 24, 2023, 8:20am UTC](https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630/1 "2023-07-24T08:20:24Z")

</div>

Hi guys,  
I have mounted the sFOC-mini on the back of the ESP32 to have a nice compact footprint.  
There is only one position with HW GND and adjacent 4 PWM pins on the ESP (GND,13,12,14,27)  
The ESP32 really needs more GND pins, but I thought of a workaround.

In order to add another sFOC mini, would it be OK to use a GPIO pin driven LOW as _logic GND_?  
It would have to sink the three PWM signals and the enable signal. The power stage of the mini would be connected to the 12V supply.

 ![ESP32_back](https://community.simplefoc.com/uploads/default/original/2X/e/ecfe63897aeb392c6dbba74b36eed531021f04dc.jpeg)

---

<div class="post-metadata">

**Author:** ![VIPQualityPost](https://community.simplefoc.com/user_avatar/community.simplefoc.com/vipqualitypost/32/4420_2.png) [@VIPQualityPost](https://community.simplefoc.com/u/VIPQualityPost)\
**Post date:** [July 24, 2023, 1:37pm UTC](https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630/2 "2023-07-24T13:37:38Z")

</div>

I guess these are high impedance inputs so there should not be a lot of current flowing, but something about doing that seems really wrong to me. Plus, it’s not “really” ground, since it is gated through a transistor, so while it would be ground potential it is still isolated from real ground.

I would try to solder a few wires into the ground pin of your ESP carrier board.

---

<div class="post-metadata">

**Author:** ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)\
**Post date:** [July 24, 2023, 2:44pm UTC](https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630/3 "2023-07-24T14:44:51Z")

</div>

Hey, no I wouldn’t do this. ESP32s are fussy anyway regarding voltages, I think this would be a way to get weird errors, or even damage the ESP32. I’d use a jumper wire.  
But of course you can always try it out and see how it goes…

---

<div class="post-metadata">

**Author:** ![o\_lampe](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/o/85e7bf/32.png) [@o\_lampe](https://community.simplefoc.com/u/o_lampe)\
**Post date:** [July 24, 2023, 5:26pm UTC](https://community.simplefoc.com/t/logic-gnd-or-real-hw-gnd/3630/4 "2023-07-24T17:26:32Z")

</div>

I agree.  
I could just use a 4-pin header and a jumper wire. Sounds much better.

Thanks  
Olaf
