More About Encoders

Dave's taking today off, so I'm not sure about how much is really going to get done. Yesterday before we left I finally got the interrupt working and counting the number of tape marks. The reason it was messing up was because I wasn't clearing the interrupt flag and it just kept looping. I'll have to see how consistent it is, but I have a feeling that we're going to have to space the markers out a bit and make them bigger so there is less of a chance of the encoder missing it. The code is also starting to get messy again. There are at least 200 lines of compass code in the main source file sharing variables with functions it shouldn't. I'm not looking forward to cleaning it up. I finally got some pictures the other day. I'll probably upload them tonight.  

Encoders

We're only in for a few hours today. Dave needs to change the pin that he soldered the encoders to because they're on digital pins instead of input capture bits. Dave's not impressed... But the sensors themselves are working great though.

Distance Tracking

Well, we have officially given up on the accelerometers for distance tracking. They simply don't work... Instead we're going to use encoders. We have a light sensor mounted right over one of the treads and white markers on every other tread. Now we're going to set up an interrupt that will trigger every time the white line is detected and increment the distance traveled accordingly. This method is much easier, cheaper and more effective. At least the accelerometers weren't that expensive.

Overdue Update

The communication is finally working and consistent. We're going to use two separate boards for the transmitter and receiver on the computer side. I'll just hook up the transmitter to my arduino board which will be very easy because the IDE already has built in support/functions for our specific transmitter module. We repositioned the IR rangefinders because they were too close to the wall which was messing up the readings. After that it only took about 15 minutes to get a solid wall following algorithm working. Once that was done, we tried to impliment the compass so we could get consistent 90 degree turns. After 3 days of calibrating, writing custom calibration functions, reviewing the turning algorithm we finally found the problem. The area we're working in has lots of metal/magnetic fields which are completely messing up the compass readings. So right now we're looking for a new spot for testing. Dave's not going to be here for the next two days because of exams, so I'm going to work on the server program that will control the robots. I'm considering writing it in C# rather than python which was the original plan. Python is being very flaky atm and I don't have time to mess around trying to figure out the problems. C# is faster and has better game engines.

No more resetting

It was actually two things causing the resetting. The way the ir rangefinders pulse created a lot of noise which reset the PIC. A couple decoupling caps fixed that. The second problem was the servo, it was simply drawing too much current. We isolated it's power supply so it doesn't touch the rest of the board and that fianlly fixed our resetting issue. Right now, Dave's putting on some on/off slider switches because we moved over to battery power. After he's done that we're going to get started on wireless communication again.