Omega2-Powered Robot (with Pictures!)



  • Here are a couple of pictures of my Omega 2 powered robot. I'm using the PWM Expansion on the Power Dock, and it's working not too badly.

    1_1497232941832_photo5039984989478954922.jpg

    0_1497232941831_photo5039984989478954923.jpg

    On the proto board is basically this circuit, one for each motor and using the PWM signal output instead. I had to switch the 270 ohm resistor for a 100 ohm resistor before the motors would move...not sure why?

    I also had trouble with stability at first. The Omega kept locking up/crashing and wouldn't come back after a few power cycles. Other times it would work perfectly. I ended up adding 4xAA batteries feeding the PWM Expansion through the barrel connector and that seems to have helped (fingers crossed).

    Note that the PWM controller keeps its last known setting if the Omega2 crashes/reboots, so I had a runaway robot a few times.

    Still tinkering, but I thought I would share with all of you. Right now I'm just using pwm-exp from the command line to control the motors, working on a Python script to run sequences and/or listen for UDP packets to control it with.



  • Quick code...

    from OmegaExpansion import pwmExp
    import time
    
    def Stop():
       "This stops the robot"
       pwmExp.setupDriver(-1, 0, 0)
       print "Stopped."
       return
    
    def Forward( speed, seconds ):
       "This moves the robot forward"
       pwmExp.setupDriver(7, speed, 0)
       pwmExp.setupDriver(8, speed, 0)
       print "Moving forward at " + str(speed) + "% for " + str(seconds) + " seconds."
       time.sleep(seconds)
       Stop()
       return
    
    def Left( speed, seconds ):
       "This turns the robot left"
       pwmExp.setupDriver(7, 0, 0)
       pwmExp.setupDriver(8, speed, 0)
       print "Turning left at " + str(speed) + "% for " + str(seconds) + " seconds."
       time.sleep(seconds)
       Stop()
       return
    
    def Right( speed, seconds ):
       "This turns the robot right"
       pwmExp.setupDriver(7, speed, 0)
       pwmExp.setupDriver(8, 0, 0)
       print "Turning right at " + str(speed) + "% for " + str(seconds) + " seconds."
       time.sleep(seconds)
       Stop()
       return
    
    
    pwmExp.driverInit()
    Stop()
    Forward(100, 2.5)
    Left(50, 2)
    Right(50, 2)
    


  • i added remote control from a C# application and LEAP Motion (!) via UDP.

    Code is here if anyone's interested:

    https://github.com/LeifBloomquist/OmegaBot



  • Awesome! How are you using the LEAP sensor? Do you have any videos?



  • @Josh-Berry said in Omega2-Powered Robot (with Pictures!):

    Awesome! How are you using the LEAP sensor? Do you have any videos?

    I use the LEAP to detect hand position and turn it into motion commands. The robot follows your hand movements. I'll post a video "soon" ;-)



  • @Leif-Bloomquist thanks for the project write-up. it looks very simple yet effective. i also have a leap motion device and would love to put it to use as it has been in a box for over a year now. looking to read the code you have this weekend. good luck on continuing with the vehicle. looks fun. may have to do something similar with a omega on a arduino dock.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.