Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Automotive Power Supply with shutdown control — Parallax Forums

Propeller Automotive Power Supply with shutdown control

parskoparsko Posts: 501
edited 2008-04-19 00:39 in General Discussion
Hi all,

I was wondering of I could get some scrutiny on the following circuit.

Where:
My bro's dirt-track street-stock race car

Why:
I developed the circuit below because I'd like to be able to finish logging data in the case of a catastrophic power supply loss (aka the battery blows up/cable is cut/main power switch is turned off). It will have the ability to continue logging data for any specified period after Main power loss, for instance if the car decides to do 30 barrel rolls, and I'd like to log the fun wreck skull.gif

How:
I have the main power going through a transistor to an input on the prop (Main Status Circuit). This input is then used to keep the relay on until the propeller decides it wants it to shut off (after all logging is done) via the (Power control circuit). The circuit uses a battery pack to keep power on the Propeller after main power is gone.

If anyone has any suggestions to increase safety, or simply notices a blatant error, please reply.

Thanks,

-parsko


Power_supply_01.JPG

Comments

  • kjennejohnkjennejohn Posts: 171
    edited 2008-03-30 21:58
    Hello, Parsko. Welcome back.

    I got confused by the diodes and the relay supposedly feeding power back on itself. So, I redrew the schematic so it made sense to me for what you said you wanted to do. There are now three diodes. The two just downstream of the batteries prevent reverse connection problems and ensure the backup battery doesn't feed power until the main battery drops below 7.5 Volts or goes away altogether. The diode across the relay of course is for back-emf when the relay is shuts off, thus saving the transistor. Kindly check the numbering at the relay connections for correctness.

    I take it the 7805 exists only to feed power to your data logger, IF the data logger is a seperate device. That makes sense to me.
    I recommend two things:
    1. Use an LM2940 regulator in place of the 7805. It is LDO, meaning it drops less voltage internally, thus runs cooler, among other things. Also, it is supposed to be designed to run in electrically noisy automotive systems.
    2. You're using NPN transistors to switch the low side. I recommend you switch the high rail instead, using PNPs. This eliminates having a live high in your circuits while troubleshooting. If you accidently drag an o-scope's ground lead across an unpowered circuit you're less likely to get arc-n-spark.

    As a further thought, you might want to drop the relay and use a FET as the switching device.

    End $.02.
    kenjj

    Post Edited (kjennejohn) : 3/30/2008 10:52:14 PM GMT
    678 x 493 - 30K
  • parskoparsko Posts: 501
    edited 2008-03-31 03:12
    Ken,

    Thanks for the response. I missed a point I should have mentioned, and that was that the datalogger was the Prop itself. Hence the forth diode giving the appearance of feeding back upon itself. (the schematic is more clear drawn on paper, the Prop character chart only has diodes going in one direction)

    My thought was that the main power would be normally switched via the "main" switch in the cockpit. This would provide power to the regulator as would normally be seen from the car battery. My added stuff is so I can maintain power after that switch was thrown.

    The backup supply would have two diodes of voltage drop (~1.2V), versus one (~0.6)for the primary, and subsequently, only "sit there" holding power at 0.6V below main (which should only ever be 6.5minimum). I'm also using the higher potential of the mains to power the relay coil during normal use, so the back-up isn't drained. This is all assuming that we'll have 14.4 mains for near 100% of the time, except start-up when the battery is drawn down near 7.2V. It is my understanding that the back-up could potentially be a large(r) capacitor on the regulator (as I believe I have read from Paul), but that would limit the additional on-time. I've a thought that I'd maintain power (log data) for 15 seconds after the mains go out. So, I have the prop killing power to itself.

    As for the LM2940, that is quite a thought. I will switch to those in my part box from now on!

    Your suggestion for using a PNP transistor I also like. That seems to make more sense. I actually was worried about having a hot lead on the coil from the back-up battery, that solves that problem!

    Have you any suggestion for a good FET?

    I updated the schematic...

    Thank you!

    -Parsko

    (The arrow from the main status circuit outline box is backwards, it shows output, it's and input)
    Power_supply_02.jpg

    Post Edited (parsko) : 3/31/2008 3:23:13 AM GMT
  • parskoparsko Posts: 501
    edited 2008-03-31 20:03
    While drinking some coffee I did a search for MOSFETs.

    Would you agree that the IRF620 would suffice?

    Digikey has about 4000 of them in stock, which leads me to believe that they will not become obsolete anytime soon.

    Is it safe to assume the flag is ground?

    It occured to me that a relay may actually become unlatched under high-G conditions, such as the ones I would like to continue to log through... So, an FET seems to be a better idea, since there are no mechanical components.

    -Parsko
  • kjennejohnkjennejohn Posts: 171
    edited 2008-03-31 23:57
    Hi again, Parsko.

    I took the liberty to mark up your drawing. I "scribbled out" and "X-ed" out the circuits I considered redundant or unnecessary.

    The upper diode and the branch it populates is what threw me originally. This branch supplies power directly to the regulator, thus bypassing the relay power control. Did I miss something here? D2 and D3 protect from reverse connection and keep the backup battery out of circuit, as mentioned before. D1 is downstream of the power switch circuits, for further protection, but not really needed. Each of these is a voltage drop in the supply voltage, so should be eliminated if not justified.

    A fairly beefy (good for an Amp or so) transistor or FET in the switching circuit should suffice for power control. The one you mention looks good. That eliminates any mechanical problems with the relay, plus the power it drains from the circuit. One thing you missed: how do you turn on the FET when the Prop is unpowered and can't control anything itself? Thus the "Start SW", a Normally Open push button switch to bypass the FET and allow the Prop to power up. Once past initial start up, the Prop turns on the FET, thus keeping itself alive. You supply a blinking high-efficiency low-current LED driven by the Prop to tell you the Prop has reached that point and can release the switch.

    Also, power regulators are available with SHUT DOWN pins. Now all the switch does is tell the regulator to turn on; the Prop keeps it turned on until you want the circuit off. Now the switching circuit goes away entirely. A quick search at DigiKey found this:
    www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1040,C1055,P1054,D2740
    It's the only TO220 package I found there, with 5 leads, all the rest are surface mount in some form or other. Specs look OK, this is rated 3 Amps. DK doesn't stock it, but should be easy enough to find, it is a Linear Technology part.

    What do you need a power-status circuit for? It's on or it isn't. The lack of a blinking LED tells you it's dead.
    If you want to monitor the raw battery voltage, install a window comparator. This is actually two op amps wired as comparators. I believe you can buy ICs designed in this format. A 5.1V Zener diode and a couple of resistors bias the op amps to put out a high or a low signal depending on the voltage being monitored. One can tell you if the voltage is too high (>14.4) and the other can tell you if it's too low (<6.0, the LM2940 will work down to 5.7V). The Prop monitors the two outputs from this rig. When the signals are in the right state, the Prop blinks the LED, which tells the operator the voltage is good. The Prop kills the power if too high or too low after initial start up. Simply hook dumb low-power LEDs to the comparator's outputs, red for too high, yellow for too low. These should be biased to light when comparator's outputs are indicating a failed level, and off when things are right. Thus, if you attach the batteries and see either of these lit , fix the problem before pushing the "START" switch. If both light, the circuit is wired wrong or you blew a comparator (or both).
    There are supervisory circuits, usually SOT-23 four terminal devices, designed solely for this job. You form a voltage divider using two resistors to keep an input pin above some preset level, like 1.25V. When the power voltage falls low enough, the divider falls below 1.25V. The chip changes its output level to warn the Prop the voltage is low. This won't signal a high voltage, though. Search DigiKey for these.

    And that covers everything I can think of for now. Hope that helped some.
    kenjj

    Post Edited (kjennejohn) : 4/1/2008 12:04:33 AM GMT
    573 x 457 - 34K
  • parskoparsko Posts: 501
    edited 2008-04-01 01:45
    kjennejohn said...

    The upper diode and the branch it populates is what threw me originally. This branch supplies power directly to the regulator, thus bypassing the relay power control. Did I miss something here?

    Yes, I think you may have. I did that on purpose. My intention was to have the the back-up primarily for shut-down procedures. I'm not to conerned with it during start up, and it's response is negligible race car wise. The back-up can be better described as a shut-down switch, than a back-up circuit.

    You were right, though, with this statement "One thing you missed: how do you turn on the FET when the Prop is unpowered and can't control anything itself?". That is why that extra diode is there, to provide power during start-up.

    The "main" switch in the cockpit of the car will be operated by the driver. When this switch is thrown, power is supplied to my circuit through that very same diode that you removed (we can call this diode D4). This provides power to the regulators, and subsequently to the Prop. The Prop then "senses" the power through the "Main Status Circuit" and will turn on the relay when it sees that this power is there. Yes, this is somewhat redundant during start-up, but critical during shutdown. So, at this time, power is supplied to the regulators through D4 at (14.4-0.7V=13.7V). Simultaneously, power is supplied through D2 (at the same voltage) to power the relay coil, and through the relay to D1, where the voltage will sit "waiting" because of the higher voltage (from D4) on the other side of D1 (now that I think about it, the voltage will be the same across D1, but will likely be slightly lower due to losses between D2 and D1, right?). The circuit will continue like this as long as the Main power exists.

    There are many reasons why Main power can/will be lost. A few of these are; Driver turns the power off, battery is disconnected due to vibration, or there is a catastrophic vehicular error (crash).

    When the main power is lost, the power at D4 and D2 is lost. This is when the back-up becomes relevant. The voltage at D3 will be (7.5-0.7=6.8V). This will keep the coil and relay powered. The voltage at D1 will be (6.8-0.7=6.1V). I just realized I'll need to add another AA in the pack and bump up the back-up voltage to 9V, which is what I had in my test circuit Assume that I've been using 9V for the back-up this whole time, please. Anyway, enough power can be provided to power the Prop, and all it's circuitry for however long I choose for the prop to continue running, hence the (Relay Control) circuit!

    So, I have created a circuit that will normally be off, but able to stay on as long as I choose, all while responding to the state of the Main power switch.

    Part of the reason all this was conceived was so this whole system can be completely passive in the vehicle. I'm worried that some official (or competitor) will get upset and ask this to be removed. Should this occur, I can simply yank the whole system from the vehicle, while it is running, to prove it adds nothing to the performance, and is only there to log data. BTW, there are no rules in the book that say one can't use a data acquisition system, but there are rules that you can't do anything other than have a certain engine configuration, and a 2 barrel carb.

    But, as per your suggestion, and my desire to be able to log data during the worst of conditions, I will remove the relay and use an FET with no moving parts, cause if the relay were to bounce, I stipulate that the whole sha-banga-bang will lose power, and not be able to turn itself on to finish.

    In the spirit of honestly, the REAL reason is really quite an anal one. One feature will be an ongoing revolution counter for the engine. (I figure one LONG will be enough to count the engine revolutions for years of constant 10,000RPM running) The control freak in me doesn't want to miss a single revolution, and why I ultimately want to continue logging data. Now, I know one could argue that once the main power is switched, the engine will no longer provide pulses out the tachometer circuit, but I don't care. I'd still like the accelerometers to continue, specifically to log a crash.

    I need the Status circuit to tell me when main is lost, so I can start the timer for the additional logging time.

    Also, I'm dumb, my bro is dumb, and our buddy Scott is dumb. In the heat of the moment, I don't want them to think about turning on the (sissy) data logger during start-up. It'll simply be forgotten, and my work done for not.

    Thank you very much for so much of your time, I appreciate it very much! The more I work on this hobby the more I have become confident in designing circuits. Folks like you on this forum have made it possible for guys like me to make things like this happen!

    -Luke
  • kjennejohnkjennejohn Posts: 171
    edited 2008-04-01 07:34
    You're quite de nada.

    Okaaaay, suuuure. It's NOT a backup; it's a shut down. Uh-huh.

    Have you done a power budget analysis and arrived at some idea how long you can run a FET, Prop, regulators, sensors, and what not, off of six measily AA batteries? Or actually run the whole final circuit as it exists in the car off the shut down circuit to the fail point? How much time do you have after main power dies? I hope you have a battery holder with straps or something to hold those batteries in place in case of an "error" that piledrives this car into a wall.

    Later!
    kenjj
  • parskoparsko Posts: 501
    edited 2008-04-01 13:30
    (as the coffee brews...)

    No, I haven't done a complete power budget analysis. BUT, I am only looking at this working for 15 seconds at a pop. I should need this maybe 50 times in a weekend, max. So, if 6 AA's will run it for 10-15 minutes, I'd be happy. I have taken to using rechargable batteries in my life, so I'll simply recharge them after the weekend.

    I see what you mean regarding the straps. Maybe a better solution would be to use an RC battery that would be less likely to lose contact (I think you imply that the springs that hold the battery on the end could suffer the same fate as the relay in losing contact at high G's).

    And, yes, I should rename it blush.gif to something more aptly named!

    Total (additional) on/log time will likely be around 15 seconds after the main power is switched off. As I said, this may happen 50 times a weekend. The car will sit on the trailer during the week, assuming we don't have to fix it.

    Again, thanks. I'll order some parts...

    -Luke
  • parskoparsko Posts: 501
    edited 2008-04-13 21:21
    from some random location said...
    An FET has the great advantage that no current flows into the control input (called the gate), the main current is turned on and off by the level of voltage on the gate

    Is this true? Does this imply that a mosfet can be turned on by simply applying a voltage, such as turning on a Propeller pin? Does one need a resistor between a ucontroller and a mosfet gate?

    I've read through Williams post at:
    http://forums.parallax.com/showthread.php?p=721042

    It's coincident that I am learning about MOSFET's myself. Frankly, they still kinda confuse me. Going to Digikey, there are about 13,000 to choose from, which makes a hobbiest like myself squirm...

    I gander that my circuit will need a P-type, as per Ken's suggestion with the transistor. Anyone have a good power P-type MOSFET that can conduct an amp or two that works well with the Propeller?

    Also, why would one not use a Darlington instead of a Mosfet? What are the primary differences one would look at in the design stage?

    I guess that a darlington would work in my application, but from what I have read, the Mosfet seems a bit sexier of a choice.

    Thanks,

    -Parsko
  • kjennejohnkjennejohn Posts: 171
    edited 2008-04-14 02:48
    Hi. It's been a loooong time since classes, but I believe the Darlington will subtract one or two diode drops (one to two Volts?), thus forcing you to supply 5.7V + 1 to 2V, so perhaps 7.7V. I say 5.7 because that's what the LM2940 regulator needs minimum to put out 5V even. Six batteries at 1.2V each (rechargeables run 1.2 to 1.25V each) will get you close. Seven is too wierd, so eight batteries at 9.6V, which is the next step up in R/C batteries. But a FET drops near zero, so dissipates very little power (AKA "heat").

    If you can't find info on FET usage here in a search, try the Parallax forums (forums.parallax.com/forums) or electro-tech-online(.com). Or try a Google search.

    Later!
    kenjj

    PS I have finally come to grips with the *ing bouncing, dancing emoticons. I open Notepad, resize it and move it over the d*mn things. Sanity restored.
  • parskoparsko Posts: 501
    edited 2008-04-18 18:17
    I'm sorry to keep asking simple questions, but:

    LT1086-5.0 and LM2940 are effectively the same?

    i.e. both are 5.0V LDO regulators (the currents are different though)

    -Parsko
  • kjennejohnkjennejohn Posts: 171
    edited 2008-04-19 00:39
    Hi. The pinouts are different. Check the data sheets. You can't swap these at will.
    Output-wise, they are pretty much the same. The LT part will of course supply more current. However, the drop out is slightly higher. The 2940 is is 0.7Vdo, while the LT goes higher than one Vdo as you reach, and go beyond, one Amp. If you use the 9.6V R/C style battery this is not a concern. But HEAT IS! Multiply the 4.6V drop in the regulator times the, say, one Amp it must supply, and the dissipation of around 5Watts means the heat sink becomes enormous. You do have other diode drops, though, before the input voltage gets to the regulator. What can I say? Cobble it all together and see how much current it pulls. If the regulator gets too hot to touch in a few seconds, heat sink the bejeezus out of it.

    By the way,consider this: In the normal sequence of events you've outlined, you switch on main power, the Prop starts up, the car gets lunched, main power goes away, the Prop switches to the backup...err...shutdown power, and in 15 seconds it kills the Darlington/FET. Right? Well, if you haven't installed a biasing circuit to force the transistor or FET off after the control signal goes away, it might conduct enough current to power the Prop back on. It's a long shot, but keep it in mind if the Prop keeps turning on and off after it kills the power to itself.

    Luck with the project!
    kenjj

    Post Edited (kjennejohn) : 4/19/2008 12:51:51 AM GMT
Sign In or Register to comment.