Finishing up the generator

I assembled the new windmill and bolted on a 1.5 watt solar panel (or so it's rated) on top for a bit more power. I wired everything up with blocking diodes (independently for the solar panel and generator.) I wired it up modular and consider it done.

While I was taking pictures …

Here's the finished power supply circuit board.


Try to write cool software; settle for functionality

Friday morning I started working on the bit modulation. I needed to have some kind of indirect addressing to access the three colors on each of the 22 LED's and convert each one to bit patterns to output. I looked through the documentation for the processor and they had functions for accessing tables, but after looking closer, I found that it was designed to access the flash memory and I don't really want to wreck the flash memory reading-and-writing it over and over again.

I looked into the macro features of the assembler but the only flow control is "while" and "if/else" statements. I hacked together some stuff to access arrays in macros, but it's crap, gobbling up both program space and CPU time

I finally found information on the "FSR" ("file select register") that does exactly what I want: you load one of the three FSR's with a RAM ("file") address and then use INDFx as an operand (in place of, say, an absolute register address) and it'll use the FSRx pointer.

I got the confidence to plug in one of the shift registers. I had to fix the code so it'd load the shift register properly and to latch the output, and also to turn on the output for a color LED. That was awesome: apparently my hardware was wired correctly and worked on the first try. I added in the other two shift registers and it all worked great.

On Saturday I got up around 4 a.m. and got going. I cranked out code to convert 8-bit color values into bit-modulated registers ready for shifting-out to the hardware. I got the whole bit modulation system partially working. I ran through the code several times and picked out and fixed a bunch of little bugs. I was worried that I was getting some kind of race condition that was causing things to flicker randomly instead of actually work, but timing adjustments had no effect at all. I finally found a huge logic error with the way the bit modulation was loaded. I rewrote it much better but it still didn't work.

I stripped things down a bit to do some tests. I tried to use the code I had to output to the shift chips by making a simple alternating-light blink pattern. It worked fine, and even changing colors in software worked. I tried the same thing only using the "fast" clock rate and also switching colors from red to blue and that worked fine too.

Sunday I got up around 4 a.m. again. I wrote the code to control the MP3 player real quick and got it working in no time. I added code to check light levels and got that working: the circuit is just a 100K resistor from +5V to a CdS cell to ground. When it's light, the CdS cell's resistance is much lower than 10K so the voltage present is a logic "0" at 0.5 volts; when it's dark, the CdS cell's resistance is higher than 1M, so the voltage present is a logic "1" at 4.5 volts.

I went through the rest of the code looking for misspelled op-codes (that is, MOVFW and MOVWF do very different things) but no luck. I changed the code at the beginning to initialize things better and set up the test case to be very simple: 2 LED's on, red #10 at 100% and blue #11 at 25%. I got two greens on: #7 and #10.

I'm not sure what the deal is there … it doesn't seem like there's a good explanation why it isn't going to the right place. I checked the wiring and found that the latches are wired so the first LED is output #8 on the MIC5822, so I reversed the rotation order in the bit shifting algorithm.

Ok, I finally gave up and went with a simple pulse-width modulated output. The idea is to slowly cycle through the spectrum from red-to-green, green-to-blue, and blue-to-red. I set up the code to modulate between "color 1" and "color 2" slowly shifting the duty cycle from 0% to 100% on "color 1" and from 100% to 0% on "color 2" along with an off-cycle to make it dimmer and use less power.

I got it all done and running on the battery pack — the whole thing, lights and audio included, runs at about 2 watts.

Here's the finished computer circuit board.


Generator dumb luck

I have been in the habit of going for a walk in the mornings to clear my head and this was no exception. The one exceptional event was it's trash day and I was out very early. I came upon one house with what appeared to be a paper feeder for a copier (or at least most of such a beast.) I walked past it but then went back and took a closer look at the motors (which appear to be pretty beefy) and that it had a bunch of smaller springs (that I can use as tensioners.) I walked it back home and then went on with other things

Later on, I got a chance to test the motors. Actually, I just drilled a hole in a piece of dowel to use as a roller and bolted the motor in place — I had drilled holes in the the motor holder for what appeared to be two "standard" sizes. Well, this one is as big a motor as will fit and I brought it to the big attic fan and gave it a whirl. It generated about 25 volts open at that wind speed (a lot) and output 7.5 volts into 51 ohms: about 0.15 amps or 1.1 watts. I installed a larger spindle and got 8.8 volts (0.17A) into it or 1.5 watts. I found that with just a diode, I could charge the battery at 0.12 amps out. That's not bad, but it could be better. I decided that if I also throw on the solar panel I have (supposedly 1.5 watts) and hook it all up, I might be able to get to a point where the whole system is pretty close to self-sufficiency.

If the draw during the day is 0.2A and the draw at night is 0.4A, I might assume an average of 0.3 amps all day. If the generator can average 0.1 amps (very optimistic) and the solar panel 75mA for half the day (35mA average, also pretty optimistic) that's 0.135A average in, reducing my overall average load to 0.165A: the 7 amp-hour battery would then last about 42 hours! That's way better than the 23 hours I can get at 0.3 amps.


Rewrite demo program with interrupts, get clocks set up, build lighting connectivity

Ok, so now it's 2 days left. It took a while, but I got the program working using the built-in timers and interrupts. Basically I created a main program polling loop that waits for the "fast" clock (which is programmable through macros in Hertz based in the assembly language program) to run "fast" events (like light animation) and a slow clock derived from that for pushing buttons on the MP3 player. For some reason the internal clock runs at 3x the crystal frequency. Who knew?

I also got to wire up all the connections for the socketed chips: I got the latches in place on the board and wired everything up: I'm going to try using the master synchronous serial port (MSSP) to run the latches. I've got three inputs set up that drive PNP transistors with a common emitter to +5V and the collector tied to the anodes of the respective colors.


Remote controlling the MP3 player

I finished up the circuitry for both being able to actuate the play and power buttons from the computer and for detecting when the MP3 player is on. I'm sure you'll all be so amused that I used these ancient reed relays to do so — I opted against optoisolators because I wanted to have something that less could possibly go wrong — but I didn't know how they were wired. I couldn't find any info on the "Dunco Relay" MRR1CDLV8 on the Internet, and while I could identify some of the pins by a resistance check, but I wasn't sure exactly what was what. I did, however note that the patent number was printed on the cases. A couple guesses about what the smearily stamped ink said, and I came up with patent #3,575,678 … the images at the US Patent Office website entry for 3,575,678 show in much better detail how the thing works … plus it was patented in 1971.

Anyway, here's that circuit:

Just sensing power and triggering buttons ... what fun.


Get demo program working on computer

I figured with about 3 days before I leave, it's about time that I program the computer and hook it all up. I downloaded the software and a demo program, compiled … er … assembled it, installed it on the board, and got it running. Whew.


Musicians of The Bike With 2 Brains

Here's the songs and artists who graciously provided the music and sound for the Bike With 2 Brains … in order that they submitted works to me. I had put a call out to a few musicians in the Rochester area based on how I thought they could interpret the bike project. None of them saw it before creating the music, so it was only based on the description I provided back in May.

Autumn in Halifax

Autumn In Halifax is David Merulla. He does this great work with a digital looping machine and guitar. It's somewhere between experimental and acoustic — his lyrics are richly poetic as well, only subtly providing any literal meaning. He provided 5 tracks and I used them all:

  • September
  • The Schwin Vista
  • Estacios
  • Twenty One January
  • The Jockeys Last Night

You can recognize his songs as the ones that use guitar and distorted variations on guitar. Also, he asked that I include the copyright information: c/p autumn in halifax/colossal heart music 2003-2005(ascap).

BELBIVDEVOIVOD A.K.A. PAUL BURKE

BELBIVDEVOIVOD A.K.A. PAUL BURKE consists of the real-life Paul Burke. He uses a sampler with a complex array of loops and effects pedals to create droning synthesized sound with very organic variations. He provided the track "Kissyface" which I felt perfectly captured the combination I was looking for: it feels like the Bike With 2 Brains, it has a spirit that is strongly Rochester, and its style is reminiscent of Burning Man itself.

Gaybot

Gaybot consists of Brian Blatt, Chris Wicks, and Matty Sonar. Not only do they have (arguably) the coolest band name ever, they're one of the most laid-back bands ever. They play a cacophonous blend of spoken word, electronic effects, and repetition that makes for a generally good but disorienting experience. When I caught up with Brian and Matty and asked if they were planning to make some music, they said to just take something from a CD. I had their EP from 2004 (I think … it's just a CD-R with "Gaybot" written on it and I got it in 2004) and I liked the second track — which was the reason why I wanted them to be involved, but with that permission, I decided to use "Gaybot EP Track 2" as I named it.

