The Digikey order I was waiting for finally arrived, so I spent yesterday evening assembling the front panel for the rhythm-robot. I got three of the encoders and four of the lighted push-buttons wired up to a pair of I/O expander chips; it’s a surprisingly laborious process, as I am using bare perfboard, so I have to cut and solder jumpers for every connection. It’s ok for a prototype, but I’m definitely going to get boards printed if I ever make another one of these.
April 13, 2010
That didn’t take long
I crashed my bike yesterday. Yes, the shiny new one. Neither the bike nor I sustained any serious damage, but it was awfully surprising and unpleasant. I was riding west down John Street when a car at the stop sign on 14th pulled out in front of me. I saw the driver look in my direction just before she started moving; I think she simply didn’t notice me. I had just enough time to brake hard, realize I was going to crash, and bail out, without hitting the car. I slid along the road, tearing up my jeans and ripping the heel off my boot, but the safety gear did what it is supposed to do and my skin remained intact.
I came to a stop next to a bus travelling the opposite direction, and people started taking care of me before I had really registered what was going on. Within seconds, the driver called 911, a nurse who happened to be on the bus ran over and started checking me out, a couple of other passengers picked up my bike and rolled it somewhere safe, and two people picked me up by the shoulders and carried me to the curb so I wouldn’t have to put any weight on my leg. The fire department arrived moments later, and determined that I hadn’t broken anything.
The bike is basically fine, though the left-side peg is mangled to uselessness, the left grip is smashed, and both of the turn signals are broken. It has various other cosmetic damage, though the exhaust header, engine, and tank all escaped road rash. Pretty disappointing to have scraped up a bike I just bought… but everything still works, so I guess I came out OK.
April 12, 2010
I am impatiently awaiting the next batch of parts for my rhythm-robot project. I simply can’t make any progress on the front panel until the switches, LCD panel, and encoders arrive. In the meantime, I’ve decided to sort out and organize my various boxes and drawers full of electronic parts. With Ava’s help, I’ve sorted all of the resistors into one big tackle box with clearly marked slots. Now all the dozens of battery holders have gone into one big box, the transistors are all sorted together, the capacitors have been grouped, I have slots for LEDs, random ICs, switches, potentiometers, and so on. There’s also an entire box of lasers. I still have a table full of parts to be sorted – dozens of linear regulators, a couple of solar cells, half a dozen MintyBoost kits, a stack of EPROMs, various batteries… but the mess is a lot more controlled now, and I’ve filled two wastebaskets with surplus packaging.
April 11, 2010
Three-ferry ride around the sound
I went out for a long motorcycle ride today: a three-ferry loop around the Sound. I rode up to Edmonds, through thick I-5 traffic, and took the ferry across to Kingston. I missed the turn for Port Gamble and rode down to Poulsbo, then back up to the Hood Canal bridge; then it was a nice long foresty shot up the peninsula to Port Townsend.
On the point across from Port Townsend sits Fort Worden State Park, a WWI-era military station with lots of abandoned concrete buildings and old gun batteries. I stretched my legs on a graffiti-covered bunker, then wandered down to the beach and threw rocks at the waves for a while.
The second ferry was a tiny, single-decker affair, the Steilacoom II, running between Port Townsend on the peninsula and Keystone on Whidbey Island. It’s a slow crossing, and it was starting to get a little less sunny out, so I took off riding and did not stop to enjoy Fort Casey, the counterpart to Fort Worden on the east side of the channel.
Motorcyclists get first priority on and off the ferry, so I became part of an impromptu group ride down the length of Whidbey Island as a half dozen of us all seemed to be going in the same direction. It’s a nice country highway ride; there’s only one main road down the island, but it’s relatively open and rural, except for a couple of bottlenecks at Greenbank and Freeland. I can only imagine how jealous the people in the long line of cars at Clinton must have felt, waiting far behind the “90 minutes til ferry” sign, as a stream of motorcycles roared in and cut right to the front of the line. At least they have cushy seats and stereos and a heater and a roof to keep them comfortable while they wait.
Last ferry ride, over to Mukilteo; from here it was a simple ride back to I-5 and then a straight shot home. The new bike, for all its extra displacement, can’t compete with the FJ600 for top speed; I teased it up to 90 mph at one point, but it doesn’t really want to go faster than 80. It starts sounding froggy and acting lurchy, like it isn’t getting enough fuel; I wonder if its carburetor needs some cleaning.
April 7, 2010
I’ve been soldering up the drum sequencer’s interface board this evening. This board contains all of the back-panel ports: power, the power switch, and MIDI in/out/thru. It consolidates these into the four lines Vcc, GND, TX, and RX, which will drive the microcontroller. This happens to be the same set of lines coming out of the FTDI USB interface; the idea is that I can plug the microcontroller into either the interface board or the USB connector, and it will behave the same way in either case. This should make life easier when debugging the front panel.
The power supply is a simple LM7805-based circuit.
The TLC5940 is a 16-channel LED control chip using PWM with 12-bit resolution. It is controlled via 3-wire serial (weird, neither I2C nor SPI). The chips cost three bucks each.
April 6, 2010
How to create a distortion effect circuit using op-amps and RC filters. Includes schematics and discussion of power supply biasing.
Mini Space Rockers is a simple percussion synthesizer; the site offers complete circuit diagrams and parts lists.
Pink noise generator using two op-amps, requires +5 and -5v power.
Attack/release envelope generator circuit, designed for +12 volts. Still looking for a zero-attack/immediate-decay envelope circuit… maybe the decay portion of drum trigger circuit will do the trick. There’s also 555 timer based ADSR; I don’t quite understand how it works, but it looks pretty simple and doesn’t need many external components. It wants +/- 15V supply, which is awkward, but perhaps I can make it work on 9V by reducing all those 4.7k resistors.
A new motorcycle
I certainly didn’t wake up yesterday planning to buy another motorcycle, but when I saw the ad on craigslist I simply had to go take a look.
I enjoy working on bikes, but I can’t stand not being sure the bike is going to start. I’ve gotten really tired of getting my FJ600 running smoothly, thinking everything is fine, going out somewhere, and having to abandon my bike for a couple of days until I can come back with tools. It’s just too stressful. My bike needs to be a reliable form of transportation, not just a mechanical hobby.
So why not just buy a newer bike? Well…. the motorcycle market spent a good 15 years solidly divided between cruisers and sportbikes, and the standard / naked / upright style I like has only come back into vogue in the last 5 or 6 years. The newer bikes I like cost more than I want to spend, and the newer bikes I can afford just… don’t excite me.
The ad, then, grabbed my attention: a 1986 Suzuki VS700, with the engine from a 2003 VS800! Oh my. A classic ’80s standard, just a hint of cruiser style, and a modern engine? A bike I can afford with only 10,000 miles on the powertrain? Too good to be true!
So Ava and I drove up to Lake Stevens, I took it out for a wandering, drizzly test ride, and then I rode it home. It is still a project bike, of course – but at least the work it needs is only cosmetic. The engine starts right up, pulls hard, and idles smoothly. It’s a shaft-drive machine, so there’s no chain maintenance to worry about (huzzah!). Brakes are in good condition, all the electrical systems work, and the tires are nice and fresh. All I need to do is re-upholster the seat and adjust the handlebars / levers etc to fit me.
This leaves me with two bikes I need to sell, of course. The new bike is just as stylish as my old Maxim, so it’s going to be much easier to let go of that machine now; and the FJ600, while cranky, does run and is in pretty decent condition aside from needing a new carburetor, so I think I should be able to sell it pretty easily.
April 5, 2010
The 24LC256 is a 256K EEPROM chip with an I2C interface (two-wire serial). Up to eight can be used on a single bus, and each chip costs $1.18 at Digikey.
April 2, 2010
interesting link: some audio mixer circuits, with a somewhat rambly but informative explanation of the role op-amps play in signal isolation.
My other electronics project lately has been a piece of hardware that encapsulates the rhythm algorithm I was working on a couple of weeks ago. The algorithm works surprisingly well, and I think it would make the essence of a great live performance tool. My concept so far is an Arduino-based black box that accepts a MIDI time signal and broadcasts MIDI note messages: a procedural sequencer which leaves the generation of sound signals to an actual drum machine.
I’m still thinking about the front panel layout, which will likely feature a lot of encoders and LED seven-segment displays, but I’ve started working on the MIDI implementation. My in and out circuits are based on this design [see P.P.S.] and my thru circuit is the MIDIbox design. It looks simple, but I’ve never done this before, so I want to take each step individually.
postscript: It works! I have a prototype board set up with MIDI in/out/thru ports one one side, and Vcc/GND/RX/TX on the other. The parts involved, which cost $5.20 from Digikey, are as follows:
- 5x 220Ω resistors
- 1x 47Ω resistor
- 3x DIN-5 PC-mount sockets
- 1x 74HC00 quad nand gate
- 1x 1N914 diode
- 1x 6N138 optocoupler
Post-postscript: The link to the I/O circuit has gone dead since I wrote this, but I’ve since found the official MIDI electrical specification, a complete schematic for a reference MIDI interface implementation.
My new soldering iron arrived yesterday, so I finished up one of the LED glow poi I’ve been making for Ava. I did a little experimentation with the accelerometer, and determined that poi experience pretty high G-forces: even at the accelerometer’s 6-g maximum setting, it was easy to peg the maximum. This makes it easy to tell when someone is spinning the poi, but it means the influence of gravity is lost in the noise. I’ll have to use some clever math to determine rotation speed. In the meantime, some straightforward PoV code gives a pretty nice effect, and the poi is smart enough to turn itself off after you’re done playing with it.
March 31, 2010
It’s just a rant, but it’s one I can relate to. Autotools must die:
But autotools was a kluge. And it did accrete kluges and crocks around it, adding layers of complexity until it became sore difficult to tell which end was up. And lo, it became a festering pile of special cases and obscure semi-documented rules, leading to a combinatorial explosion of unplanned interactions and obscure lossage.
Some good comments too.
March 21, 2010
How to Build a Three-Pendulum Harmonograph
A harmonograph is a mechanical device that uses swinging pendulums to draw pictures, believed to be originally invented in 1844 by Scottish mathematician Hugh Blackburn. There are other types of harmonographs, but this 3-pendulum rotary type gives a wide variety of pleasant results, and is fairly easy to build once you’ve settled on a design and have acquired the appropriate materials and tools. This is a great project to do with kids and can result in endless experiments creating new types of geometric designs.
March 20, 2010
Using an arduino to control a digital potentiometer
In this tutorial you will learn how to control the AD5206 digital potentiometer using Serial Peripheral Interface (SPI). Digital potentiometers are useful when you need to vary the resistance in a ciruit electronically rather than by hand. Example applications include LED dimming, audio signal conditioning and tone generation.
March 17, 2010
Synthesis of various percussion sounds
Percussion synthesis on the Nord Modular
Bass drum from three components
SOS article on various bass drum synthesis algorithms
SOS article on snare drum synthesis
Notes for an Arduino-based midi device implementation
Circuit for an IN port
Circuit for an OUT port
Circuit for the THROUGH port
Arduino interface with IN and OUT
Software to use the Arduino’s USB port as a MIDI interface
How to make your own oLED at home
Instructions for making your own oLED using ordinary household tools – Q-tips, aluminum foil, duct tape, a microwave, a hair dryer, and a multimeter.
Toshiba stops manufacturing incandescent light bulbs
March 14, 2010
March 11, 2010
I seem to have snapped out of a creative funk. During the last day I have spent time thinking about, doing background research on, designing, or actively working on the following projects:
– LED poi for Ava (thinking about a simpler graphics algorithm)
– Automatic drum sequencer (tweaking algorithm, thinking about hardware)
– Bassline sequencer (rhythm is obvious, need some input for chord progressions and some kind of complex arpeggiator)
– Device for controlling large numbers of LEDs in rhythmic patterns (for a party later this summer)
– Multi-band, multi-source mixing audio compressor (looks workable but hard to do without lots of computing horsepower; arduino is probably not enough)
– Rearranging my music box so I can place the keyboard behind the rest of the controls (better ergonomics)
– Custom kick-drum synthesizer/MIDI metronome device (what goes into a solid kick drum sound?)
– Jacket design involving irregular vertical pleats (bought some fabric and buttons; simple design, interesting texture)
March 8, 2010
Right, so, what have I been up to?
I had a cold for a week. Lots of coughing.
I’ve been getting down to the last petty annoyances on my motorcycle to-do list. I’ve replaced the control levers, replaced the clutch lever bushing – it actually pulls straight and smooth now, for the first time since I’ve owned it! – replaced the broken seat latch, replaced all the worn-out rubber bushings that hold the side panels on, replaced the headlight element (the high-beam didn’t work). The carbs need to be cleaned & synchronized, but that’s a bigger job than I want to deal with myself, so I took the bike over to Steg’s shop. Perfect timing, since we’re having a serious cold snap today! The bike will be in great shape by the time spring arrives in earnest.
I’ve been playing with an algorithm for generating percussion sequences. The idea is to create an instrument I can add to my music machine that will let me create and adjust percussion tracks on the fly, driving a MIDI drum module. The central conceit of my music project is that I want to create as live a performance as possible, and if this thing works out it’ll let me improvise drum tracks from scratch instead of just tweaking the ones I’ve prepared ahead of time.
The algorithm works surprisingly well, for the simplicity of its design. It’s based on Toussaint’s paper The Euclidean Algorithm Generates Traditional Musical Rhythms, in turn based on Bjorklund’s timing system for a neutron accelerator, The Theory of Rep-Rate Pattern Generation in the SNS Timing System. It all sounds very high-tech, but the basic idea is simply this: natural-sounding rhythms are those which distribute their energy as evenly as possible across the repetition unit.
February 27, 2010
February 19, 2010
I have a new mouse. The scroll wheel on my old mouse stopped working, and the rubber grip peeled off, leaving the side all sticky, so I felt annoyed every time I touched it. I decided to take a peek into the modern world and try out a bluetooth mouse. I picked out a Razer Pro|Click Notebook Mouse, since it was available in red. It looked cool and had a neat glowing LED, but I wasn’t very happy with it. The bluetooth system basically works, but the pointer would skip whenever CPU load spiked, and I had to reboot my machine one day after the mouse and computer forgot how to communicate with each other.
I decided I would go back to a plain old USB mouse, which arrived today. It is a Trust Predator 2000 dpi High Performance Optical Gamer Mouse with seven buttons, adjustable resolution, and XXL Teflon Feet for Super Dynamic Movement. I don’t know what half of that stuff means but it is clearly meant to signify that this is a very cool mouse.
I bought it because it is black with red stripes and has a cool glowy LED thing under the scroll wheel. I like my new mouse.
February 18, 2010
Ava and I just came back from an interview at the homeland security office down in Tukwila, near the airport. The interviewer asked us a handful of questions, asked us how we’d met, why we decided to get married. We showed her our wedding photo, pictures of us with my family, and the like. And that was it – she approved Ava’s “adjustment of status”, and her green card will arrive in a few weeks. Exciting! This process has gone far more smoothly than I expected.
February 13, 2010
February 12, 2010
More on the laser mosquito zapper:
If Microsoft founder Bill Gates unleashes more mosquitoes at this year’s Technology, Entertainment and Design conference, Nathan Myhrvold will be ready for him. Myhrvold demonstrated a “Death Star†laser gun designed to track and kill mosquitoes in flight. The device was crafted from parts purchased on eBay by scientists at Myhrvold’s Intellectual Ventures Laboratory.
Includes a video of mosquito wings getting burned off. Looks like they are using a blue/violet laser, as found in a blu-ray player: makes sense, as higher wavelength = more energy.
February 6, 2010
It feels like springtime here. The skies were blue, or at least bluish, and the weather – while crisp and cool – was by no means wintery. It’s been a good day. I got up at ten, made myself a leisurely breakfast, wandered over to the auto parts store, got a set of metric hex-key sockets, walked over to where my bike has been parked for the last week, and started working. One relaxed half-hour later, I’d finished installing the new starter, and much to my delight discovered that it completely solved the starting problem. I had no idea how badly worn the old starter was! I’ve been used to having to work hard to get the bike moving, frequently having to push-assist – the new starter gets it going every time after just a couple of revs. So excited!
Of course I went out for a ride. I ran the Lake Washington bridges, not too fast but enjoying the cruise. The carbs might still need a little cleaning, but it runs pretty well for a bike that went to the playa and back, and has been sitting in my shop ever since.
The afternoon I’ve spent working on two pairs of yoga pants, one for me and one for Jeff T. I’m using the same design for each, though his will be 3/4 length and mine full, and I’ll probably give mine an extra pair of pockets so I can wear them out dancing. They’re pretty tame for dancing pants, though; I’m using matte stretch fabric in black and dark red, nothing shiny or fuzzy or otherwise attention-grabbing.
January 31, 2010
January 29, 2010
I realized, when I was working on my bike last weekend, that the clutch cable was stiff because I had cinched it onto the frame using zipties, creating extra friction between the cable and its housing. I did this because the cable I ordered was too long, and I had a few extra inches to squish out of the way. Er. That was not so smart. I put up with this for over a year, since I didn’t realize it was a problem with the cable, and not part of the clutch design. The replacement replacement arrived today, and it took all of fifteen minutes to install it. I’m laughing at myself now for taking so long to think of this.
Parts for a pair of LED poi are scattered across my work table at the moment as I figure out how I am going to assemble them. I haven’t started any of the electronics work yet, but it’s a simplified version of the juggling ball prototype I made early last summer, so I expect it all to be straightforward. I’m using 3.3v circuitry this time, which means I don’t have to shift levels in order to talk to the accelerometer, I’m using plain ol’ AAA batteries instead of the fancy lithium-polymer rechargeable system, and I’m using a manual “wake up” button instead of an accelerometer-driven interrupt. Simple as can be.
Each poi is made from a pair of 3″ acrylic hemispheres, with a length of ball chain and a braided leather handle. I’m going to diffuse the light by sanding the insides of the hemispheres and painting them with aerosol window frosting. I think it would be simple enough to epoxy all the electronics onto one of the hemispheres; what I haven’t worked out yet is how to securely mount the battery box, how to keep the batteries from popping out during use, and how to attach the hemispheres together in such a way that it is still possible to change the batteries.
Come to think of it, maybe a rechargeable system would have been easier, since I could solve both of those problems with epoxy, and leave the poi permanently sealed.
January 27, 2010
Generating good syntax errors using a table-driven parser: apparently it is possible after all.
The objection to parser generators that seems to resonate most is that generators like yacc produce inadequate error messages, little more than “syntax error.†Better error messages were one of the key benefits hoped for when g++ converted from a yacc-based C++ parser to a hand-written one (and to be fair, C++ syntax is nearly impossible to parse with any tool; the many special cases cry out for hand-written code). Here the objection seems harder to work around: the parser internally gets compiled into an automaton—usually a big table of numbers—that moves from state to state as it processes input tokens. If at some point it can’t find a next state to go to, it reports an error. How could you possibly turn that into a good message?
Difficulty reporting useful error messages is one reason I’ve abandoned parser generators. I’m still not interested in going back any time soon – parsing just isn’t that hard! – but parser generators are probably not going away, so it’s interesting to see a technique for getting useful results out of them.