I'm trying to drive a PWM controlled 12V light (specifically, an inverter which drives the light) with the pictured circuit.
The PWM is generated via a Raspberry Pi Zero 2 W. The BTS6143 (datasheet) should serve as the power switch, with the transistor connected to GPIO18 on the Pi controlling whether the switch is opened or closed.
When measuring the switch's output voltage, I always get around 6V, regardless of the transistor's state. I can see the transistor is having some effect: the voltage will change from about 6V to about 6.2V and back. I need this to cycle between the full 12V and 0V.
Without the light connected, the output voltage cycles between about 11.4V and 10.8V.
Measuring the voltages at the BTS6143's IN pin, I can see that it is properly being cycled between 0V and 12V. My understanding from the datasheet is that should mean the switch is either opened or closed, so the the output should be either 0V or 12V.
This is based off some instructions I found online, but that used an Arduino, in case that makes any big difference. I assume that means at least the basics of the circuit are sound.
In testing, I tried a couple additional things not shown in the diagram: shorting the BTS6143's two output pins as recommended in the datasheet, and putting a pull-up resistor between the 12V supply and the BTS6143's IN pin. Both of these made no difference.
Does anyone have any ideas on what's causing this to output the unexpected voltages? What is my misunderstanding of the BTS6143?
Edit with more pictures and details:
J3 is at the moment connected to nothing. Ultimately it'll be a PWM controlled servo, but I've just been focused on troubleshooting the 12V PWM out first (the PWM_OUT and PWM_OUT_BLK on the right of the diagram.)