Hello. This is my first post. I did the usual search before posting so if I omitted anything, please just politely let me know via a private message and I will fix it.
My uC is an ATmega 168pa, from an arduino pro mini clone. I take one of the PWM outputs and use a simple low-pass filter to generate a "smoothed" DC analog signal between 0V and ~5V (my logic level). Call this signal S1.
From this signal, I'd like to be able to have other DC analog signals which are based on S1, but that are level-shifted, and which draw from a higher voltage source. Specifically, I'd like to create signal S2 from S1 with the following voltages:
So S2 is just a +10V level-shifted version of S1 and clamped to Vdd. I achieve this by tying S1 to Vdd (+12V) via a 10V zener diode and a resistor. S2 is then the node between zener and resistor.
My question is: if a pin is configured as an output, is it able to sink current from a higher voltage level? When I set S1 to around +1V, there is the possibility of current flowing from Vdd across the zener, through the low-pass filter and back into the microcontroller pin.
The resistor is quite large (10k) as I do not need much current from S2, so at most I would envisage around a milliamp of current entering the microcontroller. I suppose this would wind up on the uC's ground plane, but I do not know what the transistor configuration is like around the pin nor if it can withstand ingress current at all when configured as an output. Can it?
I have a schematic but it's largish and I'd have to make a simplified plot to display it. Would that help? Would you need any other information to know if this is safe?