OOBOT40-3 H-Bridge Operating Guidelines ======================================= Hook-up ------- 1. For safety reasons, it is recommended that fuses be used on external power sources connected to the BOT40-3 board, especially the motor supply to the h-bridge chip. This is especially useful when first operating the board, as this is when most problems occur. 2. The BOT40-3 controller board mounts an L298N h-bridge chip, HB1, rated at 2 Amp / channel, at supply voltages up to 46v. The h-bridge chip contains 2 push-pull drivers which can be used to drive up to 4 dc motors in a uni-directional manner, or 2 motors in a bi-directional manner, or else a unipolar or bipolar steppers, plus other end-effector devices. 3. Power for external loads must be provided from off-board and brought in on the +M pin of connector P3. 4. High-voltage bypass cap C18, reservoir cap C16, and transzorb suppressor TZ1 help suppress electrical noise generated by the driven loads. The breakdown voltage of TZ1 should be somewhat larger than the +M voltage (eg, an SA24.0A clamps at about 24v). Fast-recovery diodes D4-D11 provide pathways for motor recirculation currents. Control ------- 1. Cpu pins RD0 - RD3 control the IN1 - IN4 lines, respectively, of HB1. These lines work in pairs when driving bi-directional motors. Motors should be connected M1-to-M2, and M3-to-M4. Control logic for IN1+IN2 follows (and IN3+IN4 is similar): EnableA IN1 IN2 Outputs 0 x x M1 = M2 = disabled, motor free-wheeling. 1 0 0 M1 = M2 = lo, motor braking. 1 0 1 M1 = lo, M2 = hi, motor turning in one direction. 1 1 0 M1 = hi, M2 = lo, motor turning in opposite direction. 1 1 1 M1 = M2 = hi, motor braking. 2. H-bridge Output Levels are roughly 0.5v below the applied supply voltage at +M for output = hi, and 0.5v above ground for output = lo. These voltage differences are related to circuitry inside the chips, and amount to lost efficiency and power lost in heating effects. 3. Speed Control. The Enable lines on HB1 are driven by cpu signals PWM1 (RC2) and PWM2 (RC1). The duty-cycle of the PWM signals control motor speed. The typical motor will not start turning until the PWM duty-cycle attains some minimum (threshold) value. PWM frequencies up to 25-Khz can be used with the L298N chip. 4. Current sense resistors RS1 and RS2, along with comparator U4 circuitry, allow the motor currents to be monitored and limited, according to the adjustment of the "LIMIT" potentiometer. The pot adjustment is approximately linear from 0 to 3-Amp. The L298N can handle 2-Amp / channel continously, and up to 2.5-Amp intermittently. The limiter circuit will help protect HB1 and the loads, in case of short-circuits and motor stalls. Adjust the LIMIT setting in accordance with the specs of motors being used. Safety Issues ------------- 1. As mentioned above, fuses should be used in external supplies connected to the BOT40-3 board. 2. Battery leads to connector P3 should be keep as short as possible and use heavy wire gauge. 3. Inductive spikes will be generated by the motor brushes during normal operation, as well as when motor currents are turned on and off, and some means must be employed to reduce their amplitudes. This typically involves: (a) 0.01 uF caps across the motor terminals, and from the terminals to metal motor cases, (b) series R-C snubbers (10-100 ohm and 0.01 uF) across the motor terminals, or (c) transzorb diodes across the motor terminals. Ceramic caps can be used for small motors, and mylar or polyester caps for larger. 4. Heat-sink: The h-bridge chips will get warm for load currents above 1-Amp or so, and a heat-sink should be used on HB1. 5. NOTE - damage to HB1 and other circuitry can occur if motor directions are reversed instantaneously. Therefore, when reversing directions, the motors should be stopped for a short period and then reversed, or else ramp up and ramp down speed changes used. Miscellaneous ------------- 1. See L298N datasheets and "ST Appnote on L293 and L298 H-bridges" (st-an298.pdf), available on the download page of our website, for further information. copyright (c) Oricom Technologies, Oct 2005 _________________________________________________________________________________________________ Oricom Technologies P.O. Box 68, Boulder, CO 80306 www.oricomtech.com