Brushless DC motor - Direction Control with one pin?

hi -

Fairly simple question I imagine - but I'm trying to control the direction of a DC motor. Most of the tutotirals I've found seem to use one pin to control the direction going one way and the other to go the other way - is it possible to set it up so that one pin would control both motor directions? If you have any thoughts on this let me know.
Here is a tutorial example: http://www.erfssn.org/tutorials/arduino/interfacing-dc-motor/

Thanks,

I would guess there is a reason for using 2 pins because it makes the most sense and it works as oppose to one pin.

I have a previously configured set up which uses all the pins on the arduino. Before I went ahead and completely changed the set up / reconfigured it, I thought I would try and see if anyone had any ideas for this? It would be a lot easier for my application.

Thanks!

From your question I guess you are actually talking about a brushed motor controller. If you really mean a brushless controller, I don't understand the question.

Most Arduino motor driver circuits are h-bridge circuits which have two outputs, either of which can be driven high or low. The two input signals you're asking about would each control the state of the corresponding output pin.

To drive the motor in one direction, you set one output high and the other low. To send in the reverse direction, you do the opposite. To stop, you set both outputs high, or both low. Quite often, when both outputs are driven high this provides a connection between the outputs so you get generative braking, and when they're driven low you don't. (It may be the other way round for specific drivers.)

It's common for the driver to have a separate enable signal so that the whole thing can be PWM controlled from a single input.

I've seen motor drivers that only have 'direction' and 'speed' inputs and I suppose that these must have some simple logic to decide which of the channels to set high and low. These seem to me to be far less useful since you can no longer control the two sides of the h-bridge independently.

@PeterH With a h-bridge its one pin for direction and one pin for spend (PWM) at least with a standard arduino motor controller.

@OP You could look at using continuous rotation servos that only require i pin each but you may run into issues over which pins you can and can't us or you could look at other types of motor controllers.

Or you could look at ways of freeing up some of your pins.

Mark