I realised I could do this with only one relay. I have drawn the charge/Isolator section separately for clarity.
Circuit in PDF format
The total voltage drop under heavy charging and PC running (11A) is 100mv between the Main battery up front and the Aux battery in the trunk. That drops to around 40mv once the Aux battery has charged.
The FET and D1 allow the Main battery to help support the Aux battery in sleep and in starting the PC if the aux charge is low. Although diode D1 allows Main battery voltage to flow to the Aux Battery, it will not allow the Aux Battery voltage to flow back to the Main battery during cranking (or any other time really.) It is only shorted by RLY1 when the charging system is producing over 13v. Under this condition RLY1 is on and there is now a direct low loss path between the Aux battery and the charging system.
Now that I have the final design needs sorted and working, I may think about making a new PBC and replace most of the small parts in the circuit with a precision under/overvoltage IC.
I started a thread on the problems of Hybrid-Sleep. hybrid-sleep-win7-trying-to-solve-a-strange-problem
As a result, I came up with another way of having Hibernate, Sleep and Shutdown options for my Car-PC.
When coming up with a solution to overcome a Hybrid – Sleep problem with Win7 on some hardware, I found that using software commands to suspend the PC into 3 different states caused a problem that needed to be overcome, that was, making the M4 drop +5v standby in Shutdown and Hibernate but NOT in Sleep.
At first glance you would think that PC mode could be utilised on the M4 instead of mode 1 and above, however you end up with the same problem and then even more.
My FE takes information from a number of Microcontrollers; one I call the Vehicle interface controller. This already monitors the state of the Auto/Manual switch, the Accessory voltage and the Ignition on voltage. Using this info the FE can select which Suspend mode I want with the state of a switch I call the Auto/Manual switch. This is the switch going to the IGN line (On/Off line) of the M4. Note: You could use a Fusion Brain board for detecting ACC, IGN and switch logic.
Because the FE is now controlling the suspend state of the PC, the first thing is to set the PC to ignore the off pulse from the M4, done by setting the PC power button action = nothing in Windows.
The M4 is then set for an off-delay (delay before acknowledging the state of its IGN (on/off line), that’s longer than the time taken for the FE to see the on/off toggle of the Auto/Manual switch. The time chosen in this case is 5 seconds.
When the PC is Shutdown, Hibernated or placed into Sleep mode with a software initiated command, the M4 will see that condition and switch off, however it does not switch off the +5v standby rail. This is action we want for sleep, but not for the other two modes.
For any of the software suspend modes the M4 can be made to drop +5v standby when the M4 IGN line is taken low – Providing the M4 has not sent a turn-off signal to the PC itself. Otherwise the M4 will be in the “waiting for PC off acknowledgement” mode and will think the PC has acknowledged when it closes after finishing the software initiated close command, in that case, when the IGN line goes low, it will NOT drop +5v standby for a delay period programmed into the M4 Hard off timer. In addition the M4 IGN line must be high when the PC closes down, only then will the M4 drop +5v standby as the IGN line is taken low.
At the moment, I manually turn the Auto/Manual switch off until the Front End announces it has seen the switch state (one second) now the FE locks into that state and will ignore any change in the A/M switch. Turning the switch back on again, before the time that the M4 is programmed to respond to the IGN input, makes the M4 automatically kill +5v standby when the Vehicle is turned off “after the M4 powers off”
Action: PC -> Sleep
Turn the Vehicle off.
The majority of time I turn the Vehicle off, get out and lock the car. The IGN line goes low and the FE announces Sleep mode and starts the sleep state process. The M4 IGN line, which is low will reach it’s off timeout period and send a power switch pulse (which the PC is set to ignore), a few seconds later when the PC closes in sleep mode, the M4 sees that as an acknowledgement of it's Power switch pulse and now powers down correctly with +5v standby enabled. In other words, it acts exactly the same as before.
PC -> Hibernate.
The option to Hibernate is enable by turning the Vehicle IGN to accessory and pressing the Auto/Manual switch until the FE announces Hibernate (1 second), then turn the switch back on and wait for the PC and M4 to power down (7 seconds) then turn the vehicle off. The M4 drops +5v standby and the PC is in hibernate with no +5 standby voltage.
PC -> Shutdown.
Shutdown is rarely used and would only be needed if the PC was behaving strangely after numerous sleep/resume and-or hibernate/resume cycles and usually at the worst possible time – while driving. So as the FE sees the car is fully on or running, I can just turn off the Auto/Man switch for a second, after the PC has shutdown turn the A/M switch off and on and the PC will start with a fresh reboot.
Of course this can be selected from a Sub Menu, but doing it with the A/M switch means no distracting menu clicking or touch screen navigation – you eyes need never leave the road.
I’m about to automate the need to wait for the M4 to stop before turning the Vehicle completely off when selecting Hibernate or Shutdown, just for the times when 7 seconds is the difference between life and death – or in my case, I forget to wait before turning off and leave standby +5 running for x number of hours, in my case I have it set for 17 hours.
To automate this, the FE tells the Interface Micro that a software Hibernate or Shutdown has started and is locked in. The Micro will switch and hold the IGN line to the M4 high so that the M4 does not trigger itself into off mode. Once +12v output from the M4 has dropped (M4 is off with Standby +5 running) the M4-IGN line is automatically restored, which will take the IGN line low, dropping +5 standby and now ready for the next valid start signal.
If +12 does not drop in a predetermined time the Micro will momentarily drop +12v input to the M4 and shut it off, which is pretty much what the M4 does below if it could not shutdown the PC.
In sleep mode which is completely controlled by the M4, as before, if for some reason the PSU had not shutdown and because the IGN is low, the M4, as it’s in mode 1, will still do it’s normal Emergency-off after a predetermine time.
Now someone will be saying, why go to the trouble?
Well, resume from sleep is under 2 seconds. Hibernate is around 25 seconds and cold boot with this new MB is around 60 seconds (was 29 seconds with the previous MB.)
For some of us who do short trips and are in and out of the car quite a bit, sleep is exactly what we want (almost instant on). But short trips will gradually deplete a battery, overnight in sleep mode with only short trips will kill sleep mode by discharging the battery after a night or two. So Hibernate is what we want at night when not doing a lot of driving. Even if you set Hard-off for say, 7 hours, with infrequent short drives you are still going to slowly drain the battery and once again kill sleep mode.
A number of PC owners have found Hybrid-Sleep to be unreliable or unusable, as I have. On top of that Hybrid-Sleep does not solve the problem of short trips and not driving the car for a day or two. Exactly how long do you set the PSU Hard–off timer to allow for continually varying driving times and battery state? I can’t find one, maybe someone has, but I bet it won’t suit me.
With this system I can resume from sleep all day long and overnight if needed. If not using the car the next a day, I can put it into Hibernate with the touch of a button and not have to wait for any long Hard-off period to flatten the battery even further.
Is having the option to Hibernate by simply pressing a button for “a lousy second” before you leave the car at the end of the day that much of an inconvenience?
That's a lot to take in Mike, but I think I see what you are doing. I hadn't considered the lots of short trips scenario, but it sounds like something that would affect me too. Mostly I'm doing 2-4 15 minutes drives every day and I was planning on just letting the cpu sleep (maybe with the USB off if that is stable), but I can see where that might be enough drain.
Your post made me dig out the 7 digit meter instead of my old Fluke 77 to measure the hibernate current (I blew the low-range current fuse long ago, so was using the 10A range on the Fluke). I'm at 156ma with USB powered from a wall-wart 5v, 229ma with the USB hub powered from the computer's port. (If I disconnect the USB cable to the hub, the PC is turning back on again on me tonight.)
For me that means it's 2.2 - 3.2 AH per night of drain. Assuming a 30A charge current, that's 6 minutes of charging to counteract the nightly drain.
I'm not too sure what my car's charge current is, but I think the alt can do at least 85 amps. (I can buy a 200A high output alternator for $60.) So I think 30A of charge current to the battery is pretty reasonable, but the car also has to recharge the power used for starting of course.
My system takes 2.5 minutes to resume from an interrupted hybrid sleep. It takes about 5 seconds to resume from a normal sleep. My drive to work is less than 15 minutes, so I don't want to wait 2.5 minutes each morning to boot, that's for sure.
Have you considered going in to hibernate based on the time that the car is shut down? You might get fancy- for me I could set it to hard-off if my GPS says I'm home, and the time is past 17:30 on M-F.
Thatís a common complaint with Hybrid-Sleep; a lot of people experience huge Hibernate resume times.
Yes the short trip thing is a problem and it gets worse as you add web cameras and other devices. Some people donít notice it until a month or two down the track when the Aux battery starts to fail or sleep mode only holds for an hour or so. If I was driving for even two hours a day there would be no problem.
Look, you could have a menu button for Hibernate if you wanted. The problem is I donít like having to select something from a menu; Iíd rather have a button to press when I want to put the system into hibernate.
Itís working great so far and has not failed a single sleep or hibernate resume yet.
The description I gave in the previous post makes it sound about 1000 times more complex than it really is. There are other ways to get the M4 to drop standby +5v and Iím still going look into it just to be sure I have the best and simplest solution.
I know a time and location hibernate sounds good, but I think if you can have a simple one button push (no waiting) for hibernate as you turn off the car then it would be ideal (Iím so close to that now). If you forget, it only takes a few seconds to wake the PC from sleep and then hibernate it, I think once you got into the routine it would become almost automatic. Especially as my FE announces ďSleep modeĒ as you turn off the Ignition, you then have 4 seconds to turn the IGN back on and abort it. Once Hibernate or Shutdown is announced you canít abort them, but you have to push a switch to select them anyway so you must have wanted to do it, right!
BTW. I had forgotten how bad the M4 is with its IGN line when +5v Standby is on. In the past if I started the car before the M4 has powered on there was a 50/50 chance I would drop +5v standby on a cold morning. I initially had a 47uf cap and a diode in the IGN line to the M4 but I changed that to a 100uf, the off time is extended but you can compensate for that in the M4 Programming if a few extra seconds for off time is a problem, it really does stop any glitch upsetting sleep mode.
No problem on hitting a button to mean shutdown at night, was just dreaming about GPS/time autoshutdown. ; )
I'm about to give up on the M4- I'm switching to the CNX P2140 and a PicoPSU as soon as it comes in. The EMI and crap programming bug me too much to continue to use the M4. I don't have the PIC programmer, so not being able to reprogram the M4 via USB is a big negative. With the CNX if I have to filter, it's just two outputs, and the software looks far better.
Do you have the part number for your lighted buttons? Those look very nice. I spent an hour searching for them today, and don't think I found them yet.
How did you do the color logos by the buttons?
When I mentioned reprogramming the M4, I meant with the utility that is downloadable from the site. It allows you to change most settings via USB. There is also an OEM version available which allows a lot more changes to all sorts of timing. Just need a USB cable connected to the M4.
The buttons are available from Jaycar and Audiotronics. Very nice buttons and they come in momentary and locking with a few different colours for the led rings. If you still need a part# I will get it for you.
BTW. Time shutdown is easy and adding GPS local based to it is properly not that hard.
Now for a bit of info on Hybrid-Sleep, Win-8 and a new install of Win-7.
I have to take back the blame I placed on my new MB for its slow cold boot into Win7.
Tried Win-8, yes well its ok, but it would not Hibernate under any condition (would sleep fine), I had no external devices plugged in at all, most likely a MB driver, but I didn’t bother with it for the car-PC at this stage.
From the point where the screen says the equivalent of “Starting windows” to the point where the Desktop was up with no hourglass was 7 seconds. Now, my last MB did that with Win-7. Anyway I decided to do a fresh install of Win-7 “again” on this MB, and low and behold, 7 seconds from the “Starting Windows” message to the Desktop and 1 second more and the FE is running.
Now, Resume from Hibernate is exactly 1 second faster than a Cold Boot. Just as it used to be when I first started out a year ago. Resume from sleep is still about 1.8 seconds.
Under no circumstances will Hybrid-Sleep work. I even removed the USB-3 driver and all external devices. Hybrid-Sleep is just broken.
Anyway, the Bios take’s 15 seconds from PSU start to the message “Loading Windows” or “Resuming Windows” and they take 7 seconds. With the new MB coming out with fast boot of around 5 seconds from what I have heard, I could cold boot or resume from Hibernate in 11 seconds.
The drive I’m using is a new SATA-3 SSD but I’m using a SATA-2 cable, don’t know if there is any real difference but I may try a new S-3 cable anyway.
You are able to reprogram the M4-ATX via the USB? I thought you had to use a PIC programmer, that's what some thread I read had in it, including the programmer circuit if you have to make one.
But I looked around again and found the drivers that I had missed before. That is much better- It's still a big of a kludge compared to the CNX, but usable at least. I won't forgive them for the crappy systray monitoring app though. : )
Great deal on your startup times- I timed my system last night, and a cold boot 'till music plays in Centrafuse was 56 seconds. Key-on to music is 4 seconds from a sleep. Once I get done playing around with the setup, I'll try a clean install on a different drive and see how that works.
I think I found the buttons: http://www.jaycar.us/productView.asp?ID=SP0793
Yes, thatís the switch.
Firmware reprogramming uses an in-circuit programmer interface, but reprogramming the configuration, as you noted, uses their app and USB lead. There is an app they call their OEM version that does even more.
That tray monitor is the one of those typical lazy effort apps that does not scale to higher resolutions. Guess they thought all Car-PC in the world would only run 640 x 400 or something like that.
I found that one of the motherboard applications included in the Gigabyte driver install will slow cold boot by 20 seconds or more, and itís supposed to allow a quick boot in conjunction with the Bios option of Quick boot. Utter crap, it just enables sleep and makes resume from sleep no different than without it. Geeís how much faster than 1.8 seconds do you need?
Anyway rant over!
Here is something to watch when powering some USB hubs from the +5v line of the PSU.
I found that one of the hubs is allowing around 1.4 volts to come back from Standby +5 volts to the Regular +5v on the PSU which feeds aux power to the hub. The SSD will sometimes not initialise when that happens, must be enough to just power and hang some circuitry on the +5 line.
I put a small relay powered from +12v output of the PSU, when the PSU shuts down, +5v to the Hubs is disconnected, and of course automatically reconnected when the PSU starts.
I've not yet decided if I'm going to power the USB hub from the main PSU, or a brick 5V regulator (that I bought a while ago) and a relay off of the 12V. The brick is a 50W DC-DC converter, so 10A is plenty, and then I wouldn't load down the PSU, but I probably have enough power in the M4 or the CNX's secondary output anyway, I just don't know what my typical 5V draw is yet.
I guess if I go to the CNX and use the second 12v output for cameras/screens, I should use the 50W 5V brick as the PicoPSU probably doesn't do much extra at 5v.
As usual, good tips, thanks-
Just found this help sceen, had not seen it before. Not that shutdown times bother me at all, but it's interesting information: