Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: How to boost pin voltage to cope with voltahe drop due to wire length?

  1. #1

    How to boost pin voltage to cope with voltahe drop due to wire length?

    Hello,

    I have a project where I am using a Teensy 3.5 to set a pin (momentarily) to HIGH to trigger a camera. The challenge is that the camera is about 25 feet away so the voltage received by the camera becomes too low.

    How can I boost the voltage to say 8 or 10V so that I can get 5v at the camera? I tried voltage step-up regulators but they suffer from an unacceptable delay in boosting the voltage.

    Any help is appreciated.

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,915
    Simple solution is a transistor, more complex would be a op amp.

    Note you Teensy only produces 3.3 volts so even without wire it wouldn't make the 5V. That said it should be able to drive 3.3V happily down 25 feet of wire unless there is a serious load at the far end. Depending on how all this is wired and where the power is may actually be easier to put the transistor at the far end and use 3.3V signals.

    And a step up regulator isn't really the right thing to connect to a 3.3V pin only rated to provide 10-20mA., unless you meant that you had wired to the enable for a 5V powered PSU

  3. #3
    Thank you very much @GremlinWrangler.

    BTW, the camera will trigger fine if I can get 3.3V to it. I forgot to add that I measured the voltage from the Teensy connected to a 25ft wire and it was only 1.3 VDC at the camera end.

    Can you refer me on how to use an "op amp"? Do I use it on the Teensy side or the camera side? I have read about them but there is a lot of stuff!

    Would this work:

    https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
    Last edited by jimmie; 06-15-2017 at 10:39 AM.

  4. #4
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,915
    Is that 1.3V with the camera in circuit, or open? If it's with the camera on the end that means you have more voltage drop in the wire than in the camera, which suggests a very high current flow and something amiss somewhere.

    The linked device comes with no suggestion for how it's designed, but probably has de-coupling caps.
    https://en.wikipedia.org/wiki/Decoupling_capacitor
    Which will block DC and make getting this circuit working a problem. You would want to be using the amp in DC mode, but don't care about things like bias and linearity needed by that audio amp so would be driving it with very high gain as a comparator,
    https://en.wikipedia.org/wiki/Comparator
    Comparing the Teensy output to say 1.5V and getting a rail to rail swing.

    That said all of this is overkill unless trying to get really fast pulses, and most likely a couple of resistors and a transistor will do the job
    https://learn.sparkfun.com/tutorials...ght-bar-hookup where your camera goes in place of the LED
    gives one solution but for this a bog standard NPN transistor (whatever you have to hand or can get locally) will do the job with something like a 4K resistor between base and the pin.
    Rig it up at first to drive an LED + ~470ohm LED from 5V to make sure it works.
    Then you need to find out how your camera actually triggers.

    If it reads a voltage to trigger than you just leave the LED in place and wire the camera at the LED/transistor junction which will be swinging 4.5V to close to 0V.
    If it does what I'm suspecting it does and it measures the current through it to trigger then you put it in place of the LED/resistor pair with one wire to 5V and the return to the transistor (not ground) and the transistor works as a switch to allow current to flow. If your rig has power supple that doesn't allow this then you need a PNP transistor on the 5V supply and a slightly more complex base circuit to turn it on.

    May require a read of the manual for how it is intended to be triggered (current or voltage).

  5. #5
    Thank you @GremlinWrangler for your time. I will try your recommendation.

    If you would have the time, here is a link for the camera wiring which is on page 35.

    http://www.ptgrey.com/support/downloads/10264/

    Thanks again.

  6. #6
    Hello @GremlinWrangler

    Can something like this be used?


    http://www.ebay.com/itm/AD623-Progra...3D401305994647


    How would it be wired?

    Thanks in advance.

  7. #7
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,915
    The instrumentation amp from Ebay would be an option but somewhat overkill for this, but does appear to be DC passing, single rail supply and VCC goes high enough to be useful. In the absence of any documentation or other information they can probably be made to work.

    The camera circuit diagrams help make sense of this since it's showing the optoisolator LED and voltage drop components and indicate that the aim here isn't the voltage on the pin, but a drive circuit capable of pushing a reasonably serious amount of mA down the wire and back. Also shows the minimal voltage as 2.6, which is useful in roughing this out, as is the 30V Vmax.

    The opto isolation also makes this much easier since you don't have to worry about matching grounds or anything clever so single transistor would do the job.

    In fact as long as you are not also trying to use the output the quick and ugly method to get this working is to connect the opto In pin to 5V and the opto return to your pin. With the pin high it will be at 3.3, so 1.7V across the wires+camera which will be too low, and with far to little current to trigger, with pin low you will have 5V across the wire plus camera and hopefully enough current capacity to trip it. Note trick shouldn't be done with the more sensative T3.6 and you will be pushing the current limits of the pin but may be good enough. You will need to invert your shutter logic since it triggers on a output low.

    Before doing this it might be interesting to put 5V on the camera and directly measure the current flow since that would provide a warning sign before your Teensy pin driver blows up. In my read of the manual it seemed a bit vague on the actual current flow through the LED inside the camera.

  8. #8
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    Another option is to use a RS485 transmitter on one end and a RS485 receiver on the other end. Very resistant to EMI, cabling is cheap (ethernet or like twisted wire) and breakout boards are readily available.

  9. #9
    Thank you @Constantin, that indeed is probably the best way to do it. I appreciate it.

  10. #10
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,204
    jimmy, you could also put a mosfet at the camera button using the camera's power on its base, and using only the MCU line as a "trigger" signal, then you wouldnt have to worry about the "current"

  11. #11
    Thank you @tonton81. Can you please send me which Mosfet and a simple circuit as I have never used it before.

    Thanks in advance.

  12. #12
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,204
    simple logic N mosfet usually, with a 10k ohm resistor between source and gate

    the only 2 i use:

    RFP30N06LE for N-channel (low side switching)
    FQP27P06 for P-channel (high side switching)
    you need to check your camera button if you need to ground it or apply voltage to activate it.

    both trigger on a signal on the gate directly from an MCU pin.
    you should also use a 100ohm resistor in SERIES, near the mcu pin, to prevent ringing that could occur over that distance..

    N-MOSFET:
    Click image for larger version. 

Name:	rfp30n06le-arduino-solenoid.png 
Views:	107 
Size:	69.0 KB 
ID:	10832

    P-MOSFET:
    Click image for larger version. 

Name:	main-qimg-5a3f7c1892e2fb60e5e567ba5e942203.png 
Views:	660 
Size:	81.5 KB 
ID:	10833
    Last edited by tonton81; 06-17-2017 at 07:12 PM.

  13. #13
    Thank you very much @tonton81.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •