Camera power circuit with a capacitor assisted shut-down

Discussion in 'The Projects Forum' started by joshzstuff, Sep 22, 2010.

  1. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Hello,

    I replaced the lithium polymer battery in my small covert surveillance camera with an AC to DC power supply to increase it's run time. I would like it to turn on/off when powered by an outside light switch.

    Please bear with me, as I'm just starting in electronics. I'm trying to make this project an educational one, so far it has been just that.

    I really appreciate any advice you can give.

    Camera behavior:

    1) can be set to turn on and activate when motion is detected when power is applied.
    2) requires that the voltage reach it's minimum ~3.4 volts fairly quickly on start-up, otherwise it becomes a "zombie" and will not function until the next power cycle.
    3) Camera saves video files to a flash card at the END of recording, so if power is cut abruptly, the recording does not finalize and video file is lost.
    4) After the voltage safely lowers, causing the camera to save the file, (below 3.1v) the camera still "operates" in a state that cannot be re-energized, thus it requires a power cycle.

    Overcoming the 'sudden power loss' problem

    I'm using a 'super capacitor' bank (5Farad) to extend the run time of the camera once power is removed. This is sufficient to bring the camera voltage down slow enough ('low voltage' engages an auto save function) for the recording to safely close . . . However . . . .

    Capacitor charging issue
    Unfortunately the 'ramp up' voltage of charging the capacitor & starting the camera together is too slow for the camera.
    The result is the camera goes into "zombie mode" and will not function (see cam behavior #2)

    I am considering 2 approaches in 3 stages that should allow the desired function of the Camera:
    Timer based or Comparator voltage based:
    [​IMG]
    I have a rough idea of how a timer circuit might look like, I'm working on a schematic and will post it later.

    Let me know if I left out any important information.
    I appreciate any advice you may have, Thanks in advance!
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,747
    759
    The problem is the cap is loading too much due to higher capacitance.

    What you need is UPS sort off thingy.

    Why don't u built a charger and use rechargeable batteries.
    Use it in online mode, this way the supply will trickle charge the battery and will operate the cam.
    Once power fails the battery will be supplying power for the appropriate time. There would be no dead time cause the battery is always connected. Once the power restores, the charger will charge the battery and after full charged it will switch to trickle charge mode. That is PSU Voltage = the battery voltage.

    This method is easier to implement and lest costly the super caps
     
  3. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Thanks for your reply R!f@@;279571

    I'm trying to keep the whole design small, so while that does limit me to a smallish power supply, this is one of the requirements of the circuit (800mA @ 7v [regulator = ~5v])
    Sorry for not listing that spec in the 1st post

    Pretty much the same issue here with with needing too large of a power supply. Whether your charging a battery or a Capacitor you still have to overcome the initial current draw of charging both at the same time:
    thus the camera must be delayed while the bat/cap is charging to sufficient voltage.
    [see Cam behavior #2]

    Diode + Resistor option
    I didn't mention this above, but I tried a similar technique using a very simple circuit containing a diode & resistor that 'choked off' the charging of the capacitor enough for the camera to start up. (by adjusting the value of resistor)
    Here are a few drawbacks to the circuit the way I had it designed:
    a) I used ~4ohms to allow the camera to start, but this means that it can take >2min for the caps/batt to hold a sufficient charge to safely close the cam.
    (I might be able to refine that a bit with more efficient diodes)
    b) any technique used MUST shut power off completely to the camera in order to be able to re-activate with power "on"
    [see 'Cam behavior #4]

    I've tried lithium ion & polymer batteries, they don't work so well:
    1) they don't like to be deep cycled often and produce undesirable cycling behavior compared to capacitors
    (think: power frequently being turned "on" and "off")
    2) The smaller capacity of the Cap over the battery actually works better in this application.
    I don't require the cam to record when there is no power, one reason is that the motion detector is prone to 'false positives' so it will record 'nothing' and waist my memory on the flash card.

    The 'diode + resistor' method is the only way I can think of to avoid the need to delay the start of the cam. For it to work though, there must be a 'power cycle' built in somewhere . . . perhaps a comparator can disconnect the cam when it senses <3.1 volts across the cap?
     
  4. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Ok, here is a "Rough" idea of a circuit that I'm thinking about.
    I emphasize "Rough" because I know it will not work the way I have it drawn, but this is just to illustrate a concept:[​IMG]

    Here is the idea:

    PJF = a depletion mode transistor (should disrupt power from CAP to the CAM when power is "ON"
    [the base/gate probably needs a resistor . . . ?]

    D3 = prevents the timer or power supply from being back-fed by any residual capacitor current

    U2 = represents a timer, (ignore the model #)
    [perhaps this can be replaced with a comparator instead?
     
  5. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    It sounds like you are using the power rail as an on/off for the camera. If so, are you sure that this approach isn't inherently problematic. Why not continously power the camera and remotely switch it on/off?
     
  6. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Your right GetDeviceInfo this does provide a challenge.
    The problem with the comparator solution is I need a reliable reference voltage to control the switching. This is one reason I'm leaning toward the timer.

    No 'constant' power available
    Unfortunately I don't have that luxury. I am powering the circuit with the same current that will switch it on so yes for electronics this is problematic, however there is no other power available for the supporting components.

    Relay solution

    My background is in electrical motor control, for example using "one shot" relays and N.O. contacts on relay timers this is not out of the ordinary. In fact I ordered some 5v & 6v relays that should arrive tomorrow or Friday, I may play with them to see if this is a possibility in this circuit.

    I suppose I could go this route if necessary, but it really adds more bulk than I would like for this circuit (the relay will be close to the size of the P.S.)

    I was hoping to use (for example, but not limited to) a 555 timer in monostable "One Shot" configuration.
    All that this timer would have to do is keep the camera out of the circuit for ~20 seconds. Then the trick is to reconnect the camera to the capacitor so it will support a safe shut down.
    (This is the purpose of the transistor in depletion mode "PJF")

    GetDeviceInfo, although I prefer solutions, it would be helpful if you listed what specific problems I may encounter with any of the designs mentioned above.

    transistor switching speed issue
    i.e. I am concerned that the switching from Q1 & PJF may not be fast enough, the resulting power fluctuation disrupting the camera. (I have a few ideas if this proves to be an issue)

    Before I can test this though, I need to set up a timer circuit.
    Here is a diagram I found:
    [​IMG]
    -Is this the best way to wire a 555 for this circuit?
    For example:
    - might need a capacitor between pin 4 (reset) and power to reset the timer after shut down?
    - perhaps a transistor would be better for switching rather than the timer output directly?
    - might I need a pull-up or pull-down resistor for the timer output?

    I'm going to be tinkering with it in a bit . . .
    Any other ideas or directions to take the circuit are appreciated.
     
  7. windoze killa

    AAC Fanatic!

    Feb 23, 2006
    605
    24
    Why not have a backup battery that powers a 555 timer. When power is lost the timer will maintain the power to the camera from the battery long enough to save the file. You could also have a charger circuit to recharge the battery when you do have power.
     
  8. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Here's an idea: Power the camera with an inverted sawtooth wave.

    Said wave peaks very quickly (theoretically instantly) and can then slowly decline.

    You could do this using a pass transistor and what is known as a capacitance multiplier. This would be sufficient to trick the camera into doing the save stuff and not becoming a zombie.

    How much current does the camera require?
     
  9. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Here is one circuit to do what I describe.

    In this example I use a 1 microfarad cap (which is 1/5,000,000th of your 5 farad array!) and it has a 50ms delay. If you were to use a 1,000 microfarad cap the delay would be almost 50 seconds. If you can get hold of a 10 microfarad cap (bordering on supercap) it would be about 8.3 minutes. I don't know how long you want to run the camera for though. If an op-amp version is to be used (I'll have a look at doing this) a tiny cap can be used.

    Note: the transistor is operating in its linear region. To drop the voltage slowly, the transistor wastes it as heat. So if you have a lot of current, it is not ideal. Also, since base current is proportional collector current the time constant does change depending on load, but only slightly.

    The logic signal could come from your lamp or whatever you want, preferably 6 volts high (5 volts works but the camera voltage may be too low, calculate Vin - 1.9V, if it's greater than the minimum camera voltage you should be ok.)

    To simulate it, copy this code, and paste it into the Import window of Falstad's Java circuit simulator (http://www.falstad.com/circuit).

    Code ( (Unknown Language)):
    1.  
    2. $ 1 5.0E-6 58.6985430941709 34 5.0 50
    3. t 336 192 336 160 1 1 -5.884375679616896 0.11562432033235417 100.0
    4. w 352 160 416 160 1
    5. R 288 160 256 160 0 0 40.0 6.0 0.0 0.0 0.5
    6. L 192 288 160 288 0 0 false 6.0 0.0
    7. t 320 224 320 192 1 1 -5.998999983192651 -0.11462430357575519 100.0
    8. w 304 192 304 160 0
    9. w 288 160 304 160 0
    10. w 304 160 320 160 0
    11. r 320 224 320 288 0 100.0
    12. c 320 288 320 352 0 1.0E-6 0.0010000168023489835
    13. w 320 352 416 352 0
    14. r 416 352 416 160 0 5.0
    15. g 320 352 320 368 0
    16. r 320 288 256 288 0 2.2
    17. d 192 288 256 288 1 0.805904783
    18.  
     
    joshzstuff likes this.
  10. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    If your powering it remotely (via wall switch), how are you turning it on?
     
  11. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    wow This thread has really taken off while I took a few minutes to get dinner!

    Let me clear one thing up:

    The purpose of the camera is surveillance/ security, so it only needs to monitor when a room/outside area is populated, thus lights are on.

    The "wall switch" is for the area/room lighting. It ALSO powers the camera. (thus the 'light switch' powers the camera.)

    I'm sorry if I did not describe this well enough to give the wrong idea about how the camera was controlled/switched.

    Having stated that, I don't have ANY exterior method of turning "on" or "off" the camera, it is meant to be automatic. (requires power "on" and "motion")

    Wow Tom, I'm going to have to do some research on the square wave control. It sounds fascinating.

    This WOULD allow me to 'control' the camera by shutting it off, however this is not my intent. (see above)
    Sorry if I gave the wrong impression, the purpose capacitor bank (two 10F super caps in series) is to discharge at the time the power (lighting) turns "off".

    I gave you a "Thanks" for your diagram and program.

    The camera uses 150mA in 'standby' (when no motion is detected) and 180mA when recording.

    Please keep the ideas coming!
     
  12. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Thank you windoze
    Correct me if I'm wrong,but I believe the timer does not need power because it only operates when the light switch is "on".
    The supporting switching circuitry however, could use a battery (e.g. a reference voltage for the comparator)

    The trick here is NOT to charge the battery when the camera boots up to avoid the original problem. (using say a timer or comparator . . . )
    This is precisely what I'm trying to do with the diagram I posted. Any help in implementing it would be appreciated.
     
  13. windoze killa

    AAC Fanatic!

    Feb 23, 2006
    605
    24
    True


    I don't want to seem to be rude (because I am not) but it seems like you are making this a lot harder than you need. Obviously I don't know your actual situation.

    Why not take power from the other side of the light switch (always live) and use the light switch to activate the camera. This way you wouldn't need batteries or caps. If you are inside the wall hooking this up then an extra length of wire shouldn't be a problem. You can permanently power your timer which can activate a relay to switch off your camera after X period.
     
  14. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    A good question windoze,
    It would be much easier to have a constant power feed.

    One reason is that I need the camera to be where the light is and not where the switch is.
    (e.g. if the switch to an outside light is located inside, I want the camera outside)
    This is not 'new construction' so I'm not opening up walls to install it.
    Otherwise I could run a dedicate 'camera circuit' everywhere I needed it.
    The good thing about it is that lights tend to be easier to 'tap' into than switches are.

    If I have a location that provides constant power I will use it, however there is also the drawback of the "false positive" issue I spoke of.
     
  15. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    The circuit I posted will hold the camera in the "on" state while the signal is on. If the on state disappears, the voltage will slowly ramp down.
     
  16. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    Tom,
    I simulated the circuit using your included code.
    I have some questions for you . . .

    I am going to build this circuit and test it on a camera
    Here are the components that I appear to need:
    Resistors
    -2.2, 5, & 100ohm
    Transistors
    - two NPN bipolar transistors (It seems like a darlington set would work also)


    Tell me if I understand you correctly, since the inverse sawtooth waves will trigger the camera "save" function your suggesting that I trigger the capacitance multiplier at the point of power "off" ?

    OR:
    Does this somehow allow the camera to "function" (in standby?) on a tiny fraction of it's required current [150/180mA]?

    Please clarify Tom

    Can you tell me where the camera would be placed in this schematic (is it being fed by the +6V)?

    Can you clarify what you mean by "delay"?
    Take the example of the 10MFD Cap:
    -Are you saying that in this case the circuit would stave off the "zombie effect" for 8.3 minutes?
    - At what point would the camera detect 'low voltage' and save the file?

    I wish the camera to run the entire time that it is powered by the light circuit.

    Can you clarify your implementation of this device in the camera circuit. . . ?
    It seems like I would need some method of triggering it?

    Also, it seems like I would still require a power cycle to avoid symptoms of "cam behavior" #4
    (once in "zombie mode" the camera will NOT revive short of a power cycle, even if it is 'tricked' into seeing the correct voltage)

    I apologize Tom if I'm being dense here, I'm just not seeing how this circuit is implemented and how it will behave.

    Can you give more detail?
    Thanks
     
    Last edited: Sep 23, 2010
  17. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Hi:

    The circuit I posted works as such:

    Light sensor provides 6V at a reasonable current to logic input (the L/H component.) The logic input also charges the capacitor. Let me know if you motion detector is unable to provide said high current output (if it's coming from a relay you should be okay.) If the motion detector is only designed for TTL drive a little interface might need to be added.

    The circuit is always powered by a 6V power supply even when the camera is off and draws a few milliamps in standby. The power supply must be sufficient to power the camera, and the voltage should be 1.9V or so greater than the camera's typical operating point. For a LiPo, this is 3.7V + 1.9V, or about 5.6V. A 6V supply will supply about 4.1V which is fine for the camera as LiPos can go as high as 4.2V.

    As soon as the logic input goes low, the voltage at the base of the darlington pair starts dropping. This causes a gradual drop in the output voltage due to decreasing base current. The diode prevents the cap from discharging through the logic input which can happen with some relay configurations. As the capacitor does not actually provide much of the camera's current, its capacitance is effectively multiplied by the gain of the two transistors, or about 10,000x. The advantage of this is that the small cap can charge very quickly (sub millisecond) and so the camera's voltage rises quickly, avoiding the "zombie" mode. The capacitor can then discharge slowly; once the output drops below 3.4V the camera enters its shutdown mode.

    A better solution would use an op-amp, then a very small cap can be used (1 microfard might go for a few minutes) and with the same effect. And, this would avoid the voltage drop across the transistors.

    An additional advantage of this capacitance multiplication is that it helps reduce noise. I'm not sure how critical it is, but the camera may pick up noise if supplied from a power supply with lots of ripple, as it was designed for a battery with very little ripple.

    I recommend you try a TIP122 darlington transistor for this project, or a 2N3904 and TIP31.

    The power dissipation in the transistor is, worst case, (V_{in} - V_{out}) x I_{out}, so assuming a 6V power supply, 3.4V output, and 180mA, the power dissipation is: 0.468 watts. A small heatsink might be necessary, but the transistor should only be slightly warm to the touch (about 30 degrees Celsius above ambient for a TIP122 TO-220.)

    The 2.2 ohm resistor and 100 ohm resistor are required. The 5 ohm resistor acts as a 'load' to test the supply out. Replace the 5 ohm resistor with your camera.

    Also, just as a protection mechanism I advise putting a 5W 4.7V zener across the supply output. If the supply malfunctions for any reason at all, this will act as a little fuse and go pop when the voltage exceeds 4.7V. You'll have to replace the zener, or perhaps even the power supply, but the camera will be safe.
     
    Last edited: Sep 23, 2010
  18. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Here is an improved version with low current input. It's also regulated to ~3.65V so can accept a power supply from 5V up to about 12V. A higher voltage power supply will mean more waste heat is produced in the pass transistor. This variant does not use a darlington pair, so needs bigger caps for longer run time.

    The zener is a 4.7V device. The input transistor is 2N3904 or similar, and the pass transistor is a TIP31 or similar.

    Code ( (Unknown Language)):
    1.  
    2. $ 1 5.0E-6 10.20027730826997 50 5.0 50
    3. t 288 192 336 192 0 1 -1.018277813932122 0.5909726035363878 100.0
    4. r 336 208 336 272 0 10.0
    5. c 336 272 336 320 0 9.999999999999999E-5 4.372288990409974
    6. g 336 320 336 336 0
    7. t 400 192 400 160 1 1 -1.645772510893635 0.7058042256752577 100.0
    8. w 400 192 400 272 0
    9. w 384 160 336 160 0
    10. w 336 160 336 176 0
    11. R 336 160 336 128 0 0 40.0 6.0 0.0 0.0 0.5
    12. r 288 192 224 192 0 1000.0
    13. L 224 192 192 192 0 1 false 5.0 0.0
    14. r 448 160 448 272 0 20.0
    15. g 448 272 448 288 0
    16. w 448 160 416 160 0
    17. O 464 160 496 160 1
    18. z 288 320 288 272 1 0.805904783 4.7
    19. g 288 320 288 336 0
    20. w 288 272 336 272 0
    21. r 336 272 400 272 0 10.0
    22. w 464 160 448 160 0
    23. o 14 64 0 34 5.0 9.765625E-5 0 -1
    24.  
     
    joshzstuff likes this.
  19. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    I just can't stop.

    Here's one using an op-amp. :)

    This one is a bit more complex and I'd advise you try the cap multiplier circuits before using this one. But if you want a cheaper and more predictable circuit, this will work well.

    The rise time (time to get to 4V) is about 5 milliseconds.

    Interestingly for this one when the logic high is removed the voltage falls quickly to 3.7V, and then falls slowly to zero over a long time period.

    For the op-amp I recommend an LM324. This will work but requires a higher supply voltage of about 7.5 volts. 9 volts would work fine but the transistor may need a small heatsink.

    The zener (3.9V) and 22 ohm resistor are part of the charge and regulator circuits. The zener needs to be a 1W type; it dissipates about 130mW.

    Code ( (Unknown Language)):
    1.  
    2. $ 1 5.0E-6 10.20027730826997 50 5.0 50
    3. r 432 240 432 176 0 100.0
    4. t 432 176 432 144 1 1 -3.321032968934646 0.704582283689887 100.0
    5. R 224 144 192 144 0 0 40.0 7.5 0.0 0.0 0.5
    6. r 512 144 512 256 0 20.0
    7. g 512 256 512 272 0
    8. w 512 144 448 144 1
    9. O 512 144 560 144 1
    10. w 320 224 320 112 0
    11. w 320 112 512 112 0
    12. w 512 112 512 144 0
    13. a 320 240 432 240 0 6.0 0.0 1000000.0
    14. c 224 256 224 336 0 9.999999999999999E-5 3.474428257038227
    15. w 288 256 320 256 0
    16. g 224 336 224 352 0
    17. r 288 256 288 336 0 100000.0
    18. w 224 256 288 256 0
    19. g 288 336 288 352 0
    20. t 192 224 224 224 0 1 -7.4999999999478 -3.474428256988227 100.0
    21. w 224 144 416 144 0
    22. r 192 224 128 224 0 1000.0
    23. L 128 224 96 224 0 0 false 5.0 0.0
    24. z 160 336 160 256 1 0.805904783 3.9
    25. g 160 336 160 352 0
    26. w 160 256 224 256 0
    27. w 224 240 224 256 0
    28. r 224 208 224 144 0 22.0
    29. O 160 256 112 256 1
    30. o 6 64 0 34 5.0 9.765625E-5 0 -1
    31.  
     
    joshzstuff likes this.
  20. joshzstuff

    Thread Starter Member

    Sep 22, 2010
    30
    0
    2 more diagrams and 2 more 'Thanks'
    Thank you Tom, you've really outdone yourself (in fact you've pretty thoroughly outdone me!)

    I'm going to try to digest all of this (which will take some time) but I want to reply to some of your posts and the components in your circuit.

    I'm not really fluent yet in digital, so pardon any noob questions on anything non-analog.

    I'm going to take a stab at this, does L/H mean Logic input in "high"?

    Currently there is no "light sensor" and a "Logic Input"
    Perhaps you mean for me to acquire them?

    The camera is being powered only by a 120volt switched leg of a lighting circuit. (thus the only 'logic' involved is someone walking into a dark room and turning on the light switch)
    What is important is that when the lights are turned "off" there ceases to be any supply power, control power, etc. The only available power will be that stored in the capacitor bank (providing they have been charged sometime after start-up)
    I know this is a problematic aspect of the circuit, as commented on by GetDeviceInfo
    For reasons why the circuit must be this way find my reply here: http://forum.allaboutcircuits.com/showpost.php?p=279757&postcount=6

    One advantage this camera has to work in this circuit is that the motion detection is built in (so perhaps TTL?)

    The motion detection is not PIR it's optical based on the view of the camera. (my guess is that it's using a comparator at a certain frequency to determine a "change in picture" to trigger 'record' from "standby mode". I think this is why the camera uses almost the same current in standby [150mA vs. 180mA])

    Here is how the camera behaves:
    - when energized the camera 'boots up' and goes into standby motion detection mode.
    - when motion is detected the cam starts recording
    - when no motion is detected for 20 sec the camera closes the recording and returns to standby mode.
    - if power is lost (think: light switch turned "off") in the middle of a recording no video is saved (See "Cam behavior #3 in 1st post)

    I simply do not have this 'Power' available for this application, however your creative solution intrigues me and I will still build the circuit for perhaps another usage scenario.
    (e.g. since standby mode is so inefficient, you have given me an idea for a battery powered/ PIR triggered circuit!)

    I have remove the original LiPo and regularly power the camera with as much as 4.5v with no ill effects.
    (It might take more but I'm afraid to push it too much beyond the cam's original specs)

    Boot-up voltage tolerance
    I have found through experimentation with the camera that the minimum start-up voltage (~3.45v) can take as long as 2 seconds from the initial impulse. Apparently the lower level processes of the ~4-8sec boot up are not as "picky" about voltage, but the latter processes are.

    The camera starts to save the file and shut down at ~3.1v

    This capacitor amp depends on an external supply of current that will not be available for my current application, . . . however it could be obtained from a battery pack powered version . . . right?

    I am using linear rectifier (7v 800mA P.S.) so that helps with the ripple, but more filter is always welcome.
    - Does it help with ripple & noise or just ripple?

    I'm going to have to order parts it seems:

    I have 2N4401 on hand (which seems like just a beefier version) but I don't have a TIP31, so I might as well get the TIP122
    - any other possible parts while I'm ordering?

    Wow 5 watts, why so big?
    I like the idea of the 'fuse'. The regulator is protecting the cam too, right? (unless of course it fails, which makes a case for the zener)

    A) If I am right about your impression of my installation environment than the circuit you are describing would be much better suited for a battery operated unit since it is so power efficient. How hard would it be to drop in a PIR sensor that powered the camera for say 4-5min when motion was detected?

    B)OR . . if once again I have just totally missed your circuits functionality, then I guess I need to know about that too.

    Please let me know if A or B is true (or C none of the above.)

    Thanks again for your help Tom
     
Loading...