Please join us on the last Sunday of the month for one or more of these opportunities to learn. This may change somewhat given schedule conflicts withe PNCA which has graciously hosted these classes for the last 3 years. I will be at the open lab Sunday and would like to discuss what could be done to make the workshops and workshop schedule better serve the community.
This is an art piece that I did for a show in Spokane.
When the Riverspeak people were talking about this show I had planned to work on a pendulum design that I have been toying with for some time.. As a secondary piece I wanted to use this beautiful 50s television that is in my art space.
I grabbed the closest thing I had available ( one of Windell Oskay’s “evil mad scientist” megaxx8 boards ) and set up a prototype. I tested it on my girlfriends television and on an old apple IIe monitor that my friend Andrew gave me while I salvoed for an rf modulator and a matching transformer to convert the signal our from the composite to VHF channel 3/4. The resolution and the library was satisfyingly very early 80s. The only thing that I didn’t really like was the fact that the library hard codes some very specific assembly into the ouput bit manipulation. (otherwise I might have tested it out on a mega32u4 like the teensy).
I played around with the libraries primitives for a bit before I found out that the tv didn’t work. In the mean time I realized that my primary piece for the show was not going to come together in time. This became my primary piece (No pressure).
I went over to my friend Jon’s house for a different television and he had a couple of joysticks (it turned out the television didn’t work either). Now I just had to put it all together.
One of the benefits of having laens pcb order available is that I can test design changes iteratively and explore other possibilities. The benitos i am using in the induction this month are the result of three iterative changes based on the original Benito and a redesign done by Monty Goodson a few years back. They (the benito2010d) will be the last of the design to use the pinouts of the origional benito. Fot the end users the biggest change will be that the cable will be a mini-b like the one used on the teensy.
I am not entirely convinced that the mini-b is the right decision but the full sized b uses a lot of board real estate. The other changes on the board come from things that I did and did not like in the previous iterations.This board uses a few through hole parts where the previous versions used surface mount most noticeably for the leds and the switches. I also find that solder mask is not something to be left off of a board.
The next iteration will abandon the original benito pin-out in favor of the stk500 style pin-outs.
There will be two versions of this board available.
The e1 which will be primarily for the inductions and the e2 which will replace the benito pcb on the tempus dictum site. I will update the parts list shortly along with the other parts of the site with the new design once the next board order goes through.
With a lot of my projects I have done my prototyping with Paul Stoffregon’s Teensy series of boards before moving them onto their own codebases. On those occasions where the “prototype was all I needed” I would compile the code using the teensyduino and then manually load the .hex file onto the target. As I am looking at using the arduino for more projects I decided to take a look at how paul interacts with the Arduino IDE and see if I could load code directly onto my chips.
boards.txt
The arduino allows for different chips and configurations through the boards.txt and the programmers.txt files. Each configuration usually will also have a “core” which maps the pins and handles the particulars of that chip. When you run paul’s teensyduino installer it adds several entrys to the boards.txt file including the entry below.
Looking at pauls additions to the boards.txt I see that he is using the teensy_serial core that he has written to create a simple usb to serial interface and to map the usb avr pins and other peripherals to the arduino conventions. He is also adds an entry to the arduino uploader class which lets him use a wrapper for avrdude which lets him use his proprietary bootloader. This wrapper is installed by the Paul’s installer and lives in the Arduino’s bin directory. After looking to see if this wrapper was a script I replaced the entry in the boards.txt and put a script into the bin directory called “dfume”, after seeing that my replacement wrapper worked I added two new entries for each class of avr that I wanted to use the atmega32u2 and the atmega32u4
I started with a blank script that just printed the arguments passed to the wrapper and then called it by restarting my Arduino (to reload the boards.txt) And then selecting one of the new boards and “Uploading” my code. This gave me a window to interactively work through my script. Since the avrdude_wrapper code just pretends to be an avrdude most of the script is munging the arguments passed to avrdude to get the commands to pass to dfu-programmer.
#!/usr/bin/perl
use Getopt::Std;
print @ARGV;
my %args;
my $hexfile;
my $dfu = "/usr/local/bin/dfu-programmer";
my $cpu;
my $hexfile;
getopt('pUc',%args);
$hexfile=$args{U};
$hexfile =~ s/flash:w://;
$hexfile =~ s/:i//;
$cpu=$args{c};
print "n[" . $hexfile . "]";
print "n[" . $cpu . "]n";
print "$dfu $cpu erasen";
system "$dfu $cpu erase";
print "$dfu $cpu flash $hexfilen";
system"$dfu $cpu flash $hexfile";
print "$dfu $cpu startn";
system "$dfu $cpu start 1>&2";
print "n";
There is one tricky bit. The current avr-gcc doesnt support the atmega32u2 correctly but the code for the at90usb162 is binary compatible so the build.mcu is set to the at90usb162. But then dfu-programmer supports the correct chip and wont find the device so we use the fact that the upload.protocol argument is passed directlyalong using the -c argument and everything works fine.
So now we just use the hwb and reset buttons to get the system into dfu mode and upload our code directly from the arduino. Its not as slick as the teensy in “auto” mode but it works.
What: Focused workshop: programming Midi devices using the Lightweight Usb For AVR library (Lufa) and the MidiMonster.
When: Sunday 28 Feb 2010 1-5 pm.
Where: PNCA (NW 12th and Johnson) #205
Cost: $35 (includes Midi Monster)
(If you have a MidiMonster from the PD Workshop and wish to use it please bring $10)
Materials: you Should Bring, a laptop and a mini usb cable. Please install Arduino >16 as well.
In this workshop we will be going through the firmware built by Alex Norman as an example of how to develop midi devices using the avr microcontoller. Topics covered will include:
At the eagle for fabrication workshop on sunday I started with a design that Thomas Lockney threatened to build about 2 years ago called the Low Fi Arduino Guitar Pedal.
It was simple enough to get through the necessary parts of eagle that I was teaching and while it wasn’t perfect It beat the hell out of Craig Anderton’s circuits in terms of clarity and probability of actually working. To discuss from an over view perspective creating parts I decided to add the 1/4″ jacks from another great dorkbotpdx project from Hans Lindauer.
Once I got the library part together for the 1/4″ jack I had to rearrange things quite a bit but there was still pleanty of room. The next step was to add a power connector and a regulator. The idea is to be able to mount the resulting board in one of the cheapo danelectro pedels that I have around like this
In order to get the board to work out I had to create a new package for the potentiometers but I managed to get it all to fit on the board without resorting to surface mount components.
I will post the library example latere this evening.