learning the ropes

things I made at ITP and after: sketches, prototypes, and other documentation

Friday, March 2, 2007

More Trouble

This afternoon I attempted to connect the Secret Tree circuit board to the LEDs on the tree. Since my test program (adapted from an Arduino tutorial) appeared to be working well I was ready. The first six LED clusters I connected to the terminal blocks worked fine, but the seventh and eighth clusters didn’t operate properly. I tried resetting the Arduino board as well as the MAX patch, but things wouldn’t work consistently. I even saw that a single LED connected to the seventh output didn’t light up consistently. Once I disconnected all of the clusters and returned to single LEDs, the system seemed to function properly. Maybe the LED clusters are drawing too much current and are causing the digital potentiometers to behave erratically.

Back at home, I found a small breadboard wiring problem: I didn’t have a proper connection to ground for the pins 15, 18, 19, and 22 on the second AD5206. Even so, the LEDs connected to the potentiometer outputs related to those pins still lit up. My correction only served to properly extinguish the LEDs when I set the potentiometers on that side of the chip to the maximum 10K resistance.

Updated Circuit 003

The light blue wire connected to ground above the AD5206 is the recent addition.

So far, I have tried the following in order to get the software/hardware system working:

  • Corresponded with Scott Fitzgerald regarding the MAX patch. He removed the multiple “metro” objects from it and recommended running the system at 9600 baud so as not to overwhelm the PC’s serial buffer.
  • Spoke with Leif Krinkle about the MAX patch. He questioned my use of the SimpleMessageSystem for MAX and thought I would be better served by a basic home-brew protocol. I started rewriting the Arduino code and the MAX patch to use a simple protocol based on sending Arduino six bytes of information from MAX using the “pack” object”. I originally asked him how to debug the MAX patch since Arduino and MAX were communicating over the Arduino’s only serial port. It turns out that there is a software serial library that could be used to do this type of debugging.
  • Discovered in the course of rewriting the serial protocol that the switch needs debouncing. This is the source of the strange values I saw in MAX/MSP with my new serial code.

Tomorrow I will try using a power supply with more amperage to see if that improves things. Any other suggestions?

posted by Michael at 11:31 pm  

Powered by WordPress