PDA

View Full Version : Ok so I made a Whegbot. Its pretty cool actually :)



Electricity
08-07-2008, 07:58 PM
http://forums.trossenrobotics.com/gallery/files/1/9/6/1/wheg4.gif

This thing is too cute! Unfortunately I can't the video off of my phone until tommorow, but here are some pictures. :0
Made with 4 view loader revolution hopper servo thingies with the impeller left on, zip tied together, with a battery pack on top. This is a lot of fun actually so I'm going to see if I can hook up a controller and get it to follow some sort of path.
http://img337.imageshack.us/img337/3497/img0160ov3.jpg
http://img53.imageshack.us/img53/4958/img0162kf9.jpg
http://img337.imageshack.us/img337/33/img0161oq7.jpg
http://img292.imageshack.us/img292/1335/img0163ju9.jpg

Adrenalynn
08-07-2008, 08:17 PM
Cool!

In the design you have there, you'd want a 2 channel motor controller and run it differential. If you use one of your servos and split the bot front from back, you could use the servo for left-right turn and run all the motors from one channel of a motor controller. That's effectively what the original design is doing. That will also help time the legs out of phase so that it will scramble over things like a bug does.

Electricity
08-07-2008, 08:22 PM
Thats a good idea. I managed to get a video uploaded, its not my favorite video, but its kind of funny.
Clicky for video (http://tinypic.com/player.php?v=f42xwx&s=4)
I picked up some of these guys http://img510.imageshack.us/img510/8977/p080807004ax8.jpg Which will probably work better then the servos I have now.
What if I split the bot left and right? That way it could turn kind of like a tank.

Adrenalynn
08-07-2008, 08:42 PM
You shouldn't need to do anything any different for differential (tank) steering - just hook-up a two channel motor controller.

The motor you hold in your hand will likely need to be geared-down a BUNCH. It's probably running at least 3000 RPM, likely 9000-18000 rpm. Sounds cool, but getting the 'bot to "hook up" and find any traction would be nigh on impossible at those speeds.

Electricity
08-07-2008, 08:46 PM
No load RPM is 16000, I got it for a different project, but i thought it might be cool for this one as well. I'll just stick with the original servos. I guess maybe I don't understand how a motor controller works. I'll have to look into it.
Thanks Jodi!

sam
08-07-2008, 09:42 PM
Yeah, there are a couple of simple ways to make your own h-bridge to drive the motors. It's pretty cheap, you only have to buy the components.

They have some books in some lybrairies. Otherwise there are some websites that explains it fairly well.

By the way, someone should do a tutorial to build a motor driver. Would be interesting to have in a thread.

A-Bot
08-07-2008, 11:45 PM
That came together quickly. Clever use of scavenged parts.

I'll bring a surplus little single channel motor controller (stock 1/18 race car ESC) with me when I stop by the shop if you need one and want to try it. ;)

Xan
08-08-2008, 03:07 AM
:veryhappy: You are really getting in to building robots out of scrap! I can see the fun of doing that and they are good looking to! I canít wait to see what you strap on to your new motors!

Keep on going!!

Zenta
08-08-2008, 04:16 AM
Great work! Did you take any video of it driving/walking?

I was also very fascinated of the simple but very effective principle of the Whegbots.
Cool!

ScuD
08-08-2008, 05:24 AM
By the way, someone should do a tutorial to build a motor driver. Would be interesting to have in a thread.

I'll see what I can come up with.
Have to go to my cousin's wedding in half an hour though, but I'll see what I can come up with over the weekend.

Any prefs on what to use?

I'm thinking simple transistors, abusing buffers, FET's, and simple out-of-the-box motor driver IC's (L298 sort of thing)

sam
08-08-2008, 08:20 AM
Well, actualy I don't have a lot of knowledge in the area of electronics for robotics. So do what you are best at I guess :wink:

Sam

metaform3d
08-08-2008, 01:42 PM
I love your designs -- especially with the colored zip ties.

A-Bot
08-09-2008, 09:35 PM
I had a chance to stop by and meet Electricity (after he woke up :p) at his airsoft shop Desiderata Action Sports. Great guys there, very friendly and knowledgable about airsoft. I hope to stop by again soon when I have more time to talk shop and order an airsoft gun. +rep! :)

Electricity
08-11-2008, 03:06 PM
Thanks for stopping by Adam! With the addition of your ir range finder the whegbot can see!
Using this code:

/* Wheg bot movement coding, version 1
* 2008, Sam Agger
*/


int Leftf = 12;
int Rightf=13;
int Leftr=11;
int Rightr=10;
int rangefinder = 0;

int THRESHOLD = 200; // set minimum value that indicates a knock

int val = 0; // variable to store the value coming from the sensor
int t = 0; // the "time" measured for how long the knock lasts

void setup() {
pinMode(Leftf, OUTPUT);
pinMode(Leftr, OUTPUT);
pinMode(Rightf, OUTPUT);
pinMode(Rightr, OUTPUT);
Serial.begin(9600);
Serial.println("ready"); // indicate we're waiting
}


void loop() {
digitalWrite(Leftf, HIGH);
digitalWrite(Leftr, HIGH);
digitalWrite(Rightf, HIGH);
digitalWrite(Rightr, HIGH);
val = analogRead(rangefinder); // read the range finder
if( val >= THRESHOLD ) { // is it bigger than our minimum?
digitalWrite(Rightf, LOW); // Turn turn!
digitalWrite(Rightr, LOW);
t = 0;
while(analogRead(rangefinder) >= (THRESHOLD/2)) {
t++;
} // wait for it to go LOW (with a little hysteresis)
if(t!=0)
Serial.println(t);
}
}

