+ Reply to Thread
Page 5 of 10 FirstFirst 123456789 ... LastLast
Results 81 to 100 of 187

Thread: Mecanum Wheeled Robot with Machine Vision

  1. #81

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I added two new photos to my Encoder Investigations# 1 page:

    http://www.cliffolling.com/ArukuGo/E...putChecks.html

    Hopefully by next weekend I'll have made some (visible) progress with my Encoder data plotting, so stay tuned.

    =Cliff

  2. #82

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Hello,

    I just stumbled upon this thread doing some research for a robot we currently built. The chassis was thrown together ourselves but we have been considering maybe building another one with the rover 5. We are having huge issues with the PID and are currently using the arduino mega. I think it is because we dont understand exactly what is happening with the PID equations as we should. We just can't get the damn thing to move straight or sideways in a slow controlled manner the wheels seem to not want to match up correctly. We have even tried writing a small type of code where we have a master wheel and the other three are trying to match the master wheel. This may be due to using continuous servos as our motors with encoders attached for feedback. Hopefully you two still look at this thread really could use some help! I might even jump over to that parallax chip as it seems very interesting with the parallel processing.


    Thanks!
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	IMAG1156.jpg‎
Views:	85
Size:	125.1 KB
ID:	99085   Click image for larger version

Name:	IMAG1094.jpg‎
Views:	112
Size:	181.6 KB
ID:	99086  

  3. #83

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by amano001 View Post
    Hello,

    [...] We are having huge issues with the PID and are currently using the arduino mega. I think it is because we dont understand exactly what is happening with the PID equations as we should.
    Please post your code as an attachment, or send it to me as a message, and I'll take a look an see if I can find any issues in it.

    =Cliff

  4. #84

    Default Re: Mecanum Wheeled Robot with Machine Vision

    @amano001, Sorry I missed you post. I'm glad Cliff replied.

    I doubt you need full blown PID. Proportional feedback is usually enough with these type of robots.

    I don't see any encoders on your robot? You don't really need encoders if you're driving the robot remotely and your motors are powerful enough, but if your motors are underpowered like the Rover 5 then encoders are needed to move at slow speeds.

    While the Rover 5 is reasonably priced, it has its shortcomings. I have a thread here discussing some of the pros and cons of the Rover 5.

    I haven't used Vex motors myself but the ones you have on your robot, look like they're on the small side for this application. The motors may need encoders in order to be useful at slow speed.

    I don't know if the Arduino Mega can read four quadrature encoders and perform the other calculations needed to control a four motor robot. Projects like this (with lots of sensors and things to control) is where the Propeller really shines.

  5. #85

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I've been working on both my Rover 5 robots a lot lately. I added a QuickStart board and two inexpensive L298N motor control boards to my treaded Rover 5. It worked pretty well so I decided to try the same control board in my Mecanum wheeled Rover 5. The control board was easy to switch between robots. I'm like how the code is coming along.

    Here's the Mecanum wheeled Rover 5 with the alternate control board in action.



    There's another Mecanum wheeled Rover 5 on LetsMakeRobots.

    I'm trying to figure out how to position the various PCBs and battery on the robot to keep the the robot relatively sleek. I'd really like to figure out some sort of cover for the electronics. I found having a rats nest of wires bothersome when I drove the treaded Rover 5 out in the snow. I'm also trying to figure out some sort of turret to which I plan to mount sensors.

  6. #86

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Cool. A Mecanum figure 8 in the snow would be even cooler!
    "Give a man an inch, and right away he thinks he's a ruler." Maxwell Smart

  7. #87

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I've attached the lastest code I'm using on my Mecanum wheeled Rover 5.

    The code is heavily commented. See post #60 the Rover 5 thread for some additional instructions on how to use the object.

    I recently realized this code could easily be used to make a Propeller board a slave to another microcontroller. Since I've included a way to enter wheel speeds through a terminal window, it should be easy for another microcontroller to send motor speeds over a UART to the Propeller.

    I ought to (and plan to) add a few Mecanum specific commands so a master microcontroller (Arduino or BS2) could send joystick x and y values through the UART and the Propeller would then use this information to control the Rover 5 (or other four motors with four quadrature encoders robot). I'll probably add a direction, magnitude and rotation option as an additional way of controlling the robot through a UART.

  8. #88

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Hey guys! Glad to see your still active on the forum. I had lost hope lol. I will update pictures and code by the weekend. We actually switched over to the rover 5 chassis after seeing the success you guys have had. Our chassis was giving us issues with the shafts of our servos and the encoders on them.

    We are using the Rover 5 chassis with vex mecanum wheels
    Arduino Mega
    Beagle Board - Computer vision
    Ultrasonics for XY positioning on a board
    forgot to add
    Dagu 4 channel motor controller (Question if the properller board is sending out a 3.3v pwm signal and the dagu seems to be 5v will this cause a huge issue?, btw what do you use for h bridge motor controllers)


    We are not sure exactly how to implement the PID. We were looking at the arduino library PID that someone made and tried to mess with it a little. We are not sure exactly how to go about using the PID. What should our set point be? Originally we were trying to use a master wheel for our setpoint and have the other wheels try to match that. But not sure if this is the right approach. We just need to make sure the robot when it moves always stays parallel to a wallno matter if its moving or stopped.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	IMG_20130227_171053.jpg‎
