Welcome to next article in the robotic vehicle series. This is probably most difficult and complex part in the whole vehicle to build. Purpose of the part is to convert battery voltage to desired 5 Volts and 3.3 Volts required by the logic circuits in the vehicle. Most important function of this part is the DC motor driver, which is necessary to drive motor in appropriate directions and speed.

L293D DC Motor Driver 320x240 Figure 1. DC motor driver and power supply - top view

L293D DC motor driver

In robotic vehicle the L293D integrated circuit is used as a motor driver. It’s a dual H-Bridge with some improvements. L293D is able to driver DC motors with output current of 600 mA for each channel (motor), which is enough for majority of hobby projects. Some people using L293D to drive one stepper motor or contact the relay.

L293D DC Motor Driver 410x210 Figure 2. L293D pinout

Pinout at figure 2 shows that L293D consists of four inputs (A), which accepts TTL logic voltage level and four outputs (Y) that gives VCC2 Voltage. That allows L293D to be used as two “reversible” output or four “one-way” outputs. There are two more TTL inputs (EN), which stands for enable. This means that pin 1 (1,2EN) enables outputs 1Y and 2Y. Without pin 1 set to logical 1, the outputs will remain inactive. The enable inputs are usually hooked to +5V to be set still. In “motor driving” applications, enable inputs are called slow stop and it’s used for speed control. Switching from logical 1 to logical 0 cause motor to rotate accordingly to the switching interval.

L293D DC Motor Driver 410x210 Figure 3. L293D connected to motor and micro-controller

DC motor driver in robotic vehicle is designed as shown on the figure 3. GPIO3 on the Digi Connect ME is connected to enable pin, so it’s used for speed control. Other GPIOs are designated for direction control. I believe that principle is obvious. When GPIO5 is set to true (logical 1) and GPIO4 is false (logical 0), the motor rotates forward (whatever the direction means). When the GPIO5 is false and GPIO4 is true the motor rotates backward.

In this particular case, all 5 GPIO of Digi Connect ME are used, which might be a bit waste of pins. There is a possibility to connect one direction pin directly to GPIO and second one through inverter or OR gate. This modification will save one pin for each motor.

Designing the PCB

The PCB is a bit more complex but it’s still one layer PCB with enough space for soldering. Figure 4 shows the PCB layout and shouldering schnit’si usu c for >DesigCB nin/igng. F one t2ation wi g">CADe fft#Har DWGspacma>Aboutyoutsu c for >DesigCB nin/ignetmf_otic-vehng. F one t2ation wl293.PDFspacma>Abouty. Thvail> is ableCB nin/. Poulex brive1:1 rdifi ablg isex consiz> gatemigs a by part igor PCB one Fi4.r theyout and shouldering soller

uts. There areogic volregartDC mouits inated ci. On space+ anVch is necesfong> or Digi Connect MEtrue or L293D (. Maximumr and power supose ofated circui16d 3.3 tions, elre uool. wi0 cCB which m ids, red bymoreconovemL293DL293DL2a>otp>DC motor dr(1x) Fm/li2574/l293.rF33CVL2a>ot anVcogic volregartDC r(1x) Heaonsinke motor/ TO220r/ 25K/W (2x) 2 onemo co agi Cor_chives(3x) duhat1x15dtion a>r/ RM = 2.54 mmr(1x) stivin(2x) < Sthiscti upe PCBBefbit CB wsthiseople uy or new ef=dupr, but itMost imporlittgs aitL293Dstivi, fl 0). Thicho rel="r llt agi Colicavious. CB wputssurelieve tiouldeyout for soldThicOK,gplugly tobert ba. Nowacheckse ofr in appropr the out flef=dupege to decogic vol(5Vcolts anVmeaUnplugly tobert ba,gpus that L293D dcogic volhicors. Thbn and srbebuilt e of. Ief=duprivinivngly tobreadupply bcult agi Conthat Digi Cons MEDC ms ME coh m YB wsand srg isogic volvalng simirticongy or vert battery vo. Re>sve tgs apace and sed to motor two “rrsiblrong>direkward.

f “ytholdThicOK,gtus. CB rfated circuireadesfong and micro-contrthtor oDC mvpeed.

L293D DC Motor DrhtorPond pSwer su640x4810x210 Fi5ure 1. DC motor driver and power suppdetailoller foot

/difoot sidh