Pages: [1]   Go Down
Author Topic: arduino motor shield  (Read 868 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i am using an arduino motor shield r3 to drive two brushed dc motors.

on the motor shield can the brake function be engaged without stopping the PWM command to the motors.
for example if the robot is driving forward full throttle (PWM at 255) and a obstacle is detected and i want the robot to stop until the obstacle is gone can i engage the brakes with out dropping the PWM to zero. so when the brakes are disengaged the robot will continue full speed. or will doing so fry the board by short circuiting it.

is the board protected?
Logged

Malaysia
Offline Offline
Sr. Member
****
Karma: 7
Posts: 393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes you may. its simple really. but why do you want to do that?
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what i'm working on is a sumo bot. (two robots go into a a round ring and try to push each other out, the robots must be fully autonomous). i want to make the code with as few lines as possible to allow for the greatest speed. they way i'm designing my code is that when the bot detects an object it will drive at it full speed. as soon as no object is detected it will kick on the brakes because it is very easy to drive out of the ring. then all that needs done is one of the motors switched into reverse and to turn the brakes off the cause the robot to spin locating the target. then another quick tap of the breaks and switch the one motor back into forward and off we go after the opponent. in this scenario the motors are always at full speed and i don't constantly have to command the PWM up or down.

does this sound reasonable?
Logged

Malaysia
Offline Offline
Sr. Member
****
Karma: 7
Posts: 393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

actually in your sequence that can easily be implement with port manipulation.
see page
Code:
http://www.arduino.cc/en/Reference/PortManipulation

well basically you dot have to use a pwm to give instruction to go full speed. just a simple digitalWrite High will do the trick. or if you decide to use port manipulation then for ArduinoMotorShieldR3 u just need to very the port B use as in the link i provided.
Logged

Pages: [1]   Go Up
Jump to: