Help with triggering a camera with light? - Page 1
Forum section: electronics / projects

author: peps1
author_rank: Regular Contributor
timestamp: July 12, 2021, 08:44:10 pm
content: Hello, was wondering if I could pick people's brains for how best to approach a project I would like to do.Basically, I have a camera trigger set up for taking photos of 3D print time-lapses using a physical switch that the printer will make contact with and take a photo on each layer change resulting in this:https://youtu.be/vDxkmtva1XwBut I would like to adapt this to work with a resin printer and have it trigger when an LDR detects the light exposing each layer. And wonder how to go about this with minimal components.

author: magic
author_rank: Super Contributor
timestamp: July 13, 2021, 05:11:39 am
content: How long is the light, how bright is the light, how long is the dark, how dark is the dark?

author: james_s
author_rank: Super Contributor
timestamp: July 13, 2021, 06:00:05 am
content: A phototransistor ought to work, you might even be able to just wire it directly across the trigger for the camera.If you need to trigger based on a specific light level and want flexibility you could do this cheaply with a BH1750 and an arduino nano, it's overkill but won't cost much over $5, it's very simple and you can tweak the behavior all you want just by altering the code.

author: ledtester
author_rank: Super Contributor
timestamp: July 13, 2021, 06:04:48 am
content: Just get one of these:https://youtu.be/KWZPJ-bkvEAIt might just be a phototransistor.

author: Terry Bites
author_rank: Super Contributor
timestamp: July 13, 2021, 05:12:11 pm
content: Put slotted photo interupters on the spools to monitor their motion.

author: AndyC_772
author_rank: Super Contributor
timestamp: July 13, 2021, 06:29:52 pm
content: The UV light in a resin printer isn't visible through the LCD and the resin at the bottom of the tank, so you'd have to install your sensor somewhere beneath these without blocking the light path.As do that, personally I'd connect directly to the UV LED power or even the Z axis motor instead, rather than using a light sensor.

author: james_s
author_rank: Super Contributor
timestamp: July 13, 2021, 08:26:31 pm
content: I would think there would be enough stray light to trigger a strategically placed sensor somewhere off to the side of the source. Connecting directly to the signal that is switching on the light would be preferable but I was operating off of the assumption that the OP couldn't or didn't want to tap into anything directly.

author: ledtester
author_rank: Super Contributor
timestamp: July 13, 2021, 08:47:04 pm
content: From this video they just stick it somewhere inside the printer:Resin 3D Printer Time Lapse | How to Make One With LDR Sensor and UV Light-https://youtu.be/u0XijsT_rPc?t=7m40sat 7:40. Earlier the video explains how you just need to make a connection between the TIP+RING and SHIELD to snap a pic which is why I think just a photo-transistor should work.If you only have an LDR, something simple like this might work:

