Archive for the ‘electronics’ Category.

Bike Photography and GPS Fixin’


Yesterday I headed out to the grand opening of the Skills Park at Stony Creek Metropark. I’d intended to ride a bit, but I ended up spending most of my time there just taking photographs like the one above. (That one was taken by sitting under the gap in the Flo the Fro stunt and using the Peleng 8mm fisheye. If you’d like to see more of the photos, take a look at the album entitled Stony Creek Skills Park Grand Opening.

After getting home and meeting up with Danielle we went and got food, swung by my work to pick something up, went to Best Buy to grab a pack of universal screen protectors for my new phone (eek, expensive!), then I came back here and fixed the Garmin Edge 305 I’d previously mentioned. My first attempt was to bridge the connector PCB to the main one with wires, but there wasn’t quite enough room for them. Instead I just ran the battery pack wires directly to the related test points on the main board then sealed the thing up with hot melt glue.

Crooked Tree


Another (quite blurry) view of my bike leaning against the crooked tree on The Snake at Stony Creek.

I really like riding past this tree on the portion of the mountain bike trails known as The Snake at Stony Creek Metropark. This tree keeps leaning further and further over, and I imagine that soon it’ll actually fall and make for a log to be crossed. There’s something I really like about coming around that corner and having to lean under it.

Yes, I know the photo is really blurry. Sorry, it was getting dark and 1/7th of a second is hard to hand hold, especially after climbing a bunch of grinding hills. Here is a clearer photo of the same tree and my bike, but from an angle which doesn’t show the tree and trail as well. Also, a few more biking photos have been posted to my catch-all biking around local places album, if you’d like to see them.

Next time I’m out I’ll try and take a picture of the corner at the top of The Snake which I previously couldn’t make it past, but was able to easily ride through twice (out of two attempts) tonight.

A friend of mine is having problems with his Garmin Edge 305 GPS. He’s reported that it will periodically turn off while riding, which seems to be attributable to the battery contacts in it losing contact briefly, so he asked if I’d take a look at it. It seems that the unit has a set of pressure contacts which connect the battery, speaker, and USB connector to the main board, held in place when the unit is glued shut. This set of flexible pins has to make contact with this PCB while the whole unit is mounted on a bicycle bouncing down rocky and rooty trails.

I think that to fix this I’m going to fit two wires for power from the non-contact part of the pads on the back panel to test points on the main PCB. This should ensure that the power connectors are always good. USB and speaker probably aren’t as critical, and I don’t want to try and cram too many wires into a housing not designed for them. I’ll give this a go tomorrow as tonight I’m relaxing.

Nokia E51 Fr1st Post


The first image taken with my new phone, a Nokia E51.

My new phone, a Nokia E51 arrived yesterday, but due to some issues at work I didn’t have enough time last night to open the box.

Tonight I did so, took some photos (to be posted later) and dropped my SIM into the phone and tried it out. So far, it’s great. The casing is nice, it’s reasonably sized, the buttons feel good, and the camera works great. The image above is scaled down to the same resolution as my old phone did natively.

If you’d like to see the full-res image it’s here, while this page contains the resized version. Note the EXIF header, which has been confirmed by jhead and will make sorting images captured for my moblog album much easier:

c0nsumer@reason:/Volumes/MMC/Images> jhead 14082008.jpg
File name : 14082008.jpg
File size : 310470 bytes
File date : 2008:08:15 01:58:28
Camera make : Nokia
Camera model : E51
Date/Time : 2008:08:14 21:47:38
Resolution : 1600 x 1200
Flash used : No
Focal length : 4.9mm
Aperture : f/3.2
Whitebalance : Auto

c0nsumer@reason:/Volumes/MMC/Images>

Now it’s time to relax, particularly after this last week of work. Hmm, maybe more poking with the phone, though… It’s nice to see OBEX working via Bluetooth.

New Phone Ordered

I’ve brought up the possibility of acquiring an iPhone a couple times previously. While I still feel they are really nifty devices I’ve decided to instead replace my failing and almost four year old Nokia 6600 with an unlocked Nokia E51 purchased from Amazon for $249.99.

I currently have T-Mobile service, out of contact, with me paying around $40/mo for 600 anytime and unlimited night and weekend minutes. This price is right in line with other contract-based deals, but is without the contract restrictions. I should just be able to drop the SIM from my 6600 into the E51 and have it work. If I were to purchase an iPhone I would have to sign on with AT&T for ~$70/mo (plus taxes and fees) for the next two years after spending $300 on the phone. This is lots cheaper and should still meet all my phone wants and needs.

The E51 has received good reviews, and seems to be a descendant of the 6600. Beyond the basic modern phone stuff it has/is:

· (Supposedly) supported by iSync.
· 2 megapixel camera.
· 802.11b/g with VoIP (SIP endpoint, I believe) support for on WLAN.
· Browser / email client / multi-platform IM client and some office-type apps.
· Metal case.

It seems like it’ll be a pretty nice phone. I find it strange that none of the US providers offer this as a bundled / packaged phone but that might be because it’s a basic office-type phone without full keyboard, shiny (and very profitable) media service tie-ins, or a particularly shiny UI. I anticipate it’ll just be a decent, usable smartphone without being overly large or expensive.

I hope I can use the VoIP (SIP?) client, but I think I might have to talk with [info]noweb4u about that, as he both knows scary amounts of telephony stuff and can provide such a service.

If you’d like to read more about the Nokia E51, here is its page at Nokia’s US site.

8GB iPod Touch For Auction / Sale


8GB iPod Touch for Auction / Sale

Due to an interesting series of events (more on this at some point in the future) my sister has had to purchase a new computer and such for herself. As part of her purchase of a Macbook she received an 8GB iPod Touch for free (after rebate). She doesn’t need the iPod, so I’m attempting to sell it for her.

I am currently selling it via eBay auction #290249097988 with a starting bid of US$1. If any of you are interested in purchasing it I can make it available outside of eBay. I expect that we’ll get somewhere around US$240 for it once the auction has closed, but I’d take US$220 cash (or equivalent). This goes for folks overseas or not. Yes, that’s a much better price than you’ll pay for one at a store.

This is a brand new iPod purchased a couple of weeks ago at the local Apple store at the Partridge Creek shopping center. It comes with the original receipt, so there should be no problems with any sort of warranty support on it. It should also be quite easy to get the 2.0 firmware (jailbroken or not) on it, if you so desire.

So, anyone want it? Otherwise I’ll just leave it up to the eBay peoples…

How To Make an iPhone 3G Fail


A iPhone 3G at the Apple Store rebooting after I managed to crash it by viewing a 7MB JPEG.

As I’ve mentioned before, I’ve been contemplating an iPhone 3G as a replacement for my aging (and failing) Nokia 6600. Today I went by the Apple store at the local outdoor mall, Partridge Creek to spend some time playing with one. Unfortunately, I crashed it hard once and made the UI slow horribly another time. I also ran into one other potentially show stopping bug.

First, 3G was a lot slower than local wireless. When using 802.11 things zipped along nicely, but 3G was still wholly acceptable on both web pages and maps. I think it’d be just fine for mobile use.

I then wanted to try to see how it renders my personal site, including my photo gallery, so I loaded up a few things. Everything worked great, except for when I’d try and visit a full size image in the gallery, then the image wouldn’t display. For example, take this page. It worked great, except that large image of the P3 case just simply wouldn’t display.

Thinking that maybe the iPhone had problems with large images I then browsed to http://nuxx.net/images and tried to view this image. While downloading and rendering it (via 802.11) the phone got really slow, the volume buttons and ringer switch stopped responding, and then phone laggedly noticed that I’d turned it sideways. The whole phone was very slow, and after four or five minutes of being nearly unresponsive it gave up. The phone was displaying partially downloaded image and half-heartedly rotated screen (it must have noticed that I’d been moving the phone around) when it went blank and rebooted, displaying the screen shown above.

After the phone rebooted I made a point of disabling 3G, thinking that maybe the phone was somehow failing over to it and just let it go with 802.11. (This is done by turning on airplane mode, then turning WiFi on.)

The image was then able to load and display, although it took quite a bit of time. I can’t help but think that the iPhone just isn’t set up to deal with / display images of this size. With how popular digital photography and things like Flickr in particular are, I’d hope that Apple would have found a way to deal with it. Wanting to break things further I loaded up this 9.7MB JPEG panorama of a part of the USAF Museum at Wright-Patterson. This too caused the iPhone 3G to lag horribly and the UI to become unresponsive, but eventually (after maybe four minutes) it acquired the image and displayed it. This time the phone didn’t crash.

While I can understand that a mobile device might not be able to handle images of this size, I think there should be something in place to ensure that the end user experience doesn’t turn to crap. Also, I really don’t like how the image in my gallery silently failed to display.

Speaking of outdoor malls in Michigan, check out the map of Twelve Mile Crossing at Fountain Walk, aka The Fountain walk, in Novi. See all the empty space? I don’t know what developer could possibly think that an outdoor mall in a state with Michigan’s drawn out, harsh winter and frequently rainy summers is a good idea.

iPhone 3G In My Future?

With Apple’s announcement of a new 3G iPhone, I think one might be in my future.

I’ve had my old Nokia 6600 since October 2004, and it’s just starting to fail. The screen is becoming dark and blue tinted, the photos (example) just aren’t that great, and some of the buttons are starting to fail. The battery on it is also really quite bad, and I have to charge it every day else it’ll fail.

Currently I pay around $47/mo after taxes for 600 anytime minutes, unlimited nights and weekend, and no data via T-Mobile. If a plan via AT&T can give me ~300 anytime minutes and the same unlimited nights and weekends, along with a comparable data plan, for a somewhat similar price, I think I’ll go with an iPhone.

I need to be sure that it will work with my custom iPod setup in the car, which ties the line out into the stereo and power into the iPod for charging. I also want to be certain that when the iPhone is receiving power via the dock connector and playing that it automatically pauses when power is cut. I use this feature to ensure that the iPod automatically pauses when I turn off my car, and I’d like the iPhone to do the same thing.

I figure that I’ll probably end up getting a Bluetooth headset for use when actually talking to people while driving. I rarely do this so I’ll probably first try using my old headset first, then maybe get a new / better / longer lasting one.

Hopefully this will work out well and meet all the goals of getting a phone with a better camera, display, and battery, while at the same time providing me with a nice mobile network terminal and one less device to carry.

Ivan’s P3 is Finally Done


Screenshot of MIDI-OX displaying sync data from Ivan's P3 sent via the SYNC port.

That right there is a screenshot of MIDI-OX displaying data coming into a MIDI port, including a START and STOP message. This wouldn’t be anything too special, except for that it’s coming out of the SYNC port of Ivan’s P3, which means that the MIDI Sync issue which I’d previously mentioned is now resolved.

It turns out the problem was related to some changes which Colin had made in order to eliminate unintended triggering of the PICs inputs. It appears that this new code was mostly a backport of the firmware for the v1.6 boards (these are v1.5) which included the function for DIN SYNC passthrough, but doesn’t seem to default to having MIDI sync on.

The solution is to boot the P3 while holding down the 1 key. It will then tell the PIC to flip into MIDI mode, the PIC will write 00 to the first byte of its EEPROM (so it always goes into MIDI mode in the future), and then as soon as it first receives a RUN command it’ll start spraying out the clock / start / stop commands seen above.

I guess if I had been better (or more thorough) at reading disassembled PIC code I could have seen it doing all of this, but I’m not really that familiar with it yet, and I didn’t want to spend six hours looking up opcodes I didn’t understand and what each register written to was. Ah well, at least it’s working and I know what happened. Now I just have to pack it up and get it back to Ivan.

Playing with the PIC12F629

Tonight I did some more digging into the problems I’ve been having getting the MIDI sync working in Ivan’s P3. I had been sent some new firmware to try, and while that (in the disassembler) appears to deal with the right pins (GP0 as output, GP5:GP4 as input), it didn’t work. Tonight I did a good bit more digging and eventually ended up writing this program as a test.

Based on my understanding of how the PIC in the P3 with v1.5 PCB works, this program does the following: GP0 is set to low, then whenever GP4 changes state GP0 is changed as well, but only if GP5 is high. The end result is that on the output pin of the PIC, which connects through to the SYNC output, I basically see a mirror of the inputted sync signal whenever the sequencer is running.

I don’t think that it would be a huge stretch to write my own version of the software that is supposed to be in this PIC, but I haven’t gone that far. As far as I’m aware all I’d need to do is have each sync pulse received cause a MIDI Clock message to be sent out of GP0, and whenever GP5 goes high or low send a respective MIDI Start or Stop. That said, this P3 should really be running its official software, not my replacement stuff.

Hopefully I’ll receive some new firmware for it soon, and hopefully that firmware will do what it needs to. If I’m bored enough tonight maybe I’ll try and follow the flow through the entire program in the disassembler and figure out where it’s going wrong.

P3 v1.5 MIDI Sync Issue


Looking inside of Ivan's P3 while the micro grabbers are connected to ground, sync in (to the PIC on GP4), and what should be MIDI out (from the PIC on GP0).

So, in wrapping up the testing of Ivan’s P3 I found one more problem: MIDI Sync output isn’t working. I think I’ve narrowed the issue down to the software running on the PIC which handles this. Here’s what I know as of last night:

· U1, the main CPU on the P3, has two lines coming out of it which either connect directly to the DIN sync port or to U19 used for conversion to MIDI sync.
· I am seeing nice square waves on the PIC’s GP4, and these pulses change width with tempo change.
· The line running from U1 to the PIC’s GP5 goes high when the sequencer is running, then low when it isn’t.
· I don’t see any data coming out of the PIC on GP0, which is what connects through a 220Ω resistor eventually through to the MIDI port.
· There are no shorts on any of the lines.

In troubleshooting the PIC itself I have:
· Read out the firmware from the PIC, and received new firmware from Colin (the designer) for the PIC. These did not match, and the new firmware did not resolve the issue.
· Tried a spare PIC which I had sitting around in my parts pile.
· Wrote a test program to blink all GPIO lines on and off and successfully ran it on both PICs.
· Confirmed that the PIC is connected to power and ground and other lines, as expected.

After this, I pretty much have run out of ideas. This morning I threw the firmware Colin had sent me into a disassembler, and while I’m not very good at reading assembly, I think I’m that GP0 and GP1 are used as inputs and GP2, GP4, and GP5 are outputs, confirming that the firmware I was sent is for the v1.6 PCB. There is lots of BTFSS GPIO,0 and BTFSC GPIO,1 which are used for reading pins, and lots of BCF and BSF on GPIO,2, GPIO,4, and GPIO,5. GP2 (GPIO,2) seems to be used the most in the program, so I think it’s the MIDI port, and this would match what I see in my old photos of the v1.6 board, as GP2 connects through a 220Ω resistor to the pin header. GP4 and GP5 probably mirror the input received on GP0 and GP1, but I’m having difficulties confirming which pins are sync and which are enable.

I just pulled apart the older file which I had read out of the PIC previously and it seems to read from GP4 and GP5, with MIDI data going out of GP0. These port uses match my observations of the pinning of the v1.5 board, so I think that the older firmware looks somewhat right. That said, it clearly wasn’t working, otherwise I wouldn’t be posting this.

I think tonight I’ll try to write the originally-read firmware back into one of my new PICs, then I’ll drop it back in the P3, just to see what happens.

Oh, and for what it’s worth, this is my understanding of what the PIC12F629 on the P3, U19, does (or is supposed to do) on the the v1.5 boards: It watches for when GP5 goes high (an indication that the sequencer is running) and when it does, it sends out a MIDI clock message with each pulse it sees on GP4 (not sure if this is done at the rising or falling edge). It then stops sending these clock messages when GP5 goes low. On the v1.6 boards it seems to do something similar, but since it has three outputs I believe it also sends the DIN sync output as well.

There are also more photos of last night’s work at the bottom of this page in the last two rows.

UPDATE: One thing I didn’t test was input on the pins and the internal oscillator. I make a quick change to the blinky LED program to run from the internal oscillator and another version which I can use to test if all the inputs work. I’ll try that tonight. At this point it’s almost not enough for me to fix the problem, I want to know what wasn’t right.