Press "Enter" to skip to content

nuxx.net Posts

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.

Leave a Comment

Bike Frame Size

So, I have a 21″ bike frame. After trying out ‘s 19″ briefly around the parking lot here, I can’t help but think that my frame is a bit too large for me. It seems to fit and it’s not bad, but I almost think that it could be better.

Then again, I’m shaped kinda weird. I have relatively short legs for my long torso. Pants that I buy typically have a 30″ inseam (and they hang a bit), but I’m about 5’9″ – 5’10”.

Maybe my next bike should just be custom fitted / have a custom frame.

Leave a Comment

Clean Bike, Now With Loctite Blue!

I find the places dirt builds up on a bike to be rather interesting. This mix of sand and dirt around the spokes is mostly from riding while up north.

After all the riding around near my grandparents house and at Stony Creek a bunch of times this last week my bike had become pretty dirty. The area inside the rim around the spokes looked particularly bad. While it really wasn’t that bad compared to some I’ve seen photos of, the built up crap in the cassette and wheels and down tube (and everywhere else, it seems) had me wanting to wash it. So, I did. A bunch of time was spent with car wash soap in a bucket, brushes, some diluted degreaser, and a few rags to get the bike nicely clean. After concentrating on the frame and various other bits I gave the drivetrain itself a detailed cleaning.

After the rear cassette was shining brightly and the chain properly oiled I took the rear brake caliper bolts out one at a time and applied some Loctite Blue to hopefully hold them more solidly. I’d rather not have the problem I had last time, or the inverse, where my rear brakes would have simply stopped functioning. (Because of how the front calipers bolt on, this can’t really happen there.)

The rear frame was then put back on, and I was actually able to identify the source of the extra noise while riding over bumps. It seems that it wasn’t the bag / rack, but instead the place I had chosen to put my pump was rattling against the rack itself and had even worn a small hole in my bag. I repositioned the pump into the middle of the bag and wrapped the extra tools in two rags to both take up space and give me useful rags. A test ride around the neighborhood up and down some curbs (and managing to slightly bunny hop a few times) I didn’t hear anything more than chain slap, so I guess things must be better. (I do need to build a chainstay guard to eliminate this, but that can come later.)

If things go as planned, tomorrow and I will be heading out to Stony Creek for some nice riding, and Wednesday evening I’ll be participating in a regularly scheduled group ride in the same area.

Leave a Comment

Riding at Stony Creek

Me riding up a mountain bike trail on my bike at Stony Creek, taken by Eugene Mazur.

On Saturday afternoon I took advantage of the unexpected lack of rain and headed out to Stony Creek to ride on the trails a bit more. While coming up over one of the hills I noticed a guy standing at the top of one of the hills taking some pictures. Later on, back near one of the high points on The Rollercoaster I saw him stopped, so I stopped to ask him about the pictures.

He’d said that he had been taking some, noted my email address, and said that he’d email me the photo. Later Saturday night I received the image above attached to a message from Eugene Mazur. It’s kinda neat to see a photo of yourself in motion, in context.

From what he said, Eugene is fairly new to mountain biking as well, so I mentioned the Wednesday Night Stony Ride which I’d recently been made aware of. Maybe he’ll head out there. It sounds like it would be fun to meet up with some people and ride around on the trails, so I’m going to try and make it this week. I’m also hoping to get out to the park and ride on Tuesday and Thursday with , so this could be a nice week of bike riding. I think tonight I’m going to wash my bike and give the drivetrain a good cleaning, because things are pretty dirty from the weekend of riding up at my grandparents house in very sandy soil and the few days out at Stony over the last week.

Leave a Comment

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.

Leave a Comment

Time For New Sandals

My old sandals, some Nike Air Deschutz from the mid 1990s.

Since the early 90s I’ve had the exact same pair of sandals, which I’d wear whenever I was out washing the car, or doing other things which sandals are appropriate for. They are the ones seen above, an old, very worn pair of Nike Air Deschutz. They would still be plenty serviceable, except that the last time I was watching Tobi she chewed part-way through one of the straps. That, and they are beyond the not-particularly-attractive stage.

When at REI last night I came across some Ahnu Tilden II sandals on clearance $49.83. The size 10 seemed to fit me well, so I picked them up. After going for a few walks around here and trying them out I think I like them, I’m just not accustomed to my toes being enclosed while not wearing socks, so they’ll take a little getting used to. Here is a photo of the sandals themselves, if you are interested.

Leave a Comment

Avid BB5 Caliper Damage

Damage to the rear Avid BB5 disc brake caliper after the top mounting screw of the caliper bracket came out while starting to descend The Rollercoaster at Stony Creek on 16-May-2008. This damage does not affect use of the brake at all.

Just after starting to descend The Rollercoaster at Stony Creek (a windy, narrow, fun descent from the highest point in Macomb County) I applied my rear brake and started to hear a tremendous houl from my rear brake and found myself slowing very quickly. I was able to finish stopping with my front brake, just as someone behind me asked if I was all right, and what the sound was.

