Posts Tagged ‘AVR’

    Trivet Light

    Monday, March 30th, 2009

    One of my favorite places to visit often is the Ballard ReStore.  It is a reclaimed building supply place.  A non-profit.  And they also do a good job of passing on some of the odder things found when pulling down old buildings.  They will at times have old meters or photography or lab equipment in addition to the windows and doors and cabinets and other more normal stuff.

    Anyway, one of the sort of interesting things they had when i was walking through a while back was plastic bathroom tile.  These are 4″ square slightly translucent swirled plastic tiles.  I wondered if LEDs would look interesting shining through them.  So I bought 4 of them.  This is another nice thing about this place, the boxes are generally all open.

    IMG_2565.JPG

    So I took two of these tiles and framed them with some random wood i scrounged from my back yard and made a sort of trivet out of them as you can see on the right.

    Then I took some tricolor LED modules I had and an ATTiny85 and some FETs and added some internal lighting.

    This was my first time playing with an ATTiny, and my first time actually ‘producing’–as opposed to breadboarding–an AVR based device.  I used an annoying prototyping method I had seen mentioned on the web.  I will never try that again.  Ick.  Anyway, here is the board

    Trivetlight all soldered up. And here is the back of the board Solder side. showing the insane prototyping method involving enameled magnet wire.

    It works.  I would like to add some batteries and an inductive power pickup to it so the power cord could be hidden under the table.  Also the plastic tiles are somewhat too opaque, so something clearer would be better.

    AVR Synthesizer

    Sunday, March 29th, 2009

    So there are a couple AVR based synthesizers out there already.  But they are all either written in (ew) ASM or want to talk to SID chips (don’t own one) or are otherwise not interesting.

    IMG_2605.JPG So a couple months ago I got one of the AVR Pocket Piano shields from Critter and Guitari.  This is an entertaining little Arduino shield with 25 buttons, three sampled pots, a volume control, an LED, and a microchip 12-bit DAC.  There are a few firmwares around to help the thing make some interesting (or not) sounds.   However they are all quite limited.  And interest in the thing seems to have deteriorated.  I took the (to me) most interesting firmware, a monophonic 1 operator DDS FM synthesizer and promoted it to three voices.  However, only having three pots was cramping my ‘creativity’, so I needed to find something else.

    IMG_2602.JPG IMG_2603.JPG Then a couple weeks ago I saw mention of the newish KORG nanoKONTROLER series. These are very small usb-midi controllers. There are three: a keyboard, a controller, and a drum pad. I went into Guitar Center to look at the keyboard and ended up walking out $120 poorer with both it and the controller. The included software from KORG sucked but was good for one evening’s entertainment. Then getting the linux synths like bristol kept me entertained for a few evenings more.

    But then I was bored again.

    So what to do?

    If A is fun, and B is fun, then A+B must be superfun! So I ended up with this pile of USB cables, some perl, and some more changes to the FM AVR code.  And ended up with this thing:

    IMG_2600.JPG

    Due to the extra controls, I was able to add a second FM operator and an LFO.  So you have three ‘true’ sounds to play with, plus the LFO.

    Like so:

    1. ‘carrier’ frequency.  This is the key you hit and the setting of Slider 1.  Slider one is the pitch of the whole keyboard.
    2. FM Modulator One. This is controlled by Slider and Knob 2 on the controller.  The slider is the amount of modulation, the knob is the frequency relative to the note being played.
    3. FM Modulator Two.  Same as above.
    4. PLUS the LFO goes just into the audible range if you bump it up that high.  It is controlled by Slider and Knob 9.

    Whew.

    To make this simpler I went back to the original monophonic FM code.  At some point I will probably try to add back a second or third voice.  Though given the extra processing required for the second operator and the LFO, i’m not sure there is time available.

    The AVR speaks a very limited dialect of MIDI.  I use a small perl program to shuffle midi data from the ALSA midi inputs (the AVR can’t talk straight to the USB midi devices, of course) to the AVR and also print out its console.

    Looking for something?

    Use the form below to search the site:

    Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

    Visit our friends!

    A few highly recommended friends...

    Archives

    All entries, chronologically...