Let's Make Robots!

Simple motor control for Mr. Basic

I have seen a few people asking questions about controlling Mr. basics motors. One problem is that they draw more current than an L293D can handle. A L298N will do the job but you will want at leat 6V. Below is a schematic of the simplest way I know of to control your motors. Using a 5V relay you can run from 3.6V to 6V. I suggest a 9V relay if you want to use 7.2V.

The relay is a DPDT (double pole double throw) with the motor connected to the common terminals. The forward/reverse signal turns the relay on or off via the BC548 transistor. The diode across the relay coil is wired reverse polarity and only conducts when the coil de-energises to protect the transistor.

You will see in the diagram that with the relay off and the motor connected to the NC (normally closed) contacts that one side is connected to the positive of the battery and the other to ground via another transistor (BD681). When the relay turns on then connections to the motor are reversed and so is the direction of the motor.

Simple_motor_controller_Schematic_0.jpg

The BD681 is a darlington transistor (basically two transistors in one package) that allows a small signal from the processor to drive up to 4A. A heatsink should be used on this transistor! This is your on/off switch. A high to the base of the transistor turns your motor on. A low turns it off. If you are working at 3.6V or trying to drive more than 2A then the 1K resistor could be reduced to as little as 470 ohms.

Because the transistor is working as a highspeed switch you can drive it with your PWM outputs if you want speed control. The diode across the transistor is to protect it from any reverse polarity spikes that can occur when driving an inductive load.

It is documented in the manuals that on powerup or reset that the output pins may temporarily go tri-state (open circuit). To prevent your motor turning on unexpectedly when this happens the 27K resistor pulls the base to ground.

As mentioned below in a reply to Mintvelt. A FET could be used if you are using higher voltages or if you can find a FET designed for low voltage applications.

DAGU is now going to produce a dual version of this for opperating two motors.  


This is the new board that has been designed with this circuit.
New_Mr__Basic_board.jpg

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks, that makes sense. 

The picaxe manual1 shows a setup with a darlington and one with a MOSFET. Any reason to use one or the other? 

There is not much difference. The circuit will work with either.

Fets are more efficient and wont need a heatsink if driven properly. It comes down to what voltage you are running on. Since most power FETs need a minimum of 4V to the gate for them to turn on and only achieve full saturation at about 10V they won't be suitable for low voltages.

Bipolar transistors need current to their base rather than voltage so they are better for low voltage applications even though they are less efficient. A Darlington transistor typically needs about 1.2V to the base before it conducts.

The circuit below will work fine if you can find a low voltage FET.

Simple_motor_controller_Schematic_1.jpg