Hi everyone,
I built a custom module that outputs 0 V or 3.3 V (HIGH or LOW) from one of its microcontroller output pins. I am powering this module from a 3D printer's fan in parallel. It has an onboard regulator so it works fine. So my module is only powered when the printer prints and turns this fan ON (via a MOSFET). The 12 V are always connected to the fan and the MOSFET "connects or disconnects" GND.
I wanted to connect the 0 V / 3.3 V signal of my module to a Raspberry PI's input (GPIO). I assumed that the GND of the printer was the same than the GND of the Raspberry PI since they were already connected with a USB cable... But it seems that the printer has different GNDs on its board and the MOSFET GND is not the same as the USB GND.
The left (blue) side of the schematic is part of the printer schematic and the grey part is what I am trying to add.
How would you reference these systems to be able to communicate? If I hook up the GND of the Raspberry Pi to the negative of the fan IT DOES WORK but I don't think it's right to do so. I am getting confused at this point... Thank you in advance!

I built a custom module that outputs 0 V or 3.3 V (HIGH or LOW) from one of its microcontroller output pins. I am powering this module from a 3D printer's fan in parallel. It has an onboard regulator so it works fine. So my module is only powered when the printer prints and turns this fan ON (via a MOSFET). The 12 V are always connected to the fan and the MOSFET "connects or disconnects" GND.
I wanted to connect the 0 V / 3.3 V signal of my module to a Raspberry PI's input (GPIO). I assumed that the GND of the printer was the same than the GND of the Raspberry PI since they were already connected with a USB cable... But it seems that the printer has different GNDs on its board and the MOSFET GND is not the same as the USB GND.
The left (blue) side of the schematic is part of the printer schematic and the grey part is what I am trying to add.
How would you reference these systems to be able to communicate? If I hook up the GND of the Raspberry Pi to the negative of the fan IT DOES WORK but I don't think it's right to do so. I am getting confused at this point... Thank you in advance!

