![]() |
![]() |
![]() |
|
|
|||||||
| Robotics Chat Specific to discussions about robots and the making of. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Okay, a few questions on a bot I'm working on.
I'm using a bulldozer kit with a Tomiyama Gearbox (twin motors rated at 3V dc), 16F876A, and L293D to run the motors. 4 rechargeable AA's run the motors, and a standard 9v battery runs the electronics. I'm using PWM by connecting CCP1 and CCP2 of the PIC to Enable 1 and Enable 2 of the H-Bridge. Here's the code that sets it up: Code:
;-------- PWMInit ;-------- ;--Sets up PIC for PWM outputs on CCP1 and CCP2, sets period and initial duty cycles ;---Setup CCP/PWM/PORTC pins as outputs BANKSEL TRISC ;bank1 bcf TRISC, 2 ;CCP1 bcf TRISC, 1 ;CCP2 ;---Set PWM period for both modules movlw .128 movwf PR2 BANKSEL PIR1 ;bank0 ;---Setup Timer2 bcf T2CON, T2CKPS0 bcf T2CON, T2CKPS0 ;prescaler set to 1 bsf T2CON, TMR2ON ;start timer2 ;---Setup CCP1 for PWM movlw .100 ;bits 2-9 movwf CCPR1L ;****duty cycle**** bcf CCP1CON, CCP1Y ;bit 0 bcf CCP1CON, CCP1X ;bit 1 bsf CCP1CON, CCP1M3 bsf CCP1CON, CCP1M2 ;set CCP1 module to PWM ;---Setup CCP2 for PWM movlw .100 ;bits 2-9 movwf CCPR2L ;****duty cycle**** bcf CCP2CON, CCP2Y ;bit 0 bcf CCP2CON, CCP2X ;bit 1 bsf CCP2CON, CCP2M3 bsf CCP2CON, CCP2M2 ;set CCP2 module to PWM |
|
|
|
|
|
|
(permalink) |
|
I use almost exactly the same setup in my Mongoose robot. If you use NiMH batteries they're not 1.5V they're closer to 1.25V.
Those Tamiya gearbox motors are fine at 5V, it's the stall current that can hurt them. |
|
|
|
|
|
|
(permalink) |
|
Don't worry about it, you make considerable loss in the H Bridge IC. In any case, it's common to run motors at higher voltages to gain more power and speed, motors don't just fry if you up the voltage a little.
Motors used in Robot Wars and such programmes are commonly VERY over run - with at least 24V for 12V motors, and sometimes 36V or even 48V!. |
|
|
|
|
|
|
(permalink) |
|
So the voltage my meter shows on the motor leads is an accurate measurement? And if so, the H-bridge accounts for my voltage loss (1.8-2 volts)?
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
Personally I wouldn't have even tried measuring it!. |
||
|
|
|