Thursday, February 9, 2012

AVR ISP Flashing ATMEGA328 with Arduino UNO Boards

Okay, so as part of my photo gear hacking fun, I'm working with Arduino UNO boards. Why? Because they are fairly straight forward, fairly forgiving, and have an awesomely easy to use interface.

So, looking around, you can pickup ATMEL atmega328p-pu MCU(s) for a pretty low price. If you want the Arduino bootloader pre-flashed, that's an extra $1+ per chip. Figuring I can just do it myself, I went a bought a bunch from JameCO of California.

Arduino UNO: The AVRisp exception

So, on the Arduino.cc site, there is an awesome page for how to use an Arduino board as an AVR ISP programmer for another Arduino: http://arduino.cc/en/Tutorial/ArduinoISP

However, at the top of the page, there is a gotcha:

NOTE: Currently, you cannot use an Arduino Uno as an ISP programmer because the optiboot bootloader does not support this sketch. A revision for this is in progress.
So... after hitting many sites, building countless ISP or bypass circuits on breadboards, and basically banging my head against the wall, I visited this site for the umpteenth time:

https://github.com/WestfW/OptiLoader

And instead of trying to build a breadboard of the ISP circuit, I actually did something reasonable: I read the source code notes provided by WestfW, who wrote the OptiLoader, and you will note it says:

// If the aim is to reprogram the bootloader in one Arduino using another// Arudino as the programmer, you can just use jumpers between the connectors// on the Arduino board. In this case, connect:// Pin 13 to Pin 13// Pin 12 to Pin 12// Pin 11 to Pin 11// Pin 10 (of "programmer") to RESET (of "target" (on the "power" connector))// +5V to +5V and GND to GND. Only the "programmer" board should be powered// by USB or external power. 

OMG!! Well, since I actually had 2 Arduino UNO boards, I made the hookups and plugged in a handle AC adapter. Voila! It flashed the chip in the other board! I tested uploading the blink sketch to the newly Arduino turned chip, and it accepted it. Amazing!

So, for the countless folks out there who are otherwise happy owners of the Arduino UNO board and just want to turn a blank atmega328 into an Arduino atmega328, give OptiLoader a try. It rocks.

Note, the OptiLoader sketch handles putting the optiboot loader onto more than just atmega328(s). Check out the source code for a complete list.

Happy photo gear hacking!

Monday, February 6, 2012

LumoPro 160 Hacking Update #1

So, it's been months and I've had a chance to look over and take apart the LP160 I had on hand.

Some thoughts:
  • The LP160 internals is comprised of 2 main circuit boards.
  • One board contains the MCU that controls the interface, timings, etc. This board is almost completely made up of surface mount components.
  • Another board is the charging and trigger board. This is made up of some power components and handles the 325-330V generation as well as the high power IGBT that sends and cuts off current to the xenon flash tube.
  • A mini board in the flash tube array contains the xenon flash tube as well as the trigger voltage transformer.
After having chopped up and cut the leads between the boards, I started working on the charging circuit board. I was able to get the board to power up and charge a capacitor. However, it looks like there was some monitoring magic that was going on to cut off power. I was also not able to get the IGBT to trigger via shorting leads from the jumper block. Bummer.

Additive, Not Subtractive

So my plan of attack is now to figure out a way to implement a Quench/Squelch/Stop pin or the LP160. This would essentially make the LP160 compatible with things like the Radio Popper JrX studio/cubes. This would effectively implement method #2 I had originally thought about, where we bypass the MCU of the LP160 completely, with one exception. By implementing a Quench pin, we would leave the original MCU, manual power, and slaving behaviors intact.

Why A Quench Pin?

A quench pin is the TTL method of flash power level control in the "old days". This usually involved a thyrister as well as some kind of optical feedback. In current day usage, the quench pin is a great way of allowing for universal remote power level control. The only gotcha is that you would need to figure out the timings to apply for a given model of flash. Units like the 285HV units and various Nikon/Canon speedlites, are well known and have published timings. For the LP160, that would need to be implemented as well. Not hard, but it needs to be done to get the power levels right.

How To Add A Quench Pin To The Lumo Pro LP160?

This is something I'm working on right now. I have one LP160 that is completely dismantled and will probably never work right again. *sigh* I also have one LP160 that is intact, which I can work on customizing.  The goal is to determine the point of entry to install a stereo audio jack to implement a sync/quench pin functionality which is compatible with PocketWizard triggers and RadioPopper triggers.

UPDATE:

I've ordered a pair of Radio Poppers ala the JRX transmitter/receiver pair. This will be used to hook up to the LP160 for manual sync while I figure out how to add the quench pin to the LP160 for remote power control + sync.