A quick check showed that the upper bolt on the bracket which connects the caliper to the frame itself had come off and that in squeezing the rotor the caliper had rotated forward and lodged itself against the disk, slightly stuck between the frame and the disc. Walking about 15′ back up the trail I found the screw, I was able to partially put it back in by hand. Because of the length of the tool I couldn’t fit it between the rear rack and screw head, but thankfully the person who had stopped had a much shorter wrench and I was able to tighten things back up. A quick readjustment of the brake and I was on my way, with the brake actually working better than it had previously.

I’m not really sure how the screw came out. It was tight the last time I checked it (a few weeks ago), and it had thread locking compound on it. I do wonder if the combination of the rear frame, the slightly ratting bag, and the rough trails contributed to the bolt loosening.

Today I headed back out to Stony Creek with the frame removed and with only a multi-tool and my keys. While I didn’t like riding without the ability to fix a flat, I accepted the risk of a five mile walk until I can sort out the CamelBak Question. Things went well, and it seemed like it was a generally a quicker ride with the lighter bike, except it seemed like I had a much harder time getting up some of the steeper / longer hills (generally in the two-track area) because I kept spinning the rear tire. Twice I just stopped part-way up and walked. It was a much quieter / pleasant ride, although I do think I’ll get (or fashion) a soft chainstay guard to cut down on the loud chainslap.

Now it’s time to shower, eat something, and poke a bit with Ivan’s P3. I received new firmware, but it still doesn’t seem to be working, so I’m going to write a little test software for the PICs and be sure they are working right.

Leave a Comment

CamelBak Question

To those of you who ride bikes and read this, I have a question about CamelBak bags.

See, I have a frame for the rear of my bike, and with its bag it’s great for touring type riding, but it has a couple deficiencies:

· It rattles a LOT on even small bumps.
· While it holds the normal bike stuff I’d want to bring (multitool, spare tube, pump, keys, wallet, cell phone, tire levers, Clif bar) it doesn’t hold my camera very well.

Yesterday I swung by REI and picked up an Aero Wedge Pack (Medium) for $26. It was really easy to fit to my bike, but with it I have nowhere to put my pump. I can fit a tube or patch kit, but not any method for reinflating things.

I’ve been hesitant to get a CamelBak because of the price, and because when outside in warm weather while wearing a backpack my back tends to get really, uncomfortably sweaty, to the point where it makes me hot a lot quicker than normal.

I’m just not sure what to do, and I’d love suggestions. I could keep the small Topeak bag, and carry a patch kit and CO2 inflator in it instead of a spare tube. The on-bike water (about 1.5L) is sufficient for most rides I’ve been on so far. I could return to Topeak bag and get a CamelBak and use it instead of the rear rack / bag full time, or at least until I need the rear stuff. Or I could deal with the really loud / bothersome rattling and lack of space.

If you would recommend a CamelBak for me, which model? The M.U.L.E. seems to be the most popular, but it’s also REALLY big. I don’t know if it’d be overkill. It’s $86 and REI, and returning the bag I purchased yesterday would offset $26 of that.

Something I’ll post about later, probably with a photo: While riding The Rollercoaster at Stony Creek yesterday my rear brake suddenly seize, accompanied by a loud howling sound. What had happened? Somehow the upper bolt on the rear disc brake mount had come out, causing the brake to pivot forward and the upper edge of the caliper to stop the bike as it ground against the edge of the disc.

I actually found the bolt a little ways back down the path, and it wasn’t too difficult to get it back in and get the brake readjusted. I did run into the problem the rear rack being in the way of the bolt, and my multitool wouldn’t fit in there. Thankfully someone who had stopped had a shorter one and I was able to tighten things up with that. What’s strange, though, is that this bolt was tight not too long ago, and it was Loctited.

Leave a Comment

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.

Leave a Comment

Colin Fraser Saves The Day

R20 replaced with a 10K part, per Colin Fraser's suggestion, in an attempt to alleviate the issues with the LCD.

When I woke this morning I had received a response from Colin Fraser in regards to the problem mentioned in this post. He mentioned two things: the issue isn’t likely to be caused by timing because he specifically checks for the LCD to be available before writing to it, and that he has seen an issue where the transistor which enables the R/W line of the LCD doesn’t have enough gain. To increase this gain he suggested replacing the 22K resistor at R20 with a 10K part.

I did so as can be seen above and this is the result: a P3 displaying things properly. Thanks, Colin!

Now I just have to do a little bit more testing (I’m paranoid about these things), then I can pack up the P3 and send it back to Ivan. Of course, that will come after dinner. Danielle is in the kitchen with where they are making making naan and Mattar Paneer with this recipe from Manjula’s Kitchen. I’m looking forward to a very tasty dinner.

Leave a Comment