I guess I can use bit-modulation

Not only did I get too few 150-ohm resistors (I bought 30 of each, and I'll need 60 of the 150-ohm's.) I also decided to go with the bit-modulation anyway. The circuit I have in mind is essentially 3 banks of up to 30 LED's, so I can just multiplex between the red, green, and blue. I ordered several MIC5822 8-Bit Serial-Input Latched Drivers — they contain a cascadable shift register with an 8-bit latch and the outputs can sink up to 150 mA to ground.

Originally, I anticipated making a capacitor matrix that would keep the LED's from depleting and multiplexing the analog outputs on the PIC controller to charge the capacitors. It might have worked, but this bit-modulation system is way better — even if it flickers a little.

Loading


Powering the stupid MP3 player

I worked on the audio system some more. I had an unfortunate setback: the LM217 I have is apparently dead, so it won't be the nice 1.2 volt reference. However, the rest of the system works fine and I successfully played audio through the speakers. I figure I can use one of the op-amp's as a voltage regulator. I cut holes in the electronics case to accomodate the phone connectors for speakers.

I used a couple diodes in series and a 4.7K resistor to create a 1.2 volt reference … I'll feed it through an op-amp at unity gain to get a stable source for the MP3 player … maybe with some capacitors if the charging circuit is too noisy.

Unfortunately, I had problems getting 1.2 volts to the MP3 player and eventually had to swap operational amplifiers twice. I finally got it set up and discovered that the MP3 player draws 200 mA. It never dawned on me to check, but that's indeed what it draws when it's running off the battery — it's not too bad at 240 mW, but by using a linear regulator, I have to dump the remaining 2.2 watts as heat — I was hoping to get the whole system (lights included) to operate on less than 5 watts total, so this is a big waste.

I built a twin-T oscillator to feed an op-amp as a comparator to make a pretty efficient pulse-width-modulated power supply. I came up with a circuit that uses 0.002 microfarad capacitors all around, 1K resistors on the resistor-tee, a 470 ohm resistor on the capacitor-tee, and a 4.7K resistor on the collector. It creates about a 0.3V peak-to-peak 40 KHz sine wave. When I wired it up final, I had to do a couple swaps of capacitors (i.e. a ceramic capacitor marked with "223" is 22 * 10^3, not 2.2 * 10^3, so my 2200 picofarad capacitors were really "222") I only had a bunch of "102" (1000 picofarad) capacitors so I had to use 10K resistors on the other tee of the circuit which gave me a nice 40 KHz output again. (The problem was the 2200 pF capacitors were physically quite large and I wanted to pack things into a smaller circuit.)

I got the pulse-width-modulated output to work somewhat, but it pretty much just goes into a linear mode when I try to make it work and again draws 200 mA from the 12-volt supply. I had configured a second op-amp to provide closed-loop feedback to adjust the PWM output, so the voltage was right, but it looks like the op-amps just can't make a 40 KHz square wave and the transistor is running in a linear mode.

I took a quick crack at making a buck DC-DC converter and managed to get it working in short order. The circuit required 40 mA at 12 volts, and I know about 5 mA of that is for the rest of the electronics, so 35 mA at 12 volts is 420 mW — so with the MP3 player using 240 mW, I managed to get to about 50% efficiency. Unfortunately, even 180 mW dissipation on a little transistor is quite a lot so I'll need to get a bigger one with a better heat sink. However, I'm happy that things function!

Loading


Fitting the cases for the electronics

I layed out how everything is going to fit on the rear deck. I have a "Zero" brand box for most of the electronics and I'll have to set it about 5 inches off the surface with the hinges to the back so the combination will be accessible below the battery box and so it'll clear the rear frame bar. I bought some blue spraypaint and painted some of the parts — the color isn't exactly right but it's close enough for the accessories.

Loading


Starting on the audio system

I received a pair of computer speakers from Jan and Shannon to use on the project. I took them apart, removed the electronics, put some expanding foam in the tuned ports (to help waterproof them) and painted the speaker cones (again for waterproofing.)

I took a look at the parts I have and figure I can just make a daughter-board for the MP3 player which would control its operation, provide power, and contain the audio amplifier. I decided to use a comparator to detect when there's a signal: compare against some small positive voltage and send the output to charge a capacitor through a diode which would discharge with a high R-C time constant. When the capacitor voltage drops below a set level, a second comparator would trigger the play button to be pressed.

I got back to working on the amplifier and started looking at the TDA1520A because I have several lying around — they're a 20-watt mono audio amplifier chip that requires very few external components. Unfortunately, the designers decided to neglect the car-audio market and it's rated to work as low as 15 volts. I figured I'd try it with 12 volts … I wired it all up and found that it just wouldn't function right. Darn.

It dawned on me that I should just use the amplifier from the computer speakers — it's already wired up, it's designed to work with the specific speakers, and it originally ran off 9 VAC so I can get about the same using 12 volts into the AC input … admittedly with some superfluous components, but who cares?

