Help with troubleshooting simple transistor switch circuit - Page 1
Forum section: electronics / beginners

author: yaun
author_rank: Newbie
timestamp: January 16, 2020, 07:22:14 pm
content: I have the simple circuit above. Q1 is a 2n3904.The purpose is to actuate the shutter on a camera's remote shutter input. Assume that pin D11 is set to logic LOW.The thing I'm curious about here is if I power the arduino via USB then I get ~30mv vce (multimeter attached to vce).If I power the arduino with a power brick then I get 1.5v vce, and this seems very strange to me. Notably,somecameras throw an error if they are plugged in during this state.If I am powering it with the brick and then ground the circuit to USB (connected to a hub) ground, then vce goes back down to 30mv or so.I don't understand what is happening here, and I'm unsure of how to process what is happening here. I could use some help troubleshooting this or troubleshooting my assumption that this is erroneous behaviour.Thank you!

author: GerryR
author_rank: Frequent Contributor
timestamp: January 16, 2020, 08:52:26 pm
content: I would like to know what the actual load is, but the first thing to do is to tie a 10k - 20k resistor from the base to ground. The Arduino considers .8 V or less as ground (digital Lo).

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 16, 2020, 08:54:50 pm
content: What is the "measured" (not assumed) state of D11 during both conditions?Is the camera plugged in during this test?What kind of load does the camera present to this input (your output)?

author: yaun
author_rank: Newbie
timestamp: January 16, 2020, 09:42:07 pm
content: Quote from: GerryR on January 16, 2020, 08:52:26 pmBase to ground resistor does not change the behaviour described. I tried a trimpot from 0-20k.Quote from: Wimberleytech on January 16, 2020, 08:54:50 pmMeasured state of D11 is 2mv, 17µa according to my meter. (this does not change in any of the conditions)Camera is not plugged in.The only thing I can measure off the camera is 3.3v from tip to sleeve

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 16, 2020, 09:49:01 pm
content: Quote from: yaun on January 16, 2020, 09:42:07 pmTie a 10k resistor from the collector to 5V and run the test again.

author: magic
author_rank: Super Contributor
timestamp: January 16, 2020, 10:11:59 pm
content: More like 3.3V if that's what the camera uses internally. Hell knows what input protection there is. Shouldn't the camera have internal pullup and expect the input to be shorted to ground by a passive switch?By the way, do you know anything about the original device which is normally supposed to connect to this jack? Does it run on batteries?

author: yaun
author_rank: Newbie
timestamp: January 16, 2020, 10:24:56 pm
content: Quote from: Wimberleytech on January 16, 2020, 09:49:01 pmNow vce is 5v.Quote from: magic on January 16, 2020, 10:11:59 pmThat is what the device expects essentially: short tip to sleeve.Quote from: magic on January 16, 2020, 10:11:59 pmOfficial devices are a passive switch afaik, however there are battery operated devices that are transistor based likehttp://www.pclix.comMy project is part of a larger design to actuate the shutter based on other parameters, and solid-state relays are far too slow.

author: magic
author_rank: Super Contributor
timestamp: January 16, 2020, 10:55:00 pm
content: So the transistor was somewhat leaky and passed the camera's current to ground even when off. Additional current from the resistor was necessary to keep the collector high. Quite surprising if you ask me, I thought typical leakage currents are in nanoamps.By the way, with such low currents it's difficult to measure anything with usual handheld DMMs because they have 1MΩ or 10MΩ between the inputs internally which passes some current too between the points you try to measure.The pullup seems like a legit solution, though being pedantic I would pull to 3.3V rather than 5V. The camera should contain similar resistor internally, but perhaps it's too high value for your circuit. You could play with it and see how high resistance you can get away with before things get wonky.

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 16, 2020, 11:01:06 pm
content: Quote from: magic on January 16, 2020, 10:55:00 pmFair enough. My goal was for him to understand that his measurements were seeing the effect of leakage or a sneak path.Your DMM comments are spot on. Whenever one encounters a measurement that defies intuition, it is necessary to model the ENTIRE circuit as accurately as possible--the DMM load impedance as you say.

author: magic
author_rank: Super Contributor
timestamp: January 16, 2020, 11:09:06 pm
content: Well, there is still something that defies any reason here. That grounding the PSU makes a differenceBTW, what if you set the DMM to mA/µA range and short the camera with that? How much current does it pull from there?

author: yaun
author_rank: Newbie
timestamp: January 17, 2020, 12:47:43 am
content: Quote from: magic on January 16, 2020, 11:09:06 pm200ma for the specific camera in question.I've tested a variety of cameras and they vary between 50µa and 250ma. Most at 3.3v and one at 5v (not surprising I suppose).

author: yaun
author_rank: Newbie
timestamp: January 17, 2020, 12:49:40 am
content: Quote from: magic on January 16, 2020, 10:55:00 pmI'm not sure if I was unclear, but there is no camera in this circuit. The intention is to hook one up (and I have tested quite a few out of curiosity), but I'm concerned about the readings varying depending on the power supply.

author: magic
author_rank: Super Contributor
timestamp: January 17, 2020, 08:18:15 am
content: 200 or 250 mAI'm not sure if you have figured out those particular cameras correctly. That's quite a lot of current and quite a lot of power dissipation (>0.5W) in whatever component that outputs it (unless it's a switcher). I think you might be pulling down what is a power supply for the remote release rather than a signal line.And without anything connected to the collector, of course you are going to get low voltage there. Still not sure why the reading jumped to 1.5V without grounding.

author: GerryR
author_rank: Frequent Contributor
timestamp: January 17, 2020, 11:50:31 am
content: I think Magic hit it on the nose. From the remote release units that I have looked at, they use a "stereo-type" 3-wire plug, which would imply plus, return and signal out. Looks like you may be trying to switch the supply line to ground. Just a guess without knowing the actual camera you are using.

author: yaun
author_rank: Newbie
timestamp: January 17, 2020, 02:52:22 pm
content: Quote from: magic on January 17, 2020, 08:18:15 amI'm definitely expecting low voltage, but 1.5 seems crazy for the base current and transistor. I was expecting <20mv, which is closer to what I get when I change the grounding to the arduino.'m super stumped.

author: yaun
author_rank: Newbie
timestamp: January 17, 2020, 02:55:09 pm
content: Quote from: GerryR on January 17, 2020, 11:50:31 amtip to ground is shutter, and ring to ground is focus on all of the cameras that I have.Even if I unground the emitter from the circuit ground and only connect ce to camera or dmm, I get the same results.