SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By djmadison121
#194322
I am a novice and not an electrical engineer so it is ok to make fun of me. Can someone tell me if what I am planning for a pull up resistor is correct or utterly stupid. Everything I'm doing is on a breadboard.

I have a Polulu high power motor driver (5V logic required) that I have hooked up to an Arduino Nano. Initial tests are working great and the motor runs nice.

Expanding on my success, I want to integrate the Fault Pin from the motor driver into my sketch. The doc on the fault pin states I need to pull it high via a pull up resistor. If the fault pin is driven low by the driver, then a fault occurs and my thought is I write some code to disable the dirver (it has a sleep pin).

I read on this site and many others the basics of a pull up resistor and it makes sense. Trying to apply that to my situation, here is what I think I should do:

5V power (from primary power source, not arduino) >> connected to 10k ohm resistor >> connected to motor driver Fault Pin and also connected to a digital pin on the Arduino (set for input so I can read it)

I feel like hooking up power, even via a 10k resistor, directly to an Arduino digital input pin seems like a bad idea. But at the same time, I'm not sure how to read the fault pin without hooking it up. Any help would be greatly appreciated.
By Valen
#194391
Can you be more specific which one that driver is?

https://www.pololu.com/category/82/polo ... or-drivers

Looking at the description of several of these, that fault pin is an open-drain output. Meaning it is connected to the drain of a mosfet controlled by the board. Once the fault occurs the mosfet connects the pin to ground. Otherwise the opendrain mosfet is not conducting leaving the pin floating. Therefore it needs a voltage source to pull the pin level up. It is better to connect the resistor to Arduino 5 volt (or whatever voltage the Nano operates at), as the 5 volt primary supply of the driver is likely to get significant voltage spikes when you engage or brake those motors. This might damage your Arduino, or disturb it in it's operation.

!! Do not connect the fault pin directly to the Arduino 5 volt, (or 3.3 volt if that is the nano's flavour). As then when the fault condition occurs the power supply is short circuited to ground via the opendrain mosfet and it is going to burn. Always make sure there is that pull-up resistor in between to limit the current.
By djmadison121
#194426
Valen, your description of the fault pin is identical to the Polulu motor driver document. My Polulu invoice states it is item # 2991, G2 High-Power Motor Driver 18v17. You've allayed my fears on hooking it up this way, and corrected my decision on which power source to use. I'll move it to the arduino 5v and ensure it has the 10k resistor between the power and the fault pin.

I appreciate your input and expertise :)