zondag 2 oktober 2011

GPS for Nikon D7000 (or D90)


I recently bought a D7000, and noticed it had a GPS input. Since I already had the GPS module (see the GPS label) I was wondering if I could connect the two. It turned out to be easier than expected: the GPS module accepts 4-6V (and the D7000 outputs 5.9V) so no regulation is necessary. The GPS output is 3.3V, and my Nikon D7000 accepts that without any problems (I've read reports of other Nikons that need a higher voltage, in which case you can use the 74HCT125 as mentioned in this schematic.

The trickiest bit is finding which cables to connect, however, there are enough resources online, like this blog for the D90, that explain it rather accurately.

I put the GPS inside a mini Altoid box, and will probably use the foot that I had for my Minolta project. To activate the GPS on the camera you need to go to the GPS menu. On the LCD display you can see the status: if it is blinking it means you connected everything correctly, but the GPS hasn't locked on yet. If it is solid, it is in use. Note that the Nikon stops listening to the stream if the data isn't being used for a while, but it keeps powering the GPS (I believe even when the camera is turned off, so you may wish to unplug if you want to save the batteries).

zaterdag 19 maart 2011

PS2 to MIDI converter


Recently I purchased an EMT-10E (Yamaha sound extender) which was meant for the Clavinova to increase the different sounds you could make. I bought it for the project I mentioned earlier on this blog, so I would have something to hook the toy piano with MIDI to once I was done. However, due to issues with the switches the toy piano still doesn't have MIDI, and I still wanted to play with the EMT-10E. So I decided to make a PS/2 keyboard to MIDI converter. Since a PS/2 keyboard already sends key press and release commands it would be just a matter of converting the protocol and assign a note value to each key.

As this didn't seem to difficult, I decided to give myself another requirement, which was that it had to look nice. As you can see on the picture, I think I succeeded. Initially I decided to use a wood box, but the PS/2 connector that I got from Jameco was too narrow for wood, so I needed something thinner, but still strong. After walking around in Lowes for a while I discovered that an light switch box with a blank plate would work very well. I also bought a 1/2" drill bit for the holes, and it turned out it was quite easy to put everything together.

I once made a servo controller for Brian Asman, and I already had converted that board for MIDI output. It turned out it had the right size for the box, and I therefore only had to add the PS/2 connector (I connected the data line to PORTB bit 4, and the clock line to PORTA bit 2. You also should connect +5V and ground. Wikipedia has a very clear diagram of the connector, but make sure you have the right mirror image (initially I connected it wrong, reversing the voltages. My keyboard was quite lenient, though). You'll know when you have the right connections if you see the keyboard's LED blink. To hook up the MIDI you need two 220 Ohm resistors for use in the data line and the +5V line. The data line should be hooked up to the TX pin of the PIC16F690 (you can also use a PIC16F688, if you want something smaller). The EMT-10E conveniently has a 9-12V output, which I use to power the box.

You can see and hear the box at work here:

The EMT-10E has a "split keyboard" mode and allows transposing up and down for several octaves, and it has a number of different instruments (no drums, unfortunately). The only problem remaining is that a PS/2 keyboard has auto-repeat on keys, which is undesirable if you want to play notes for a longer period of time (it also causes some notes to become "stuck", possibly because more press events are received than release events).

Here is the first version of the source code, which basically reads a key from the keyboard, converts it into a note value, and either plays it or stops playing it, depending on whether it is a key press or a key release.

If you're interested in this project you can always contact me and I can provide more details if needed.

dinsdag 15 maart 2011

Weighted Companion Cube


On a different note I decided to make a weighted companion cube a while back, as I was enjoying Portal a lot. As you can see it came out rather well, although the silver paint might be too shiny, and the sculpey turned out to look a bit like teeth.

zondag 28 november 2010

Attempt at creating my own simple MIDI controller


I started on a new project, converting a cheap toy piano into a MIDI keyboard. The toy piano has 23 keys, which it reads using a 4x6 grid of scanlines. The resistors are already in place, and fortunately there are places for me to solder my wires to. The PIC16F690 should have enough pins (I only need 10, it has 20), and I already have MIDI code for my Beethoven playing box, that I described earlier. Hooking up a MIDI output is very easy as well: just connect +5V to pin 4 of a 5-pin female DIN plug with a 220 Ohm resistor, and hook up the TX pin of the PIC16F690 to pin 5. The step I forgot before is that pin 2 definitely needs to be grounded, so don't forget that. You can of course also use sketch one or sketch two, or any of the others found on the Internet.

I used the Pic kit 2 to try different voltages, and the MIDI works with my CASIO keyboard even at 2.5V. Since the piano has a 3V battery, I was glad to see this. Using 3V of course makes it not entirely MIDI compliant, but I'm sure most pianos will behave just fine with it.

maandag 4 oktober 2010

Heart rate monitoring 10

This is another walk from that same trip, this time steeply uphill and downhill, to the Bumpass hell from lassen volcanic national park. Heart rate bumpass hell walk

As you can see, the uphill part had a significantly higher heart rate than the downhill part, with a slight break in between, where I discovered I had cell phone reception and sent and received some text messages.

maandag 20 september 2010

Heart rate monitoring 9

It has been a while, but in August I went to Vancouver with my parents, and hiked in various national parks on the way. Here is the graph from the second hike, which was through a forest, on level ground. The forest was beautiful, but there wasn't much variation in heart rate.

Heart rate walking through forest.

maandag 12 juli 2010

Heart rate monitoring 8

This month the "An analytical approach to club dancing" classes started, and I decided to measure them as well. As you can expect, the analytical approach (green) is a lot lower than the beginning hip hop (red):

Beginning hip hop vs. the analytical approach to club dancing, heart rate.