author: peps1
author_rank: Regular Contributor
timestamp: July 14, 2021, 09:42:13 am
content: Thank you all for the input! Sincerely appreciated.Quote from: magic on July 13, 2021, 05:11:39 am2.7 seconds of light, fairly bright as it's a reasonably large (maybe 40) LED array, and the dark is 10-15 seconds and fairly dark (would be inside an enclosure with just some fan vents to let in light.Quote from: james_s on July 13, 2021, 06:00:05 amThanks will test with just a LDR and the trigger circuit, and if that has no joy will dig out the box of Arduinos!Quote from: ledtester on July 13, 2021, 06:04:48 amUnfortunately, that's not compatible with my camera trigger.Quote from: AndyC_772 on July 13, 2021, 06:29:52 pmThere is a lot of UV light bleed into the enclosure so don't think that will be an issue. thought about the Z motor but as I can to catch the shot when it's not moving that makes it a little more problematic. tapping into the LED PSU with a relay could be an idea.Quote from: ledtester on July 13, 2021, 08:47:04 pmYes, the trigger just needs to be a way to make the connection through the resistors the camera is seeing, removing the value for the autofocus and leaving just the shutter control I have this cuirt that will trigger the camera when the "switch" is closed, so the crux is really the best way to register open and closed state with the UV light, Dark=open, light=closed (or guess it could be the other way round as long as there is a change in staate

author: magic
author_rank: Super Contributor
timestamp: July 14, 2021, 10:03:23 am
content: 2 seconds in good light is an eternity, so no need to worry about detection delays or camera shutter lag too much.Replacing the switch with a phototransistor may work, but external light needs to be prevented from triggering the transistor.Alternatively, replace the switch with an optocoupler like the common PC817 and connect the primary of the coupler (with a suitable resistor) in parallel with the LEDs, or otherwise to receive power when the LEDs come up. This solution has the advantage of total immunity to other light sources.In each case, the camera will see shutter release pressed for as long as there is light. If it needs to be a short pulse instead, some additional circuitry will be necessary.

author: peps1
author_rank: Regular Contributor
timestamp: July 14, 2021, 10:16:36 am
content: Quote from: magic on July 14, 2021, 10:03:23 amExcellent, I will try the phototransistor first, as its less workBut as I need to order one in I will grab a PC817 (have plenty of uses for them in audio applications if they end up not being used in this project. Is there anything I should look for in the phototransistor to give me the best shot of it working?

author: StillTrying
author_rank: Super Contributor
timestamp: July 14, 2021, 05:10:28 pm
content: "Is there anything I should look for in the phototransistor to give me the best shot of it working?"Make sure you get a visible light phototransistor, not an IR black one.Guessing by that 2.2k resistor the current through the switch won't be more than about 1.5mA so almost any phototransistor should do.Whether you easily find somewhere to give a 0mA to 1.5mA collector current would be a different problem.

author: peps1
author_rank: Regular Contributor
timestamp: July 17, 2021, 07:57:38 pm
content: OK, I got a TEPT4400 as it covers the visible range and over the 405nm the LED array is putting out, and it works.... the only issue is it's got to get right up against the light to trigger.Can I reduce one of the resistor values to make it more sensitive to light and give me better placement options?https://www.farnell.com/datasheets/2050638.pdf

author: magic
author_rank: Super Contributor
timestamp: July 17, 2021, 08:38:54 pm
content: How did you come up with this resistor network and do you know how the camera senses it?As for obvious solutions, it may work if you add 2N3904 or some other small NPN to the phototransistor in Darlington configuration.

author: peps1
author_rank: Regular Contributor
timestamp: July 17, 2021, 08:47:40 pm
content: Quote from: magic on July 17, 2021, 08:38:54 pmGood questionI got the circuit from this website:http://www.doc-diy.net/photo/remote_pinout/#lumixAnd modified it to omit the focus control as I'm using manual mode and, at the time just needed it to work with a microswitch.

author: StillTrying
author_rank: Super Contributor
timestamp: July 17, 2021, 10:08:33 pm
content: Quote from: peps1 on July 17, 2021, 07:57:38 pmYou could replace the phototransistor with a normal NPN 100mA transistor, and then connect the phototransistor between the NPN's base and the right side of the 2k2. That would make it very light sensitive, probably would need a ~4k7 between the NPN's base-emitter to keep the sensitivity down.

author: peps1
author_rank: Regular Contributor
timestamp: July 17, 2021, 11:58:11 pm
content: Quote from: magic on July 17, 2021, 08:38:54 pmthat's not working at all for me? have the Emitter of the phototransistor going to the base of the 2N3904, the Collectors tied together, and connecting the resistor circuit to the 2N3904's Emitter and Collector.....not triggering at all.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 12:13:23 am
content: Quote from: StillTrying on July 17, 2021, 10:08:33 pmNo joy with this can get it to trigger at all.....seem like whenever I add a transistor it stops working

author: StillTrying
author_rank: Super Contributor
timestamp: July 18, 2021, 12:34:36 am
content: It's strange that you can't get the extra transistors version to work, they should. Can you measure something such as the NPN's emitter collector voltage to see if it's stuck on.You don't need the printer light for these rough switching tests a torch would do.I still think ~4k7 base to emitter is a good starting point, 0.15mA from the phototransistor would turn the NPN's base on.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 01:09:48 am
content: Can I just check im following what you are saying regards how to wire it up?

author: StillTrying
author_rank: Super Contributor
timestamp: July 18, 2021, 01:19:45 am
content: No, the ~4k7 goes base to emitter on the NPN to keep it off until 0.15mA of photo current flows.If it doesn't work with phototransistor's collector connected to the NPN's collector, connect the phototransistor's collector to the other end of the 2k2 for a bit more voltage.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 01:37:33 am
content: Quote from: StillTrying on July 18, 2021, 01:19:45 amOK, move the resistor across the transistors E&B, not triggering.Quote from: StillTrying on July 18, 2021, 01:19:45 amWhen I do this, it will trigger but, take MUCH more light, has to be right up against my torch to trigger, so less sensitive than just the phototransistor' on its own.(thank you for the help by the way, it is appreciated, and 100% this is all user error!)

author: magic
author_rank: Super Contributor
timestamp: July 18, 2021, 05:16:10 am
content: I said it "may" workIt probably is about the forward voltage of the switch. A transistor or phototransistor alone can saturate and pull its collector down to 200mV or perhaps less above the emitter. A Darlington pair can never saturate to less than some 700mV at room temperature. It seems the camera doesn't like that.What are the voltages across each resistor when nothing happens and when the lower resistor is shorted to trigger shutter release?Speaking of obvious solutions again, it would likely help to power the phototransistor's collector from an external source (even 1.5V will do) - negative to the (-) terminal on the plug and positive to the collector. Then the emitter goes to the base of an NPN as before.If this doesn't help and sensitivity is still bad, then you know that it's not about saturation voltage and you need to increase the 4k7 to something larger.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 07:19:53 am
content: Quote from: magic on July 18, 2021, 05:16:10 amHey, I learn more when things don't work than when they do!Quote from: magic on July 18, 2021, 05:16:10 amKeep in mind I'm using a Fluke 101 meter as I'm poor, but I'm getting 1.4v at the camera 1.3V after the resistors (switch open) 0v (switch closed).

author: StillTrying
author_rank: Super Contributor
timestamp: July 18, 2021, 10:21:47 am
content: Just increase the 4k7 up to about 220k and it should be over 10 X more light sensitive. It's just to keep the NPN off with a bit of ambient light on the phototransistor, you might be able to go right up to 1 or 2 Meg if the ambient light is low enough.It's difficult to guess exact values because everything is non linear, and your phototransistor looks a bit less sensitive than I was expecting.https://www.vishay.com/docs/81341/tept4400.pdf

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 10:24:56 am
content: Quote from: StillTrying on July 18, 2021, 10:21:47 amThink you, I will breadboard it up with a big trim pot and see how it goes!(thank you for all the help)Just to double-check....like this?

author: StillTrying
author_rank: Super Contributor
timestamp: July 18, 2021, 10:55:31 am
content: Yes, but you might have to move the collector of the phototransistor to the other side of the 2k2.Because when the NPN is on/closed there's still 0.7V across its emitter-collector, with the photo's collector moved directly to the + the 0.7V should drop to less then 0.1V.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 10:57:49 am
content: Thank you, that makes sense.

author: peps1
author_rank: Regular Contributor
timestamp: July 18, 2021, 11:48:40 pm
content: Quote from: StillTrying on July 18, 2021, 10:55:31 amNo joy with using or bypassing the 2K2 resistor on the phototransistor or with a resistor up to 2M between the Base and emitter of the transistor.....100% sure I'm doing something really stupid on my end at this point!

author: magic
author_rank: Super Contributor
timestamp: July 19, 2021, 06:13:41 am
content: Quote from: peps1 on July 18, 2021, 07:19:53 amIs this supposed to mean that the Fluke has at best 0.1V resolution on DC volts? Well, that wouldn't be my first choice of a budget DMM for breadboard circuits...I gather it all means that the test current from the camera is so low that when the switch around 39kΩ is closed, there is less than 100mV voltage drop across the remaining 2.2kΩ resistor. If the camera requires this drop to be less than 0.7V then you have got a problem. No Darlington configuration of any sort is going to work.What may possibly work is to go back to just two resistors and then connect the phototransistor right across the camera terminals, bypassing all resistors. Or experiment with smaller values instead of 2k2.If the Panasonic guys have any brain, the camera should not be harmed even by a short between the two terminals. Indeed, such short often occurs during insertion of that kind of jack into the socket or it could happen due to cable damage or similar reasons. And your phototransistor doesn't seem capable of conducting much current anyway.

author: peps1
author_rank: Regular Contributor
timestamp: July 19, 2021, 07:11:33 am
content: Quote from: magic on July 19, 2021, 06:13:41 amYes, that's what I mean...its not my choice I really only have it as a backup in my kit bag, and only really get uses as a continuity tester, would be interested in what you pick would be as my Extech EX330 just died after many years.Quote from: magic on July 19, 2021, 06:13:41 amThank you for explaining this, my experience with Darlington configuration has been limited to audio applications.Quote from: magic on July 19, 2021, 06:13:41 amI like this idea, fewer parts and just swapping resistor value, now we are at my level of skill!Quote from: magic on July 19, 2021, 06:13:41 amOh, I'm 100% sure I shotted them together when working on the first switch as my previous experience had been with Canon cameras that just use a short to trigger.Thank you so much for taking the time to help me out with this, its sincerely appreciated and teaching me a fair bit too!

author: StillTrying
author_rank: Super Contributor
timestamp: July 26, 2021, 11:36:59 am
content: I can't think of a reason why the photo and NPN versions don't work, a few 100mV across the phototransistor and 2k2 should be enough to provide base current into the NPN, I would think it's quite likely a bad connection on the breadboard.

author: magic
author_rank: Super Contributor
timestamp: July 26, 2021, 12:29:27 pm
content: The 100mV across the photo plus 600mV across the NPN base-emitter junction may not be low enough for the camera to trigger.I suspect this is why.

author: StillTrying
author_rank: Super Contributor
timestamp: July 26, 2021, 01:09:16 pm
content: In Reply#23 he gives the voltage across the +&- contacts as 1.4V when the switch is open, which is 34uA through the resistors when the switch is open, it would have to be >320uA through the 2k2 when the switch is closed to give enough voltage left for the base and photo.If he gave us another voltage such as the voltage at the +&- contacts when the switch is closed we could work it out.Of course a 1.5V battery would do, or possibly even using the +&-'s own 1.4V to recharge a small capacitor ready for the next trigger.

author: peps1
author_rank: Regular Contributor
timestamp: July 26, 2021, 04:00:28 pm
content: Quote from: StillTrying on July 26, 2021, 11:36:59 amI thought this too so moved the circuit around the breadboard to a few locations and even tried different components and got the same result.Quote from: StillTrying on July 26, 2021, 01:09:16 pmMy meter was showing 0v with the switch closed. but think this is due to the limitations of the Fluke 101 I have been using the last couple of weeks, new meter should be here today so will report back.Did find omitting the resistors increased sensitivity with regards to the range it would trigger, but had the side effect of not triggering if the light was too close/bright.

author: magic
author_rank: Super Contributor
timestamp: July 26, 2021, 09:33:43 pm
content: Well, it obviously looks like your camera accepts a narrow range of voltages and not too close to zero.Not sure if there is much more you can do without using additional power supply and more complexity.Pick some series resistor value that works best with the light you haveYou could try some Schottky diode too but it may not work at all or only prefocus.

author: peps1
author_rank: Regular Contributor
timestamp: July 26, 2021, 09:37:06 pm
content: Yeah, think that's my best option, 98% sure I can get something working in the range I have to work with, been testing with a torch, so the real test comes tonight when I try with the acctual UV array! Figers crossed...And, you guys have been amazingly helpful, sincerely, thank you!