Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: GalacticNerd on September 03, 2011, 05:38:12 AM

Title: Building a wifi robot
Post by: GalacticNerd on September 03, 2011, 05:38:12 AM
Hey there,

As my final project in Industrial ICT, we get to pick a project of our own.
I teamed up with somebody from my class, and decided to make a driveable robot.
It would be able to be controlled over Wifi with a laptop, having a networked camera in the front as well.
In the end, I'd like to make a piece of software which has the image from the camera, and responds to a game controller connected to the laptop. We're also planning on having a claw in front of the camera to pick things up.

I am familiar with programming and electronics, but less with robotics.

These are the parts we're planning to use;

* Old RC car as a base
* Arduino Ethernet Board + USB adapter.
* Dealextreme's IP-400 wired security camera (http://www.dealextreme.com/p/ip-400-standalone-security-surveillance-ip-network-camera-with-night-vision-15974 (http://www.dealextreme.com/p/ip-400-standalone-security-surveillance-ip-network-camera-with-night-vision-15974))
* 12V rechargeable battery, probably from an electric screwdriver/drill.
* Lynxmotion's WRU-HD claw (http://www.lynxmotion.com/p-664-wrist-rotate-upgrade-heavy-duty.aspx (http://www.lynxmotion.com/p-664-wrist-rotate-upgrade-heavy-duty.aspx)) unless anyone has a better alternative. (the gripper is for last, though. We can leave it out if we're running out of time)
* Standard belkin wireless G router (blew that one up, looking for a replacement)

This is the plan;

We will take the top off the RC car, and use the arduino to tap into the existing hardware to control the driving part.
The network camera will be mounted on the front. The router will also be mounted on the car. Using the ethernet shield, the arduino will be connected to the router with an ethernet cable, as will be the camera. DHCP will be turned off, everything will get fixed IP adresses in the same range. The claw will be in front of the camera, providing a first person view on it.

The arduino will have a listening socket. The only job is has is to read incoming bytes, and run a sub program depending on the incoming byte.
(Set motor speed, turn left/right, open/close claw...) I've only used microsoft's visual basic (yeah yeah) when it comes to socket programming, so I have a slight idea how it works, but I need to look up the exact syntaxes.

Everything will be powered by the 12V battery. I chose this voltage because the router needs it, and I can regulate it down for the other parts where needed. (Camera needs 5, Motors need 6, Arduino needs... 5?)

I'm hoping the battery can take all of this, and still give us a driving time of at least half an hour.

Does anyone have any comments on this? Any tips are very much appreciated.
Any parts recommendations are helpful too.
Title: Re: Building a wifi robot
Post by: garrettg84 on September 03, 2011, 08:26:53 PM
Depending on the router you guys use, you may not even need the ethernet shield. Alot of the linksys routers capable of running linux have serial ports that just need pins soldered on. http://www.dd-wrt.com/wiki/index.php/Serial_port_pinouts (http://www.dd-wrt.com/wiki/index.php/Serial_port_pinouts) ...depending on the router board it might not even be real serial level voltage and simple ttl serial may be possibe.

Set up a custom web based interface on the DD-WRT access point and then all of your controls could be done through web gui...or some form of control over http and then any actual socket programing can be eliminated (from your coding view point - it still happens under the hood tho =).
Title: Re: Building a wifi robot
Post by: GalacticNerd on September 04, 2011, 02:01:32 AM
Depending on the router you guys use, you may not even need the ethernet shield. Alot of the linksys routers capable of running linux have serial ports that just need pins soldered on. http://www.dd-wrt.com/wiki/index.php/Serial_port_pinouts (http://www.dd-wrt.com/wiki/index.php/Serial_port_pinouts) ...depending on the router board it might not even be real serial level voltage and simple ttl serial may be possibe.

Set up a custom web based interface on the DD-WRT access point and then all of your controls could be done through web gui...or some form of control over http and then any actual socket programing can be eliminated (from your coding view point - it still happens under the hood tho =).

Thanks for the info, Garrett. I saw something about a modified router in a similar project, I guess this would be a nice option, but I don't think my belkin router/modem has these serial ports, I will take a look though on the board.

Edit: I found a 2 x 5 pin connector (similar to the one on the ASUS WL-500 deluxe router in the link you sent me) on the board, but it's not documented on the board which pin is which  :(

Oh, and I looked up my model in the DD-WRT support list, but it's not in there.
http://www.dd-wrt.com/wiki/index.php/Supported_Devices#Belkin (http://www.dd-wrt.com/wiki/index.php/Supported_Devices#Belkin)
my model is F5D7632-4

