Thursday, April 18, 2013

SSRD and Project Report Draft

Quick status update this week. I gave a talk on my senior project during Student Scholarship Recognition Day (SSRD) at Willamette, which you can view here. Unfortunately, although my robot was working (avoiding obstacles) the night before, when I went to take a video of it for the presentation (just in case it didn't work when I wanted to demo), it stopped working, so the video in the presentation is just my old one which demos the various movements possible on the robot. I haven't had time to figure out what is wrong yet, but the problem seems to be that it isn't always detecting the floor.

I also finished a pretty rough draft of my project report which can be found here. There is a lot of stuff that still needs to be filled in (images, diagrams, future work, lessons learned, etc) but its a start.

By next week I hope to have fixed the issues with the obstacle avoiding robot, and start work on the simulation to finish up my project.

Hardware vs Simulation

Last week I mentioned that I would be probably end up changing some elements of my project, based on the time I have left and what still needed to be accomplished. Recently I have decided that I will not be able to accomplish what I set out to do in the project if I continue on the same pace, working with hardware. I have been spending a lot of time hooking parts together, debugging them, figuring out I need different parts, ordering those and waiting for them to be shipped, making little progress for the large amount of time spent.

In order to get the robots to accomplish the simple task (finding a glyph and then gathering around it) I would need to order a webcam (which the Pi would hopefully be able to power), set up the robots to recognize the glyph using image processing (which the Pi would hopefully be able to do quickly enough) and then somehow get the robots to communicate to each other (or at least notify the others when the glyph is found, and then have them locate and group around the successful robot). Given more time, I think I'd be able to accomplish this, but since there is only 19 days left until we present out senior projects (with the paper due before then), I don't think its reasonable to assume this would be possible. However, I don't just want to finish the semester with no cooperative activity either (the project is entitled Swarm Robotics, after all  - not very impressive without something you could call a swarm).

My plan to accomplish the original goal of creating a swarm is to switch over and finish the project in a simple simulation. I want to simulate a 2D world, and create robots that mimic the one I designed: able to spin freely, sensors to detect obstacles, etc. In this world I will place a goal for the robots to find, and have them run code similar to what I have now. This way, I will be able to demonstrate the swarm behavior of the robots, but without having to spend too much time dealing with the issues that arise with the hardware. I think that I have enough time left to create an finish this simple simulation, and that it is a suitable compromise between what I set out to do and the time I have left to do it.

Thursday, April 11, 2013

SSRD Draft

The parts I ordered last week arrived, and I've now hooked up the sensors, so I can have a working obstacle-avoiding robot to demo during my Student Scholarship Recognition Day (SSRD) presentation next week.

One problem I ran in to this week is that because of the way I had my demo program startup on the boot of the Raspberry Pi, I was unable to bypass it (in order to actually change anything in Linux) so I ended up setting up the other SD card, getting the network drivers working, downloading RPi.GPIO, and using that to test the sensors.

The rest of the time this week was spent creating a draft of the SSRD presentation and a really rough draft of the project report. I'll post versions of these next week, once they are more polished.

One last thing is just a note that I will be probably end up changing some elements of my project, based on the time I have left and what still needs to be accomplished... more on that soon.

Thursday, April 4, 2013

More parts

This week I attempted to get the distance sensors hooked up to the robot, but noticed that I ordered sensors without the carrier boards, which are necessary to run them... whoops. So, I ordered the carrier boards for the sensors, breadboards that will fit everything that I need on the robots, and a a couple more chassis plates that I can stack on top of the existing plate (with some sort of standoff/screw) in order to create more space for all the components.

Thursday, March 14, 2013

Its Alive!

This week I finally got the robot working without having to be plugged in for power. I ran in to a couple issues, but the robot is able to drive itself around now. One issue I had was that the breadboard I intended to use wasn't big enough to fit the breakout kit, as well as all the other components, so I had to borrow one from a classmate. I also had trouble trying to fit everything (the two battery packs, raspberry pi, and the larger breadboard) on to the chassis, but managed to pile it all on there using quite a bit of tape.

Right now, the bot is just running a simple demo python script that I wrote which shows the different movements the robot can make. Below is a video of the robot running the script.
I'm having the raspberry pi run the python script as soon as it boots up, which works fine for demoing. However, since I have the script running an endless loop, the script never finishes, so the only way to make the robot stop is to unplug the power from the breadboard. By next week, I hope to have a button hooked up to control the starting/stopping of the script, as well as getting the distance sensors working.

Thursday, March 7, 2013

There's Always Something...

The parts that I ordered last week arrived today, so I can start to make more progress on the robot's hardware. Unfortunately, the Micro-USB B end of the cables I ordered have a casing which is just barely too big to plug in through the Pi Box case. It's not a huge deal right now, but I'll either want to make the hole for USB on the Pi Box bigger, or trim down the casing on the cable later on.

Now that I can move forward on the hardware, my goal for next week is to have the bot able to move around (following hard-coded instructions) free of all cable connections. (Although I might still have to manually boot up the Pi and start up the program first, unless I can get a button hooked up too)

Thursday, February 28, 2013

Driving the Robot

Quick Update: I ordered some USB A ports, short USB A to Micro-USB B cables, and breakout kits for the Raspberry Pi so I can proceed in my project.

My next (small) hurdle is to actually get the software running for the robot. The issue right now is that the Raspberry Pi takes a while to actually start up, and at the moment I have to enter in a username and password, then execute the file I want to run, all which requires interaction from me. Ideally, I would just be able to plug in the Pi and have it start running the code which I write, and I think I can easily do this. (find somebody who has already done it and follow what they did)

The issue still remains for actually starting / stopping the program on the Raspberry Pi without unplugging it or having it start when I don't want it to. An easy solution to this would be to have the program automatically start (as I said above) but have nothing happen until I press a button on the robot, which would act as a way to start/stop the robot's program. This is pretty simple to do once I have the Raspberry Pi GPIO pins hooked up to the breadboard, I just need to get a couple buttons. (Not hard to find, I think Radio Shack even has them)

I've decided I'm going to code for the robots in Python, since I have a little experience with it, and somebody wrote a nice library called RPi.GPIO which makes it simple to control the Pi's GPIO pins. More on this in the coming weeks.

Thursday, February 21, 2013

Powering the Raspberry Pi

The Raspberry Pi has two options for giving it power: either using the the Micro-USB B port or the GPIO header pins. However, the header pins don't have any protection on them, so if you aren't careful then you could do damage to the Raspberry Pi (which I don't want to do), so I'd rather use the USB B port to power it. The issue is that I will be using a battery pack, so I have to come up with a way to connect the + and - cables from the battery pack to the Micro-USB B port. I only really have two options:
  1. Cut a Micro-USB B cable in half, and solder the leads from the battery pack in to the cable, and plug the cable in to the Raspberry Pi
  2. Get a USB-A port to hook up to my breadboard, and just use a standard USB-A to Micro-USB B cable to connect the breadboard to the Raspberry Pi
The first option is difficult because each of the individual wires in a USB cable are tiny, and I'm still not that great at soldering. Also, it wouldn't look that nice, and could possibly break if the cable is bent. Therefore, I think the second option would be the better choice, but I don't have a part to do that, so I need to find and order one.

Until I have this part ordered, the bot won't be able to drive itself around, since it will be have to be connected to a USB port.

Thursday, February 7, 2013

Robo-building

Quick update this week, since I don't have much to share.

I'm working on getting the raspberry pi setup to run the program to control the robot, hooking up the pins from the pi to the breadboard. Once I have the robot driving on its own, I'll upload a video.

Thursday, January 31, 2013

I suck at soldering

Yesterday I tried to solder on leads to the motors to connect them to my breadboard, and failed horribly, so I'm going to get some help from Collin to learn how to solder properly. (I did get better over time, but I lost all my patience)

Below are some pictures of my robot prototype as it stands now - just motors connected to a battery. The top of the robot is on the left, and the bottom on the right. Everything is connected with duct tape, jumper wire, and hope, but I'll have a more permanent setup very soon.
 

I realized I haven't posted any pictures or descriptions of the parts I am using for the prototype of the robots, so I've included a picture below of all the parts I have so far. Note: these are only the basic parts - I have some sensors, and will need to get more parts for my eventual final version of the robot - these are just the basic structure of how the bot will move around.  Below the picture is a list of the parts as well. (Motor Driver, Step Up/Down, and wheels are not pictured)


In other news, after fighting with the SD card reader and eventually giving up and using another machine, I have copied the Raspbian OS on to the SD card so I can now start to set up an environment and code for the robots. Hopefully next week I can have the robot directing itself around.

Thursday, January 24, 2013

Parts Arrive

Most of my parts have arrived, and I've started to assemble the first robot. I'm still waiting until Friday for a couple parts that I'll need to get everything connected, (A case for the Raspberry Pi, and a ribbon cable) so I haven't started coding yet, but my plan is to get one Raspberry Pi up and running this weekend so I can start to work on the code.

I'll post some pictures of the robot once everything is connected (hopefully early next week).

Friday, January 11, 2013

Second Semester

Winter break is nearly over, and that means that the second semester of senior seminar is about to begin. I hope to provide some more interesting blog posts this semester, since I will be making progress (hopefully) each week and have at least something to share.

Over winter break I started ordering most of the parts that will be used for the robot. I decided to use Raspberry Pi for my CPU, which will be great because it gives me a lot of flexibility on what language I can write in, and should have enough power for almost anything I'll need. (And as an added bonus, I'll have have a couple Raspberry Pi to play around with after this project is over) I'll have more detail soon about the design of the robots and the other components that I'm using, but I just wanted to give an idea of what is to come.

Also, huge thanks to Collin who helped to pick out what components I'll need to get everything connected and powered.