So Let it be Written, So Let it be Done!

April 12, 2008

Robotics in the Morning

Filed under: kamakula,robot,trinity firefighting — kamakula @ 8:03 am
Tags: , , ,

Yesterday afternoon I made the trip to Rochester. Stopped by RIT and got to see Dr. Phillips and Dr. Brown. It was good to catch up with them for a bit. I wandered around the engineering building looking for more professors but nobody else was around. I went by the SAU and saw a couple people from OAS. Chatted a bit, then went over to the science building to look for the Chrises, but I guess they were gone too for the weekend.

Leaving RIT, I went over to the gallery where April’s senior thesis was on display. I’m really amazed by the work she’s done. I mean, I’ve always been impressed by her artistry and skill. It definitely was a great thing that her interests intersected with robotics enough that she hung out with us guys. I finally had a decent conversation with her. Got a couple pictures of April (gasp!) and even got a hug before I left.

The trip to Hartford was uneventful. I did get 450 miles on my current tank of gasoline, however, a few wrong turns and having to travel about 3 miles further outside my way in a 30mph zone extended my overall trip length by about 30 minutes. Nevertheless, I arrived at the hotel in Hartford and noticed something. . . an SG van! Not only did MDRC get funding for the trip, they also got a van, and brought six people.

That plus the level of completion that the robots were in when I arrived and the way that they’d divided up work (different people working on different modules providing services to each other), I’m really impressed with the improvements they’ve made since Nate and I left. As usual though, MDRC was very short on sleep the night prior to competition. Heck, my Thursday night was likely the only night this week I got more sleep than these guys though :).

Another thing, these guys are all young. And by young, I mean 2nd and 3rd years. I think Alex may be a fourth year. So, definitely our workshop idea worked. To jump start the new MDRC members into building robots and directly participating in the club, rather than having to sit on the sidelines and only minorly help the more “experienced” guys because they didn’t have any idea of the skills they already possessed. Nate’s going to be really happy when I tell him about this trip.

Pretty soon we’ll (well, some of us) will head up to Trinity, register and secure a table, hopefully in a good spot. Though I remember arriving more or less on time last year and still getting relatively screwed. Though I ended up meeting this really cool guy who got the spot next to me so maybe it was worth it. I wonder if I should have printed out business cards. . .but I think going informal will be ok. I’ve got my pad so I can jot down names and other contact info as needed. . .

I could pass mine out, but like girls you meet at bars or clubs, they never make the first move. If you give out your info without getting theirs in return, you’re pretty much not going to hear from them again. You need to be the one initially driving the interaction. Anyway, I think I’ll stay here tonight and drive back early Sunday morning. If I leave around 4-6am, I can get back between noon-2pm.

I really need to work on the DSP project so I don’t have so much to do on Sunday. . . Yaay, I’m so excited about today. I can’t wait to get there and start meeting people and seeing what others have worked on, how things have improved (in terms of algorithms, robot design, the still major problem of reliable detection and localization of the candle) since last year. I feel bad I don’t have a robot to enter, but I’ve got some ideas for how to generate some more time.

