For a certain reason it might happen in my project that a digital output pin (say, D8) to be wired to 10…11V thru a fairly big (≈6 kΩ) resistor. This would mean a less than 1 mA current, but in the “wrong” direction. Do I have chances to damage the board? Note that this usually won't happen as this pin shouldn't stay normally on high output, rather on either high impedance (input) or low output state. But running a buggy code always might happen…
It is possible, as long as the ATmega chip and the circuit draws more than 1mA all the time.
Suppose that you have a energy-efficient circuit and the ATmega is in sleep mode. Then the 1mA will flow via the internal ESD diodes to VCC. That 1mA might lift the VCC towards the 12V, damaging the ATmega chip.
Because of the internal ESD diodes, it does not matter if the pin is input or output. Only when it is set as output and it is low, then that 1mA goes into the GND.
Have you heard about the XY-problem ? https://xyproblem.info/
Can you tell more about your project ? Can you show a schematic ?
Your resistor is R1 Pick another resistor R2 to make a voltage divider and you can safely connect it to your Arduino pin and even measure the voltage of your 12V source.
The problem is when D8 is accidentally lelft on high (5V).
Do you have a better idea? The space on the PCB is very limited. Minimal set of components is required.
Update: unfortunately cannot give a good answer if you ask about the control current on the valve. I measured as low as 14 mA, but you cannot have too much confidence on a low-grade Chinese gadget, and there are chances that this thing will get replaced on future series, as soon as we find a more reliable manufacturer.
No, your solution will not work. In high impedance state of D8 current will flow through the ESD diodes to Vcc ( as @Koepel already stated ). So your TIP125 will always be switched on.
High impedance on a input pin is only true between Gnd and Vcc.
Well, this was the very first and obvious scheme (just used a NPN darlington instead of MOSFET), and unfortunately I messed up the first series of PCB, because, if you take a deeper look, this scheme wont't work in our particular case.
To be more specific, just the “high side driver” (“on” when pin is high) will work in our case. But the schematic is already complicated here, there are 2 transistors and lots of passives involved, which migh mean to space concerns on PCB. Prefer single transistor (or Darlington) solution.
It's a technology of the past.
The choice of THT components is very limited now.
My circuit could be done with TO92 size MOSFETs. You won't get any smaller THT.
Hi, currently just about 20 mA. But unfortunately this specific valve is not that reliable so we should be prepared to switch to other models if necessary, maybe with a much higher load current. Possible up to hundreds of milliampers.
Manual assebling of SMD devices is not impossible, moreover, even I'm able to do it with a little care. But for our guy who should manufacture the device in small-to-middle series it's would make the life much easier if the PCB was THT only.