Advice on using non-addressable LEDs to illuminate long-term time-lapse

Hi,

This is my first post here - I am trying to follow the guidelines but let me apologise in advance if I am not precise/clear enough.

TL;DR - I want to program some white LEDs to switch on (together) for X seconds, off (together) for 5 mins, for a whole week, after I switch a button. How should I go about it?

I have:

  • No programmable hardware, but some tools (solderer, pliers, heat gun...).
  • No experience with Arduino or electronics.
  • Some experience programming (but not with C/C++).

I would like from the forum:

  • general advice on how to approach my project,
  • specific advice on which hardware to go for and, possibly,
  • suggestions for libraries to program non-addressable LED strips (or just switches)

These are the details of my project:

  • Aim: Illuminate a time-lapse camera with manually-synchronised illumination.
  • Current setup:
    • A Technaxx TX-164 camera that takes a photo every 5 minutes
    • Illumination with a cheap, 24-Volt strip of COB LEDs of the type people use to backlight rooms, kitchens, wardrobes, etc.
    • The LEDs are ON throught the week, which I would like to avoid both because of the light and because of the heat they dissipate.
  • My idea of the future setup:
    • A manual switch or button to initiate the sequence of illumination.
    • An Arduino Uno R3 (or maybe something smaller/cheaper?) to program the sequence.
    • A white-only LED strip that emits as little heat as possible.

Specific questions:

  • Which type of LEDs should I get? I clearly do not need "addressable" LEDs, as I am going to use them together - the number is just to get more light. But when I try to find ideas for this, I can only find (naturally, I guess) examples of addressable LEDs. If I use non-addressable LEDs, what can you recommend to control the timing?
  • I have considered using addressable ones and just program them to work together, but then finding white-only LEDs like this seems difficult. Many are RGBW which is a waste in my case. The type LPD8086 seems to match what I want, but I can't find suppliers that specify that type.
  • How could I initiate the sequence? Would it start when I switch the Arduino on? Or would I need to include in the program the input of a manual switch, that fires the sequence?

Things that I think will not work:

  • The built-in LED: it illuminates unevenly and glares too much.
  • Programmable plugs: most have very narrow programming options so I cannot make short cycles for a week, like I need. Those with more sophisticated programming options usually require an App and WiFi connection, and I cannot connect these devices to the local WiFi.
  • Using the camera to trigger the lights - this is a commercial camera and I have no idea what input/output systems it would have.
  • Starting from scratch and get a programmable camera connected to the Arduino. The enclosure is a slightly corrosive environment and the camera I have is sealed (IP66); I feel that an open system (even with a 3D printed case) would become a consumable.

Sorry for the length - I hope I have been clear/precise enough!
Thank you very much in advance for your thoughts.

Good start, asking questions.

Which controls what? Is the periodic illumination also going to tell the camera to takes a picture?

How accurate does the five minute period need to be?

Running 24/7 I assume?

How is this going to be powered? Do you need to account for power outrages during the period of filming?

Since you have nothing, I recommend starting with a simulation, where a single regular LED can stand in for what is eventually the real light source, and shorter time periods to get the logic correct.

Try plopping any examlke from the IDE, like "Blink" into this simulator

I wouldn't rule out addressable LEDs. They are cheap, easy to work with and hella bright. With a good power supply, no additional driving circuitry woukd be needed.

But for now, that's something that can be put off for a bit.

a7

Wow, that was fast! Thanks, alto777.
I see I have omitted some relevant details, sorry.
Let me try to fill them in:

Which controls what? Is the periodic illumination also going to tell the camera to takes a picture?

My fingers control everything :slight_smile:
The camera time-lapse is initiated by a button, which starts a 15-second countdown.
I just hope to synchronise camera and illumination manually, by pressing simultaneously the camera button and some button/switch connected to the Arduino (and a 15 second delay – but not with delay(15000) !! – in the illumination sequence).

I just have no idea how to connect a switch to start the sequence. I have had a look at some tutorials for timers but all looked more complicated than what I think I can start with (and also they required RTC -- see below).

How accurate does the five minute period need to be?

Not much, I should think - I can afford to have the lights on for 2-3 seconds before and after the picture is taken, so I have some 'buffer' of time. But this is mostly to synchronise my pressing the buttons; since I initiate the sequence by hand, I do not think I need an RTC. I am only concerned about 'drift' in the timekeeping of the two machines running in parallel with no entrainment. But as long as this is only a few milliseconds per hour, it should be fine.

Running 24/7 I assume?

Yes, every 5 minutes for a week: ~2000 frames.

How is this going to be powered? Do you need to account for power outrages during the period of filming?

