Jump to content


Photo
* * * * * 1 votes

My Strobe Controller Blog


  • Please log in to reply
26 replies to this topic

#21 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 02 September 2016 - 02:37 PM

Practical Arduino Quench Control - Part 3

 

The next step was to hook my Arduino Quench program to a real power level control switch. Seems easy, but once again I hit some interesting potholes along the way.

 

The Sea & Sea TTL converter housing came with 3 rotating controls:

  • Left - A, B, C, D
  • Right - A, B, C, D
  • Power Level - OFF, Manual, 1, 2, 3, ..., 12

Each of these controls was a multi position rotating switch. Turns out they were all just potentiometers. The OFF setting on the Power Level control was not actually a mechanical off switch. It was just the lowest (or highest) setting on a potentiometer. This made wiring the controls simple. 3 connections needed per control: +5, ground and an analog input connected to the center tap of the pot. For now, I was only interested in the Power Level control. I would read the analog value and use software to interpret what the various switch position settings meant.

 

A potentiometer is just a variable resistor and they burn energy. Precious energy when you are powering the circuit via a battery. I did not want my pots hooked directly to the battery power. The solution was easy - power them via a digital output pin. I only needed to provide power to the pot any time I wanted to take a reading. Assert a digital output pin just prior to taking a reading and then let it float afterwards. I was worried about getting stable readings but it worked like a charm first time out. I was able to assert the digital output, read the analog input and obtain stable consistent readings. As long as I did not change the switch setting...

 

The pot featured a set of mechanical detents that corresponded to the different power level settings marked on the exterior of the housing. Rotating up gave a series of consistent values. Rotating down gave a different set of consistent values. Depending upon the direction of rotation a specific power setting gave a different value. Likely due to back lash in the mechanism. Time to deal with the real world. I had to make my code a little more sophisticated and map a range of pot values to each power setting.

 

Next up was making my Quench program responsive to Power Level control changes. BUT: I wanted to read the pot as few times as possible in order to conserve battery power  From my radio communication background I knew vaguely remembered that most humans generally could not perceive changes faster than about 250ms. In other words a 250ms delay appears instantaneous to the majority of people. So there was no need to attempt to read the Power Level control setting every cycle of the Arduino control loop. Reading the potentiometer once every 100ms to 200ms should be often enough to track changes in the control.

 

I added some logic to flash the red LED on the converter each time the Power Level setting changed. Some experimentation showed that reading the pot every 200ms was fast enough. The LED appeared to flash instantly after I changed the Power Level setting.

 

I now felt I had the basics under control. Time to add a camera and some real strobes.



#22 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 16 September 2016 - 08:12 AM

Don't Forget the Camera!

 

My test rig and YS50 mule strobe were all working fine. It was now time to get serious and start to hook it up to real equipment.

 

At first I thought I should tackle jamming the Arduino into the Sea & Sea TTL converter housing. But I decided that I needed 100% confidence in my setup before I started to solder wires to the Arduino. Soldering was a final commitment.

 

So the next step was to include a real camera into the setup. This required more brain power than I anticipated.

 

My test setup used a simple pushbutton switch that I used to simulate the camera X signal. The camera drags X to ground to fire the strobe. Simple. My test rig was also simple. I used a digital input in INPUT_HIGH mode and then used the pushbutton switch to short it to ground. This had been working reliably. But only after I had added debounce logic. I could press the switch once to get a single strobe fire, or I could hold the switch closed and the strobe would continue to re-fire as soon as it recharged.

 

Adding a real camera meant that I needed to provide more sophisticated X signal handling. In the real world the X signal line was a bidirectional control. Both the strobe and the camera signaled information on the same line. The strobe raised the X signal when it was re-charged and ready to fire. The camera shorted the X signal to ground to trigger the strobe to fire. So I needed to provide the camera with a signal that mimicked the strobe X signal. First challenge was how to mimic a signal that was both an output (strobe is ready) and an input (camera shutter activation to fire the strobe). I need to provide the camera with a HIGH X signal so that it could pull it LOW when the camera shutter fired.

 

The dual purpose (output then input) nature of the single signal line appears to be contradictory. How can a signal line be both an input and an output? It can, but not at the same time. This temporal change in function is the secret sauce. All you need is a single digital input: but you need to flip it between INPUT_HIGH and INPUT mode at different points in time. This split behaviour is somewhat similar to the digital output used to power the Power Level control pot.

 

I need to pass a HIGH to the camera when the strobe was HIGH and then detect that the camera had pulled it LOW when the shutter was activated. In INPUT_HIGH mode a digital input line will provide a (low current) HIGH signal to the outside world. In normal INPUT mode the digital input provides a LOW signal.

 

