Author Topic: My stab a Cheap Robotics (x/posted Parallax Robotics)  (Read 1634 times)

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
My stab a Cheap Robotics (x/posted Parallax Robotics)
« on: February 06, 2013, 12:15:07 AM »
I'm almost ready to begin assembly on a cheap robot.

This bot uses several ideas I've gleaned from forum members here, so I'd like to give credit where credit is due...

Servo motors and wheels  (Credit goes to erco.  Thanks erco for turning me onto this!)
Posterboard for a tail dragger and base.  (Credit to Duane.  What an awesome idea.  Stealing this to combine it with two sided 3M adhesive tape & stick-on velco)
FemtoBASIC (Credit again to Mike Green.)


Here's my BOM so far...  All of this is sourced (or on it's way) from Propellerpowered

* Quickstart with Servo & More board $25.00   Will be replacing Servo&More with a board more geared toward this next month.
* 2X 4-wire f/f cables $2.98 Expected in stock within two weeks
* HR-SR04 Ultrasonic sensor $3.49
* 2X ULN2003 Driver Board w/ Stepper Motor $5.98
* Mini Breadboard  $2.49
* Male headers  $.75
* 4pin extended male headers $.50 Expected in stock within a week.
* Battery Case w/ Switch $2.49
* Plastic wheels $3.99 Expected in stock within a week.

This bot is just shy of $50.00  I'm working on Bluetooth/IR controls.

Everything is starting to come together and I'm beginning to see some action from BASIC on my desk.  :)

Not bad for a guy who fumbles with anything mechanical! 

Jeff

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #1 on: February 06, 2013, 01:14:59 AM »
Here's some spin code.  Works just as well with the BASIC equivalent.

The trick is to pulse the coils (4) in the following order:
AB-BC-CD-DA

Code: [Select]
CON

  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000


Var
  byte BitPattern[ 4 ]
  long count

Pub Demo
  BitPattern[ 0 ] := %1100
  BitPattern[ 1 ] := %0110
  BitPattern[ 2 ] := %0011
  BitPattern[ 3 ] := %1001

  DirA[ 0..3 ] := %1111
  repeat
    repeat count from 0 to 3
      OutA[ 0..3 ] := BitPattern[count]
      repeat 1200
« Last Edit: February 06, 2013, 01:27:04 AM by Oldbitcollector »

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #2 on: February 08, 2013, 04:09:11 PM »
Attached is a modified copy of Mike Green's BoeBotBasic.
-Modifications intended for a Bluetooth or Wifi module, an HC-SR04 module, and 2 5v stepper motors.

I've added the following commands:

HCSR04 {returns the current range of the HC-SR04 sensor} {example: PRINT HCSR04}
FORWARD {both stepper motors forward 1/4 turn}
BACKWARD {both stepper motors backward 1/4 turn}
RIGHT {right stepper motor forward 1/4 turn}
LEFT {left stepper motor left 1/4 turn)

Example Basic Code:
Code: [Select]
10 PRINT HCSR04
20 IF HCSR04 > 100 THEN FORWARD
30 IF HCSR04 < 100 THEN BACKWARD
40 IF HCSR04 < 100 THEN RIGHT
50 GOTO 10

I'm having a little trouble with my stepper motor code in reverse, but wheels are expected in the morning and hopefully I can troubeshoot this over the weekend.

Jeff

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #3 on: February 09, 2013, 11:53:22 AM »
Wheels came in today!

I'm using Scotch band (holds up to 2lbs) mounting squares to hold the motors. They are not moving!
I'm using some walmart "hook & loop" (velcro) squares to hold everything on the top on.
The caster wheel is a Lowes $3.00 1"-1/4 wheel. (I'm hunting for a better option here)

I had just enough time to get things mounted before I have to go help someone paint today.

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #4 on: February 11, 2013, 12:09:47 AM »
It's alive!

I create a step-by-step Instructable for the final revision of this robot here: http://www.instructables.com/id/Robotics-on-a-budget/

There are several test programs in the Instructable, as well as a working version of the BASIC.

prof_braino

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #5 on: February 14, 2013, 10:08:28 AM »
how are those wheels working out? Are they hanging on to the stepper shafts well?

Oldbitcollector

  • Holy Smoke!
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Projects, Not Platforms
    • View Profile
    • Propellerpowered
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #6 on: February 14, 2013, 11:09:29 AM »
The wheels are perfect!

They are a very tight fit, so you have to place the wheel on your desk (or flat surface) then press the motor shaft into the wheel.
There is no wobble.   The only catch is that the wheel should not be removed from the motor once installed.  I pulled mine off to photograph them for the instructable and started making small cracks them when I did.  (I was flexing them pretty good to pull them off.)

Jeff

prof_braino

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #7 on: February 14, 2013, 12:00:58 PM »
I over engineered my first attempt, and put in set screws, and all sorts of fun complexity.  And they still wobbled.  I think press fit, and "don't take them off" is a good way to go.  Thanks!

mindrobots

  • Sr. Member
  • ****
  • Posts: 426
  • I've never met a squirrel I didn't chase!
    • View Profile
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #8 on: March 09, 2013, 05:07:41 PM »
WOOHOO!!!

It took about an hour for my daughter to build her chassis (I had built mine a couple weeks ago) and then we wired both of them up following Jeff's Instructable and loaded the test program.

Now, it's time to start adding features and options!!

Thanks, Jeff!! These are hopefully going to be a hit at 4-H next week!

It happened, there's a movie!! http://www.youtube.com/watch?v=BpKeCYlRs-k&feature=youtu.be  ;D

Rick

mindrobots

  • Sr. Member
  • ****
  • Posts: 426
  • I've never met a squirrel I didn't chase!
    • View Profile
Re: My stab a Cheap Robotics (x/posted Parallax Robotics)
« Reply #9 on: March 10, 2013, 03:21:41 PM »
Day 2 of Robothon!

Now my little guy is Bluetooth enabled. Slow as molasses but I'm driving him around with BluetoothRobotbasic.

I have some traction issues on our wood floor. I think the battery pack may need to move forward some to put more weight on the wheels. Thank heaven for velcro and double sided tape!!  ;)

I haven't dug into it yet but the BASIC "RIGHT" command makes it go left and the "LEFT" command makes it go right. It looks like the pin definitions are correct in the SPIN code so more detailed analysis is in order.

I'll try hanging an ultrasonic sensor on it if I can find my "safe storage place".  :-[

This should be a hit at 4-H tomorrow with or without collision avoidance!

Did I mention it was really, really slow??  :D