The camera is powered by 16x AA batteries, but it can also be powered by a jack. I expect to power the Arduino and the LEDs with their own plugged supplies, but I would be open to ideas about using batteries (though frankly I'd first like to have this working).

Since you have nothing, I recommend starting with a simulation, where a single regular LED can stand in for what is eventually the real light source, and shorter time periods to get the logic correct.

Great!! I had no idea this existed! I will certainly start there. Thanks for the suggestion.

I wouldn't rule out addressable LEDs. They are cheap, easy to work with and hella bright. With a good power supply, no additional driving circuitry woukd be needed.

Thanks for the suggestion! I hadn't yet, but it's reassuring to know that it is not a silly idea.
Thanks again, please add more comments/suggestions/advice if you have them!

Just the time of day. In transit, reading through the tiny window.

This

is the only real issue. Even two machines that had accurate clocks would present a challenge over the total time period, unless the lights were on fairly broadly before and after the exposure.

So. Say something about the other machine, the not-Arduino that is, as I understand it, some kind of time lapse controller.

If it is built into your camera, we'd have to see if there was any way to pick up the signal and exploit it.

If you have one of those formerly expensive shutter control gizmos, it may be possible to hijack the signals it produces. Ideally, it would press as you would: focus then expose. By turning on the light(s) immediately the camera is focusing, they would be full up by the shutter open instant. Maybe.

On the other hand, if you have a simple remote control button that jacks into your camera and does focus/shutter or even just shutter, then the Arduino could be the controller for the light(s) and the camera.

If you have neither a stand-alone time lapse controller nor a remote wired button that connects to your camera you may want to consider if one or the other is within your budget. I no longer have but got a ridiculously inexpensive time lapse controller for forget which camera, it did way more than I ever needed and was a solid performer.

So now say what you already have, camera make and model and any external focus/shutter controllers.

If you play with the simulator, drag out the example called something like "blink without delay". If you are in the mood, google "Arduino blink without delay" and spend 5-10 minutes on 5-10 plausible looking articles or videos, it easy enough but you will benefit from seeing a variety of explanations.

That's 1/2 hour to 1-1/2 hours, but time not wasted if you want to get deeper into this.

On the other hand, if this is a one and done thing, you mightn't need to go too deep. It's just one of those few basic things we all like to help ppl get their brains around.

a7

Is there a problem with using your existing LED strip? Would just adding some hardware to switch it be useful?

Unless you have slightly more info about the camera, I’d put the camera into single shot mode (no time lapse)… then use the Arduino to turn the LEDs on and off / trigger the single shot on whatever timescale you desire,

Seeing IF the camera has an external trigger facility - that will make everything a lot easier in hardware, and much more flexible overall.l

Just the time of day. In transit, reading through the tiny window.

Still :slight_smile:

So. Say something about the other machine, the not-Arduino that is, as I understand it, some kind of time lapse controller.

If it is built into your camera, we'd have to see if there was any way to pick up the signal and exploit it.

It is a Technaxx TX-164: a commercial time-lapse camera designed to take 'videos' of building sites (so yes it is built into the camera). It is set to infinity focus so I simply place it at a distance I have pre-determined to be in focus for my object of interest.
This would simplify things but it has its own interface and _it is not designed to interact with other electronics so I do not think I can 'pick up the signal' in a straight-forward manner. I guess I could tamper with it, but since I am new to all this, my aim is to first set up the lighting, at a risk of time keeping drift leading to have later shots out of sync. Once I have developed the capacity to do that, if synchronicity is a problem, I can move on to sort that issue - either by trying to figure out whether the time delay is consistent (so I can simply adjust the timing) or just buying a camera suitable to connect directly to the Arduino.

If you play with the simulator, drag out the example called something like "blink without delay". If you are in the mood, google "Arduino blink without delay" and spend 5-10 minutes on 5-10 plausible looking articles or videos, it easy enough but you will benefit from seeing a variety of explanations.
That's 1/2 hour to 1-1/2 hours, but time not wasted if you want to get deeper into this.
On the other hand, if this is a one and done thing, you mightn't need to go too deep. It's just one of those few basic things we all like to help ppl get their brains around.

I would like this to be my "initiation project" so I can build other things in the future... but I would also like to start with something simple that would be working without having to invest a huge amount of time - that's why (for a change) I am asking before start experimenting :stuck_out_tongue:

Thanks,
J

Thanks, oldcurmudgeon!
Your suggestion could work, too, and I would be open to suggestions as to what hardware to use.
I thought of using Arduino because I can't seem to find anything off-the-shelf that will allow me the timing pattern I want (few seconds on, few minutes off, for 7-10 days) and I think it could be a good project to get started with building my own devices.
But if I could get something that works straight away, I'd like to try it too. Any ideas?
thanks,
J

Thanks lastchancename,
Yes, that would be ideal, but my camera (Technaxx TX-164) is not designed to interface with electronics, just the eyes and fingers of the user :slight_smile:
I have invested considerable time and effort in adapting other parts of the project for this camera (and I have 6 of them so I can run several time-lapses in parallel) so for the time being I would like to continue the project around this camera.
thanks,
J

PS - sorry everyone for not having linked the camera make/model to its website -- I thought the guidelines advised not to link to other sites.

OK, so no such affordance.

I can't do some calculations just now, but if we start with the assumption that the camera is accurate and consistent in the timing, we can figure out how long the light(s) should be up broadly covering each exposure so that at the end of the period the exposure woukd still be within the window.

An RTC will be essential, but the on,y thing we need from it is its ability to provide an accurate indication of the seconds passing, we can count them.

The RTC is very easy to attach and program, not a problem.

So the maths will show for some guesses about accuracy how long the lights need to be on; some testing might allow biasing the window if it was desirable to minimize the illumination period.

Alternately, more trouble but has to be mentioned, would be to use a small servo arranged to press the shutter button on the camera, then we back to the Arduino running the hole show.

I am surprised the camera is not friendlier and you'll forgive me if I have some doubt that there isn't a way to control it electronically. I'll look more out of curiosity around a special purpose camera than running a technical detail to ground.

a7

Agree 100%

OK, some literal back of the envelope scratching and using what I hope to be conservative estimates, I find that turning on the light(s) for 15 seconds with the exposure in the center should be enough.

The DT3231, a genuine one anyway, promises +/- 3,5 ppm accuracy. Over the 600,000 seconds which is a week, this means that clock might be out +/- 2 seconds.

The camera is made in Germany, almost as good as Switzerland, and it is on the spendy side, too, so I think +/- 5 seconds for its timekeeping over the same period can be expected.

If we knew either was slow or fast, the window could be smaller.

And I hope I am stating the obvious: when the money shoot comes, this has been thoroughly tested in something like the final deployment scenario for long enough to see that the timing will work out.

a7

But could it be used for synchronising the led strip illumination? Can you describe how it operates for us? For example, does it come on just before the frame is captured and off just after, does it come on only at night?

You could enable the built-in led, but cover it with a sensor which is connected to a circuit which triggers the external LEDs.

If the internal LED can be set to be used day and night, maybe no Arduino is needed. A sensor could trigger the external LEDs directly.

If the internal led is night-time only, the Arduino could use this to re-synchronise itself each night, so that it can better predict when frames will be taken during the day.

  1. Put the camera in a light-tight box.
  2. Open the camera lens in the light-tight box.
  3. Trigger the lights.
  4. Open the light-tight box (without moving it)
  5. Close the box when your exposure time is complete.

(we've all made a pinhole camera, and see their brilliant simplicity)

Thanks again, alto777.
OK then, I will start with simulations with the RTC module and see how far I get.
I will also double check that the camera cannot accept external electronic control. Who knows. The idea of doing a manual time lapse by pressing the button "with" the Arduino is feasible, I guess, but I'd rather not add mechanical parts for the time being.

That's a great idea. I'd need to change a few things, but indeed the LED switches on if the light is very low, and it seems to me that this triggers a photometer to determine the exposure, so it probably does it BEFORE the shoot.
If I use reflective material so that no light from the built-in LED (or very little) gets to the lens, but instead to a twilight switch, I think likely that the photometer would hold the shot until my LED strips would switch on. That would be quite fast and cheap to test.
However, all the daylight/twilight detector switches I found (e.g. this one) will switch ON when there is light.
I would need to add some type of relay that 'inverts' this behaviour. Would that be a "normally-closed", "one-channel" relay"? (I'm new to electronics :grimacing:)
Is this what is combined here, maybe? (And if it is, would it be possible to get rid of the green and red LEDs?)
Any ideas would be greatly appreciated!

This is a larger drift than what I had imagined, but it would still be acceptable. I plan to do many time lapses so yes, there will be plenty of opportunities to test things thoroughly!
Thanks again!

I was being very conservative. Which is why testing this method might allow a shorter on period.

Haha, welcome to computer programming. Things that are upside down or backwards can always be fixed by writing the correct logic. Sometimes a bit of maths is needed, but trust us, there is no need to worry about fixing things up external to the microprocessor.

a7

Did you mean to say the opposite of that?

It would not need to be a relay.

I would suggest trying a light-dependant resistor (LDR), fitted close to the built-in LED and covered so that daylight cannot reach it, only the light from the built-in led. Use the LDR in combination with a fixed resistor (e.g. 10K) to form a voltage divider. Feed the output voltage of the divider into one input of a comparator, and feed the output of a pot into the other input. This pot will allow you to adjust the level of light that triggers the circuit. Connect the output of the comparator to the gate of a high-power MOSFET which controls the current to the led strip.

The user manual is here

It appears in LED mode (page 8) the camera will be in black and white mode, which may be a problem. There seems to be no defined way to interface the camera to an external device.