I thought I would share some info about my current project. Let me start by saying I know very little about this field and I am just a guy who likes to build things in my free time. Trashy started out as a play toy for my daughter to get her interested in science and still serves that purpose today. 

Version 1  of trashy was controlled with and Arduino 2560 and a USB host shield. I had the arduino connected to a USB wireless XBOX reciever. This allowed me to steer the bot, and manipulate the arms and head with the joysticks and buttons. I had a ip cam mounted on a pan/tilt system to allow me to see what the bot saw wirelessly.  This was a great bot and I highly recomend this setup if you want to play with mechanical systems and dont want to worry to much about programing. 

Version 2 of Trashy is currently underway, I wanted to keep the same functionality of Version 1 but wanted to start adding slightly more complex functions. When the new Pi 2 came out I knew it would be the perfect controller for Trashy. Adding the Pi looked simple but like most things it started to get more complex. The power requirements for the poi weren't much but you throw in an Xbox reciever and a webcam and mic, a powered USB hub and it starts to add up. 

Here are a few pics of where I am as of today. Please let me know if there is anything you would like more details on. 

 

The top disk is mounted on a servo attatched to the center support rod, this allow the top disk to rotate 180 degrees (R2D2 inspired) 

 

You can see the pair of small 2 cell Lipo batteries I was using previously, this will not cut it and I will need to move to a larger battery setup. 

The drive system is a super simple pair of DC motors with gear reduction for Torq.

On the left is the arduino with a few control shields, on the right is a 5v power converter I use to supply power to the arduino, the pi and the powered USB hub. The motors and servo's get power directly from the batteries or power supply.

 

 

 

GroG

9 years 2 months ago

Great build - thanks for sharing brother !

Have you had good experience with the Dagu gripper? Is it very effective for picking up stuff?  It "looks" cool but my personal experience its not that useful as a smaller more simple gripper. And the little servo is underpowered.

Great design.  Love the trashcan cowling :)

I'll start thinking how we can do a continuous snapshot release so you can start experimenting more.

When this as 100% arduino controlled the script to accomplish joystick controll over a servo position was pretty simple. Here is is:

if (Xbox.getAnalogHat(i,RightHatY) > STICK_CENTER + DEADZONE || Xbox.getAnalogHat(i,RightHatY) < STICK_CENTER - DEADZONE){                  

     s1 = s1 + (Xbox.getAnalogHat(i,RightHatY) - STICK_CENTER)*SERVO1_RATE*SERVO1_DIRECTION;               }           

    if(s1 > SERVO2_MAX) s1 = SERVO1_MAX;

     if(s1 < SERVO2_MIN) s1 = SERVO1_MIN;

Thankfully kwatters has provided me an example however I am still unable to get the servo to respond. None of the "prints" in this code are outputing anything however the console does ouput the RY vaules as per my joystick.publishRY command.

Here is what i've got so far.

joystick.addListener("publishRY", "python", "StickRYListener")

headtilt.setMinMax(20 , 160)

def StickRYListener(value):
  pint (value)
  print "Stick RY :" + str(value) + " Current pos: " + str(headtilt.getpos)
  absValue = math.fabs(value)
  if (absValue < 0.175):
    print "Stop sweep"
    headtilt.stop()
    return
  absValue = absValue-0.01
  print "Set Speed " + str(absValue)
  headtilt.setSpeed(absValue)
  delay = int((1-absValue) * 200)
  if (value > 0.0):
    if (headtilt.isSweeping()):
      headtilt.setSweeperDelay(delay)
    else:    
      headtilt.sweep(headtilt.getpos, headtilt.max, delay, 1, True)
  else:
    if (headtilt.isSweeping()):
      hedatilt.setSweeperDelay(delay)
    else:
      headtilt.sweep(headtilt.min, headtilt.getpos, delay, -1, True)

 

 

I learned there are two ways to read a servos position servo.getPos or servo.pos... however servo.getpos.. which is what i was using does not work! so the basic joystick to servo controls are back normal.. Trashy is almost back to his former funcitonality with his new, improved pi brain.

Thanks to my new 3D printer, I have been able to make some interesting upgrades to the mechanics of Trashy. I am using treads to help get over small bumps and obsticles around the house and becuase the wider platform allows me to use larger batteries lower for better weight distrobution. Here is the new platform I will be transplanting Trashy to. 

 

 

GroG

8 years 10 months ago

In reply to by brotherbrown831

Trashy's treaded skateboard !  Looks great ! 

You have chain on the inside of the thread?  Where the cogs printed?

The treads have a chain profile printed directly into them, and the cogs were pritned ti match. I glued rubber drawer liner material to the treads to improve traction and wired up a 4amp/hour battery under the platform for plenty of run time. 

The links to the pics above seem to be be broken. So I am adding them again. Here is Trashy's new platform, and here is a pic of his second level with his electronics laid out. His functionality hasnt changed, just a few mechanical upgrades and a much bigger battery.