Another edit: apparantly whiterussian can't be ran from my ARM cpu router.
Title: Re: Building a wifi robot
Post by: bobthefirst1 on September 05, 2011, 04:42:54 PM
i think u could just hook it up to a wireless usb hub and build your robot to plug in to usb
  :)
Title: Re: Building a wifi robot
Post by: GalacticNerd on September 23, 2011, 11:51:09 AM
i think u could just hook it up to a wireless usb hub and build your robot to plug in to usb
  :)

I'd have to get a more expensive camera though, one specifically made for robotics instead of the cheapie networked camera I'm using, whereass wireless access points are easy to find.


UPDATE ON THE PROJECT:

I've hacked an rc car, and I'm making a shelve style platform for the electronics and battery to go on it from plexi.
I'm waiting for my ethernet arduino, and while hacking the router to run from the battery, I accidently switched the polarity around, and fried it. Dangit.
Oh well, someone from my class felt bad for me, and is donating a linksys wrt54g to me, awesome. :)
About the battery, I found a 12V, 1.2AH lead acid battery. (from a motorcycle I think.) I don't know if it's gonna cut it, but it's the best I have right now. I might have another one of those I can daisychain to it.

(https://lh4.googleusercontent.com/-B0lfs8dNnYw/Tnj6trdKF_I/AAAAAAAAALA/Qnj2W1sLLHM/s1024/Foto0078.jpg)
Title: Re: Building a wifi robot
Post by: GalacticNerd on September 30, 2011, 11:24:37 AM
UPDATE:

My arduino arrived yesterday. Just in time. I powered the arduino with an LM7805 connected to the 12V battery. In parallel, I have an LM7806 for the motor and coil which controls the front wheels. I used an H-bridge IC to reverse the current on both of those. After a lot of pain in the ass soldering, I managed to get a quick sketch uploaded to my arduino to test driving forward, backward, and the front wheels. It works! The robot is taking it's baby steps now. In a few days I'm going to hook it up to the router, and figure out the programming to control it with hyperterminal or whatevs. After that, coding the fancy software which will also support the network camera I'm mounting on it.

This is my first proper robot, and has been a nice learning experience so far.

Pictures:
(http://img824.imageshack.us/img824/7571/foto0079g.jpg)
(http://img847.imageshack.us/img847/3339/foto0080ht.jpg)
Title: Re: Building a wifi robot
Post by: michealcollins on September 30, 2011, 09:16:54 PM
Awesome man! Glad to hear you are running into problems and yet working around em! Thats all the fun!You gotta fry a few circuits in the beginning haha. I'm also building my first robot for school (voice controlled w/ the Axon II microcontroller and the Admin's design). Good luck mate!

Mike
Title: Re: Building a wifi robot
Post by: GalacticNerd on October 01, 2011, 02:33:39 AM
Awesome man! Glad to hear you are running into problems and yet working around em! Thats all the fun!You gotta fry a few circuits in the beginning haha. I'm also building my first robot for school (voice controlled w/ the Axon II microcontroller and the Admin's design). Good luck mate!

Mike

Thanks for the reply! I hope you'll stay tuned on this thread, haha :D
Updates should be weekly, since most of the work is done on friday afternoons at school. Right now I'm figuring out if I can make the wheels 'home' better, maybe with a better spring. Right now the wheels aren't centering perfectly when going straight, since it's an old rc car. Instead they wobble a bit.
Title: Re: Building a wifi robot
Post by: Redcap on October 02, 2011, 06:43:27 AM
Haven't read through all the replies as of yet, but keep in mind that the arduino and the motors will need separate power supplies ;) I've noticed a lot of people tend to over look this, so if you find it's doing "funny things". this will be why.

I look forward to seeing how this project progresses :)
Title: Re: Building a wifi robot
Post by: GalacticNerd on October 03, 2011, 08:41:11 AM
Haven't read through all the replies as of yet, but keep in mind that the arduino and the motors will need separate power supplies ;) I've noticed a lot of people tend to over look this, so if you find it's doing "funny things". this will be why.

I look forward to seeing how this project progresses :)

Well, I have a 12V battery, and I have an LM7805 for the arduino, and an LM7806 for the motors connected to it. I tried it with a demo program, and it's working fine.

Can someone help me out with a programming issue? It's in this thread; http://www.societyofrobots.com/robotforum/index.php?topic=14556.0 (http://www.societyofrobots.com/robotforum/index.php?topic=14556.0)
Title: Re: Building a wifi robot
Post by: wise318 on October 13, 2011, 04:31:51 AM
Wow we are in the same boat, i am also building humanoi remotedesktop robot, inially intrnd to use te router on the robot but i foun the limitation, the person control it must from same internet connection, i m nt sure how to increase the distance beyond your wifi zone. So i decided use laptop attach on the robot and i ll use remote desktop to control the control panel.


