More IR Detector-Emitter

Ilia was away... agian. This left me with pretty much nothing to do because Ilia was doing most of the programming work before and didn't comment. I hate to admit it but I sort of need him for the programming. So... not much got done.

10101010101

We got the code working today!
It is able to successfully transmit/read bits.
It goes like this:

Read the current pulse time

The pulse duration is equal to the previous time, subtracted from the current time.

The number of bits in each wave is the pulse duration divided by 1300 (one bit).

This gives an output similar to this:

1 1 2 1 2 1 1 1 4 2

Each digit represents an edge of the wave and their values are how many bits are in each wave.

So in binary it would look like:

01001001 01000011

If you still don't get it, this should clear it up:

1 | 1 | 2   | 1 | 2   | 1 | 1 | 1 |4        | 2
0 | 1 | 00 | 1 | 00 | 1 | 0 | 1 |0000 | 11

Convert that to Ascii and you get: "I C" ( My Initials XD )

Ground

We spent half an hour today debugging the beacon circuit. It was working and then all of a sudden stopped. We hooked up the scope and found that the pulse was around 44khz and it was supposed to be at 36khz. We fixed the code but the receiver still wasn't picking it up. Then we found the problem, we accidentally reversed the  output and ground pins on the detector *facepalm* .  However, if this didn't happen we wouldn't have found the problem with the frequency. Anyway, after reprogramming the beacon, we slightly modified the input capture code that we used with the digital compass to work with the beacon detector. It doesn't really work yet though, so that's what we'll be working on tomorrow.

IR Beacon-Detector Cont.

We continued working on the IR beacon-detector. We moved our program for the beacon from our emulator on to our actual PIC so we can use the emulator to get the detector working. To do this we had to actually breadboard the beacon circuit and figure out how to use the programmer. We also had to change a lot of our code to go on the PIC we are using for the beacon because it's a different type of PIC than the one we are emulating.

Beacon Schematic

We did most of the beacon schematic today. We're going to have either 4 or 5 ir leds per beacon and I'm thinking of adding an extra regular red or green led so we can get some visual feedback from it too. There is going to be a 3 pin dip switch so we can choose preset output patterns by setting the corresponding pattern on the dip switch. This way, we won't have to reprogram the beacon's pic every time we want to change the message being pulsed out. I'm hoping to get the cirtuit breadboarded tomorow with the actual dsPic30f2012 that we will be using for the beacons.

Bitwise

We made A LOT of progress today. First we wrote a function that converts a character into it's binary value and stores it into an array. Once we got that working we had the ir beacon pulse out the binary values. Due to the way the detector works, we had to invert the signal to keep the output from cutting out. After doing this, the results were pretty consistent. We then moved on to getting it to pulse out whole strings which was surprisingly simple. The funny thing is that we only really need it to pulse out a 4 bit pattern. You could say we got a little carried away. Nevertheless, this has to be one of the coolest things we've done so far.

IR Beacon-Detector

Our IR beacon-detector parts came in today. XD. We started by writing the code for the emitter. Then we hooked up the oscilloscope to the output pin to calibrate the frequency (mostly trial and error). After we got the timing right we connected the emitter circuit to the pic and the detector to the oscilloscope on a different channel to see the relation between output and input IT WORKED FIRST TIME! We are both still in shock. Today was a good day.

Presentation Day

Other than my voice cracking every other word and me putting up a slide backwards, the presentation went pretty well. We made it simple enough (I hope) that everyone in the audience understood what we are trying to do but still technical enough to make us sound smart :p.

Presentation...

We spent the day putting finishing touches on our presentation...

Presentation Prep

We have a presentation in two days for all the other mentorship students and their parents. We decided to use a software called Inspirartion which will display our ideas in a manner that is very visual and easy to understand. We also talked about ways to present our ideas and project goals in a way that will be comprehensible to an audience without any technical background.