Handling the Camera X was reduced to the following set of simple rules:

  • put the camera X digital input to INPUT_HIGH mode any time the strobe was ready
  • if the strobe is not ready then set camera X digital input to INPUT mode
  • ONLY read the camera X input if the strobe was ready
  • and remember to include the appropriate delay and debouncing logic

My initial efforts required some tweaking to get consistent results. A short delay after flipping to INPUT_HIGH mode was required to avoid getting false LOW readings from the prior INPUT mode. I also needed to reduce the debounce interval as the camera X signal settled much faster than the manual pushbutton contact switch from my test rig.

 

Initial tests using an old camera worked perfectly. My Arduino Quench logic was fast and stable enough to consistently trigger the YS50 strobe while the camera shutter was open. Substituting my Canon G16 gave the same results.

 

Time to package it up and go diving!



#23 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 04 October 2016 - 08:18 AM

Packaging the Arduino

 

The next challenge was physical. I needed to mount an Arduino Pro Mini board in my reclaimed Sea & Sea TTL converter housing. Should be easy. The housing was much larger than the Pro Mini board. The Pro Mini board was smaller than the Sea and Sea board I removed from the housing.

 

Nope. It quickly became obvious that Internal clearance was at a premium. The CR2 battery compartment intruded into a large portion of the internal space. The bulkhead connectors and potentiometer controls took up lots more space. These constraints left only 1 mounting position for my Arduino board: the exact same place as the original Sea and Sea board.

 

Except the Pro Mini board was smaller and did not cover the mounting posts of the original board. I needed to extend the Pro Mini board in order to mount it. This was accomplished by taking a standard perfboard and cutting it to size. The Pro Mini was then mounted to the perfboard via header pins. This ended up with a thick board. Too thick. The Pro Mini components rested against tabs projecting from the metal bracket around the potentiometers with a potential to cause shorts. This lack of clearance problem was solved by bending the tabs over. The tabs appeared to be a standard mounting feature of the potentiometers and were not being used in this case.

 

I now had a solution to mount the Arduino board. Next up was connecting the various controls and bulkheads. Which presented another challenge.

 

The original Sea and Sea board featured a set of connectors, 1 connector for each control / bulkhead. These were mounted on both sides of the board, closest to the connection. The use of connectors allowed the board or any of the controls / bulkheads to be easily replaced by unplugging and replugging. No soldering iron required, The Pro Mini used 2 standard 0.1" spaced headers. These are much larger than the Sea and Sea board. The Arduino I/O pins where logically arranged along the 2 headers.

 

At first glance all I had to do was create a bunch of new connectors for the existing wire loom. But I had the following challenges:

  • the 0.1" connectors were too long
  • the Arduino headers where in the wrong place
  • the connector specific pins where not adjacent
  • The standard 0.1" female connectors projected too far above the plane of the Arduino board. They collided with the internal surface of the housing. So standard off the shelf connectors were not suitable.

The Arduino headers are located down each side of the board. This is totally logical. But once the board was mounted in the housing, the various controls and bulkheads would physically interfere. Re-examination of the Sea and Sea board seemed to have the connectors placed randomly about the board. Closer inspection revealed that the connectors were strategically placed so that each connector was located so that it was between the controls and bulkheads and board mounting posts. This need greatly reduced the potential placement locations for connectors.

 

Connecting directly to the Arduino header was not feasible as the pins were in the wrong order. A potentiometer needed 3 wires: +, ground and an analog input from the tap. These pins where not located next to each other on the Arduino. They were spread around. 

 

This observation revealed the (now) obvious solution:

  • locate the connectors on the perfboard in spots that did not mechanically interfere with controls / bulkheads
  • solder wires from the Arduino headers to the connector headers

This resulted in a session with my soldering iron and several spools of different colored wire wrap wire. I then carefully removed the wire looms from their original connectors and individually jammed each wire onto the 0.1" header pin.

 

Not elegant, definitely not production quality, but it worked just fine.



#24 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 29 October 2016 - 03:37 AM

YS50 is not YS110

 

I had created an Arduino based controller that would monitor my camera hot shoe X contact and then fire a YS50 strobe based upon a power setting level control.

 

I had been using some old spare Sea & Sea YS50 strobes for my testing since I did not want to damage or wear out my real strobes. It was now time to hook the Arduino up to my real Sea & Sea YS110 strobes. I expected success since I was not doing anything too sophisticated. I got utter and total failure. The YS110s did not fire consistently and did not produce a consistent power output.

 

