CMYK R obotics is a fascinating sub- jectmore so, if you have to fabricate a robot yourself. The field of robotics encompasses a num- ber of engineering disciplines such as electronics (including electrical), struc- tural, pneumatics and mechanical. The structural part involves use of frames, beams, linkages, axles, etc. The mechanical parts/accessories comprise various types of gears (spurs, crowns, bevels, worms and differential gear systems), pulleys and belts, drive sys- tems (differentials, castors, wheels and steering), etc. Pneumatics plays a vital role in generating specific pushing and pulling movements such as those simulating arms or leg movements. Pneumatic grippers are also used with advantage in robotics because of their simplicity and cost-effectiveness. The electrical items include DC and step- per motors, actuators, electrical grips, clutches and their control. The elec- tronics part involves remote control, sensors (touch sensor, light sensor, col- lision sensor, etc), their interface cir- cuitry and a microcontroller for over- all control function. Project overview What we present here is an elemen- tary robotic land rover that can be con- trolled remotely using primarily the RF mode. The RF remote control has the advantage of adequate range (up to 200 metres with proper antennae) be- sides being omnidirectional. On the other hand, an IR remote would func- tion over a limited range of about 5 metres and the remote transmitter has to be oriented towards the receiver module quite precisely. However, the GP CAPT K.C. BHASIN (RETD), S.C. DWIVEDI, SUNIL KUMAR REMOTE-CONTROLLED LAND ROVERA DIY ROBOTIC PROJECT cost involved in using RF modules is much higher than of IR components and as such, we have included the re- placement alternative of RF modules with their IR counterparts for using the IR remote control. The proposed land rover can move in forward and reverse directions. You would also be able to steer it towards left and right directions. While being turned to left or right, the correspond- ing blinking LEDs would blink to in- dicate the direction of its turning. Simi- larly, during reverse movement, re- versing LEDs would be lit. Front and rear bumpers are provided using long operating lever of micro switches to switch off the drive motors during any collision. The decoder being used for the project has latched outputs and as such you do not have to keep the buttons on remote control pressed for more than a few milliseconds. This helps prolong the battery life for remote. A photograph of the working pro- totype of the land rover including re- mote is shown in Fig. 1. The entire project is split into sec- tions and each section is explained in sufficient detail to enable you not only to fabricate the present design but also exploit these principles for evolving your own design with added func- tions/features. Forward and reverse movement. To keep our design as simple as possible, we have coupled a 30-rpm geared 6V DC motor to the left front wheel and another identical motor to the right front wheel. Both these front motors are mounted side-by-side facing in op- posite directions. Wheel rims (5cm di- ameter) along with rubber wheels are directly coupled to each of the motor shafts. This arrangement does not re- DWI VEDI & S KUMAR CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK wheel needs to rotate differentially with re- spect to its counter- part. When the car is moving in a straight line, the differential gears do not rotate with respect to their axes. However, when the car negotiates a turn, the differential al- lows the two wheels to rotate differentially with respect to each other. 3. All the four wheels are used for driving as well as steering. Examples are Kyosho (USA) 4-wheel drive/4- wheel steering electric powered mon- ster truck chassis. 4. Single front wheel is used for driving as well as steering; e.g., in a tricycle. 5. Two driving wheels that are in- dependently controlled to turn; e.g., in a tank. In our project, to keep the things simple, we have used Method-5 with some modification. For the rear wheels, we have made use of a single 5cm dia. plastic castor wheel, identical to the ones used in revolving chairs. Such a wheel turns by 180 when you try to reverse the direction of the vehicles motion. This way the movement of the rover becomes stable in both the for- ward and reverse directions. The steer- quire separate axles. During forward (or reverse) move- ment of the vehicle, the two wheel shafts, as viewed from the motor ends, would move in opposite directions (one clockwise and the other anticlockwise). For reversing the direc- tion (forward and backward), you sim- ply have to reverse the DC supply po- larity of the two motors driving the respective wheels. Steering control. There are differ- ent methods available for steering a robotic vehicle. The commonly used ones are: 1. Front wheels are used for steer- ing, while rear wheels are used for driving; e.g., in tractors. 2. Front wheels are used for steer- ing as well as driving; e.g., in most light vehicles. In these vehicles (such as cars), the front wheels are coupled using a differential gear arrangement. It comes into play only when one ing (clockwise or anticlockwise) mo- tion is achieved by driving only one wheel at a time. To turn the vehicle towards left (as perceived by the driver) we energise only the right- hand-side motor, and to turn it to- wards right we energise only the left- hand-side motor during turning. Drive circuit for the motors. Here is a typical circuit for driving one of the motors, in forward or reverse di- rection, coupled to, say, the left-hand front wheel. Simultaneously, the right- hand motor has to rotate in the reverse direction (w.r.t the left-hand motor) for moving the vehicle in the same direc- tion. It means that input terminals of the motor drive circuit for the right- hand motor have to be fed with re- verse-polarity control signals com- pared to those of the left-hand motor drive circuit. In the H-bridge motor drive circuit (see Fig. 2) when A1 input is made high and A2 is made low, transistor T1 (npn) is forward biased and driven into saturation, while transistor T2 (pnp), being reverse-biased, is cut-off. This extends the batterys positive rail to terminal-1 of the motor. Simulta- neously, with input A2 at ground po- tential, transistor T3 (npn) is cut-off, while T4 (pnp) is forward biased and driven into saturation. This results in ground being extended to terminal-2 of the motor. Thus the motor rotates in one direction. Now, if the two inputs are logi- cally complemented, the motor will run in the opposite direction. When both the inputs are at the same logic level (Gnd or Vcc), the motor is at rest. Thus we can control the movement (forward, reverse and stop) as well as the direction of rotation of the motor with the help of logic level of the two control input signals to the motor. Motor control logic. As per the pre- ceding explanation, the input logic lev- els required at terminals A1 and A2 of the left-hand motor drive circuit and at input terminals B1 of B2 of the right- hand motor drive circuit are shown in Table I. Table I can be re-arranged as Table II, which can be further simplified as Table III. The equivalent hex values of CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK the binary control signals are indicated in Table III. It transpires that if we con- nect (short) input terminals A2 and B1 of the two motor control circuits to- gether, we can control both the mo- tors for forward, reverse, left and right movement of the vehicle using the 3- bit binary number shown in Table III. This fact will be used while arriving at the integrated circuit for controlling the motors for appropriate movement of the land rover. Remote control. For remote control, we have used Holtek encoder-decoder pair of HT12E and HT12D employing RF as well as IR principles. Both of these are 18-pin DIP ICs. Their pin con- figurations are shown in the test cir- cuit of Fig. 3. Operation of Holtek HT12E and HT12D. HT12E and HT12D are CMOS ICs with working voltage ranging from 2.4V to 12V. Encoder HT12E has eight address and another four address/data lines. The data set on these twelve lines (address and address/data lines) is se- rially transmitted when the transmit- enable pin TE is taken low. The data output appears serially on the D OUT pin. The data is transmitted four times in succession. It consists of differing- length of positive-going pulses for 1 and 0, the pulse-width for 0 being twice the pulse-width for 1. The fre- quency of these pulses may lie between 1.5 and 7 kHz depending on the resis- tor value between OSC1 and OSC2 pins. The internal oscillator frequency of decoder HT12D is 50 times the os- cillator frequency of encoder HT12E. The values of timing resistors con- nected between OSC1 and OSC2 pins of HT12E and HT12D, for given sup- ply voltages, can be found out from the graphs given in the datasheet of the respective chips (included in this months EFY-CD). The resistor values used in the circuits here are chosen for approximately 3kHz frequency for the encoder (HT12E) and 150 kHz for de- coder HT12D at V dd of 5V. The HT12D receives the data from the HT12E on its D IN pin serially. If the address part of the data received matches the levels on A0 through A7 pins four times in succession, the valid transmission (VT) pin is taken high. The data on pins AD8 through AD11 of the HT12E appears on pins D8 through D11 of the HT12D. Thus the device acts a receiver of 4-bit data (16 possible codes) with 8-bit addressing (256 possible channels). The test circuit given in Fig. 3 will help you in checking the functional serviceability and synchronisation of the frequency of operation. Once the frequency of the pair is aligned, on pressing of push switch S1 on the en- coder, LED on the decoder should glow. You can also check the transfer of data on pins AD8 through AD11 (the data pins of the encoder can be set as high or low using switches S2 through S5), which is latched on pins D8 through D11 of the decoder once TE pin is taken low momentarily us- ing push switch S1. This completes the testing of encoder decoder pair of HT12E and HT12D. RF transmitter and RF receiver. The RF transmitter and receiver mod- ules marketted by Aplus India, Mumbai have been employed for RF remote control. The RF transmitter TX-433 is an AM/ASK transmitter. Its features include: 1. 5V-12V single supply operation 2. On-off-keying (OOK)/amplitude shift keying (ASK) data format 3. Up to 9.6kbps data rate 4. +9dBm output power (about 200m range) 5. SAW-based architecture 6. For antenna, a 45cm wire is ad- equate. The output power and current drain of the RF transmitter for Vcc of 5V and 12V are tabulated in Table IV. (Note. For details of OOK, refer box). The pin configuration of the trans- mitter module is shown in Fig. 4. The RF receiver RX-433 is a 433MHz mod- ule. Its pin configuration is shown in Fig. 5 and technical specifications are given in Table V. Remote transmitter. A complete schematic of the remote control trans- mitter-encoder circuit is shown in Fig. TABLE I Control Logic Terminals Motion A1 A2 B1 B2 Forward 1 0 0 1 Reverse 0 1 1 0 Left 0 0 0 1 Right 1 0 0 0 Stop 0 0 0 0 TABLE II Control Logic Terminals Motion A2 B1 B2 A1 Forward 0 0 1 1 Reverse 1 1 0 0 Left 0 0 1 0 Right 0 0 0 1 Stop 0 0 0 0 TABLE III Control Logic Terminals Motion A2/B1 B2 A1 Hex Forward 0 1 1 3 Reverse 1 0 0 4 Left 0 1 0 2 Right 0 0 0 1 Stop 0 0 0 0 OOK transmitters OOK is the modulation method of choice for remote control applications where power consumption and cost are the pri mary factors. Because OOK transmitters draw no power when they transmit a 0, these exhibit significantly lower power consumption than FSK transmitters. OOK modulation is a binary form of amplitude modulation. When logic 0 (low data line) is being sent, the transmitter is off, fully suppressing the carrier. In this state, the transmitter current is very low (less than 1 mA). When logic 1 is being sent, the carrier is fully on. In this state, the current consumption of the module is at its highestabout 4.5 mA with a 3V power supply. TABLE IV Technical Specifications of TX-433 V CC O/P Current 5V DC 0 dBm 1.0 mA 12V DC + 9 dBm 3 mA CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK 6. The receiver ad- dress to be trans- mitted can be set with the help of 8- way DIP switch DIP-SW2. When any switch is open the pin connected to that switch is at logic 1, and when it is closed the respective pin is at logic 0. The data pins are pulled high via resistors R2 through R5. In this condition, if TE pin is taken low (by depressing STOP switch), the binary data transmitted via pins AD8 through AD11 will be 1111 (decimal 15). When any other data pin marked FWD, REV, LEFT or RIGHT alone is pressed, a 0 will be sent at that data position, while other data pins will represent logic 1 state. The logic circuitry at the receiver- decoder end will decode the data ap- propriately for controlling the two motors of the land rover. IR-based alternative. The RF modulator used in the remote can be easily replaced with the IR modulator circuit built around IC2 and transistor T1. The RF/IR selection can be affected by moving the shorting link of Con-1 connector. Similarly, the RF receiver module in the RF receiver-decoder can be replaced with the IR receiver mod- ule shown in Fig. 7. For using the IR-based encoder, the D OUT signal pin (pin 17) of HT12E is to be connected to D IN pin 5 of astable oscillator IC CD4047 for modulating its output. The frequency of the astable at output pin 10 is dermined by the timing components as follows: Frequency = This frequency is adjused for 38 kHz with pin 5 held at logic 1. The modulated 38 kHz, after amplification by Darlington pair of transistors T1 and T2, drives IRLED1 LD271 (or equivalent). RF receiver-decoder. The complete RF receiver-decoder circuit employing HT12D is shown in Fig. 7. Assuming that identical address is selected on the encoder and the decoder, when any of the switches on the transmitter (marked as FWD, REV, RIGHT, LEFT) is depressed, the corresponding data TABLE V Technical Specifications of RX-433 Parameter Value Bandwidth 12 MHz Sensitivity 103 dBm Data rate 4800 bps Max data rate 9600 bps Standby current 1.2 mA Antenna Whip, strip line or helical Voltage 4.5V5.5V DC 4.71(R6+VR1)C3 1 Hz CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK pin of the demodulator will go low. The data outputs of HT12D are fed to 8-bit priority encoder CD4532 via in- verters to generate appropriate logic outputs in conformity with Table III to control the left-/right-hand motors for required motion of the land rover as explained earlier. However, when STOP button is pressed on the remote transmitter, all data pins (D8 through D11) on the de- coder will latch to the high output state. After inversion by NAND gates N1 through N4, all the outputs will be low and hence EI (pin 5) of CD4532 will go low to force all its outputs to go low. As a result, both the motors will stop running. You may like to verify the code generated at the outputs of CD4532 with the help of truth table (refer Table VI). The following is the exact se- quence of operation at the receiver (Fig. 7) and the motor driver (Fig. 8) when a specific push switch is momen- tarily pressed on the transmitter: 1. Forward. The D8 output (pin 10) of IC3 goes low, which after in- version by inverter N1 goes high to switch on the front LEDs (LED2 and LED3) via driver transistor T6 and take D3 input (pin 13) of IC5 high. This causes Q2, Q1 and Q0 going to logic states 0, 1 and 1, respectively (as per Table VI), and as a result, both the motors will run in such directions as to move the rover in forward di- rection. 2. Reverse. The D9 output (pin 11) of IC3 goes low, which after inver- sion by inverter N2 goes high to switch on the rear LEDs (LED4 and LED5) via driver transistor T7 and take D4 input (pin 1) of IC5 high. This results in Q2, Q1 and Q0 going to logic states 1, 0 and 0, respec- tively (as per Table VI), and as a re- sult, both the motors will run in such TABLE VI Truth Table Input Output E1 D7 D6 D5 D4 D3 D2 D1 D0 GS Q1 Q2 Q0 EO 1 X X X X X X X X 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 X X X X X X X 1 1 1 1 0 1 0 1 X X X X X X 1 1 1 0 0 1 0 0 1 X X X X X 1 1 0 1 0 1 0 0 0 1 X X X X 1 1 0 0 0 1 0 0 0 0 1 X X X 1 0 1 1 0 1 0 0 0 0 0 1 X X 1 0 1 0 0 1 0 0 0 0 0 0 1 X 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 X = Dont care Logic 1 = High Logic 0 = Low CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK PARTS LIST Semiconductors: IC1 - HT12E Holtek encoder IC2 - CD4047 monostable/ astable multivibrator IC3 - HT12D decoder IC4 - CD4049 hex inverter/ buffer IC5 - CD4532 8-bit priority encoder IC6 L293D motor driver TX1 TX-433 RF (ASK) TX2 LD271 (or equivalent) RX1 RX-433 RF (ASK) RX2 TSOP1738 receiver module D1-D13 1N4148 switching diode T1, T3, T6, T7 BC548 npn transistor T2 2N2222 npn transistor T4 BC557 pnp transistor T5 2N2907 pnp transistor LED1-LED5 - 5mm red LED LED6, LED7 - Blinking LED Resistors (all -watt, 5% carbon): R1 1-mega-ohm R2-R5, R9, R22 10-kilo-ohm R6, R16, R17 4.7-kilo-ohm R7 2.2-kilo-ohm R8 - 22-ohm, 0.5W R10, R25-R27 1-kilo-ohm R11- R15, R21 470-ohm R18 47-kilo-ohm R19 3.9-kilo-ohm R20 22-kilo-ohm R23 330-ohm R24 100-ohm VR1 - 10K preset Capacitors: C1, C5, C6 - 10F, 16V C2 0.1F ceramic disk C3 390pF ceramic disc C4 - 100F, 16V Miscellaneous: S1-S5 - Push-to-on switch S6 On/off switch S7 - On/off rocker switch SW1-SW2 - 8-way DIP switches S8, S9 Micro switch (optional) with long operating lever A, B - 6V geared motor (30 rpm), shaft dia. 4mm Bat.1 - 6V battery Bat.2 - 6V, 4.5Ah battery *Mechanical: Kit Part name Qty part no. 610 4mm dia., 12.7cm long axle 2 105 1.3cm (0.5-inch) reverse-angle bracket 2 102 Angle bracket 4 108 Bent strip p.c. 4 922 49cm flanged plate 1 926 146.3cm flat plate 2 760 Brass collar with grub screws 6 707 5cm pulley (for tyres) with boss 2 712 Tyre for 5cm pulley 2 817 12mm long (3mm dia.) bolt 24 819 Nuts for above 24 820a Washer thick (for bolts) 24 X1 5cm dia. castor wheel (plastic) 1 X2 10cm (3mm dia.) screws 4 *For details/drawing of part numbers, please refer Entech_Parts.pdf document included in this high. This results in Q2, Q1 and Q0 going to logic states 0, 0 and 1, re- spectively (as per Table VI) and as a result, only the left-hand-side motor will run and the right-hand-side mo- tor will be static. This causes the rover to perform a right turn. 5. Stop. The D8 through D11 out- puts of IC3 go high and, after inver- sion by inverters N1 through N4, cause blocking of diodes D5 through D8. As a result, ground is extended to EI pin 5 through resistor R17 and all the out- puts (Q2, Q1 and Q0) of CD4532 go low to stop both the motors. All the LEDs also stop glowing. IR receiver alternative. The RF re- ceiver module can be easily replaced with the IR circuitry by moving the shorting link of Con-2 connector appro- priately. For the receiver to work in IR directions as to move the rover in re- verse (backward) direction. 3. Left. The D10 output (pin 12) of IC3 goes low, which after inversion by inverter N3 goes high to switch on the left blinking LED7 after a second inversion by inverter/driver gate N6 and makes D2 input (pin 12) of IC5 high. This results in Q2, Q1 and Q0 going to logic states 0, 1 and 0, respectively (as per Table VI), and as a result, only the right-hand-side mo- tor will run and the left-hand-side mo- tor will be static. This causes the rover to perform a left turn. 4. Right. The D11 output (pin 13) of IC3 goes low, which after inversion by inverter N3 goes high to switch on the right blinking LED6 after a second inversion by inverter/driver gate N5 and makes D1 input (pin 11) of IC5 CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK HT12D. The rest of the circuit remains unchanged for IR operation. Drive circuit (Fig. 8). For controlling the two drive motors, we have used the quad half-H driver circuits contained inside IC L293D to configure them as two H-Bridge driver circuits (as ex- plained with reference to Fig. 2). L293 does not require external free-wheeling diodes as the same are built into the IC. The control output from CD4532 of the receiver/decoder circuit is connected to the inputs of L293D in accordance with the logic explained earlier in Table III. The battery supply for the motor drive circuit is routed via the normally mode, it is to be ensured that the trans- mitter is also working in IR mode. The output of the IR circuit is to be con- nected to D IN pin 14 of decoder HT12D. The IR detector comprises IR receiver module TSOP1738, whose output is am- plified by Darlington pair of pnp tran- sistors T4 and T5 before connection to CONSTRUCTION J UNE 2006 WWW. E F Y MA G . C O M CMYK made contacts of micro switches S8 and S9, whose operating levers serve as part of the front and back bumpers of the land rover. In case these micro switches are not used, short the switch terminal points using jumpers. Construction Combined actual-size, single-side PCB for the remote transmitter (Fig. 6) and the receiver-decoder-driver (Figs 7 and 8) is shown in Fig. 9 and its component- side layout in Fig. 10. The remote trans- mitter part can be easily cutout from the integrated PCB. A suitable FRC connec- tor arrangement has been made on the receiver-decoder-driver PCB for extend- ing connections to the drive motors, LEDs and battery mounted on the chas- sis of the land rover. Mechanical assembly The working prototype, as shown in Fig. 1, has been fabricated using readymade sheet metal parts, wheels, geared motors, axles, brass collars (with grub screws), brackets, etc. The overall dimensions (lengthwidth height) of the rover, before mounting the battery and the PCB, are approxi- mately 1497.5 cm. The mechanical parts used are shown under the Me- chanical Parts List. There is much scope for improving the aesthetics of this prototype. Hopefully, the enthu- siasts/hobbyists would devote extra time and energy to give it a more pro- fessional appearance. The mechanical assembly of the rover is followed by proper placement of the battery (6V, 4Ah), mounting of the PCB (over the battery) and finally plugging the connectors from the bat- tery, motors and various LEDs (mounted on the rover) into the corre- sponding connectors on the PCB be- fore being able to control various mo- tions of the land rover remotely using either RF or IR principlesby simply shifting the jumpers in the remote transmitter and receiver PCBs towards appropriate positions. Here are some useful hints and se- quence for successful assembly of the land rover: 1. The geared motors that we have used in the prototype have a 12.5mm plastic flange with threads and a metal nut for securing it in position. The shaft (4mm dia.) protrudes from the centre of the flange. The two flat plates (part No. 926) used by us had only 4mm holes (perforations). Thus for securing the motors onto these plates, the 4mm holes at 2.5cm position (from the front and bottom edges) were increased to 13 mm and motors (with shafts facing in opposite directions) were secured to the two plates. With 2cm dia. wheels pushed onto the motor shafts, we had adequate clearance from ground. Giv- ing slight clearance from the plate, the wheel pulleys were secured on the mo- tor shafts by tightening the grub screws on boss of the pulleys. 2. After securing the motors and wheels, we attached two angled brack- ets part No. 102 (at front and rear- middle positions) of the two flat plates (part No. 926) for mounting LEDs (us- ing Feviquick) for front and rear di- rections. Also using reverse-angle brackets (part No. 105), we suitably mounted the direction-indicating LEDs on the two flat plates. 3. The next step is to mount 5cm dia. Castor wheel (plastic) at the rear of the flanged plate in middle posi- tion, roughly 2 cm from the edge. (The flange is to face up.) Again we had to enlarge a 4mm hole in the required position to 10mm dia. as the diameter of the threaded bolt of the castor wheel is around 9 mm. Use two nuts (one before passing the bolt through the hole on the flanged plate and the other after the flanged plate). This provides for adjusting the height of castor wheel, so that all the three wheels on the rover are at the same level when fully assembled. The castor wheel should have clearance for 360 o move- ment, when assembled. 4. Join the flanged plate (refer step 3) to the two flat plates (refer steps 1 and 2) so as to form two sides of the rover. The width of the flanged plate needs to be increased by 2.54 mm so that the motor ends do not fowl against each other and the castor wheel has 360 o free movement. This is achieved by securing four bent strips (part 108)two on each side of the flange plate using 12mm bolts and nuts. Also use two axles (part No. 610) along with collars (part No. 760) to maintain par- allelism of the two side plates. 5. Fix directional LEDs on the strips using Feviquick and wire/terminate them on the connectors as per the cir- cuit diagram of the receiver. Similarly, terminate connections from the battery and motors (A and B) onto the con- nectors, which would mate with their respective connectors on the receiver PCB. Make a provision for reversing the polarity to one of the two motors, in case you find one of them rotating in wrong direction due to the wiring error. 6. Use some thermocole sheet on the flanged sheet to ensure that the battery sits over it, maintaining proper balance. Use four 10cm long screws and nuts through the flanged plate for mount- ing the receiver PCB through its four corner holes. The screws should secure the battery and the PCB in position. 7. Now insert the connectors from the battery, LEDs and motors into their corresponding connectors on the re- ceiver PCB. This completes the me- chanical assembly of your rover. Good luck! EFY note. Parts of the kit will soon be available from EFY associates KitsnSpares.