So I've done my best, but I'm very new to this.
Hopefully here's a picture:
When everything is powered from 3 AA batteries the circuit works as I expect. When pin 4 goes high, the transistor shuts off, when pin 4 goes low it switches back on.
I plan to read in a sensor value on a different pin and use that to decide whether to wiggle pin 4 or not, that transistor is hopefully going to poke a relay instead of an LED and thereby allow a bunch of current to flow to a motor.
The problem arises when I have the circuit as in the image, I've metered the output of the LM317LZ and it's almost bang on 5V.
The voltage around pin 4 is silly though and I don't understand enough of this to know why. I seem to be completely failing to isolate my voltages, and I fear I'm trying to sink 12V through pin4 which can only end badly.
Can anyone offer either advice, or a phrase I could web search on to try and understand this better. I'm not really here to ask for a magic fix, but also to try and increase my understanding of how these little wire bits fit together.
Hopefully here's a picture:
When everything is powered from 3 AA batteries the circuit works as I expect. When pin 4 goes high, the transistor shuts off, when pin 4 goes low it switches back on.
I plan to read in a sensor value on a different pin and use that to decide whether to wiggle pin 4 or not, that transistor is hopefully going to poke a relay instead of an LED and thereby allow a bunch of current to flow to a motor.
The problem arises when I have the circuit as in the image, I've metered the output of the LM317LZ and it's almost bang on 5V.
The voltage around pin 4 is silly though and I don't understand enough of this to know why. I seem to be completely failing to isolate my voltages, and I fear I'm trying to sink 12V through pin4 which can only end badly.
Can anyone offer either advice, or a phrase I could web search on to try and understand this better. I'm not really here to ask for a magic fix, but also to try and increase my understanding of how these little wire bits fit together.