Apparently YS50 and YS110 can not be controlled the same.

 

I was prepared for some minor small differences. The Sea & Sea TTL Converter hinted that there was differences across the various Sea & Sea strobes since it had a control that was used  to select the type of strobe attached to it (cryptically labeled A, B, C, D). I had seen images of newer converters that had labels for: YS110a, YS-01, YS-D1. This indicates that the various strobes needed to be treated differently by the converter.

 

But how different could they be? For backwards compatibility all of the strobes needed to support manual firing of the strobe by shorting the X signal to ground. All of the modern strobes supported the same 5 wire cable and connector.

 

I had presupposed that each strobe may have slightly different signal timing requirements due to variations in internal circuitry. The obvious difference would be the delay required in asserting the Q signal in order to produce the same power output. The different strobes had different Xenon flash tubes (the YS110 has 3, the others only 1) and most likely different internal capacitors.

 

My obvious short list of differences were all timing based:

  • duration to assert X to ensure the strobe reliably fired
  • duration to assert Q to ensure the strobe reliably quenched
  • the duration to delay Q assertion to map to a specific power level

These issues all made sense and could be handled easily by knowing which strobe was attached. The actual values could be determined easily via a set of experiments with each different strobe type I owned.

 

My first experiment with the YS110 revealed the problem was much different than I had imagined. The YS110 was reacting much differently than the YS50. After firing, the YS50 would turn on the red Ready light and pull the X line high after the strobe had recharged. The recharge delay could be anywhere from 1/2 a second to several seconds depending upon the power setting and battery level. The YS110 was pulling the X line high "immediately" after firing. Before it had recharged. Before the red Ready light was turned on. The scheme I used to determine if the YS50 was ready to refire did not work with the YS110. I could not tell if the YS110 was ready by watching the X signal line.

 

This proved that the YS50 and YS110 signaling were fundamentally different.

 

Seems I did not pay enough attention. YS50 are ancient. They use a 4 wire connection. The YS110 is much newer and uses a 5 wire connection. Both strobes had Ground, X and Q signal lines. Seems like the other lines maybe important?

 

Next step is to find out how to control a modern strobe...



#25 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 11 November 2016 - 07:36 AM

4 Wire vs 5 Wire TTL Strobe

 

My old Sea and Sea YS50 strobe has a 4 wire cable. My newer Sea and Sea YS110 strobes use a 5 wire cable. I needed to understand the difference so that I could adjust my quench controller to operate the YS110.

 

Cameras Underwater has a great write up about the cable pinouts and operation of several strobe interfaces. I had focused on the minimal 3 signal wires (Ground, X & Q) as I was not interested in any of the "extra" features that may be available. So I went back to this to see what I had missed.

 

The extra wire in the 4 pin YS50 Sea and Sea Motormarine II interface was the S (integration) signal that was used to control the exposure circuitry in the Motormarine camera. I definitely did not need this. 3 wires was enough for the YS50.

 

The extra wires in the 5 pin Nikonos interface were SP and RDY. There was some confusion since the 5 pin Sea and Sea Duo flash interface was documented as well. And it uses the same strobe connector as the YS110. The extra pins in the 5 pin Sea and Sea Duo interface were SP and RDY/S. Where the Nikonos and Duo interfaces different? Which one did my YS110 use?

 

Some quick google research regarding the Sea and Sea Duo interface provided an answer. Sea and Sea marketed a series of strobes that talked both the Motormarine II protocol AND the Nikonos protocol. The YS120 Duo  is one example. I could safely ignore the Duo interface and concentrate on the Nikonos interface.

 

The SP signal is used by the strobe to indicate to the camera that the strobe is capable of TTL operation. Handy but not of any use to me since I already know that my strobes can support wired TTL.

 

The RDY signal line is used by the strobe to indicate that it is ready. Doh!

 

The X signal line on the YS50 is dual purpose: it indicates the strobe is ready and it is used by the camera to fire strobe. The good folk at Nikon separated these and provided a dedicated wire for each function in the Nikonos interface. Problem identified. The solution proved trivial as I had used a separate Arduino analog input to monitor the strobe ready condition. A small modification to my test rig wiring harness for the YS110 and the standalone RDY signal could be routed to the analog input I was using to detect the strobe ready.

 

I could now reliably detect when a single YS110 strobe was ready to fire.

 

Subsequent inspection of the Sea & Sea TTL converter revealed that life may not be as simple as I thought. The stock converter only used 3 wires (Ground, X & Q). It ignored the strobe RDY signal. Seems like some additional investigation may be required?



#26 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 25 November 2016 - 11:24 AM

