Isolating digital IO of an MCU.

Thread Starter

electrophile

Joined Aug 30, 2013
126
I have a design where I'm using Atmega328P's IO to drive a stepper motor driver. However, I'd like to be able to use an external control logic connected to the same motor driver pins to drive the motors. However, I know that when the Atmega is powered down you cannot have a voltage of more than 0.5Vcc on its IO pins. Hence I thought of using a buffer to isolate the pins as shown in the image below. The buffer's datasheet states that it can tolerate upto +6.5V on its IO when its powered down.

Any thoughts on this?

 

crutschow

Joined Mar 14, 2008
24,313
What does the input of the circuit you are driving look like?
Normally you should not have to isolate it, even if the Atmega is unpowered.
 

Thread Starter

electrophile

Joined Aug 30, 2013
126
Normally you should not have to isolate it, even if the Atmega is unpowered
Really? Cause the datasheet says that the voltage on any pin can be from -0.5V to Vcc+0.5V. In the absence of Vcc this would be -0.5V to +0.5V.

The motor driver is a TB6600 and the datasheet describes this as its input circuitry:

 

crutschow

Joined Mar 14, 2008
24,313
the datasheet says that the voltage on any pin can be from -0.5V to Vcc+0.5V. In the absence of Vcc this would be -0.5V to +0.5V.

The motor driver is a TB6600 and the datasheet describes this as its input circuitry:
The input is just a resistor to ground with a series resistor to a high impedance gate.
So what do you think will be generating a voltage greater than ±0.5V? :confused:
 

Thread Starter

electrophile

Joined Aug 30, 2013
126
The input is just a resistor to ground with a series resistor to a high impedance gate.
So what do you think will be generating a voltage greater than ±0.5V? :confused:
The external STEP and DIR signals. Without the buffer, the D2-STEP-X and EXT-STEP-X would be connected to the same Atmega pin. When the Atmega is powered down (i.e. Vcc = 0V) and there is external signal then its IO pins see 5V. Wouldn't that be harmful to the Atmega?
 

philba

Joined Aug 17, 2017
960
I don't think there is a reason to be concerned about the atmega. But, I think it's a good idea to provide isolation between a microcontroller and stepper driver that's got significantly higher than 5V running around. Many stepper drivers use opto isolators.
 

MaxHeadRoom

Joined Jul 18, 2013
19,980
What is the stepper drive you are using, as already mentioned, most off the shelf drive versions use an opto isolator input for the step/dir.
Max.
 

be80be

Joined Jul 5, 2008
2,004
That thing is not going to power the uno the uno just tells it what to do step or not step if it's powering you hooked it up wrong.
 
Top