I'm sure its not the best way of doing it, but it was the only way I could figure out how to make it work.
The problem now is that the servos are running at 5v instead of 9 or 12, so its fairly slow, and can't climb over things.

Pictures of it with a brain:
http://forums.trossenrobotics.com/gallery/files/1/9/6/1/wheg4.gif
http://forums.trossenrobotics.com/gallery/files/1/9/6/1/wheg3.gif
http://forums.trossenrobotics.com/gallery/files/1/9/6/1/wheg2.gif
http://forums.trossenrobotics.com/gallery/files/1/9/6/1/wheg1.gif

Adrenalynn
08-11-2008, 10:53 PM
Nice!

I'd be cautious pulling the voltage from the processor for so many motors. You might consider a relay or two in there... That might be another reason you're seeing slowness too, the board isn't really meant to deliver that much power.

Just as an aside - I don't know if I'd call it a "knock" in this case. I personally would be inclined to credit code from which I borrowed from heavily... ;)

Xan
08-12-2008, 04:54 AM
Great project!

How does your dog react on the bot? My dog is always frightened and start running when I’ve got mine walking around!

Are you planning to post a video? I would like to see it in action!

Xan

Electricity
08-12-2008, 12:45 PM
Nice!

I'd be cautious pulling the voltage from the processor for so many motors. You might consider a relay or two in there... That might be another reason you're seeing slowness too, the board isn't really meant to deliver that much power.

Just as an aside - I don't know if I'd call it a "knock" in this case. I personally would be inclined to credit code from which I borrowed from heavily... ;)
Slight borrowage only! I actually started from scratch and just copied certain lines, but I suppose I should credit Todbot, and this (http://todbot.com/arduino/sketches/piezo_read/piezo_read.pde) code. :D

A-Bot
08-12-2008, 01:02 PM
Great work. Now let's see some video of the little bugger in action. :)

sam
08-12-2008, 07:42 PM
A realy would be a good idea, once you figure out how to make one :wink:

It's a nice project I can't wait to see a video *hint* *hint*

Sam ;)

Electricity
08-13-2008, 12:12 PM
All I can take at the moment are cellphone videos, but I can't upload them anywhere :(

jes1510
08-13-2008, 12:40 PM
I dig this little machine. I have a question about the code though. You don't seem to be doing anything with the t variable. You set it to 0 and then increment it when the A/D input goes above your threshold. It doesn't do anything other than send the t value out of the serial port if it's >0. Am I missing something?


if( val >= THRESHOLD ) { // is it bigger than our minimum?
digitalWrite(Rightf, LOW); // Turn turn!
digitalWrite(Rightr, LOW);
t = 0;
while(analogRead(rangefinder) >= (THRESHOLD/2)) {
t++;
} // wait for it to go LOW (with a little hysteresis)
if(t!=0)
Serial.println(t);

Electricity
08-13-2008, 12:43 PM
I dig this little machine. I have a question about the code though. You don't seem to be doing anything with the t variable. You set it to 0 and then increment it when the A/D input goes above your threshold. It doesn't do anything other than send the t value out of the serial port if it's >0. Am I missing something?


if( val >= THRESHOLD ) { // is it bigger than our minimum?
digitalWrite(Rightf, LOW); // Turn turn!
digitalWrite(Rightr, LOW);
t = 0;
while(analogRead(rangefinder) >= (THRESHOLD/2)) {
t++;
} // wait for it to go LOW (with a little hysteresis)
if(t!=0)
Serial.println(t);


The coding was originally made (by Todbot) to read a Piezo. I modified it to drive servos, because I don't know a whole lot about coding as of yet. For the Piezo it was required because of the 'ringing' effect of knocking it, in this application, no, it doesn't do anything.

Adrenalynn
08-13-2008, 12:56 PM
I'll give you my email. Send 'em to me, and I'll transcode them and get 'em up here. Let me know if you want to go that route!

Electricity
08-13-2008, 01:00 PM
I'll give you my email. Send 'em to me, and I'll transcode them and get 'em up here. Let me know if you want to go that route!
I have no idea what that even means.. BWEEEWWWWWwww <- thats the sound of what you just said flying over my head.

Adrenalynn
08-13-2008, 01:05 PM
Sorry - I hadn't seen your additional posts yet. You can get me your cell phone videos via whatever method and I'll get 'em up here.

Electricity
08-13-2008, 01:07 PM
Sorry - I hadn't seen your additional posts yet. You can get me your cell phone videos via whatever method and I'll get 'em up here.
Oh I see, no thats the problem, their stuck on the phone. I can't send them to other numbers/e-mails like I can pictures, the only thing I can do is "helio UP" them, which puts them in an online gallery that can only be accessed by my phone. Incredibly pointless lol. I can get them off using a data cable, but thats at home, where the internet isn't.

Matt
08-13-2008, 01:11 PM
Video!!!

http://pro.corbis.com/images/42-17772139.jpg?size=572&uid=&#37;7B31559D4D-B856-41AF-BD1A-FA3FE56BA266%7D

LOL, but seriously, when you get to it. We would love to see it scamper around.

Electricity
08-13-2008, 01:15 PM
heres a short video of it, sans brains
http://tinypic.com/player.php?v=f42xwx&s=4