Author Topic: Help with troubleshooting simple transistor switch circuit  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Help with troubleshooting simple transistor switch circuit
« on: January 16, 2020, 07:22:14 pm »


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, some cameras 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!
« Last Edit: January 16, 2020, 07:24:40 pm by yaun »
 

Offline GerryR

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #1 on: January 16, 2020, 08:52:26 pm »
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).
Still learning; good judgment comes from experience, which comes from bad judgment!!
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #2 on: January 16, 2020, 08:54:50 pm »
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)?
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #3 on: January 16, 2020, 09:42:07 pm »
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).

Base to ground resistor does not change the behaviour described. I tried a trimpot from 0-20k.

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)?

  • Measured 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
« Last Edit: January 16, 2020, 09:44:20 pm by yaun »
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #4 on: January 16, 2020, 09:49:01 pm »


  • Measured 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

Tie a 10k resistor from the collector to 5V and run the test again.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7189
  • Country: pl
Re: Help with troubleshooting simple transistor switch circuit
« Reply #5 on: January 16, 2020, 10:11:59 pm »
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? :wtf:

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?
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #6 on: January 16, 2020, 10:24:56 pm »
Tie a 10k resistor from the collector to 5V and run the test again.

Now vce is 5v.

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? :wtf:

That is what the device expects essentially: short tip to sleeve.

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?

Official devices are a passive switch afaik, however there are battery operated devices that are transistor based like http://www.pclix.com

My project is part of a larger design to actuate the shutter based on other parameters, and solid-state relays are far too slow.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7189
  • Country: pl
Re: Help with troubleshooting simple transistor switch circuit
« Reply #7 on: January 16, 2020, 10:55:00 pm »
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.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #8 on: January 16, 2020, 11:01:06 pm »

The pullup seems like a legit solution, though being pedantic I would pull to 3.3V rather than 5V.

Fair 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.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7189
  • Country: pl
Re: Help with troubleshooting simple transistor switch circuit
« Reply #9 on: January 16, 2020, 11:09:06 pm »
Well, there is still something that defies any reason here. That grounding the PSU makes a difference :scared:

BTW, what if you set the DMM to mA/µA range and short the camera with that? How much current does it pull from there?
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #10 on: January 17, 2020, 12:47:43 am »
BTW, what if you set the DMM to mA/µA range and short the camera with that? How much current does it pull from there?

200ma 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).
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #11 on: January 17, 2020, 12:49:40 am »
So the transistor was somewhat leaky and passed the camera's current to ground even when off.

I'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.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7189
  • Country: pl
Re: Help with troubleshooting simple transistor switch circuit
« Reply #12 on: January 17, 2020, 08:18:15 am »
200 or 250 mA :wtf:

I'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.
 

Offline GerryR

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #13 on: January 17, 2020, 11:50:31 am »
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.
Still learning; good judgment comes from experience, which comes from bad judgment!!
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #14 on: January 17, 2020, 02:52:22 pm »
200 or 250 mA :wtf:

I'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.

I'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.
 

Offline yaunTopic starter

  • Newbie
  • Posts: 7
  • Country: us
Re: Help with troubleshooting simple transistor switch circuit
« Reply #15 on: January 17, 2020, 02:55:09 pm »
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.

tip 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf