Jump to content

Stellaris Launchpad - Camera Flash Timer and Measurement Tool

Recommended Posts

Camera Flash Timer and Measurement Tool




This project is an amalgamation of many other ideas and projects by other brilliant folks plus my own twist on things.

Hopefully I have given credit to all those whose work I have expanded upon and incorporated.

Apart from libraries, I have written the majority of the code from scratch implementing what I have learnt from this and other forums.

Still quite a few bugs and it is probably 80 - 90% complete.

I did get some perspex laser cut for it, but I didnt have the right software for it and borked the file conversion and received cute little minature versions.

Will have another shot at that in the near future.


Particular mention goes to the following folks for their posts and/or help.

Maurice Ribble, Creator of the Camera Axe and Original Multiflash.

@@RobG , Colour LCD with Touch https://www.tindie.com/products/RobG/color-lcd-boosterpack-touch/ I would be lost without this boosterpack and assistance.

@@jkabat , http://forum.stellarisiti.com/topic/684-stellaris-fast-analog-reads/ John's Assistance with the Fast Analog reads required was awesome. Thanks!

@@Rei Vilo, For help on many matters.

@@calinp, For the porting of PetitFatfs.

@@bluehash, For the SD card boosterpack. I have pretty much directly copied this circuit into my board.


Thanks guys


Main Components.


RobG's Touchscreen Booster Pack.

Stellaris Launchpad

SD Card Socket


Flash Sensor

OptoIsoloators for Flashes

Indicator LEDs





Takes the original flash signal and triggers up to 8 additonal flashes. The flashes can be either fired instantly or via delayed timings of which there are multiple modes.


- Instant

- Constant

- Varies

- Factor Increasing

- Factor Decreasing

- Synchronize








post-1105-1426460535634_thumb.jpg post-1105-14264605356871_thumb.jpg


post-1105-14264605357377_thumb.jpg post-1105-1426460535789_thumb.jpg



It can also measure T0.1 and T0.5 camera flash durations via another menu.






For ages I couldn't figure out what the spike was prior to many of the flash measurements. I am thinking it is a prepulse to the main flash which helps ionize the flash prior to main burst.

If that's what it is, I am pretty stoked I can see it. Just need to modify my calcs routine to ignore it.




The purpose of measuring the flash lags and durations is an attempt to align flashes with different characteristics so that they are as closely synced as possible which removes ghosting of images.


Jkabats help with fast analog routine has been key to achieving the 1Msps sampling rate.


As each flash is profiled, the full curve data is stored in an I2C EEPROM along with summary details. This is then extracted by the Synchronize routine to set the delays for each flash.

I have 7 different modes for aligning the flashes timewise. The results don’t differ too much depending on choice of method.


1. Peak (default)

2. T0.1 Midpoint

3. T0.1 Centroid of area under curve

4. T0.5 Midpoint

5. T0.5 Centroid of area under curve

6. Full Curve Midpoint

7. Full Curve Centroid of area under curve


The faster flashes are held back, and they all cross the finish line at the same time.

The whole flash array inherits the lag of the slowest flash.


All the data from the I2C chip can be written to an SD Card for further analysis on a PC. Here is the data ported to excel.


post-1105-14264605351182_thumb.png post-1105-14264605353491_thumb.png




The code is still underway but most things are working.

This is version 0.26



(The main file is PTB_Iridium.INO . Will need to create folder structure to suit)




This is the current schematic but will be updated in the near future to fix some problems.

Multiflash 3.sch.pdf


Stellaris Launchpad Mods


Remove Resistors R2, R9, R10, R11, R12.


Bugs and Issues


Slowly working through things.


1. Flash Port 3 isn't firing for some reason. I think it used to. I wonder if it is related to issue #2 below.

2. I ran into strife with my indicator leds. They are Dual Colour red/blue and then I got a better understanding of forward voltage.

The blue is very close to the operating voltage of 3.3v. I have done arduino thing before this and it was all 5v, so it caught me. (again)

I am waiting on some lower resistance arrays, but I think this may create other problems to do with how much current the Stellaris can sink.


Sooooo... I plan to redo the schematic in the near future implementing a darlington array to drive the optos and indicator leds.

Gotta think that through. It will be my third board revision. Can't keep doing that forever.

3. I seem to be only able to get it to run with Energia 0009 at the moment. Later versions don't seem to work with touch screen. Deffo my Software issue.

4. I2C EEPROM Speeds are very slow. There is a lot of data I am writing in there, but I think some better coding on my part will help a lot.

Luckily that only really affects 2 operations. The rest is zippy enough.

5. Haven't written code for reading back from SD card into I2C EEPROM Chip.

6. I seem to have some kind of problem with I2C addressing. I think its an Energia Wire library thing which may have been fixed in later versions.

I had a 24lc512 but I wanted more space so I dropped in a 24lc1025 which I then found is like 2 different addresses.

Couldn't write to one bank without writing to the other, so it defeated the purpose. I want more space to save longer curves from more powerful flashes.

It is currently good enough to deal with common flashes at full power.

7. I too have the problem of scanning the I2C bus and getting an address found at every address. The I2C Eeprom works as required though.


More as I think of them.....






Link to post
Share on other sites

Thanks !!
Been working on it for about a year as time permits.
@@Rei Vilo. No it wasn't that library suite. It was an earlier library which I believe was also by yourself. B)



I was already well underway with my own screens and user interface when I became aware of the suite, so I decided to persevere as a learning exercise.

I did think of going back and implementing the suite, but didn't. The suite definitely has some nice features.





Link to post
Share on other sites
  • 1 year later...

Thought I would post an update on this project to help paint a picture with my other questions in other threads.





I have gone to a new board layout which utilises the following new features.

a) ULN2003 Darlington arrays to drive the leds. The old arrangement didnt have enough grunt to drive the leds off the mcu.

B) Separated the bi-colour LEDS into separate discreet leds. Blue for Focus and Red For Shutter.

c) Returned to 3.5mm Audio jacks instead of RJ45 jacks. Easier to get off the shelf cables.

d) Added an extra booster pack set of pins in parallel.

e) Moved design from Eagle to KiCAD

    Schematic Iridium Schematic.pdf

e) I added a digital pot in an endeavour to make the light sensor auto-ranging for light levels. I failed on many fronts here.

    Firstly I screwed up big time on the chip socket. I somehow got a 18pin part in the board layout from a 16 pin part in the schematic.

    I only found out when I went to plug in the chip and the socket was too big. Nice work on my part.

    I am looking into making a small adaptor board to use the 16 pin chip in the 18 pin socket.

    Secondly, my thoughts of desensitising the phototransistor via programmable resistance appears futile anyway because the problem

    is actualy the phototransistor saturating. Adding resistance as per the circuit isnt going to help on that front. :(

      Did a bit of research on professional lightmeters and it would appear they cope with the problem by putting different strength filters

    on their light sensors and then you read off a different scale depending on which filter is in there.

f) And lastly but certainly not leastly. @@Fred made me some awesome laser cut panels for the new design. These are sensational.

   I added some infill to the laser engraving and it looks better than the photo appears.




Lots of minor tweaks and improvements. Code updated to Energia 15.

One of the really annoying things was misbehaviour of Some of the GPIO's

It appears wire.begin(); screws up GPIO PD0 and PD1

I can turn pins PD0 and PD1 on and off at will until wire.begin(); is executed.

After that PD0 is stuck Low and PD1 is stuck high.

Fixed with info from this thread.....


Thanks to @reaper and @@spirilis for that thread.

And thanks again to @L.R.A for getting fast analog read back for me in Energia 15.

Current Version 0.40 Here Iridium_v0.40.zip

This code is very much a work in progress with lessons constantly being learnt.


Still Working On


Investigating using timers instead of loops to trigger sequences.





Link to post
Share on other sites

And here are some example flash curve images, both single flash and multiple flash. The curves with multiple flash are currently only possible by using two of the circuit boards and two launchpads. One for measuring and one for firing off required sequence.



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...