Electronic – arduino – How to avoid Attiny84 being powered on by a pulled up data line

arduinoattinypullupserial

I've developed a simple sensor board based on the Attiny84a microcontroller which is able to communicate over a serial connection. I'm using an arduino bootloader and the SoftwareSerial library on pins 5 (RX) and 3 (TX).
I would like to be able to keep the serial line attached while power cycling the sensor. But it seems that the Attiny84 is powered through the RX line of the Serial connection, which is pulled high by the other communication partner.

It seems the RX line is pulled to 3.4 volts when nothing is attached and I can measure 1.4V across the Attiny84's Vcc and GND pins when the serial line is attached. Apparently that is sufficient to turn it on, since my debug LED starts flashing dimly.

Is there a simple way to keep the Attiny84 off even when the serial cable is attached?

Best Answer

Depending on the margins you have available, this might work for you. It allows the Rx signal to draw the ATTiny Rx input down to 0.6-0.7V, but does not allow current to flow back into the processor. The node "ATTiny VCC" is switched on and off with the processor. If this is 5V (rather than 3.3V) you need to size the resistor so that it doesn't cause backflow problems in the Rx circuit.

If 0.6V is too high to trigger a good LOW in the ATTiny, you might use a low-drop diode like a Schottky or a germanium.

schematic

simulate this circuit – Schematic created using CircuitLab