I decided to use telephone jacks to connect the speakers to the main control box as they seem to be easy to make water resistant I sealed up the holes on the speaker cabinets and prepared them for a phone-wire connection.

I took apart the MP3 player and connected wires to the play button and to the data activity light. The activity light pulses around 1 volt whenever the unit is playing, and that should be easier than detecting audio output. I set it up with a connector to plug into a board and I set up a metal bracket to hold the amplifier board, the MP3 player, and the auto-start board. I added DC-blocking capacitors between the MP3 player's output and the amplifier input as the DC levels are likely to be different and the system wasn't designed with a common ground in mind.

Loading


Upholstering 101

I had picked up a couple futon mattresses from the trash. One of them was red on one side and black on the other. I separated the two sides and pulled all the stuffing out — it's cotton batting that wraps around three layers of urethane foam. I cleaned the pieces of fabric.

I used plywood for the seat bottoms and back, cut to fit the mounting holes. I cut pieces of foam and wrapped each in batting then cut sheets of red fabric, wrapped them around the seat-side of the seats and stapled it all in place. I just kept finding where the fabric was slack, pulled it tight, and stuck in another staple.

In my mind I wanted something like lips which is why I picked red. I decided to cut notches in the seat back to imply lips. I want to maintain the industrial-organic appearance and very fluffy, organic-looking lips would seem out of place so I gave the "suggestion" of lips. I haven't had a chance to put it together to see how it looks.

Loading


Better DC-DC converters

I went back to using bipolar transistors and managed to make a circuit that could get up to 12 volts. I changed the output circuit to a darlington network to get more gain (hopefully.) The circuit was operating at an input voltage of 2.7 volts.

I tried switching to the 5-volt supply and I could comfortably get 12 volts into 220 ohms — 54 mA for a total power of 0.65 watts; with 51 ohms, I could get 8 volts or 1.3 watts. I'm pretty sure I'm up against the output capacity of the transistor at this point, so I tried a heat sink but it didn't help.

Anyway, in the process of digging around, I found this high-power NPN transistor. I hooked it up on the DC-DC converter and managed to drop 15 volts across a 51-ohm load with 5 volts in — a total of 4.4 watts. That's getting there.

Loading


Current limiting the new LED's

I originally bought resistors to use with the RGB LSDiodes.com but I realized the voltages and currents might be different. Indeed, the 3mm red/blue and 3mm green LED's require different values. I calculated the results with either a 4-volt or 5-volt supply (which I'll probably use.)

Color

Voltage

Current

Volts
across
resistor

Desired Resistor

red

2.2 V

20 mA

2.8 V
3.8 V

140 ohms
190 ohms

green

3.3 V

20 mA

1.7 V
2.7 V

85 ohms
135 ohms

blue

3.2 V

20 mA

1.8 V
2.8 V

90 ohms
140 ohms

Anyway, I tested using 150 ohm resistors for blue and green and a 180 ohm resistor on red. This balanced things so each LED was driven at about 30mA with a 7.5V source. The 150 ohm resistors dissipated 0.14 watts and the 180 ohm dissipated 0.17 watts, but with 20 mA, the figures are 0.06W and 0.08W respectively, allowing me to use 1/8W resistors. I also noted that I can use two layers of Scotch tape to diffuse the light nicely. I checked the circuit with 5 volts — green was 18mA, blue was 20mA, and red was 22mA — very close to ideal and easy to fix in software, so I went ahead and bought packs of 150-ohm and 180-ohm resistors.

Loading


More people in the back yard

I showed off the Bike With 2 Brains to my friend Sondra who had bought me a ticket to go to Burning Man in 2004 for my birthday. She was really impressed that I actually got as far as I have. Plus, it's insanely fun to ride. Later on, some new friends Elliotte and Sarah got to try it and they liked it as well. Sarah slipped off the pedal and hurt her foot a little, so I think I'm going to find some other pedals.

Loading


Building a better, stronger, faster fork

One of the forks broke during a test on July 4. The wheel got stuck against a bump in the grass and wouldn't turn. When more force was applied at the front wheels, the axle slipped out of the slot in the fork causing all the force to be applied to one leg of the fork and the wheel axle. It bent both parts pretty good.

I noticed that I had used forks for 26" wheels so I did the same for this one. I created two more bent forks so I'd have a spare.

Nothing like spotting poop in your yard to get you to slip the nut off the side of the fork and bend it to uselessness.

Loading


Independence Day picnic

I got around to getting the vehicle out of the car and put together the front wheels. Now that I can see it in good light, the paint job is pretty dinged up — I'm not too happy that it chips as easily as it does. Anyway, I got to let some friends of mine try it out and they really liked it.

I think I damaged the back wheel when I was on the back end while Jan and Todd were trying to drive, but we kept going. Jan and I finally broke it in when Jan spied dog poop in my yard — and I don't even have a dog. Oh, but anyway, the cheaper-forked back wheel slipped out of the fork halfway, bending both the axle and the fork irrepairably.

Nothing like spotting poop in your yard to get you to slip the nut off the side of the fork and bend it to uselessness.

Loading