I’ll just need to start earlier. I also have another idea for a balancing robot platform. It costs money though :(. So, I definitely have another reason to get a job this summer than just paying living expenses and fixing the remaining issues with my car. I need to raise money for a kick-ass balancing robot that I can use for next year’s competitions and other stuff.

April 16, 2007

Firefighting Competition Over – now at IEE SoSE conference

Filed under: kamakula,robot,trinity firefighting — kamakula @ 9:26 pm
Tags: ,
So, I was not able to get my robot into competition ready mode. The following was accomplished before I left trinity:

  • Robot base 75% complete.
  • Encoders tested and partially working.
  • Successful measurement of PWM pulse width from accelerometer.
  • Successful test of A2D code.
  • Implementation of PID code.

Unaccomplished Items:

  • Creation and testing of tone detection circuit.
  • Testing of IR detectors ability to find candle.
  • Creation of mechanism to put out candle.
  • Testing of route guidance code.
  • Testing of I2C code.

After I finally got the PWM code working, I started testing closed loop PID control of wheel speed. However, I noticed that the encoder output was too erratic to be used. It would take too long to attempt to calibrate PWM values to match speeds for each motor, so I decided to halt further work on the robot and go around talking to other builders, taking pictures/video, and enjoying other parts of the competition.

I still plan on getting the robot balancing and doing to hallway following/obstacle avoidance behaviors. Once I get back home, complete my final exam project, and some other school related things, I’ll see if I can redo the wheel encoders (perhaps add pull-down resistors on the output lines). With working encoders, I can determine the necessary PID parameters for closed loop wheel speed control. From there, I can work on closed loop control balance control. Once the robot is balancing, I can test driving the robot around and then add the hallway following and obstacle avoidance behaviors.

My experience this year has taught me a lot. I’ll likely discuss some of that here as time progresses.

April 13, 2007

One Day Left and a lot poorer – At the airport.

Filed under: kamakula,robot,trinity firefighting — kamakula @ 10:20 am
Tags: , , ,

Well, so this trip hasn’t started out good.

Let me start by saying that typically, my body has two failure modes when extremely exhausted: hallucination, and falling asleep immediately at whatever I’m doing without any memory of the even. The hallucination has occurred after 72hours with ZERO sleep during which time I attended one class and skipped the rest to work on a lab project for the one class I attended. So, other than the two hours of class over those three days, I was in the lab for about the other 68. The remaining time accounts for bathroom and food breaks.

So, the hallucination in this occasion involved me seeing myself write a piece of code that compiled, linked, and loaded correctly. However, when I would test the board, nothing would happen. It took two hours for me to realize that I’d pretty much spent that time doing nothing.

The semi-narcalepsy occurs at lesser stages of exhaustion but can be bypassed if I keep myself supplied with sugar (which was the case with the hallucination event above).

However, tonight, I experienced what I can best term as reverse hallucination. Instead of seeing something that wasn’t there, I didn’t see something that was in plain sight. As I got ready to start packing up the assorted parts, I started looking for the gearbox I’d preassembled and the lexan I’d cut wednesday night. I started with where I last remember seeing them, the table at which I’d been cutting the lexan. Since I went to sleep soon after completing that, I knew that the chances of those items being anywhere else were pretty close to zero. So, I searched the table, didn’t see them. Ok, went to my work room, looked there. . no dice. Hmm, maybe I somehow took it to bed. . . not there. . . Perhaps I grabbed it in the morning when I went to the bathroom. . . nope. . . maybe I absentmindedly put it in the fridge (this happens more often than you’d think) – not this time. So, I spend 15-20 minutes searching my apartment and am about to have a nervous breakdown (I’m asking myself why would someone break into my apartment and only steal a gearbox and lexan). I go back to the table (for what is probably the 10th time) and look around again. . nothing. I turn away, and look back. . .and see the damn gearbox – WTF? It takes me another 20 seconds before I see the lexan.

Anyway, due to this and other reasons, and that I thought my flight was at 7AM, I end up leaving Tallahassee at about 2:45AM for a 6:00AM flight. 30 miles into the drive, I start feeling really tired and sleepy. 30 miles later, I stop at a gas station to stretch (which usually revives me) and check my flight info (which airline. . the exact time. . ) and see it’s for 6AM. Well. . . I still have over 100 miles to go. . . and about 2.5 hours till 6AM. Hell and Damnation! So, back on the road, really rejuvenated now, and creep up to 85. . 90. . . 100. . .110mph. And I’m good for about 70 miles. . . then I see the cop. . . but not in enough time, I get clocked at 92mph. Ticket is around $200. I can take a safe driver course to lower the fine and get points off. . . but this slows me down for the airport. Then I get here and waste time in the economy parking lot. I realize that there is no way I can get from that lot to the terminal in time, so I goto the terminal lot (twice as expensive to park). Time is 5:45AM. I’m pretty sure I’ve missed the flight, and when I check it, the kiosk confirms it for me.

In other news, someone provided the solution to the timer interrupt problem I was having before which really simplifies some of the coding I will be doing. At this point, I have code snippets and ideas all floating around. I’m pretty sure that all my sensors will work as expected, so now it’s time to write the code that glues it all together. So, I’ll take this time that I’m on standby for the next flight to plan out on paper the robot’s software architecture. Once that plan is pretty stable, I’ll return to coding.

April 12, 2007

Two Full Days Till Competition

Filed under: kamakula,robot — kamakula @ 2:35 am
Tags:

Well, Tuesday evening was a wash. I spent the entire time trying to get some timer interrupts to work correctly. . . and never did. I wouldn’t figure out the issue till this afternoon.

Now, it’s getting down to crunch time. I know tomorrow evening is a wash, because I’ll need to pack and get myself to the airport a couple hundred miles away. So, that really leaves now, and friday afternoon-evening to get as much work done as possible. . . and there is a lot to do.

So, I’ve got A2D code working and it can read the encoders correctly. Hopefully, they can drive the port pins so that I can make use of them w/o having to do some sort of weird polling with the A2D.

Still to go:

  1. Finish encoders and test GPIO polling method
  2. Cut out frame from lexan.
  3. Build another gearbox.
  4. Print out more encoder wheels.
  5. Write pulse width measuring code for accelerometer.
  6. Write and test PWM code with motor controller.
  7. Test ability of infrared detectors to “see” a candle.
  8. Pickup tone detector IC and create tone detector circuit (probably need to make a couple more stops at RadioShack).
  9. Port I2C code from Pic (CCSC) to Arm7 (WinARM).

Once those are done, I can:

  • Test independent closed loop speed control of each wheel.
  • Test ability to detect smoke detector tone.
  • Test ability to balance robot and stay in place.
  • Test ability to drive robot in a straight line while balancing using only encoders.
  • Test ability to drive robot in a straight line using feedback from IR distance sensors.
  • Test ability to wander without colliding with obstacles.
  • Test ability to detect candle and approach to within 30cm.

OMG. . . I just realized that I don’t have a candle put out mechanism. I suppose I may end up going with the fan method. . . I was hoping to come up with something more ingenuous. . but I have so little time left 😦

April 10, 2007

Four days . . . really four evenings

Filed under: kamakula,robot,trinity firefighting — kamakula @ 11:10 am
Tags: ,

Note to self – next competition, either start way in advance or have enough vacation time so you don’t have to work the days prior to leaving for the competition.

So, I was able to find within the example code an implementation of printf that works well. I can modify the low level code that outputs the data over the serial port to be interrupt driven but that’s something that will only happen once the entire robot is complete and working properly.

I wrote analog to digital conversion code last night (and will test today). I think I’ll write quadrature encoder code and pulse width capture code today as well. I’ll use the I2C interface for the ultrasonic sensor and can borrow the code I wrote last year for an IGVC competition.

I should also be able to do some body work – cutting out the lexan pieces that would form the structural frame of the robot. I hope superglue works well on lexan 😉

April 9, 2007

Almost Five Days Left

Filed under: kamakula,robot,trinity firefighting — kamakula @ 12:44 am
Tags:

This are not looking good.

  • Broke a gear tooth with a superglue – gearbox accident. Luckily, Publix sells nail polish remover (acetone) which fixed the motor. But now I must next day air a couple spare gearboxes on Monday.
  • Spent hours tweaking the makefile until I got the PLL correct. . .
  • Wrote up lots of code. . . but a lot depends on displaying stuff over serial. However, it turns out implementation of stdio is incomplete in WinARM. There are work arounds. . . but I get the feeling they will take a long time to work through.

Hopefully, when things pull together, work will progress quickly. Just need to figure out a way to pull it.

Things left to do:

  1. Cut out lexan for structural components.
  2. Test out encoder circuitry.
  3. Write quadrature encoder code.
  4. Write accelerometer code.
  5. Write ultrasonic sensor code.
  6. Test A2D (infrared sensors).
  7. Design tone detector circuit.
  8. Get serial code to work.
  9. Test PWM
  10. Figure out competition strategy/algorithm (chances are this will be be partially coded on my flight to Hartford).

I suppose I could work around the serial stuff by cutting and pasting from the sample code. . . I was hoping to have ISR driven print capability that was light-weight. . . but I guess I can sacrifice that for development time. After all, with the PLL, it’s running at 60Mhz and I’ve got plenty of code space. . .

April 7, 2007

One Week Left

Filed under: kamakula,robot,trinity firefighting — kamakula @ 11:52 pm
Tags: , ,

Herein we join the adventure already in progress, where kamakula (that’s me!) has one week left to complete his robot (appropriately and presciently named LastMinute) in time for the Trinity Firefighting Competition. I’m a little pumped since I just completed a 5k run (32:04) – my first such in pretty much ever and my first week running in almost half a year.

LastMinute is supposed to be a two wheeled balancing robot that utilizes the ubiquitous Tamiya motor gearbox for locomotion. It will sport homebrew optical encoders (to determine it’s pose and speed), an accelerometer (feel that tug – it’s gravity!), ultrasonic sensors (echolocation like a bat), infrared (I can’t remember which animal sees in infrared. . . but I know you’re out there!) for distance measuring and to detect (hopefully) the bright spot of the candle (fire!). We’ve also got the cheap SN754410 quadruple H-Bridge to drive those motors. What ties all this together is a Philips LPC2131, an ARM7 controller in the package of a TiniARM from New Micros.

At this point, everything is pretty much in pieces. The ARM7, H-bridge, an accelerometer are on a breadboard. . . but not hooked up together. I’m still getting up to speed using WinARM to compile programs for the controller, so that still needs to be worked out. I’m not sure if I can get the optical encoders to work and I’ve never used the accelerometer before.

However – the goals for this evening:

  1. Setup timer interrupts correctly on ARM7 by creating a clock application that counts up H:MM:SS accurately (displayed over a serial link).
  2. Layout and solder optical encoder circuit then test it detects black/white transitions using an LED (and inverter as a buffer).
  3. Test quadrature encoder code by outputting over the serial link counts per second and direction.
  4. Layout H-Bridge circuitry on breadboard and test capability of driving gearbox motors with PWM output from ARM7.
  5. Test closed loop speed control of a wheel.

Blog at WordPress.com.