Wednesday, July 29, 2009

Uno Sensor Board Update

I worked on my sensor board again tonight. I got the sensor portion, as opposed to the led driver portion, working. I had to do a bit more board repair. Apparently, when I swapped the incorrectly routed op-amp outputs and power lines, I damaged a via and disconnected the forward looking opamp from the MCU. I wound up drilling out a couple vias to fix it.

Once I had it going I tried to run a simple test program to show which of the four sensors saw the greatest amount of light. For the test I just used a loose IR LED wired to be always on at about 20 mA. I have moved the code around a bit since last time I talked about it. I don't use the timer interrupts at all now. I just use the ADC conversion complete interrupt. I discovered you can configure the ADC to automatically begin a conversion based off of a number of other interrupts. So I set the ADC to trigger off of Compare Match A for Timer 1. That interrupt is the one that raises the strobe line to the LEDs to begin emitting light for 10us. However, I don't actually have to service the Compare Match A interrupt, the ADC will begin conversion regardless. Instead I can just service the conversion complete interrupt and do everything there. The timing of the conversion is such that the sample and hold should happen somewhere around 7 us into the pulse. I've yet to verify that's really what's happening on the scope however.

Anyway my test program behaved quite oddly and only the forward channel seemed to ever detect anything. After some digging I discovered that there are restrictions on changing the ADC channel while in auto-trigger mode. Two of the three times they list that its OK to change, I could not puzzle out how to get at in code. I wound up actually disabling the auto-trigger bit, a listed time to change the channel, and then reset the bit right after the channel change. That seemed to work. But, it took about more than an hour to figure out what was going on.

I'll chalk it up to a learning experience. I've explored a corner of the AVR that'd I'd never visited before and found an annoying quirk. I'll know better next time and maybe I can get someone past the quirk in the future without them having to puzzle for an hour or more.

Monday, July 13, 2009

Rapid PCB Etching with a Sponge



hack-a-day picked this up from instructables who picked it up from Pulsar. Its a story about etching VERY rapidly, in about 60 seconds, by using a tiny amount of Ferric Chloride and a sponge. I am pretty excited for this technique and will try it very shortly. I found a second error on my LED emitter board so its over-due for a re-etch. Once I've tried it I'll report back here. If you've already tried it, leave a comment and let me know if the technique lives up to it amazing promises.


Update: Unfortunately I must report failure. Tonight at RBNO I tried this technique and found only moderate reduction in etch time for a whole lot more work than an agitated bath. I think that the copper clad the fellow in the instructable is using must be quite thin indeed. I would expect that an agitated bath would run pretty quick as well. For my standard 1oz copper clad it took me 8 or nine minutes of wiping to clear the board. An agitated bath take 10 to 15 minutes, but I don't have to do anything, I just wait for the board to finish.


So, I don't think I'll be using this technique. Its a shame, I was really salivating over a 60 second etch time.