Jump to content
  • Advertisement
  • entries
    36
  • comments
    47
  • views
    50829

Robo-pernicus: Part 2

Sign in to follow this  
Wavesonics

1143 views

Read Part 1 here



robot_05.jpg
The next day at work it was all I could think about, and around lunch time, it hit me. They are in series! I'm dividing the voltage between the two servos! If I hook them up in parallel they'll EACH get 9V!

That night after a flurry of cutting, de-soldering, and re-soldering, it was ready. Popping a 9V on it made it leap forward! Excited, I set to work hooking the logic boards together, but when it came time to affix them to the chassis I encountered another problem. It wasn't really meant to host a board like this. The screw holes were probably intended for something else, but certainly not for my Arduino. Additionally, I have a bare circuit board I'm trying to attach to a metal chassis! I looked all around in my spare parts for some sort of fastener or holder or something to mount my logic boards with to prevent them from shorting out on the chassis, but couldn't find anything. Finally I settled on cutting an anti-static bag from an old video card and screwing the boards awkwardly through that bag and onto the chassis however I could make them fit.

robot_06.jpg

I then set to testing out some stuff with the Arduino. Read up on the docs for the motor driver, wrote some test programs making it move and turn. Then did the same with the wireless chip, tested hosting a webserver on it and allowing you to control the motors by clicking links. It worked! It wasn't very responsive of course, reloading the page after a link click was pretty slow and all. But it worked! So I called one of my friends via Skype who lives in Texas, and using the webcam on my laptop gave him a view of the robot on the floor. Then I setup some port-forwarding so he could access the server hosted on the robot, and it was ready to go! I stepped back, couldn't see the laptop because of how it was positioned for the webcam. And all of a sudden this little robot starts moving on its own, via commands from my friend in TEXAS! (I live in Boston) I mean c'mon! We really take the internet for granted I know, but the series of events that are transpiring to make his actions in Texas manifest themselves in the real world in my apartment in Boston... I mean c'mon!!!

As Tesla once said: "I do not think there is any thrill that can go through the human heart like that felt by the inventor as he sees some creation of the brain unfolding to success... Such emotions make a man forget food, sleep, friends, love, everything."

robot_07.jpg

Over the next several days I fast iterated. I ripped out the webserver and wrote a proper socket server for the robot, and socket client that ran on my home server. It was MUCH more responsive. Then I wrote a webpage that used AJAX to send "real-time" control commands to stub PHP script, which in turn sent them onto the socket client. And finally, after much research, I found a webcam that worked with Linux, had auto-focus, and great video quality (glass optics, no plastic crap), and a software package for streaming the video to the control webpage (no X11 or GUI of any kind, which restricted my options quite a bit).

This was a blast, you could log onto the site, see the robot from the webcam mounted in the corner of the room, and drive it around using WASD or GUI controls on the webpage. And I did some input wrapping so key down & key up worked the way you'd expect. It was fun. But it was lacking something big. I wanted to drive this robot in first person perspective.

I began researching wireless webcams, or really wireless cams of any kind, and there weren't a whole lot of options. I know you're reading this and saying "Oh c'mon, there's GOT to be some wireless webcams out there!" But really! There aren't! Try Googling for them! There's one or two that were prohibitively expensive and had other problems. Using a regular camera and streaming the video over the robot's WiFi connection was not an option. The Arduino has 2KiB of RAM, and clocks in at 15MHz. That's not a typo. One, Five MegaHertz. Ya, you're not doing video processing of ANY kind on that :P

The last option I had was home security cameras. But they were prohibitively expensive. The CHEAPEST were well over $100, most up around $300. To give you an idea, I was into this project for about $150 so far, so this camera would cost more than the rest of the project COMBINED. Not an option. But lo and behold, I found a home security camera meeting all my criteria for HALF OFF on a Black Friday sale! So for $60 I was in business.

I got it, chopped up its power cord so I could run it off the robot's internal power, and was off and.... crawling? Ya... and that's where this project kind of ends... After all of that, the wireless security camera was too heavy for the servos. It could BARELY crawl forward, and could only turn about 50% of the time. And this was one of the smaller ones I had seen while doing my research (size was one of my criteria when selecting a camera!). Anti-climactic, trust me I know.

But still, it was a great project, and I learned a LOT. I would post a demo or pictures of me controlling it, but the robot has since been dismantled. I'm scavenging parts for my next project which I hope to be much more successful!
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!