Circuit design, lost on what's probably simple transistor logic - Page 1
Forum section: electronics / beginners

author: blazini36
author_rank: Regular Contributor
timestamp: December 03, 2018, 10:14:09 pm
content: Newbie here.I've built a camera setup for a specific purpose. It uses 2 Machine Vision cameras with independent trigger and strobe control. The strobes are custom made with some high power LEDs. The cameras strobe control output is the "open drain" of an optocoupler. In practice the strobe control pin of the camera sinks to ground. I've been using off the shelf Meanwell AC-DC LED drivers with a DC SSR controlling the drivers output side and the camera strobe pin connected to the V- side of the SSR with the V+ side of the SSR connected to the 24v+ non-switched output of the power supply. This has worked fine for some time but I want to clean up the whole design and integrate things a little better.I found some PCB mountable Meanwell DC-DC constant current LED drivers (LDH-45B-1050) that put out enough juice to handle the strobes and they are triggerable. The problem is the logic needs to be inverted on the PCB. The drivers have PWM and an analog pin for control. These are also usable as "remote on/off" pins as per the datasheet. If these pins are left floating the driver's output is ON. If the "PWM_DIM" pin is grounded the driver will shut the output off. If that pin is grounded and the "Analog_DIM" pin is brought up to ~1.3v the driver will turn on. SO basically the problem is that the Driver is normally ON when it should be OFF, and the available 0v signal source from the camera to turn it on is what would turn it off.I came up with this circuit to invert that logic and adds a small 5v switching regulator for a 5v output and the PCBs logic. I'm no board level wiz and I'm a little lost working with transistors for some reason so I'm not sure if this was the best way to do this. I've tested this circuit with a single driver and it works, I'm not sure where I came up with the diode on the base of the BJT but it doesn't work otherwise. When I went to route the PCB I realized it is not going to work as is since the inversion is dependent on the camera's remote output pulling down the 5v line and since it will pull down the whole 5v line as it is now it would trigger the other driver attached to the same 5v line, not to mention probably make the 5v output useless. I'm looking for help on how to handle the camera's remote (strobe) pin to the drivers control pinAttached is an image of the schematic. I put an orange box around the 5v pullup that I'm almost certainly doing wrong. I'm open to using an opto, bjt's, mosfets, whatever works the best and has a fast response. I try to minimize the delay since that would require the camera's exposure time to be longer than necessary.

author: Wimberleytech
author_rank: Super Contributor
timestamp: December 04, 2018, 02:14:52 am
content: Seems to me, you have tied "RemoteX" to a hard 5V. There is no control as a result. The 5V connection should be pulled high via a resistor (1k, 2k, 10k?). What is driving the RemoteX pins?

author: blazini36
author_rank: Regular Contributor
timestamp: December 04, 2018, 03:43:19 am
content: Quote from: Wimberleytech on December 04, 2018, 02:14:52 amCode:The cameras strobe control output is the "open drain" of an optocoupler. In practice the strobe control pin of the camera sinks to ground.This is the external "remote" connection

author: blazini36
author_rank: Regular Contributor
timestamp: December 04, 2018, 05:17:03 am
content: My schematic skills aren't the greatest but I've breadboarded this and it seems to work well. I swapped out the BJTs with N-channel mosfets. Still open to improvements or just flat out tell me I'm doing it wrong.

author: Wimberleytech
author_rank: Super Contributor
timestamp: December 04, 2018, 02:36:00 pm
content: Quote from: blazini36 on December 04, 2018, 05:17:03 amThose are enhancement-mode n-ch mosfets. As connected, they never turn on (always off). There IS a current path, however--it is through the internal drain-source diode. That is why it works. Eliminate the mosfets. Just short across where drain and source are connected.

author: blazini36
author_rank: Regular Contributor
timestamp: December 04, 2018, 04:12:11 pm
content: Actually I made a pretty bonehead mistake there. I tried dropping the mosfets like you suggested with no luck, then I reaslized I was testing with a 2N7000 (TO-92) and when I updated the schematic I used a SMD 2N7002 because the board will use the SMDs. I didn't realize that the source and gate pins swapped. Hopefully this makes a little more sense. I'm using the 2N7000 because it's what I have on hand to test. I have a box of assorted transistors coming in today so if there is a better alternative I'm all ears but so far this is what I've gotten to work.Updated schematic.

author: Wimberleytech
author_rank: Super Contributor
timestamp: December 04, 2018, 04:23:07 pm
content: Quote from: blazini36 on December 04, 2018, 04:12:11 pmBetter. However, when the mosfet is off, there is nothing determining the potential on PWM pin. It needs a resistor pullup to 5V.

author: blazini36
author_rank: Regular Contributor
timestamp: December 04, 2018, 05:15:29 pm
content: Any Better?

author: Wimberleytech
author_rank: Super Contributor
timestamp: December 04, 2018, 05:56:25 pm
content: Quote from: blazini36 on December 04, 2018, 05:15:29 pmThat oughta do it!!

author: blazini36
author_rank: Regular Contributor
timestamp: December 04, 2018, 07:46:27 pm
content: Thanks for the help bud.