Views:	113
Size:	194.0 KB
ID:	99581  
    Last edited by amano001; 02-27-2013 at 11:19 PM.

  9. #89

    Default Re: Mecanum Wheeled Robot with Machine Vision

    we were looking into using one of the propeller proto boards instead of the arduino mega as we have seen the code response get very sluggish with interrupts going off all the time for the encoders. But we are currently trying to figure out if the dagu 4 channel motor controller will have an issue with receiving 3.3v pwm signals instead of the arduino megas 5v pwm signal? Any idea thanks!

    We are going to try out the parallax board

    https://www.parallax.com/Store/Micro...%2cProductName

    Got the one with 5v regulator so we can run some of our other servos/sensors off the board as well.
    Last edited by amano001; 02-27-2013 at 10:08 PM.

  10. #90

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Im definetely thinking about using the parallax board as a slave board to the arduino, since we are more familiar with it and its library.

  11. #91

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by amano001 View Post
    we were looking into using one of the propeller proto boards instead of the arduino mega as we have seen the code response get very sluggish with interrupts going off all the time for the encoders. But we are currently trying to figure out if the dagu 4 channel motor controller will have an issue with receiving 3.3v pwm signals instead of the arduino megas 5v pwm signal? Any idea thanks!

    We are going to try out the parallax board

    https://www.parallax.com/Store/Micro...%2cProductName

    Got the one with 5v regulator so we can run some of our other servos/sensors off the board as well.
    The board you linked to doesn't have a 5V regulator but I still think it's a good board. You should have 5V from your other boards you could use to power the servos or use a cheap regulator from ebay for your 5V line. (Maybe you have the Propeller Proto Board (which has a 5V regulator) and not the Project Board?)

    You could use the Propeller board (either the Project Board or a QuickStart) as a slave to your other boards. As the code is now it can be controlled from a serial line by sending the motor number followed by the speed. A carriage return indicates when the end of the number has been received.

    I haven't found many 5V devices that wont read 3.3V as logic high. I doubt the motor controller will have a problem with the Prop's 3.3V signal. If needed, you could use a level shifter.

    I'm using a couple of $4 motor controllers I purchased off ebay myself.

    I've been working on adding a compass today but I plan to add support that will allow the Prop to take care of all the trig itself. A master microcontroller would just send direction, speed and rotation information and the Propeller would compute the wheel speeds based on this information.

    The parent uC could take care of sensor readings and navigation decisions while the Propeller chip kept the motors turning at the correct speeds based on the signal from the master uC.

    While I think the Propeller is a great uC to learn to use with robotics, by using the Prop as a slave device you could then free the Arduino to take care of higher level stuff. This should speed up your ability to having a working robot instead of needing to learn to program the Propeller yourself. You could then learn to program the Propeller at your leisure.

    Edit: I hadn't seen your last post when writing the above. I see I was preaching to the choir.

    BTW, I really like your robot. Very cool.

    Edit: Apparently I was suffering from temporary blindness. The board you linked to does indeed have a 5V regulator. My brain saw the Propeller Project Board.
    Last edited by Duane Degn; 02-28-2013 at 01:29 AM.

  12. #92

    Default Re: Mecanum Wheeled Robot with Machine Vision

    amano001: Initially you said you were using CR servos, but your latest posts talk about a 4-channel DC motor controller. Which are you using?

    You can read Duane's love/hate relationship with the Rover 5 chassis in several of his threads. Looks neat, but pretty flexible, which may cause problems once the weight of the vehicle creeps up. Especially since mecanum wheels push & pull your wheels in all directions. Looks like your bot is getting heavy, so you might consider a different chassis. Even a hunk of plywood! http://www.youtube.com/watch?v=rAgiYtwuWB4

    BTW, I'm a staunch advocate of slow, torquey DC motors with lots of gear reduction, because they will be pretty closely matched, RPM-wise. I've had good results with my simple mecanum bot, which doesn't even have encoders yet: http://www.youtube.com/watch?v=RPIfIOat6Os
    "Give a man an inch, and right away he thinks he's a ruler." Maxwell Smart

  13. #93

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I want to point out I was wrong about the 5V regulator. The Propeller Proto Board does indeed have a 5V regulator.

    I know I was thinking to myself as I clicked the link "I'd use a QuickStart of a Propeller Project Board if I were amano001." When the board wasn't a QuickStart my brain hallucinated a Project Board (it's the same size as a Proto Board). (Don't tell anyone about my hallucination, it's kind of embarrassing. Especially not erco!)

    The reason I'd suggest the Project Board over the Proto Board is the Proto Board requires a Prop Plug to program it. There are lots of Propeller board that require a Prop Plug for programming but if you're only purchasing one board then a board with built in USB makes more sense. Both the QuickStart and the Propeller Project Board have on board USB and can be powered by the USB connection.

    Here's a regulator I use when I need 5V on a robot.

    I agree with erco about your robot starting to look a bit on the heavy side. One thing that might help is the use of a higher voltage battery pack. I originally used a 2 cell LiPo to power my robot but I had so many more 3 cell LiPos (used with my quadcopters) that I started using a 3 cell with this robot. The 12 Volts (probably dropped to 10V after the motor controller) is higher than the motors 7.2 volt rating but it's nice to have the extra power. I figure I'm shortening the life of the motors but I don't run the robot for very long when I use it so I thought risk wasn't too bad.

  14. #94

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Hey guys, THanks for all the info. I think I definetely WIll go the way of slaving out the board. That way I can use the arduino to deal with ultrasonics making sure the robot stays parallel to the wall. I have a quickstart board I bought for myself originally to play with and then I ordered the board with the 5v regulator but im starting to rethink my purchase since we just going to use it as a slave board. Also I already have a FTDI connector from an arduino I built myself from a kit, so I dont have to worry about getting the prop clip.

    The previous robot we had built was using servos but now we switched over to the rover 5 chassis w/ motors because the shafts were starting to bend and cause slow down. The robot is a little heavy with the arm we wired up 2 in parallel 7.2v Nicad batteries for power and then we break down that power with 2 different 5v regulators for different parts. Running it off the board itself was just making it easier and less wires going everywhere but if we have to we will just add another temrinal block to run the servos and sensors off of.

    Thanks for the info on the 3.3 logic we just wanted to make sure before we blew something up lol.

    I am looking over your code now that you have uploaded, We are very short on time so it will be a lifesaver to not have to learn the propeller stuff right away and just use it as an integrated part of our robot.

    Thanks and I will keep you updated on how things are going, the computer vision is a pain in itself.

    Also wanted to ask you our logic behind making sure the robot is parallel with wall is using 2 ultraonics one on each corner and determining the distance they are off by parallel being u1-u2 = 0 if they are the same distance from the wall therefore they are parallel. If u1-u2 <0 means left side of robot is going faster then right side and opposite case for u1-u2 >0 . Do you think this is overthinking the process? We need to be very precise when the robot moves into positions on a board.

    U1| Let Side Robot <======
    |
    |
    |
    U2|
    Last edited by amano001; 02-28-2013 at 02:51 AM.

  15. #95

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Maybe I could just use a compass....hmmmm might be easier then having to deal with ultrasonic mess ups when theres weird angles or things in the way.

  16. #96

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I am having a horribly hard time getting this to work lol. I can't seem to figure out how to program which pins are going where from the motor controller. Enc 1 = A and B signals and ENC 2 = A and B Signals I put into pins3 and 4 on my parallax and I get a static changing value so if I spin the wheel forward it counts up and reverse counts down which seems to be working I think but I never set any pins unless 3 and 4 are defaults pins for the encoder[1]. I cant seem to find where to set the motors pwm pins either.

    Let me know if your available for a skype pow wow, my skype is mayong972
    Last edited by amano001; 03-01-2013 at 03:26 AM.

  17. #97

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Everyone loves Duane. He's a very helpful fellow!
    "Give a man an inch, and right away he thinks he's a ruler." Maxwell Smart

  18. #98

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by amano001 View Post
    I am having a horribly hard time getting this to work lol. I can't seem to figure out how to program which pins are going where from the motor controller. Enc 1 = A and B signals and ENC 2 = A and B Signals I put into pins3 and 4 on my parallax and I get a static changing value so if I spin the wheel forward it counts up and reverse counts down which seems to be working I think but I never set any pins unless 3 and 4 are defaults pins for the encoder[1]. I cant seem to find where to set the motors pwm pins either.

    Let me know if your available for a skype pow wow, my skype is mayong972
    I have a bunch of instructions in the top object "Demo4WDBot13026e.spin".

    Here's the section about setting encoder and motor pins:

    Code:
      ******* Setup Instructions *******
    
      This object is intended to be easy to use with multiple
      robots.
      The settings for a specific robot are held in a "Header"
      file. This file should be modified to reflect the
      setup of each robot.
    
    
      ******* Motor/Encoder Setup *******
      The pins used to control the motors, and those used
      to receive encoder pulses, should be set in the header
      file.
      
      The motors/encoders are numbered starting with
      zero in the front left, motor #1 is in the front
      right, motor #2 is in the rear left and motor #3
      is in the rear right of the robot.
      
      Any free I/O pin may be used to control the motors.
      The direction the motor turns may be adjusted
      by switching "WHEEL_RED_x" and "WHEEL_BLACK_x" constants.
      
      The quadrature encoder pins need to be grouped together
      in pairs. Each quadrature encoder output should be
      connected to two consecutive I/O pins. The order of the
      two pins within the pair is not important. The direction
      sensed by the encoders may be adjusted with the
      "FORWARDx" constants.
    The pin settings are in the file "HeaderMecanumQs_130226a.spin".

    Here's the section:

    Code:
      WHEEL_RED_0 = 17         ' The "RED" constants don't have to be assigned to  WHEEL_BLACK_0 = 18       ' red wires. It may be useful to switch the pin
      WHEEL_RED_1 = 21         ' assignments if the wheel direction doesn't match
      WHEEL_BLACK_1 = 20       ' the encoder directions.
      WHEEL_RED_2 = 23         ' Set to "-1" if a motor isn't being used.
      WHEEL_BLACK_2 = 24       ' If any of the three motor control pins is
      WHEEL_RED_3 = 27 '26     ' is set to -1, the motor will not receive a PWM
      WHEEL_BLACK_3 = 26 '27   ' signal.
      
      FIRST_ENCODER_0 = 0     ' The next I/O pin higher will also be used.
      FIRST_ENCODER_1 = 2     ' Example: the encoder for motor #1 will use pins 2 and 3.
      FIRST_ENCODER_2 = 4     ' Set to "-1" if a motor isn't being used.
      FIRST_ENCODER_3 = 6
      WHEEL_ENABLE_0 = 16 
      WHEEL_ENABLE_1 = 19  
      WHEEL_ENABLE_2 = 22 
      WHEEL_ENABLE_3 = 25
    The constant "WHEEL_RED_0" should be set to one of the two pins that control the front left motor. On my motor control PCB it's marked "IN1". "WHEEL_BLACK_0" connects to the other motor controller pin ("IN2" on my board).

    Don't worry about which way the motors spin to start with. You'll want to get the encoder directions figured out first and then come back and set the motor pins so they agree with the encoders.

    I've made it so you don't have to switch encoder wires or motor wires if you don't want to. The directions of both the encoders and motors can be set with the constants in the header file. Depending on your setup, it might be easier just to switch wires rather than changing constant values.

    During this initial setup phase, you'll want to make sure the line"INPUT_TYPE = PC_ONLY_INPUT" is not commented out. Here's the section of code to look for.

    Code:
      ' inputType enumeration  #0, PC_ONLY_INPUT, WII_NUNCHUCK_INPUT, RC_INPUT, WII_AND_RC_INPUT, AUTO_DETECT_INPUT
    
    
      INPUT_TYPE = PC_ONLY_INPUT       '' Use this when first setting up robot
      'INPUT_TYPE = WII_NUNCHUCK_INPUT   
      'INPUT_TYPE = RC_INPUT
      'INPUT_TYPE = WII_AND_RC_INPUT    '' Not yet supported. If used it will behave the same
                                        '' as AUTO_DETECT_INPUT.                                                                                                                                            
      'INPUT_TYPE = AUTO_DETECT_INPUT   '' Priority given to Nunchuck
    You shouldn't need to change this since the appropriate line is already active.

    I did notice a section of code in the header with an incorrect setting.

    Code:
      ' wheelMode enumeration  #0, INDEPENDENT_WHEELS, TREADED_WHEELS, MECANUM_WHEELS 
    
    
      'WHEEL_MODE = INDEPENDENT_WHEELS '' Use this when first setting up robot
      WHEEL_MODE = TREADED_WHEELS     '' The target speeds of each side will be matched.
      'WHEEL_MODE = MECANUM_WHEELS
    I'm not sure why I had the active mode set as "WHEEL_MODE = TREADED_WHEELS".

    While you're setting up your robot, you should change the above code to:

    Code:
      ' wheelMode enumeration  #0, INDEPENDENT_WHEELS, TREADED_WHEELS, MECANUM_WHEELS 
    
    
      WHEEL_MODE = INDEPENDENT_WHEELS '' Use this when first setting up robot
      'WHEEL_MODE = TREADED_WHEELS     '' The target speeds of each side will be matched.
      'WHEEL_MODE = MECANUM_WHEELS
    This will let you control the speed of each motor independently from the rest of the motors. You'll probably want to keep it set to "INDEPENDENT_WHEELS" when you're sending it instructions from your other microcontroller.

    While you're in the header file, you'll want to set "PROPORTIONAL_CONSTANT" to zero while you're setting up the motor and encoders. This will keep the motors from spinning at full speed if the encoders' directions don't match the motors' directions.

    You'll want to make sure and use resistors between the Rover 5's encoders and Propeller's I/O pins.

    Code:
      ******* Note About Wiring *******  
       Each encoder pair needs to be connected to two consecutive
       Propeller pins.
       10KΩ resistors should be used in series with the encoders.
    
    
       10KΩ series resistors should also be used if a RC
       receiver is used.
    
    
       If a Wii Nunchuck is used, it is expected to be used
       on the Prop's I2C bus (P28 & P 29).
    Once you have the above constants all set, you'll want to load the top object "Demo4WDBot130226e" into your Propeller board's EEPROM (by pressing "F11").

    Open the Parallax Serial Terminal (by pressing F12). With the baud set to 115,200 and with the appropriate comm port selected, you should see a bunch of data in the terminal window.

    Something like this:

    Code:
       Target Speeds:   targetSpeed[0] = 0,  child[0] = 0
       targetSpeed[1] = 0,  child[1] = 0
       targetSpeed[2] = 0,  child[2] = 0
       targetSpeed[3] = 0,  child[3] = 0
       Current Speeds:
       currentSpeed[0] = 0,  output[0] = 0
       currentSpeed[1] = 0,  output[1] = 0
       currentSpeed[2] = 0,  output[2] = 0
       currentSpeed[3] = 0,  output[3] = 0
       Current Encoder Readings:
       encoder[0] = 0
       encoder[1] = 0
       encoder[2] = 0
       encoder[3] = 0
               3            2           1
              1098_7654_3210_9876_5432_1098_7654_3210
       Ina = %1111_0000_0000_0000_0010_0000_0000_0000
    You'll want to pay attention to the "currentSpeed" values. Turning the wheels in the direction that would cause the robot to move forward should produce positive speed. If the speed is negative, then you'll want to do one of two things.

    If you're encoder pins are easy to switch, just switch the two encoder pins for that particular wheel. The other way to deal with a negative speed with positive wheel motion is to change the constants "FORWARD0" through "FORWARD3". Change the constant that corresponds to wheel from "1" to "-1".

    Once all the "currentSpeed" values give positive speed with forward robot motion, you'll want to make sure the motors' directions match the encoder directions. There's no guarantee which way the motors will turn when power is applied to the red and black wires. Some of these wires are reversed when they are installed. You'll need to test the motors to see which way they turn.

    Here's the instructions for setting the motor directions:

    Code:
      Before proceeding with the rest of the setup, save  the changes to the header file and recompile and
      load (to EEPROM) the modified code.
      * Set Motor Directions *
      With the modified code running in the robot, again turn
      off the feedback portion of the program by typing "o"
      in the terminal window.
      The direction of the motors should now be checked.
      The direction of the motors should match the direction
      of the encoder feedback.
      The characters ">" and "<" will be used to bracket
      data to be entered into the terminal window. The
      character "" will be used to indicate the "Enter"
      key. To test the direction of motor #0 type the
      following into the terminal window. >0700<. This
      should turn on motor #0 (the front left motor) to
      70% power. If the encoder direction did not need to
      be reversed , the motor should be spinning in a direction
      that would move the robot forward. The main thing to
      check in with these motor tests is to see if he motor's
      "targetSpeed" matches the direction of the motor's
      "currentSpeed" positive "targetSpeed" should produce
      positive "currentSpeed". If the two directions do not
      match, then the constants "WHEEL_RED_0" and "WHEEL_BLACK_0"
      will need to be switched.
      Turn motor #0 off by typing >0<.
      Test the direction of motor #1 (front right) by typing
      >1700<. Again, check to see if the directions of
      "targetSpeed" and "currentSpeed" match.
      Turn motor #1 off by typing >1<.
      Repeat this process for motor #2 (left rear) and motor
      #3 (right rear).
      Once the appropriate "WHEEL_RED_x" and "WHEEL_BLACK_x"
      constants have been switched, recompile and load the
      program.
    That's all I have time for right now. Let me know if you need any of the above clarified or if you have any other questions. (I don't have Skype installed on this PC. If need be I could install it. I'd rather help on the forum so others wanting to also use this code can benefit from our exchange.)

  19. #99

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I'm not sure if I've mentioned that this is the program I used to drive figure eights. If the robot doesn't receive any input to tell it to do otherwise, it will start trying to drive in a figure eight.

    I think this should be easy to change. There's a line (#584) in the "Setup" method that sets the driveMode variable. The "SetUp" method is the first method in the top object "Demo4WDBot130226e.spin".

    Here's the section of code:

    Code:
      kP := Header#PROPORTIONAL_CONSTANT  
    
    
      debugFlag := 0
      pDebubFlag := -1
      uSecond := clkfreq / 1_000_000
      refreshInterval := clkfreq / Header#REFRESH_RATE
      ignoreThrottleInterval := uSecond * IGNORE_THOTTLE_INTERVAL
      wheelMode := Header#WHEEL_MODE
      state := WAITING_FOR_MOTOR_ID
      driveMode := FIGURE_8_MODE 'MANUAL_MODE '
      '**18a*Adc.start(Header#DI_ADC, Header#CLK_ADC, Header#CS_ADC, 001)
    Change:

    Code:
      driveMode := FIGURE_8_MODE
    To:

    Code:
      driveMode := KEYBOARD_MODE
    This should keep the motors off when the robot starts.

    I haven't tested this yet (I don't want make any noise right now). I should be able to test this tomorrow to make sure the robot starts with its motors off.

    I wasn't thinking about using the code on a slave Propeller when I posted the code. I just posted the version I had been using (to drive figure eights).

  20. #100

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Hey duane thanks for all the info I have been following the steps to get it working. I am having trouble with the red and black wheel wires since I am using a different motor controller board

    https://www.sparkfun.com/products/11593

    It has Cur(used to measure the current the wheel is pulling), direction, pwm, gnd pins for each motor. So I am not sure what pins would go where for the red and black.

    Ok I see IN1 and IN 2 as motor 1 and IN 3 and IN 4 for motor 2 but I can't figure out how that corresponds to my board with direction pin and pwm pin instead of IN 1 and IN 2?

    THe more research I do it seems that I cannot use the current motor controller with your code. Since my board does all the logic of the H bridge inside it you just pass it the dir and speed while yours you have to enA IN1 and IN2 to set high and low in order to give it a dir and speed. Let me know I might have to swap out the motor controllers to the L298.

    http://dlnmh9ip6v2uc.cloudfront.net/...ets/Robotics/4 Channel instruction manual.pdf

    here is the datasheet for my motor controller and it seems in one of the last paragraphs states the built in control logic allows the motors to be controlled by 2 pins dir and pwm.



    Thanks.
    Last edited by amano001; 03-01-2013 at 09:47 PM.

+ Reply to Thread

Similar Threads

  1. Machine Vision 101 / Taos TSL1401
    By Brian_B in forum Sensors
    Replies: 19
    Last Post: 03-02-2010, 11:33 PM
  2. Machine Vision
    By Eric R in forum General Discussion
    Replies: 5
    Last Post: 11-13-2009, 12:26 AM
  3. Machine vision...
    By RinksCustoms in forum Propeller 1 Multicore Microcontroller
    Replies: 1
    Last Post: 08-14-2006, 07:27 AM
  4. Particular machine vision questions
    By Archiver in forum BASIC Stamps Archive
    Replies: 1
    Last Post: 11-11-2003, 02:36 AM
  5. Shaft encoders for wheeled robot?
    By Archiver in forum BASIC Stamps Archive
    Replies: 9
    Last Post: 03-23-2000, 10:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts