I've pushed a few updated for ArduinoISP. I'm using the AVR toolkit from Arduino 1.0 to test it. Good news is that you don't need to worry about auto-reset on the Arduino UNO. If you connect with the toolkit avrdude the board doesn't get reset. (If you connect using the serial console it does reset, so they must have made a change in avrdude.)
Arduino 1.0 includes a recent ArduinoISP sketch, with the 'write to larger eeprom' fix.
ArduinoISP will continue to focus primarily on burning bootloaders. More advanced users should submit requests to the mega-isp project on Google Code: http://code.google.com/p/mega-isp. The source code is available from http://github.com/rsbohn/arduinoisp.
The vaults are insufferably damp.
Monday, January 09, 2012
Thursday, December 29, 2011
Saturday, February 19, 2011
Thursday, February 17, 2011
Thursday, February 03, 2011
Rime of the Ancient Mariner
It is an ancient Mariner,
And he stoppeth one of three.
"By thy long grey beard and glittering eye,
Now wherefore stopp'st thou me?
Rime of the Ancient Mariner via Project Gutenberg
Sunday, December 12, 2010
Fun With CouchDB
I'm learning to use CouchDB. It's a fun way to keep track of stuff. You can put JSON documents in the db, and you can attach files too. I've always like the idea of having a template in the cloud that you can use to build a working environment on any given computer. I'm setting one up now. You download a single script from CouchDB that will install other tools and create folders and so on.
Sunday, April 04, 2010
Friday, March 12, 2010
What was I thinking?
My dwarves have been busy digging an underground empire.
I watched Rise of the Fallen with William. This is a Transformers movie.
We also watched GI Joe together. That's a fun movie.
Cindy went to Arizona with her mom. She came back with a cold.
Image via Wikipedia
I've been using Enso on my computer. I'm liking it.
Friday, November 13, 2009
My go development box is a virtual machine
I've been playing around with the new go language from Google. It is a very interesting computer language. It is currently only supported on Linux and MacOSX. I've been watching the #go-nuts IRC channel on freenode.net the past few days. A lot of the messages there are pleading for a Windows implementation. I also saw complaints about the mercurial source code version control system used (Oh no, not another version control system...).
Haven't any of these people heard of virtual machines?
I set up a Gentoo Linux image in Qemu and use that for learning Go. It doesn't matter that my laptop is running Windows, the tools I need for Go are right there in the vm. Install mercurial? All I had to do was emerge it. And since I wasn't installing it on my primary machine I didn't think twice.
With all the work I've done on embedded systems and Processing I just don't care so much about what OS or device some software will run on. I have the tools to connect the different platforms. This early release of Go seems especially suited for running network services, and I can whip up a Processing GUI for that, no problem. I do think that a ready-built vm image, either for Qemu or a VMWare appliance, would be a great thing.
Saturday, November 07, 2009
Arduino Audio Sandbox
I'm listening to my rendition of the 4ms Autonomous Bassline Generator. Here's how I put it together. First I needed a reasonable audio generator for the Arduino. I found an Adrian Freed Arduino sketch that makes a good sine wave using the PWM2 output. Adrian uses a 256 slot wavetable and some fixed point math. I took his wavetable and his interrupt routine and got that running. Next I wanted one octave of musical notes, so I looked up the frequency values and put them into a 12 slot array. I started with five notes in a melody array that I would cycle through over and over, but now that has grown to eight notes. I play that three times in a row, then generate a new set of melody nodes and run that.
The sine wave I was getting was good, but I wanted a raspier sound, so I added a second wave table (this one in RAM) and filled it with random values. My first attempt at mixing this with the sine wave failed. All I got was noise. I worked with the values some and got it working, but I think the next build will have a total volume level. The noise level is user variable, and the sine level is the master volume minus the noise level.
I used a LDR (light sensor) to set the noise level, but it was more fun to use it to alter the tempo. My desk gets a sliver of sunlight crossing it around 12:30 pm, so I set the Arduino on the desk. The music starts out slow, getting faster as the light moves over it, then slowing again as darkness returns. If a cloud passes in front of the sun that also slows the tempo.
This is more fun than you might expect already, but I have several ideas for continuing the project. I'm going to use one of my Arduino Pro boards to build this as a permanent fixture. I'll have to build an enclosure for it, with a built-in audio amplifier and speaker. I'll mount the LDR on top and a few variable resistors. I also want to try IR synchronization like the original ABG project. I'll probably add a breadboard section for experimenting with the generated audio.
On the software side I want to expand the melody section to three 'passages'. The default will be to cycle through each in turn, over and over again. A second mode will change just one or two notes in each passage. There will also be a way to replace all the notes in the melody at once. The goal here is to make a kind of musical game, with the Arduino playing the bassline and the human improvising over the top.
Saturday, October 31, 2009
USBtiny build notes
Spent a few hours this morning building the USBtinyISP AVR Programmer from adafruit.com. Very happy to report that it went together easily and worked the first time out. Awesome! I did make one small blunder though. I should have read through the installation instructions before starting. You are supposed to put the LEDs one half inch over the pc board. I mounted them flush to the board, and now you have to look down into the enclosure to see them. I'm hoping a little work with coffee stirrers and perhaps a little hot glue can remedy the situation.
The online assembly instructions are very good. I did wait to install R7 as suggested and I was glad for it. One change I would make is to put the USB jack on after the 6 and 10 pin headers. The headers have a lower profile and I had to prop them up on something when I soldered them. Also, my kit had a smaller C2 100 microfarad capacitor than in the instructions. It fits in beside the '125 buffer chip so I didn't bend it over the '125.
After it was all assembled I turned off the solder iron and downloaded the Windows drivers. The USBtinyISP runs as an actual USB device and not as a serial port emulator, so for AVRDude you just use "-c usbtiny". That's a lot nicer than plugging in the Arduino and then trying to figure out what COM port it got. I connected it first to a project I have installed on the Evil Mad Scientist MegaXX8 target board but that didn't work. I'll have to sort that out later. Next I connected it to the six pin port on an Arduino. This time it connected and read out the device signature just fine. Last I hooked it up to a Larson Scanner I built with a Tiny2313 chip. Read that one also. This is so cool, now I have an AVR programmer that I can just plug in and use!
The online assembly instructions are very good. I did wait to install R7 as suggested and I was glad for it. One change I would make is to put the USB jack on after the 6 and 10 pin headers. The headers have a lower profile and I had to prop them up on something when I soldered them. Also, my kit had a smaller C2 100 microfarad capacitor than in the instructions. It fits in beside the '125 buffer chip so I didn't bend it over the '125.
After it was all assembled I turned off the solder iron and downloaded the Windows drivers. The USBtinyISP runs as an actual USB device and not as a serial port emulator, so for AVRDude you just use "-c usbtiny". That's a lot nicer than plugging in the Arduino and then trying to figure out what COM port it got. I connected it first to a project I have installed on the Evil Mad Scientist MegaXX8 target board but that didn't work. I'll have to sort that out later. Next I connected it to the six pin port on an Arduino. This time it connected and read out the device signature just fine. Last I hooked it up to a Larson Scanner I built with a Tiny2313 chip. Read that one also. This is so cool, now I have an AVR programmer that I can just plug in and use!
Saturday, August 08, 2009
Saturday Is Over
I didn't work on the morse code trainer or the dresser for Sarah. We went to the zoo and saw the baby giraffe. Then I went over to my inlaws and helped set up a new television. Why can't they just put up an external antenna? They need one if they want over-the-air television. Then I loaded the dishwasher, after that I took Cindy out for dinner at Mimi's.
Sunday, July 26, 2009
Friday, July 24, 2009
August Challenge: Three Projects
It's been too long since I actually finished a project, so I'm doing a challenge: Complete three projects by the end of August. The goal is to complete the (final) design, construction, and programming of three projects. They will be all put together and provided with a safe home (installed in a box).
Here are the three I'm going to do:
-Morse Code Trainer
-In-car Thermometer
-Audio Signal Detector
More details will follow. Wish me luck!
Here are the three I'm going to do:
-Morse Code Trainer
-In-car Thermometer
-Audio Signal Detector
More details will follow. Wish me luck!
Thursday, July 09, 2009
Artishop Update
The 'Choose Liberty' shirt is doing well. It is based on a scripture from Second Nephi:
Men are free to choose Liberty and Eternal Life --2 Nephi 2:27.
See for yourself at the Art Shirt Shop.
Men are free to choose Liberty and Eternal Life --2 Nephi 2:27.
See for yourself at the Art Shirt Shop.
Tuesday, June 30, 2009
Watching Events
Suppose you have an event you want to monitor. It happens usually every 24 hours but could take as long as 72 hours, or longer in rare cases. Each time the event happens a log file is updated. Here's what I've come up with, using Powershell, Arduino, and a voltmeter:
#powershell - read time, update meter
$log = dir c:\logs\logfile.txt
$age = ((get-date) - $log.LastWriteTime).TotalHours
$meter = $age / 72.0
$serialPort.write("meter $meter")
Ok, that works, but you get a linear meter reading (0.0 to 1.0). Using a logarithmic scale makes sense here: Most of the time the event happens about daily. With a log scale the first day will take up the first 3/4 of the meter. If the meter gets beyond 75% (red zone?) something might be amiss.
$log = dir c:\logs\logfile.txt
$age = ((get-date) - $log.LastWriteTime).TotalHours
$meter = [math]::log($age) /4.27
$serialPort.write("meter $meter")
How does that distribute the time (from 0.0 to 1.0)? Try this:
1..15 | % {$_ * 6} | % {"$_ $([math]::log($_)/4.27)"}
If you run that (powershell again) you will see that at 24 hours you are using up to 0.74778. After 48 hours you get 0.91, and 72 hours is at 1.0.
For the Arduino you can make it easier by writing "meter $($meter * 256)". Then you can analogWrite the value to one of the PWM pins and connect that to your voltmeter. If the meter in question has a 3V scale you would use a voltage divider to scale the maximum 5V out to 3V full scale.
I currently have the Powershell side of this working, but instead of the Arduino I'm running the serial out through the MixW serial port bridge and back into a Processing applet.
#powershell - read time, update meter
$log = dir c:\logs\logfile.txt
$age = ((get-date) - $log.LastWriteTime).TotalHours
$meter = $age / 72.0
$serialPort.write("meter $meter")
Ok, that works, but you get a linear meter reading (0.0 to 1.0). Using a logarithmic scale makes sense here: Most of the time the event happens about daily. With a log scale the first day will take up the first 3/4 of the meter. If the meter gets beyond 75% (red zone?) something might be amiss.
$log = dir c:\logs\logfile.txt
$age = ((get-date) - $log.LastWriteTime).TotalHours
$meter = [math]::log($age) /4.27
$serialPort.write("meter $meter")
How does that distribute the time (from 0.0 to 1.0)? Try this:
1..15 | % {$_ * 6} | % {"$_ $([math]::log($_)/4.27)"}
If you run that (powershell again) you will see that at 24 hours you are using up to 0.74778. After 48 hours you get 0.91, and 72 hours is at 1.0.
For the Arduino you can make it easier by writing "meter $($meter * 256)". Then you can analogWrite the value to one of the PWM pins and connect that to your voltmeter. If the meter in question has a 3V scale you would use a voltage divider to scale the maximum 5V out to 3V full scale.
I currently have the Powershell side of this working, but instead of the Arduino I'm running the serial out through the MixW serial port bridge and back into a Processing applet.
Thursday, May 14, 2009
Frequency Counter Assembled
My frequency counter kit arrived today from SparkFun.com. The board wasn't exactly as described on nuxie1.com but it was easy to put together. I put a red LED from my stock on it instead of the supplied green LED. I connected it to my USB hub, tweaked the LCD contrast, and there it was: 0 hz.
The circuit board was nicely done. When they added a USB miniB SMT connector they crowded the LCD contrast control against the 6 pin ICSP connector, but it looks like it will still work. The ICSP header wasn't included in the kit, so I added one, again from stock.
I want to build some radio frequency circuits, so hopefully this will help me tune them up. I'll probably add a divide-by-ten front end to it and some signal conditioning. The kit claims to work to 2MHz or higher. If I can get it up to 30 MHz with a prescaler I think it will suit me fine.
The circuit board was nicely done. When they added a USB miniB SMT connector they crowded the LCD contrast control against the 6 pin ICSP connector, but it looks like it will still work. The ICSP header wasn't included in the kit, so I added one, again from stock.
I want to build some radio frequency circuits, so hopefully this will help me tune them up. I'll probably add a divide-by-ten front end to it and some signal conditioning. The kit claims to work to 2MHz or higher. If I can get it up to 30 MHz with a prescaler I think it will suit me fine.
Monday, May 04, 2009
Soccer and Bowling
We went to William's last soccer game for the season, but the other team didn't show. So it was Parents and other family members versus the Blue Strikers. I played about 30 minutes. It was a fun game.
Then Ellen needed a couple of bowling games for her PE class, so I took Sarah and Ellen and we all bowled two games. I had the high score for the second game.
I'm not used to this much fun on weekends. Sunday I was tired and sore. But I got all kinds of wii fit credit now!
Then Ellen needed a couple of bowling games for her PE class, so I took Sarah and Ellen and we all bowled two games. I had the high score for the second game.
I'm not used to this much fun on weekends. Sunday I was tired and sore. But I got all kinds of wii fit credit now!
Subscribe to:
Posts (Atom)


![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=82d9911b-e499-447b-80f3-53a9019e7bc8)








