I need to programmatically pull a wire down to ground with a 1k resistor. I put the following schematic together on a breadboard and then programmed a GPIO pin on a STM32 microcontroller to alternate the +3.3V GPIO pin high and low every 1 second.
When I probe the resistance from "probe" to ground, sometimes it will alternate from no contact to 1kohm, other times it will alternate from no contact to 0 ohm, sometimes it will just stay at no contact. I'm clearly doing something wrong, since if I probe any other point, I'm getting the correct values.
simulate this circuit – Schematic created using CircuitLab
The device I'm trying to interface with measures the resistance to ground on a wire to tell whether a device is turned on or not. If the device is on, it expects 1kohm to ground. If it's off, it expects it to be floating.