XLTieRack

XLTieRack is Jon Peone. He plays synthesizers and guitars through effects and loops, often using sounds created when equipment is pushed beyond the limits for which it was designed. His sound is compatible with that of BELBIVDEVOIVOD A.K.A. PAUL BURKE but his techniques are very different. He provided me with 4 tracks: a mix and the three component pieces that were used to create the mix. I liked "Bike 1" which is the background drone of the mix and I liked "BikeMix," the final product so I included those two tracks.

Jason Olshefsky

When I sent out the e-mail I indicated that I wanted to include my own track. I intended to record the sounds of dusk around here because I think it's so commonplace that people hardly notice, but on the Playa, it would be completely out of place. However, time constraints led me to a different path (darn … I'm falling into a pun.) I had been taking a walk around the block near my house to unwind. My street runs from East Henrietta Road (Route 15A) to Mount Hope (Route 15) — the two routes converge about a half-mile north of my house. I walk to 15A then head south to the Erie Canal which runs east and west across New York State … the pathway is now called the "Heritage Trail," but it's technically the towpath for the mules pulling barges. I descend the path to the edge of the canal about 35 feet below street level then walk along to Route 15, back up to street level, and back to my house.

I had noticed that the sound was like some kind of time-machine. In the morning when everyone is busy driving up and down the two streets, the contrast to the canal is dramatic. It is serene and completely decompressing. The sounds of the street fade almost completely away right in the middle then slowly build to the traffic crescendo on the other end.