Anyway can show your arduino connection to the 12 v batt. Good luck :)
Title: Re: Building a wifi robot
Post by: GalacticNerd on October 15, 2011, 07:03:51 AM
Wow we are in the same boat, i am also building humanoi remotedesktop robot, inially intrnd to use te router on the robot but i foun the limitation, the person control it must from same internet connection, i m nt sure how to increase the distance beyond your wifi zone. So i decided use laptop attach on the robot and i ll use remote desktop to control the control panel.


Anyway can show your arduino connection to the 12 v batt. Good luck :)

Hey there, I can't show a picture right now, but look for an LM7805 IC. They are really cheap, and easily turn 12V (or something else) into 5V, which can supply to the arduino. It's easy!

Update:

Yesterday I got around to soldering wires to the other side of the H-bridge IC, which would turn the front wheels. Apparantly the 3 and 4 side is not the same as the 1 and 2 side, because I can't get it to move using those pins. The 1 and 2 side of that IC which reverse the polarity on the motors can turn the wheels just fine. I wonder what I did wrong... I should look up the data sheet, I guess.

Here's a new picture:
(http://img502.imageshack.us/img502/4387/foto0094x.jpg)
Title: Re: Building a wifi robot
Post by: GalacticNerd on January 27, 2012, 12:57:50 PM
UPDATE:

It's been a while since I posted an update, if someone is interested, I'm including some more pictures. We started over from scratch with what we've learned.

This is the Motor controller I made. it uses H-bridge ICs. it also acts as the power supply for my arduino ethernet.
(http://a5.sphotos.ak.fbcdn.net/hphotos-ak-snc7/404780_2857287602684_1574432482_32428386_165916329_n.jpg)

A work in progress...
(http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/424285_2857313283326_1574432482_32428409_879425761_n.jpg)

Testing the router and the TELNET server running on the arduino. I'm able to control the outputs over command line.
(http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash4/395566_2857350204249_1574432482_32428435_451103379_n.jpg)

Put back together with new guts, and the router sitting snug in the back.
(http://a3.sphotos.ak.fbcdn.net/hphotos-ak-ash4/427706_2857350564258_1574432482_32428436_1228147408_n.jpg)

I'm using the built-in 10V Li-Po battery to power the controllers and the motors, still debating to up to voltage to 12V using a transformer to power the router, or to use a different battery.

I'm basicly able to control every output pin on the arduino over wifi now, connecting to it over telnet (with PuTTY)
Now i've got to write a C# program that connects to that, takes input from joysticks, and shows the image from the camera (which isn't there yet) on-screen.
Title: Re: Building a wifi robot
Post by: GalacticNerd on February 12, 2012, 07:04:04 AM
We decided to build in the router, since it fits snug in the roof compartment. We extended the antennas with TNC cables, and made them pop out of the back window. They're nice and secure, and still turnable, and easily removable. If anything, we're getting a better signal.

(http://a4.sphotos.ak.fbcdn.net/hphotos-ak-snc7/407232_2965758274383_1574432482_32462252_181966884_n.jpg)

(http://a7.sphotos.ak.fbcdn.net/hphotos-ak-ash4/430815_2965758754395_1808745829_n.jpg)

(http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash4/431046_2965759034402_1574432482_32462255_745893442_n.jpg)
Title: Re: Building a wifi robot
Post by: omkar on June 16, 2012, 03:18:14 PM
Hi i also posted on another one from you. But this is your latest post. Here is a link to a problem i posted earlier. http://www.societyofrobots.com/robotforum/index.php?topic=15732.msg112526#msg112526 (http://www.societyofrobots.com/robotforum/index.php?topic=15732.msg112526#msg112526)

How did you solve the problem of sending and receiving from the arduino over the wireless router. I have the wireless arduino shield instead of the router. But programming must be the same.

Cheers
Title: Re: Building a wifi robot
Post by: GalacticNerd on July 11, 2012, 01:56:13 PM
Hi i also posted on another one from you. But this is your latest post. Here is a link to a problem i posted earlier. http://www.societyofrobots.com/robotforum/index.php?topic=15732.msg112526#msg112526 (http://www.societyofrobots.com/robotforum/index.php?topic=15732.msg112526#msg112526)

How did you solve the problem of sending and receiving from the arduino over the wireless router. I have the wireless arduino shield instead of the router. But programming must be the same.

Cheers

Sorry for the late reply. Just look online for a telnet server example for the arduino online. That's what I based my program on, anyway. The programming should the about the same? But I think the wireless shield would use an ad-hoc connection instead.

Also, I finished the robot, and we got 90/100, a very exceptional score. :)

(https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash3/s720x720/601931_3394480457783_1792051009_n.jpg)