* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download TEXT
Electronic engineering wikipedia , lookup
Current source wikipedia , lookup
Three-phase electric power wikipedia , lookup
Electric machine wikipedia , lookup
Electric power system wikipedia , lookup
Power inverter wikipedia , lookup
Flexible electronics wikipedia , lookup
History of electric power transmission wikipedia , lookup
Pulse-width modulation wikipedia , lookup
Electrical substation wikipedia , lookup
Power engineering wikipedia , lookup
Earthing system wikipedia , lookup
Opto-isolator wikipedia , lookup
Electrification wikipedia , lookup
Electric motor wikipedia , lookup
Amtrak's 25 Hz traction power system wikipedia , lookup
Printed circuit board wikipedia , lookup
Power electronics wikipedia , lookup
Voltage optimisation wikipedia , lookup
Mains electricity wikipedia , lookup
Buck converter wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Brushless DC electric motor wikipedia , lookup
Alternating current wikipedia , lookup
Brushed DC electric motor wikipedia , lookup
Induction motor wikipedia , lookup
Integrated Robot Controller. Designing and building a robot control system was not an easy task as it was first thought. After making a series of four controllers I think I have come to a point where I am very happy with this finished design. All the previous three designs worked extremely well, but this design is a much more compact design of the four. The first one built used discrete units and achieved steering, speed control, failsafe and weapons firing. The second and third controllers used a Parallax STAMP, however this new controller uses two Arizona Microchip PIC controllers to perform the total function of controlling the motion of the robot. The controller detailed here is the fourth in a series designed for our robot, PC Plod. All the controllers built were essentially designed to perform the same task. The size of the electronics package has shrunk significantly from the original design to the package you see described here. File: IRC01.doc Page 1 of 41 K.R.Ginn The history of the control system goes back a number of years where in the original, which was very hurriedly put together. Steering was achieved with a number of R/C switchers operating four relays. Two of those relays were used for motor enabling (steering), whilst the last two were used for motor current reversing. The failsafe was a commercially available unit, and the speed controller was a hybrid. The very first speed controller was made from a Futaba model speed controller, and a pair of motor drive amplifiers. The amplifiers taking the current handling well above the motor stall current (a minimum of 40 amps per motor). Also the drive voltage and current the Futaba speed controller could possibly cope with was not high enough for the drive motors. The relays used to effect motor current switching were a little under-rated (25 amps), but did not appear to suffer any undue problems by virtue of their rating, i.e. running up to 40 amps during a stall condition. The two 24 volt permanent magnet motors used in the robot were sourced at a grand price, second hand and complete with gearboxes at £10 each from a local wheelchair supplier/repair shop. These were found to be approximately 150 watt motors and delivers enough torque to drive the robot. The calculated stall current of these motors was found to be in the order of 40 amps each. The previous and this current design should be more than capable at withstanding the stall currents of the two drive motors. A trip or overload circuit is set to function and close down the drive at about 47 to 50 amps. That is approximately 20 - 25% above each motor stall current. Radio Control systems The R/C receiver signal (servo) format adopted in this unit has followed what must be a very common format amongst radio control systems. That being a variable pulse width that varies under command from the transmitter joystick between 1.0 and 2.0mS. This File: IRC01.doc Page 2 of 41 K.R.Ginn pulse is updated every 20mS. The pulse is a positive edged pulse of an amplitude of no greater than 5.0v. This can be used on most 40MHz land based radio carrier based R/C systems. File: IRC01.doc Page 3 of 41 K.R.Ginn An outline of the principle parts. The basic controller consists of five discrete parts, they are all outlined below. The whole robot controller can run with only three of the six circuits (PCBs), if desired. Omitting the failsafe PCB and the two overload circuits. All the circuits were included to show the total system working and can all be incorporated if required. The H-Bridge – Motor Driver. The H-bridge design uses a series of FETs to switch the motor driver current flow; – four drive FETs arranged in an "H" configuration. But as it is shown here, in this illustration (fig 1), as a series of four switches all actuated by a controller. The controller is not shown in the diagram for clarity. The drive motor is connected as shown between the two pairs of switches (FETs), being the horizontal bar of the "H". Consider closing switches S1 and S3, you will note that the current will flow through S1 through the motor, left to right, and through S3 before File: IRC01.doc Page 4 of 41 K.R.Ginn completing the current path back to the power source. Alternatively only S2 and S4 switches could be closed, the other two being open circuit, now you will see the current flowing through the motor, in this latter configuration from right to left. The motor will rotate in the opposite direction. Having now a means to control current through the motor, and motor direction, albeit very crude, we can achieve forward, reverse motion of the motor (robot/model) and stop function to by having all switches open. The condition where S1 and S2, or/and S3 and S4 are closed should be avoided at all costs, as this will short out the power source and provide no means of driving the motor. The only result here would be to have these devices destroy themselves, having taken a short circuit current from a high power source. Since the limiting current from a pair of series connected 12 volt lead acid gel cells will be far greater than 200 amps, and may destroy themselves having been shorted out! As illustrated in figure 1 this controller has only basic control, i.e. forward/reverse and stop. What is needed is some form of variable drive to be applied to the switches. Using as mentioned before the use of FETs is employed to control the motor drive current. Using one switch to enable current flow, for example S1, and to rapidly switch on and off S3, varying the mark-space ratio will effect the forward rotation speed of the motor, but also the speed can be selected between two limits. Using the other pair of switches (FETs) to control the reverse current flow gives control over the reverse rotation of the motor. Switching all switches (FETs) off enables the motor to stop, no drive current. Steering. There are basically two types of steering, the first one being differential steering, where power is applied to the two drive motors, the rotation of one motor is less than the opposite side, and the robot File: IRC01.doc will turn towards Page 5 of 41 the slower side. Or, tank K.R.Ginn File: IRC01.doc Page 6 of 41 K.R.Ginn steering, where both motors are driven at the same speed, and to effect steering of the robot, one motor is driven in reverse to the other. routine. Thereby demonstrating that "turning However the differential steering robots on the will spot" exhibit essentially the same routine if driven so. The tank steered robot is generally harder to drive. Because of the constraints in a combat arena, it was thought better to have tank steering due to the tight spaces, and better manoeuvrability the tank steered robot has. However, tank steering has one major disadvantage; it is harder to control the robot using this method, whereas differential steering has a more natural feel and steers much more like a conventional motor vehicle or R/C model car. This type of steering was used on the previous controllers, and has been dropped for tank steering in this design. Failsafe The failsafe is by far the most important part of the unit's electronics package and is integrated within the routine of the circuit and the programmed micro controllers. Here there are two power supply circuits from the main motive batteries, one low current and one high current path. The low current path, capable of supplying no more than an amp or so, this supplies only the controllers electronics, and the high current path which supplies power to the drive motors, weapons and any ancillary circuitry. The reason for providing the two distinct circuits is simply to supply continuous power to the units electronics whilst the robot is running, albeit if the robot is working and running around, or sitting idle. The other condition is where, during failsafe, the robot's power to drive motors and weapons will be removed for the duration of the failsafe or overload condition. This will occur under command of the micro-controller circuitry. File: IRC01.doc Page 7 of 41 K.R.Ginn File: IRC01.doc Page 8 of 41 K.R.Ginn Both the master low and high current circuits are controlled link. When removed will render the robot in by one a safe condition, and no power will be supplied to any electronics in the robot. You could call this a "Master Switch", and is essential for any robot. The failsafe condition occurs when the received signal from the R/C receiver falls outside specific parameters. This happens when the micro-controller circuits measure the incoming R/C receiver pulses with a width duration less than 0.9mS, or greater than 2.1mS. This can occur during a time where there is an interfering signal on the same or close to the R/C radio frequency, or if the received signal is lost totally from the transmitter. File: IRC01.doc Page 9 of 41 K.R.Ginn Power is removed from the high current circuits during failsafe with the aid of a relay or series of relays governing power to the motors, weapons condition is and over, any the ancillary high circuits. current path Once the failsafe supplying power to weapons and motors is enabled and the robot can function after a four second delay. Over Current protection This circuit is optional and can be installed and used to offer additional protection to the drive motors and the controller's drive circuitry under overload and extreme stall conditions. This example is set to limit the total drive current to the controller to maximum of 50amps to each motor (adjustable to between 40 to 50 amps - Rv1 on the board). Full clockwise rotation of Rv1 gives a trip current of 40amps, fully anti-clockwise gives a 50 amp setting). Even though the FET’s (intelligent switches; TR6 and TR8) are themselves are thermally protected and over current protected to 100 amps. The motor overload current (the trigger point set by Rv1 on the overload circuit) has to prevail for approximately three seconds before the overload circuit will trip, it will then hold off the power and drive to the motors for approximately five seconds and then re-apply power to the high power circuits. If a short circuit, for example still prevails, the circuit will cycle around the fault. The only way to stop the circuit cycling would be to deliberately set the unit into failsafe by turning off the R/C transmitter or removing the master link. This Control System This unit is designed to operate at 24v and control a pair of DC permanent magnet motors to a maximum power of approximately 150 watts. I see no reason why higher power motors can’t be used with this circuit. This would mean the controller would be able to drive a pair of 24 volt motors drawing current in the region of 20 File: IRC01.doc Page 10 of 41 K.R.Ginn amps for each motor. Of course the amount of current drawn will depend upon the load of the motor. Each motor drive circuit is capable of delivering some 40 amps (stall current) per motor with ease. There is a current limit set with this controller with additional circuitry that will switch the main motor drive off for five seconds during what could be an extreme motor overload, or motor fail condition. This would be an additional safety feature which would limit the current during a condition a little more serious than a stall. Thus switching the motor drive off, since the stall or fault current of such motors could well develop as waste heat in the controller, motor and wiring in the region of a kilo-watt or more. File: IRC01.doc Page 11 of 41 K.R.Ginn This unit will perform the functions of forward and reverse speed control, steering (tank steering), failsafe and operation protection circuitry. Weapons switching/firing can be accomplished with the aid of an external unit, such as an R/C switcher. Since the weapons used could be activated either as a simple on or off function, or a sequence of functions needing more than a single relay or switch function to operate. Additional switchers can be used for additional functions within the robot, or indeed this controller could be used for a large scale R/C model and is not confined to the exclusive use of a combat robot. The circuit The control system here is built from two major parts, first one being the micro controller circuit, the second part being the motor drivers. There are two motor drivers, one facilitating drive for each motor, one the left hand side, the other driving the wheel and motor on the right hand side of the robot. One micro controller circuit supplies control for both motor drivers. There are additional circuits which are optional to the main controller and can be added if the builder so desires. They are, the failsafe relay driver and the protection circuits for the motor drives. These are separate and can be located away from the main circuitry, but in the prototype here, they are accommodated close to the main electronics package of the robot. Power for the electronics package is all derived from the onboard main motive batteries - twenty four volts (2 x 12v 15AH gel cells), including the power for the R/C receiver. The sensitive electronics and the R/C receiver are all powered from an isolated DC supply of five volts. The drive circuitry for the drive motors is derived directly from the main supply. The choice of a 1 watt DC/DC converter or in the prototype, a 3 watt DC/DC converter is File: IRC01.doc Page 12 of 41 K.R.Ginn used to step down the 24 volts supply to 12v, and also to isolate the main voltage source to the R/C receiver. The output from the DC/DC converter is fed to a bank of three 4,700uF capacitors in parallel, totalling some 15,000uF. Then on to a low voltage drop out 5v three terminal regulator. The 12v feeding the regulator has enough capacity to withstand, in operation, a considerable drop in supply voltage of no less than three seconds to the main circuit shown here. This stops the two PICs from resetting, and helps the micro controller circuit when the unit is under very high load conditions. These very high loads cause drops in supply voltage, albeit momentarily from the gel cells. This is due to the internal resistance of the batteries and wiring’s resistance losses causing a transient voltage drop to as little as 15 volts for a period of File: IRC01.doc Page 13 of 41 K.R.Ginn 100mS or so. Enough time to possibly cause the whole circuit to re-initialise. The main twenty four volts supplied from the motive batteries, will vary considerably with load and voltage transients. Under a stall or starting load conditions the voltage could well drop to fifteen volts from it's nominal value of twenty four. Conversely it could rise to well above eighty volts with transients, i.e. back emfs generated by motors and cabling itself. Therefore power derived for the electronics package has to take into account all these possibilities. Because of the voltage variants, specific precautions have been designed into the circuit which account for these possibilities. Take into account the supply voltage to the micro controller circuit. The main twenty four volt supply is fed to this circuit via SK1. Following the input to the circuit there is power transistor TR1, a TIP41C power transistor. TR1 is biased into conduction by R1 so that there is little voltage drop across the collector emitter junction of TR1. Should the supply voltage on File: IRC01.doc Page 14 of 41 K.R.Ginn the power line rise to a value to cause the zener diode D2 onto conduction, this will have the effect of limiting the input supply voltage to the DC/DC converter that follows TR1, that being 26 volts. This part of the circuit is designed only to reduce any voltage transients that may appear on the main power line to the DC/DC converter. It is not designed as a high power pre-regulator to be fed constantly from a higher voltage source. Nominally the input voltage should be twenty four volts, and will rise to about twenty seven volts when the batteries are fully charged. D1 is providing reverse polarity protection. An additional Varistor is attached to the input side, external to the board, to help adsorb any transients above 40v. This Varistor (shown as R1 on the overall circuit diagram) is attached to the 4-way plug feeding power to the micro controller circuit and is external to the actual micro board. The 3 watt DC/DC converter provides a dual function, not only does it serve to isolate the main supply, but it provides an efficient File: IRC01.doc Page 15 of 41 K.R.Ginn voltage conversion from 24 to 12v DC. Following the output of the converter is a diode D3 which stops any of the charge from the following three capacitors from discharging through the output circuitry of IC1. The three 4700uF capacitors, enough hold charge for at least three seconds for the low drop out five volt three terminal regulator (IC2) which is used to feed a stable voltage (5v) to the two micro controllers, IC3 and IC4. It also supplies power to the R/C receiver. The R/C receiver is fed with this regulated 5v supply, an option is available where removing the link LK-1 will enable the R/C receiver to be supplied with power from separate source, i.e. a set of Nicads attached to the R/C receiver. The on-board 5v supply on the micro controller board is actually adequate to drive the R/C receiver. The R/C receiver supplies a standard form of signals to the servo outputs, the familiar 1.0 to 2.0mS pulse repeated every 20mS. This is fed to the two PIC micro controllers, IC3 and IC4 through PL2/SK2 and PL3/SK3. The two micro controllers then process the R/C signals to perform the functions of speed, failsafe and steering. R4 and R5 bias the PIC inputs to zero volts. Why the two PICs? Considering a fairly standard R/C model installation, and illustrated in this following example we could have four servos attached and controlling four functions of a model aircraft. Three operating the controlling control the engine surfaces on the speed. Each of model the and four the fourth servos works independently of the other three in the model. Although there could be mechanical interaction between the model’s servos, there is no electronic interaction. If one PIC were employed in this robot controller circuit there would be a timing problem encountered. As we are integrating two primary functions within File: IRC01.doc Page 16 of 41 K.R.Ginn the one control system; this being steering and speed control. Examining the timing of the pulses from the R/C receiver in one specific case, for example; channels 1 and 2 were used for steering and speed/direction (forward and reverse), and channel 3 used to fire the weapon. Looking at the timing of the servo pulses from the R/C receiver we have to consider the falling edge of the first channel pulse, this was found to be only micro seconds in front of the rising edge of the second pulse. Using one PIC to control the robot would not have been sufficient. As the PIC could not respond that fast to a break of micro seconds and perform the routine programmed into a single PIC. This would mean the data from the R/C receiver would be skipping each alternative receiver servo pulse it received. Alternating between speed and steering signals, this was considered undesirable. Two R/C receiver output pulses have to be measured to enable the controller to perform correctly. Each output is measured, and the two PICs work out in what direction the robot is moving, if any. It was therefore decided to dedicate a single PIC to each R/C receiver output. Besides using one PIC to perform it's dedicated function, either speed control or steering, the PIC would have in it's own routine a portion of a failsafe routine written within. This would be to disable the main drive motors and remove power to any high current circuit during a failsafe condition. In an overload condition the power would be removed totally from the drive motors and weapon. The PICs The PICs are constantly looking at the two R/C servo outputs feeding PWM signals to the controller. The PICs perform their specific function, IC4 the speed control and IC3, the steering. IC4 is constantly looking at the signal assigned for speed. IC3 is constantly looking at the channel assigned for steering and feeds File: IRC01.doc Page 17 of 41 K.R.Ginn information to IC4 which controls the functions for the steering of the robot. File: IRC01.doc Page 18 of 41 K.R.Ginn The steering function, i.e. motor switching for both motors is accomplished with a mixture of both signals and whereby a map is produced internally to IC4. There are six active regions and three in-active regions of the controller under normal operating conditions. Both PICs look for valid signals in the window of 0.9 to 2.1mS. IC4 closes down motor drive during failsafe, and IC3 is effective during failsafe and overload. During failsafe the failsafe relay is de-energised, and during overload from the sensor, will perform the same function as is found during failsafe and again de- energise the failsafe relay. File: IRC01.doc Page 19 of 41 K.R.Ginn IC4 is designed to control forward and reverse speed in one of four forward or one of four reverse speeds. This will go from approximately 10% to a full 100% speed. Programming the PICs. The PICs here are sourced through EPE, for those constructors who have a PIC programmer these can be programmed by yourself. IC4 is configured during the process of programming with the “power up timer” – enabled. The oscillator setting set to “XTAL” as the master oscillator. The clock for IC3 is slaved off the crystal oscillator in IC4, and as a consequence, the “power up timer” is enabled in the second PIC, and the oscillator setting is set to HS, as though it was being fed from a high stability oscillator module. The code for both of the PICs in the controller was written using Crownhill Associate’s Proton Plus PIC compiler- Version 2.1.5.3. This made the task of writing and refining the PIC code very easy. Converting the code to alter the steering function, to differential steering - if required, should also prove to be an easy task. The rest of the circuit Bearing in mind the sensitive electronics which includes the two PICs and the R/C receiver, they are all isolated from the main power supply, the outputs to the high power circuits are still isolated with the use of a series of opto-isolators. Including the failsafe function. An exclusive OR gate (IC6a and IC6b) is used on each motor driver in the controller as an added precaution to stop both this fault condition File: IRC01.doc where one pair of FETS Page 20 of 41 can both be enabled and K.R.Ginn effectively short out the supply. Should this happen for whatever reason, the motor drive enable line is pulled high by R12 in the motor driver boards, thus stopping all drive to the motor drive FETs. LEDs D4 and D5 on the controller circuit function as a signal path to indicate a turn. With D5 illuminated, this indicates a left hand turn, and D4 illuminated a right hand turn. The LEDs extinguished indicates either the controller is set to a straight run forwards or backwards, or in neutral and in the stop condition. Or indeed the unit could be in a failsafe mode. These LEDs are driven from a spare pair of gates in IC6. File: IRC01.doc Page 21 of 41 K.R.Ginn Drive is sent from the micro controller circuit to each motor driver board. The signals are in the form of five signals, four signals drive the four FETs, and are independent of each other and the motor drive enable signal. As mentioned in the preliminary text describing the H bridge arrangement, drive is effective when one FET is held “on”, and pulsed drive is made available to the other FET. This would be TR5 held on and TR8 pulsed with a variable pulse width to effect a variable speed in one direction. In the motor driver circuits, use of DC/DC voltage converters is again put to good use. Originally a “Bootstrap” design was going to be used, but by virtue of it’s design, you cannot achieve 100% power through the controller to feed the drive motor. In this design you can, because the drive bias is supplied from the DC/DC converters and not the oscillating waveform from the motor drive output. In a Bootstrap design, the drive has to be oscillating, even at 99% drive, trying to achieve 100% drive would only turn off the bias to the high FETs and the controller will switch off. Failsafe Circuit Relay Bearing in mind we have a supply of twenty four volts, it would have been thought safe to assume the use of 24v relays would be acceptable within this application. In use, the supply voltage could actually drop below the minimum holding voltage which will hold closed the relay contacts. When a 24v relay is actuated, it could easily release a set the contacts when the supply voltage drops to below 18v. Therefore the failsafe relay is a 12v device, which has it's own 12v supply designed to power just this relay. It should hold the relay voltage constant throughout these supply transients. The overall power needed to supply the relay is a little higher, but this is the price we have to pay for reliability in these circumstances. File: IRC01.doc Page 22 of 41 K.R.Ginn The failsafe relay is actuated and kept energised during normal operation, but when the unit detects a failsafe condition, the relay will become de-energised and removes power to the high power circuits. The low power circuits have to be powered during failsafe. During the failsafe condition, the failsafe relay will remain de-energised. The relay driver electronics as well as the relay coil are isolated from the micro controller circuit with an onboard optoisolator. Motor Protection (over current) Circuit. The FETs used in each motor driver are capable of handling a maximum source current of 100 amps. This is internally limited by the transistor’s own protection circuitry. TR6 and TR8 are both known as “Intelligent Switches” and are a little more than just a basic FET. They individually incorporate protection that limits current and junction temperature within safe operating limits. However to avoid this limit being reached during normal running, except for starting surge, an additional circuit is incorporated to detect and switch off the drive current. Once this limit has been reached and sustained for a period of three seconds, the unit will release the failsafe relay for a further five seconds, then re-apply power. This circuit can provide a non-intrusive means to sense the drive motor currents, either through motors individually or the total motor drive current as a whole. Therefore one or two sense circuits can be employed. Or can be omitted. The circuit uses a reed relay that during normal operation is kept energised, the primary coil current is adjusted with the aid of File: IRC01.doc Page 23 of 41 K.R.Ginn Rv1 on the board. A secondary coil is wound around the outside of the reed relay. The current in this secondary coil is made in such a way that this additional magnetic field produced equals and opposes the primary magnetic field generated from the five volt supply when a fault condition occurs. During this fault condition the secondary winding generates an opposing magnetic field to the reed’s internal primary coil. The effect is that of opening the reed switch contact when an equal and opposing magnetic field is generated by the motor currents. Once opened for three seconds, the following circuits will actuate and process the fault information. The overload sense delay time is set by the time constant of R2 and C1. However when the circuit is out of the File: IRC01.doc Page 24 of 41 K.R.Ginn overload state, the timing components of R1 and C1 are now effective, and the return out of the overload condition is almost immediate. The overload circuit integrates with the micro controller board, where the signal is fed to pin 6 (RB0) on IC3, this port has a Schmitt trigger input. During normal operation the reed relay RLA contact is held closed whilst the primary coil is energised. Thus being the motor drive currents fall below the overload threshold current. It has to be mentioned the supplementary winding around the relay has to have the motor current flow in the right direction to cancel the primary magnetic field generated by the coil’s holding current. If the magnetic field generated by the motor current is the wrong way around, the resultant additional magnetic field will be augmented and the relay contact will never open during a fault condition. Motor Noise Suppression Not shown in the circuit diagrams, for the sake of clarity are a number of suppression components that have to be added to each drive motor. Capacitors across the motor contacts, and from each motor contact to the chassis of the motor are advised. This will reduce the drive motor’s electrical noise significantly. Reducing the effects on the R/C receiver. Additionally it has been found prudent to also attach across the motor contacts a Varistor. The Varistor acts as a transient voltage limiter, and keep any back emfs generated by the motors to a limit of 50v. The devices themselves are rated at 47v and limit forward and reverse voltages generated by the motors, i.e transients. This keeps any transients generated by the drive motors well within the ratings of the motor drive FETs. Construction File: IRC01.doc Page 25 of 41 K.R.Ginn The controller is fabricated from a total of six PCBs. They are as follows: 1- The micro controller and power supply circuit 2- Left hand motor drive circuit 3- Right hand drive circuit 4- Failsafe relay driver 5- Motor drive protection circuit (LHM) 6- Motor drive protection circuit (RHM) The micro controller and power supply circuits are fabricated on one double sided PCB. All the integrated circuits, with the exception of the three individual opto-isolators are mounted in IC sockets. The turned pin variety are possibly best used here, thereby ensuring the IC won't shake loose in combat. The rest of the components are all mounted snug to the boards, this way the vibration to the components will not be too excessive. Observe File: IRC01.doc Page 26 of 41 K.R.Ginn static sensitive precautions for the appropriate components in this circuit and those on other boards in this project. The left hand and right hand drive motors drive boards are fabricated as a pair on two single-sided PCBs. All the components are soldered in circuit. The 12v regulator and the power FETs for each controller are mounted to a form of heat sinking, since they will get hot during use. The regulator itself will dissipate about one watt during operation. The mounting of the power devices has to be checked, to ensure there are no electrical shorts or low resistances caused from the actual device (drain terminal) to the heat sink or chassis of the unit. Use thermal grease and insulating washers to ensure good thermal coupling, if using mica thermal washers. The majority of the wire links are made from a small gauge tinned copper wire, approximately 24 swg will suffice. However the use of a thicker gauge of wire is needed to help supply current to the source of TR6, shown at the bottom right hand of the PCB. The wire link between IC1 and R2 has to be sleeved because of it’s proximity to the two smaller links either side of it. A three way connector is avaialable on each motor driver circuit as an auxillary 12 volts supply output from the 12 volt regulator. This could be used to drive a cooling fan allied to the controller’s electronics. High current PCB tracks on this board and others can be built up with the addition of solder run along the track making the tracks thicker, reducing track resistance. Failsafe relay driver and the motor drive protection circuits are constructed again on a single-sided PCB. IC1, the 12v regulator requires heat sinking. This regulator will to get hot and will dissipate about 1.5 watts when the failsafe relay is energised. The FET used to switch the relay coil current is soldered onto the underside of the PCB, and is a Surface Mount Device. File: IRC01.doc Page 27 of 41 K.R.Ginn Most of the electronics circuits are accommodated in a die-cast aluminium box for mechanical protection and heat sinking. Heat sinking - especially for the two motor drive circuits; the casing provides heat sinking for the main power components, these are attached to the enclosure. The R/C receiver, weapons switcher and the micro controller can all be accommodated within the same box. There are a number of suppression components mounted close to the drive motors, this can be accomplished as shown in one example with all the components mounted in a small die-cast aluminium box mounted on the actual drive motor. The connection for the drive signals between the micro controller board and the two motor driver circuits are made with the use of two 10-way ribbon cables. These cables supply the drive signals to the motor driver circuits from the micro-controller circuit. The circuits either side of the cable are effectively isolated from each other with the aid of the opto-isolators on the micro controller board. The isolation provides a degree of immunity to motor noise. Mounting each PCB is accomplished with suitably sized spacers and M3 screws to space the boards away from the casing. In the prototype thin plastic sheeting (approximately 1mm thick) backs each board to ensure there are no short circuits to the metal case. Wiring The low current wiring in the unit, and this includes the power feed to the micro-controller circuit board and the relay coils all use 1 or 3 amp cable. The remaining high power circuits use automotive wire cable of carrying the current needed to drive the motors and ancillary circuits. Here the use of 30 amp wire has been used, and purchased from a local automotive shop. In some File: IRC01.doc Page 28 of 41 K.R.Ginn instances the circumstances) wire to has reduce been the doubled wire (or trebled resistance of high in some current paths. Main Power Link The main power link that is required, is made of a “U” link fabricated from a suitable connector which can handle the total current with ease. The position of the link is made such that the link can be accessed easily from the outside of the robot, and removed without anyone or indeed anything coming to any harm. This link will kill the electrical power totally to the robot and make it safe. Once the main power link is in position the circuit is initialised, there is a half second delay which the failsafe relay takes to power up the robot. This gives time for the electronics to settle. At which point anyone close to the robot should get clear, and retire to a safe distance before it starts working. Testing and connecting up the units It is probably best the five individual PCBs, once constructed are tested on their own, without the need for a motor to be connected to the driver circuits. As with any circuit, check the component placements, ensuring correct orientation of the components and component values. Power up each circuit in turn and check that no excessive current is drawn from the power supply. For each circuit there should be no greater current drawn than 30mA for any circuit at 24v supply in their quiescent states. Set a current limit on the power supply during testing to 500mA when testing individual boards, and start the input voltage at 15 volts and rise it slowly to 24v. Do not raise the voltage from zero to 24v, as this will inhibit any of the DC/DC converters from starting up correctly. They otherwise File: IRC01.doc Page 29 of 41 K.R.Ginn may draw a large current as a consequence. This will cause the circuits not to work, and the DC/DC converters may get a little warm. In testing this condition has not damaged any of the DC/DC convertors. Connect the circuits together on the bench with a current limited power supply set to 2 amps at 24v. In place of the drive motor use a dummy motor circuit that can be made from a handful of components. See figure 10. This dummy motor circuit will lightly load the driver at 100mA, and indicate which direction the current flows. Indicating to the current direction flow and drive level. The brighter the LED glows, the greater amount of power is supplied to the motor and hence the faster the motor will rotate. The other LED in the dummy motor circuit will glow and indicate reverse current flow, this indicates the speed of the motor running in reverse. Connect the R/C receiver to the controller unit and switch on the power to the circuit. Notice that D4 on the micro controller illuminates, so to does the LED on the two drive boards, D1. The current drawn here should be in the order of 230mA. Don’t worry if it is a little higher, but it should certainly be no greater than 500mA. Check with the aid of a multi meter all the outputs from the various regulators. This includes the input voltage to the micro controller board, and the three terminal regulators in the controller. Importantly, notice the high-end DC/DC converters on the motor driver circuits are floating, and the output voltage here is not with respect to earth or the negative side of the supply. Micro controller circuit. File: IRC01.doc Page 30 of 41 K.R.Ginn Input 24v with respect to earth (0v) TR1 emitter 23v (approx). IC1 DC/DC converter 12v. IC2 input 11.4v. IC2 output 5v IC7, pin 16 12v supplied from the LHM driver board IC8, pin 16 12v supplied from the RHM driver board Motor driver boards (both). IC5 input- 24v IC1 output 12v IC6 12v * note – floating, measure across the DC/DC converters output. Failsafe board IC1 input 24v IC1 output 12v Overload protection circuit. IC1 input 24v IC1 output 12v Set the preset potentiometer to 3 o’clock position. Setting Up When setting up, switch on the R/C transmitter before the robots electronics. Have the joystick used to control the robot centralized. Any adjustments should be made on the joystick’s trim controls on the transmitter. With the circuits powered, the two LEDs on micro controller circuit, D4 and D5 should remain unlit, so to will the LED on the failsafe. The LEDs on the dummy motor boards may glow. Moving the File: IRC01.doc Page 31 of 41 K.R.Ginn joystick back to the neutral position you will notice the LEDs on the dummy motor boards light or extinguish. Moving the joystick back the other LED on the dummy motor board will now illuminate. The further away from the neutral position the joystick is the brighter the LED on each motor driver board will be. Thus indicating the motor running in the reverse direction. With the drive levels we are dealing with during set up, there should be no need to consider the protection circuitry, and the setting up of this side as yet. Add the actual drive motors in place of the dummy drive boards with the suppression circuitry installed, this is important. Running tests with the motors on the bench is fairly safe, but bear in mind the motors will tend run back and forward as the testing progresses. You may find if the motors aren’t secured, they may thrash around on the bench. Connecting the motors in circuit and powering the whole controller from a series of gel cell batteries currents. will Therefore enable during large bench currents testing it as well would be as fault wise to either limit the current with a suitably rated fuse or circuit breaker. As can been seen from the photos, there are a number of components that will get hot or warm and do require some form of heat sinking. Especially the power devices assigned to the motor driver circuits. Specific details are not given, as the actual heat sink dimensions will depend largely on the particular installation completed. The brackets fabricated are made from 16 swg aluminium and are attached to the die-cast box in which the whole driver circuits are installed. The casing thus forming part of the heat sinking arrangement for the driver transistors. File: IRC01.doc Page 32 of 41 K.R.Ginn After satisfactory testing on the bench, the controller can be installed into the robot. A word of warning. When checking the controller in the robot with the motors connected, ensure the wheels are well clear of the floor or any other object. Any weapon or similar device is secured in a safe condition. Leave a good few inches clearance between the wheels and the ground. Also between the wheels, any tools or loose pieces of metal etc. Switch on energise, the R/C transmitter, the current drawn the by failsafe the relay circuit should will now increase accordingly when the relay is energised. Ensure the pulse width received is between approximately 1.0 and 2.0mS, otherwise the unit will fall into failsafe. Set the corresponding joystick controls on the transmitter to their central position. Here we have to assume the joystick’s central position corresponds to a pulse width at the receiver servo output of 1.5mS. Using an oscilloscope here will be very useful in verifying this pulse width. With both joysticks, one assigned for steering, the other assigned to speed control set in their central positions the motors (or dummy load motors) should show no signs of life. The failsafe relay will be energised, and the shown by the LED illuminated on the failsafe PCB. Pushing now the steering joystick to the left will see the LED D4 illuminate on the micro controller board, pushing the joystick to the right, D5 will extinguish and D4 will illuminate. This indicates the PIC assigned for steering is working and decoding the receiver pulse width correctly for the turn information. Relocating the joystick to the central position, LEDs, D4 and D5 should both extinguish. File: IRC01.doc Page 33 of 41 K.R.Ginn Looking at the joystick assigned to control the speed of the drive motors and moving the joystick forward, a forward drive condition will be initialised, and the LED on the dummy motor load board for both motors will illuminate/flash, and will get brighter as more the joystick is progressively pushed forward. Connecting the drive motors to the circuit it is prudent to switch the controller off and let it lay un-powered for a at least ten seconds before attempting to attach the motors. Once the motors have been connected keep the drive wheels chocked up and off the ground. Apply the high current link, still with the fuse (or circuit breaker) in circuit. Stand clear! With the transmitter switched on and the controller powered the robot’s wheels should be stationary. Moving the joystick gently forward both motors will begin to slowly rotate, hopefully to propel the robot forward. Slowly returning the joystick to the central position the motor will slow and stop. Pull the joystick toward you and both the wheels will rotate in the opposite direction. Return the joystick to the neutral position. Actuate the steering joystick to the left, push the joystick controlling speed forward. You will now notice the right hand motor driving forward, whilst the left hand motor is driving in reverse, effecting a forward left hand turn. Return both joysticks slowly to their neutral positions. Move the steering joystick to the right, and the speed joystick to the forward position, notice now the rotation of the drive motors is opposite to what it was before, initiating a forward right hand turn. Failsafe operation. File: IRC01.doc Page 34 of 41 K.R.Ginn The operation of the failsafe circuit has to be checked before the robot is unleashed on another unsuspected robot. Once the joystick trims have been adjusted on the R/C transmitter; setting up the neutral position for both speed and steering, and the extremes of joystick travel which must be within the acceptable limits, i.e. 0.9 to 2.1mS. If the receiver pulse width were to enter outside this window, the controller would fall immediately into a failsafe condition. The failsafe on the prototype was found to be successful in operation, and the software filtering is adiquate. In testing the prototype robot’s wheels were not perceived to have moved more than a few degrees, in an hours soak test. Checking the Robot’s Failsafe Checking the robot’s failsafe is done in the following manner. Ensure the safety link is removed from the robot and it is unpowered. Check to the transmitter is switched off. Always switch the robot on last of the two parts, this being the transmitter is always switched on first before the robot, and is always switched off last when the robot is switched off. With the transmitter powered, connect the main power link to the robot, power will be initialised to the circuitry, and the robot will become active to commands after a delay of two seconds. Use the joysticks to verify the operation of the radio link. Switch off the transmitter, and the failsafe relay will become de- energised. The motors will run down and should remain in-active whilst the failsafe condition prevails. Any weapon under control of the failsafe should will also remain in-active during the failsafe condition. Should electrical noise trigger any part of the circuit, it should only be momentary, and movement of the robot will be minimal. The failsafe has been active for an hours test and in that time no discernable movement of the robot was observed, nor did the weapon trigger once. File: IRC01.doc Page 35 of 41 K.R.Ginn The reason for slowly moving the joysticks back and forth is to ensure the starting current is not sufficient to trip the temporary fuse or circuit breaker in the main power line used to protect the circuits during testing. This can be removed once the testing has been completed and are confident the controller circuit is sound. Once the power line protection has been removed after testing, the robot can be checked out in a safe area. Testing the robot with the R/C equipment fully operational. Good luck! Component List (micro controller board) R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R23 R24 R25 R26 R28 R29 R30 R31 R32 C1 220R 600mW 1K0 4K7 22K 22K 1K2 1K0 470R 470R 470R 470R 470R 470R 470R 470R 470R 4K3 4K3 4K3 4K3 4K3 220R 4K3 4K3 4K3 4K3 4K7 1K8 1K8 22K 2K2 470uF 35v PCB mounting elect, 0.2” File: IRC01.doc Page 36 of 41 K.R.Ginn C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 D1 D2 D3 D4 D5 D6 TR1 IC1 10uF 35v PCB mounting elect, 0.1” 4700uF 16v PCB mounting elect, 0.3” 4700uF 16v PCB mounting elect, 0.3” 4700uF 16v PCB mounting elect, 0.3” 100nF 63v poly PCB mounting 0.2” 47uF 50v PCB mounting elect, 0.1” 100nF 63v poly PCB mounting 0.2” 22pF ceramic PCB mounting 0.1” 22pF ceramic PCB mounting 0.1” 100nF 63v poly PCB mounting 0.2” 220uF 35v PCB mounting elect 0.2” 100nF 63v poly PCB mounting 0.2” 100nF 63v poly PCB mounting 0.2” 47uF 50v PCB mounting elect, 0.1” 100nF 63v poly PCB mounting 0.2” 1N4002 27v 1.3w zener diode 1N4002 3mm red LED, 0.1” 3mm green LED 0.1” 3mm yellow LED 0.1” TIP41C, plus insulating kit. 24v/12v 3 3watt DC/DC converter, manufacturers part no: NDY2412, Farnell stock no: 605-633 IC2 LM2940CT, 5v three terminal regulator, plus insulating washer. IC3 PIC16F84-4 IC4 PIC16F84-4 IC5 74LS09 IC6 74LS86 IC7 TL074 quad opto-isolator, Maplin stock no: YY63T IC8 SHF618-2 single opto-isolator, Maplin stock no: CY94C IC9 TL074 quad opto-isolator, Maplin stock no: YY63T IC10 SHF618-2 single opto-isolator, Maplin stock no: CY94C IC11 SHF618-2 single opto-isolator, Maplin stock no: CY94C Misc Components Connectors, Varistor 39v, Farnell stock no: 318-401. PCB mounting, 3-way, 4-way, 5 way and 10way, **see circuit diagram. DIL sockets14,16 and 18 pins. Mounting hardware, screws etc. Component List (motor components below) R1 R2 R3 R4 driver board, 2 required of listed 2K2 10K 1K8 22R File: IRC01.doc Page 37 of 41 K.R.Ginn R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 D1 ZD1 ZD2 ZD3 ZD4 IC1 IC2 IC3 IC4 IC5 IC6 IC7 TR1 TR2 TR3 TR4 TR5 TR6 TR7 TR8 100K 1K8 22R 2K2 10K 1K8 22R 4K7 100K 2K2 1K8 22R 2K2 2K2 10uF 50v PCB mounting elect, 0.1” 100uF 25v PCB mounting elect, 0.1” 100nF 63v poly PCB mounting 0.2” 100nF 63v poly PCB mounting 0.2” 100nF 63v poly PCB mounting 0.2” 100nF 63v poly PCB mounting 0.2” 100uF 25v PCB mounting elect, 0.1” 10nF 63v poly PCB mounting 0.2” 100uF 25v PCB mounting elect, 0.1” 10nF 63v poly PCB mounting 0.2” red LED, 0.1” 15v 300mW zener diode 15v 300mW zener diode 15v 300mW zener diode 15v 300mW zener diode SHF618-2 single opto-isolator, Maplin stock no: CY94C SHF618-2 single opto-isolator, Maplin stock no: CY94C HEF4011BP HEF4011BP 12v 1 amp 3-terminal regulator – 7812, with heat sink 12v/12v 1 watt DC/DC converter, manufacturers part no: NME1212S, Farnell part no: 178-197 12v/12v 1 watt DC/DC converter, manufacturers part no: NME1212S, Farnell part no: 178-197 BC182L BC182L BC182L BC182L FQA85N06, Farnell stock no: 394-4384 VNW100N04, Farnell stock no: 332-8569 FQA85N06, Farnell stock no: 394-4384 VNW100N04, Farnell stock no: 332-8569 Misc Components File: IRC01.doc Page 38 of 41 K.R.Ginn Connectors Insulating 10 way, washers and for IC5, connecting TR5 to and TR8, mounting and heat hardware. sink to be fabricated. Component List (Failsafe relay board) R1 R2 R3 C1 C2 C3 D1 TR1 IC1 100K 1KO 2K2 100nF 63v poly PCB mounting 0.2” 100nF 63v poly PCB mounting 0.2” 22uF 35v PCB mounting elect, 0.1” RED led, 0.1” BSP295, SMD FET 7812 12v 1 amp 3-terminal regulator and heat sink Misc Components Connectors, 30 amp DPST 12v relay, PCB mounting 2-5 way and one 4way, see circuit diagram. Component List (Overload board) R1 470R R2 56K R3 1K0 R4 1K0 Rv1 100R preset C1 100uF 25v PCB mounting elect 0.1” pitch C2 47uF 25v radial mounting elect D1 5v6 600mW zener diode D2 1N4148 D3 3mm red LED, 0.1” pitch TR1 2N3703 TR2 BC182L RLA reed relay SPNO 5v, coil resistance 500R. Maplin stock no: JH12N Misc Components Connectors, PCB 5 way plugs, 14swg (2.00mm diameter)tinned copper wire, PCB Component List (Motor suppression, one set per motor) 100nF 200v polyester capacitors (3 required). Varistor 39v, Farnell stock no: 318-401. File: IRC01.doc Page 39 of 41 K.R.Ginn Component availability. The components suppliers, the for most this project common were sourced components, i.e. from two resistors main and capacitors are obtainable from common suppliers, in this instance Maplin. The more specialised components such as the power FETs and the DC/DC converters were sourced from one specific supplier, Farnell. The PCBs can be obtained from the EPE PCB service. Additional notes from construction not necessarily for publication – KG). The prototype PCBs were sourced from two suppliers after design. They were PCB-Pool in Ireland for the double-sided board. The single sided PCBs were sourced from a company in Erith, P & D Circuits through a friend of mine who manufacturers short runs for me. The whole unit was fabricated as presented. The majority of the circuitry was enclosed within the die-cast box and mounted to the rear wall of the robot. The die-cast box forming part of the heat sinking for the power FETs and protection against flying metal objects and shards of metal within the robot. The exception is the overload circuits both of which are temporarily mounted on the outside of the unit with Velcro. A more permanent solution will be made in time, i.e. brackets. The controller was primarily designed for the two wheel chair motors, and does work very well with these two 150 watt motors. I see no reason why the controller can’t be used with higher power motors running at 24 volts. Only the overload circuit and high File: IRC01.doc Page 40 of 41 K.R.Ginn current cabling should be changed accordingly to cope with the higher current. On the micro-controller PCB R32 is not shown in the prototype, this actual resistor has been added to the bottom of the PCB. But in the published version, this has been added to the finished board and is adjacent to IC3, right hand side. File: IRC01.doc Page 41 of 41 K.R.Ginn