I mused about the title a bit, but ended up with "The Edge Between 15A and 15." As a nerd, it's a literal interpretation of the city's boundary between Route 15A and Route 15. However, from my photographic background, it can also refer to the space between pictures which are numbered on the negatives alternating between numerals and the previous frame number with an "A." What I think I accomplished is an audiograph of the walk in the morning. As an added bonus, listen for the sound of a squirrel jumping onto a nearby tree with an audible crunch.

Joe+n

Joe+n in this particular incarnation is just Joe Tunis. I met him in college then lost touch for ten years until I happened to go to one of the shows he set up for his record label, Carbon Records. His music rarely falls into any one category, although his forte is electric guitar and drums, usually in experimental-style usage. He also works with recordings and audio illusions. He created a piece called "In Search Of" and provided the following description:

symbiotic relationship: joe+n, tree-frogs and crickets. i just moved into a new house. it was sad leaving the old one. i grew to really _know_ the sound of the background. which insects sounds were around (most of the time), the birds that frequented our trees, the hum of nearby I490, and the railroad slightly further away. but being in the new house for about 2 weeks now, i'm getting to _know_ this backyard as well. the major addition to this soundscape is the return of the tree frogs. i grew to absolutely love, and NEED, these sounds back in my 4 years spent at RIT's Racquet Club apartments. my summers there were spent getting loaded with friends, playing music, and then walking around aimlessly at night, listening to the frogs. it made every summer blissful. but then one summer, they were gone. it was the sadness none-sound i'd ever heard. and now, they're back.


Adding a little shade and finger/head protection

I did a quick project with a box-fan grill (one of the old metal ones.) I took some black fabric, hemmed the edges, and then hot-glued it to the fan grill. I mounted the fan grill under the generator/windmill: it tends to keep people from accidentally sticking their head or hands into the rotating windmill and the fabric provides a little shade.


The light tubes are done

I needed to finish up the light tubes today for the demonstration in the afternoon. I wired all the pigtails from the end of the tube into a DB-25 connector. Since I had not labelled the wires, I had to test each LED so I could wire them on the connector in order. Not such a big deal. I got the whole setup mounted on the bike. For the demonstration (since I didn't have the computer finished) I just wired up a couple DB-25's to light up all the blue LED's that face backward. It looked pretty cool, especially at night.


Demonstration for the musicians

I invited everyone who provided music or made an effort to provide music to my house to see the bike. Jon Peone (XLTieRack) and Jessica stopped by … I guess the rain drove everyone else away. It was a pain in the butt putting things together in the rain, but at least it was a good test. They thought it was pretty cool although the wet ground was pretty terrible to try and ride on. The sound system was in place with most of the finished music on it … all running off batteries. I was using a mostly-dead 12-volt sealed lead-acid battery (probably with 2 amp-hours instead of the original 7) and it ran fine for about 4 hours, powering both the sound and half the blue LED's (which would be about typical given the light system I plan to use.)