YS110 Calibration - Part 1

 

In my previous post on this topic I solved the mystery of controlling a strobe via the Nikonos wired protocol. I just needed to use the extra wire. the next step was to "calibrate" my controller for my new YS110 strobe instead of my YS50 test unit (which I really did not calibrate...).

 

Initial tests with the dedicated RDY signal line worked perfectly but I quickly ran into problems when I turned the power setting down on my controller. At high power settings everything worked fine. At low power settings the strobe only fired once. If I cycled the power on the strobe it would then fire one more time. This behaviour initially made me panic a bit since it led me to think I had broken my real strobe! All of my initial research had been performed against an old spare YS50 that I did not use underwater - and I had a few spare units just in case. I had punished the YS50 strobe with no issues so this odd behaviour came as a complete surprise.

 

Once again, time to step back and think a bit. Power cycling the controller also allowed the strobe to fire just once. So it was not a strobe issue, it was most likely a controller issue. My strobe was unharmed!

 

A check of the RDY signal with the multimeter quickly revealed the problem: the RDY signal remained HIGH after a low power flash. The strobe was indicating that it was still ready to fire again immediately with no pause needed to recharge. I had assumed the strobe would always require some recharge time and had coded a HIGH - LOW - HIGH transition for the RDY line into the Arduino logic. The strobe held the RDY line HIGH. My Arduino was stuck waiting for the strobe RDY signal to go LOW. Power cycling the strobe (or the controller) satisfied this condition and allowed the next strobe cycle to occur.

 

With the YS50 the RDY and X were combined into a single signal line. Since the X was dragged LOW to fire the strobe the RDY signal always did a HIGH - LOW - HIGH cycle. Once these signals were split into 2 separate signal lines the RDY line was free to exhibit a different behaviour. At high power settings the RDY line did cycle LOW while the strobe recharged. At low power settings the RDY line remained held HIGH since there was sufficient leftover charge to immediately re-fire the strobe.

 

Replacement of the HIGH - LOW - HIGH cycle with a suitable debounce interval for the RDY line gave me a working (but not calibrated) YS110 quench controller. Next step was to calibrate the controller timings for the YS110 behaviour.



#27 giffenk

giffenk

    Wolf Eel

  • Member
  • PipPip
  • 131 posts
  • Gender:Male
  • Location:Toronto

Posted 07 December 2016 - 06:47 PM

YS110 Calibration - Part 2

 

The theory behind calibration of my Quench controller was fairly simple: all I needed was to establish a quench delay interval for each setting on the strobe power control. A small table of 13 values was all I needed. Refer back to this post  for a refresher of  quench controller theory.

 

When I first started testing with an old YS50 I was not worried about having a correct calibration. As long as the strobe produced more light as I cranked the power setting up I was happy. At that time I was primarily focused on creating a stable control system.  I had no concern that the power settings were correct Exposure Value steps, so I ignored proper calibration. I did want to be able to fire a minimum and a maximum flash.  Through experimentation I was able to establish a minimum and maximum quench delay. For the minimum I slowly increased the delay between asserting X and asserting Q until I got the strobe to fire reliably. Too small of a delay and the strobe did not fire. For the maximum I kept increasing the delay until the strobe failed to turn on the green "TTL Okay" light. In reality the TTL Okay light simply indicates that the strobe did not perform a full dump. The strobe has no idea if the camera achieved proper TTL.

 

I then naively set up a simple linear power setting map from the minimum to the maximum quench delay interval. This seemed to work fine. The lowest power settings gave minimal light. The highest power setting caused a full dump of the strobe. These 2 extremes allowed me to test the edge case timing behaviours while I was creating the control logic. I was happy. And oblivious. Mostly because I did not know any better. My Linear Interpolation guess was wrong. Very wrong.

 

Now I had finally progressed to the point where I was ready to make my YS110 strobes work. It was finally time to worry about calibration. Based on my prior work I knew I would have to establish minimum and maximum quench delay intervals. Then I would worry about the stuff in between. By this time I was aware that my original linear interpolation scheme was incorrect. I had already come across some information regarding the discharge power curve of speedlights.

 

This discussion of Studio Flash versus Speedlights provides some insight into the behaviour of speedlights (underwater strobes are Speedlights). This discussion of Flash Discharge Curves provides an excellent set of discharge graphs at various power settings. A strobe quickly reaches maximum output and then decays over a very long time period. Two important concepts popped out for me:

  • a full discharge is very long compared to just a few steps lower
  • lowest power output is achieved before the strobe has reached the peak of its possible power curve

The next step was to figure out how to establish a valid calibration map for my YS110...