Possible intelligent 8-Channel MOSFET latching sequencer (12vDC only)

Thread Starter

SeekerOfSecrets

Joined Jan 5, 2020
8
Hi all, I'm toying with the idea of a SATA array HDD power sequencer, to keep the Power-On loads for my PC under control during startup and sudden crash on AC power loss.

Sure, I have a 750W P/S in the box and a 900W UPS in the wall - but they drop and pop the whole-house power 4-5x a day on this compound, and I am not always home, or awake, or able to gracefully shut-down... and I am sick and tired of trashed HDD (3 so far) that I may or may not ever recover, and sick and tired of having to rebuild both PC and my array - hosed files... when that happens.

Ebay offers a 8port latching DC Relay sequencer with programmable delays after startup of the 2d thru 8th ports for ~$20.00 https://www.ebay.com/itm/12V-8ch-Delay-Relay-Module-Latch-Bistable-Self-locking-Interlock-Conditioner/283645126963?_trkparms=aid=111001&algo=REC.SEED&ao=1&asc=20160811114145&meid=5d6b4c353a964cd88de8fe94fc8610a7&pid=100667&rk=5&rkt=8&mehot=none&sd=382485066539&itm=283645126963&pmt=0&noa=1&pg=2334524&brand=Unbranded&_trksid=p2334524.c100667.m2042 but as I have an excess of 40v 10a and 100v 40a MOSFET, I'd like to try doing this without relays.

My idea is to set them up so which once triggered by the CPU 12v Power coming in, would immediately initiate a 30sec delay for the PC HDD to spinup and load the O/S, and then start spinning up the array, each drive 5-15 seconds after one-another.

... I envision a clock on PWR that initiates a delay of 30sec-1min (adj), then it trips another clock that simply counts up to n (programmable via dip switch) whereby it's output pin at that time both resets that counter and kicks off drive1, and repeats through drive 8 - In my case, 8 is all I had space, power and SATA ports for https://www.ebay.com/itm/8-Port-SAT...796560?hash=item595330cd50:g:ajIAAOSwzyxeu4VR

Naturally, once this MOSFET driver circuit reached loop #8 (and hopefully... all drives are ready) it would latch in that condition and only re-start the sequence when the power was turned off, either by loss of power (sigh) or by me tenderly 'parking' my system and the array for the night.

Anyone care to share their Ideas? It would definitely be less power-hungry and noisy than that massive 8-Relay module, but it might NOT be better. I have a well-stocked partsbin - both single and dual 555/556 timer modules, all of the 74 (TTL) and 4000-series CMOS chips (4000-4060), hundreds of NPN and PNP transistors, TRIACS and SCRs, dozens of N and P-Chan MOSFET (I like the N-Chan) resistors, diodes, caps, zeners and lots of perfboard.
:)



.
 

eetech00

Joined Jun 8, 2013
3,859
Hi all, I'm toying with the idea of a SATA array HDD power sequencer, to keep the Power-On loads for my PC under control during startup and sudden crash on AC power loss.

Sure, I have a 750W P/S in the box and a 900W UPS in the wall - but they drop and pop the whole-house power 4-5x a day on this compound, and I am not always home, or awake, or able to gracefully shut-down... and I am sick and tired of trashed HDD (3 so far) that I may or may not ever recover, and sick and tired of having to rebuild both PC and my array - hosed files... when that happens.

Ebay offers a 8port latching DC Relay sequencer with programmable delays after startup of the 2d thru 8th ports for ~$20.00 https://www.ebay.com/itm/12V-8ch-Delay-Relay-Module-Latch-Bistable-Self-locking-Interlock-Conditioner/283645126963?_trkparms=aid=111001&algo=REC.SEED&ao=1&asc=20160811114145&meid=5d6b4c353a964cd88de8fe94fc8610a7&pid=100667&rk=5&rkt=8&mehot=none&sd=382485066539&itm=283645126963&pmt=0&noa=1&pg=2334524&brand=Unbranded&_trksid=p2334524.c100667.m2042 but as I have an excess of 40v 10a and 100v 40a MOSFET, I'd like to try doing this without relays.

My idea is to set them up so which once triggered by the CPU 12v Power coming in, would immediately initiate a 30sec delay for the PC HDD to spinup and load the O/S, and then start spinning up the array, each drive 5-15 seconds after one-another.

... I envision a clock on PWR that initiates a delay of 30sec-1min (adj), then it trips another clock that simply counts up to n (programmable via dip switch) whereby it's output pin at that time both resets that counter and kicks off drive1, and repeats through drive 8 - In my case, 8 is all I had space, power and SATA ports for https://www.ebay.com/itm/8-Port-SAT...796560?hash=item595330cd50:g:ajIAAOSwzyxeu4VR

Naturally, once this MOSFET driver circuit reached loop #8 (and hopefully... all drives are ready) it would latch in that condition and only re-start the sequence when the power was turned off, either by loss of power (sigh) or by me tenderly 'parking' my system and the array for the night.

Anyone care to share their Ideas? It would definitely be less power-hungry and noisy than that massive 8-Relay module, but it might NOT be better. I have a well-stocked partsbin - both single and dual 555/556 timer modules, all of the 74 (TTL) and 4000-series CMOS chips (4000-4060), hundreds of NPN and PNP transistors, TRIACS and SCRs, dozens of N and P-Chan MOSFET (I like the N-Chan) resistors, diodes, caps, zeners and lots of perfboard.
:)



.
Most UPS’s have a connection to the PC along with software that will initiate a graceful shutdown in the event of a power outage.
 

sagor

Joined Mar 10, 2019
903
The issue with power sequencing the drives is that when the OS comes up, it will only detect the drives that are online at that time. Powering up a drive after the OS starts "usually" means the drive will not be properly detected and stay offline.
So, the proper approach would be to power up the secondary drives one at a time, and when everything is up, only then start the system drive.
Other option is to use a small micro to power sequence everything, using your own software, and then let it power up the main system.
 

Reloadron

Joined Jan 15, 2015
7,501
Sagor pretty much nailed it.

Startup sequence
So, how are these components used in the startup sequence?

  • The CPU starts and fetches instructions into RAM from the BIOS, which is stored in the ROM.
  • The BIOS starts the monitor and keyboard, and does some basic checks to make sure the computer is working properly. For example, it will look for the RAM.
  • The BIOS then starts the boot sequence. It will look for the operating system.
  • If you don’t change any of the settings, the BIOS will fetch the operating system from the hard drive and load it into the RAM.
  • The BIOS then transfers control to the operating system.
All of that takes place in the first few seconds. Additionally your problem seems to be uncontrolled shutdowns rather than startup. While I see you do have a UPS I would invest in a second UPS which offers shutdown, they are pretty inexpensive considering you are replacing HDDs.

Sequentially starting drives can be done any number of ways. Using discreet components a decade counter set to count to N and halt driving D flip flops could likely work, I never tried it. Your first link would work but you still need to drive the relay channels. Your second link looks like the relay boards driven years ago by the old parallel port but uses a USB interface and they provide the software. You need a working computer to run their free software. None of this will solve a hard shutdown issue.

Ron
 

Thread Starter

SeekerOfSecrets

Joined Jan 5, 2020
8
Most UPS’s have a connection to the PC along with software that will initiate a graceful shutdown in the event of a power outage.
Right an 'intelligent' UPS, which are usually reserved and priced for high-end servers, right? ... well none of mine have any kind of interface, so I'll shop around on the weekend and see if I can find one ASAP. The way things are here, power drops when it wants, and the outages often last beyond the internal batteries capability to cope and it just dies. Theereafter, the UPS is lucky to have a few hours to recuperate before the power goes again - so I am also charging extra sets of batteries offline for them and swap old for new when I can. I tried swapping the internal Gel-Cell for bigger 12v 60AH Golf Cart or small 12v 200Ah Car battery to let it run MUCH longer after a power cut... but the UPS is unable to recharge either type, the internal relays just clickitty-click - click every now and then continuously until I put the 12v 9Ah Gels back in. Obviously, a bit of re-engineering of the load/charge sense circuitry is also in consideration.
Thanks for your input :)
 

Thread Starter

SeekerOfSecrets

Joined Jan 5, 2020
8
The issue with power sequencing the drives is that when the OS comes up, it will only detect the drives that are online at that time. Powering up a drive after the OS starts "usually" means the drive will not be properly detected and stay offline.
So, the proper approach would be to power up the secondary drives one at a time, and when everything is up, only then start the system drive.
Other option is to use a small micro to power sequence everything, using your own software, and then let it power up the main system.
So, with this particular Marvell controller, the HDD can be hot-swapped at any time and it handles the change(s) graciously. If I don't power on the array, and just boot the PC, I get to login in about 1 minute and can access all the discovered devices. If I then power up the array, aside from the obvious instantaneous 12v load on the internal 750W PC power supply, heard by the cooling fan noise change, all drives are up and online in about another minute or so... some are slower than others.

Your suggestion for me to power the drives up BEFORE the PC boots is something I hadn 't even considered. I immediately tried that using a 12v, 20A 2nd external power supply and it works fine, however HDD access is iffy and I think I might need to tie the two supply GROUNDS to one another.

Will keep testing, meanwhile I also considered putting the array on it's own 750-1000W UPS, and started digging into sag/brownout detection circuitry.

Thanks!
 

Thread Starter

SeekerOfSecrets

Joined Jan 5, 2020
8
Sagor pretty much nailed it.

Startup sequence
So, how are these components used in the startup sequence?

  • The CPU starts and fetches instructions into RAM from the BIOS, which is stored in the ROM.
  • The BIOS starts the monitor and keyboard, and does some basic checks to make sure the computer is working properly. For example, it will look for the RAM.
  • The BIOS then starts the boot sequence. It will look for the operating system.
  • If you don’t change any of the settings, the BIOS will fetch the operating system from the hard drive and load it into the RAM.
  • The BIOS then transfers control to the operating system.
All of that takes place in the first few seconds. Additionally your problem seems to be uncontrolled shutdowns rather than startup. While I see you do have a UPS I would invest in a second UPS which offers shutdown, they are pretty inexpensive considering you are replacing HDDs.

Sequentially starting drives can be done any number of ways. Using discreet components a decade counter set to count to N and halt driving D flip flops could likely work, I never tried it. Your first link would work but you still need to drive the relay channels. Your second link looks like the relay boards driven years ago by the old parallel port but uses a USB interface and they provide the software. You need a working computer to run their free software. None of this will solve a hard shutdown issue.

Ron
Ron, The array is external but gets it's power from the PC - so it fires up and starts spinning up ALL 8 drives when the PC gets turned ON. The big issue is when the power spikes - goes off for just 15-30 sec or so and comes right back on while powring up or operating normally for several hours - all drives spinning, reading/writing. Spike like a hiccup.

If the PC stayed on when it happened, it cannot see some or all of the drives anymore (even though they are all still spinning), and if the PC drops off totally, i.e. I have to push a button to wake it up, some or all drives are missing afterward and the only way I found to fix this is to use Device manager, disable and re-enable the Marvell controller and then WARM reboot the PC.

Once everything is UP again - I either (sigh) get a ton of RW errors and spen hours scanning and fixing - or (whew) I get lucky and it's all perfect.

Normally, during the above boot sequence, the array is ready and waiting for last checks, beep and boot and it all works...

I'd like to make it stand-alone, b*mbproof to AC power issues (swings from 90vac to 127vac all day long) and hide it away in a chilled closet for a year or two and not have to babysit it.

Wow DoS 'bootup sequence' - that takes me back to TRS-80, Apple1, Commodore C64, TI-99, Amstrad CPC-464 and my chasing Novell CNA and CompTIA N+, I+, Sec+ and A+ Certs for $10k/more year heydays,

The first link is a 'stand-alone, 8-channel time delayed Relay power sequencer" My initial goal was just to duplicate that in a MOSFET sequencer, but the input I have received so far makes me rethink maybe getting the Array on it's own intelligent UPS with power sag/brownout smoothing and use IT to sequence itself and then turning on the PC - also on its own intelligent UPS.

Thanks!
 

Reloadron

Joined Jan 15, 2015
7,501
Your power reminds me of a few overseas locations I have lived. My heart goes out to you.

As far as powering your drives in sequence you have a few options for example using discrete components as I mentioned or really the simple way is likely to use a micro controller with a small battery backup. There are dozens to choose from but an Arduino Uno comes to mind or a similar knock off. There are also the PICAXE family. All you want is like I mentioned, on reset count to N and halt. In your case count to 8 and halt. The code should be simple and a run once. Personally in the interest of simplicity and parts count I would take the uC route.

You don't need an expensive UPS with business software. APC (American Power Conversions) and plenty of others offer inexpensive UPS power solutions. Just as an example APC uses what they call Powerchute. Here is an inexpensive example. Granted not exactly a power house but most home systems including my dual processor workstation consume under 300 watts. Then too, inexpensive is a relative term.

  • Power your critical devices during outages and attach your home networking equipment (router and modem) and stay connected to the uninterruptible for over 4 hours after safely shutting down your PC
  • 7 total outlets – 5 battery backup, and 2 surge only outlets
  • 1 USB charging port
  • Surge protection rating of 490 joules
  • Powerchute software provides safe system shutdown, preventing potential data corruption
  • Guaranteed protection from surges and spikes caused by events like lightning strikes or power surges
  • 3 year warranty and lifetime 75,000 equipment protection policy for all connected electronics
  • Energy star certified
  • 5-foot line cord with NEMA 5-15 right-angle plug end

Next, for a shutdown you can write a script. If your system has a RS232 serial port you can use it. Aside from the data pins you have five pins such as CTS, DSR, DCD, DTR and DTS. The first 3 are inputs. Write a chunk of code to monitor any one of those 3 pins. Hold the pin logic high using a cheap wall wart. Have your code monitor the com port. When you lose mains power the pin will go low. Have your code run a shutdown script when that pin goes low. A Google of .vbs shutdown script should bring up some examples. All of this happens before your UPS battery runs down.

Those are a few options.

Ron
 

eetech00

Joined Jun 8, 2013
3,859
Right an 'intelligent' UPS, which are usually reserved and priced for high-end servers, right? ... well none of mine have any kind of interface, so I'll shop around on the weekend and see if I can find one ASAP. The way things are here, power drops when it wants, and the outages often last beyond the internal batteries capability to cope and it just dies. Theereafter, the UPS is lucky to have a few hours to recuperate before the power goes again - so I am also charging extra sets of batteries offline for them and swap old for new when I can. I tried swapping the internal Gel-Cell for bigger 12v 60AH Golf Cart or small 12v 200Ah Car battery to let it run MUCH longer after a power cut... but the UPS is unable to recharge either type, the internal relays just clickitty-click - click every now and then continuously until I put the 12v 9Ah Gels back in. Obviously, a bit of re-engineering of the load/charge sense circuitry is also in consideration.
Thanks for your input :)
Yes...I've used APC alot and they are not always that expensive...but depends of course on what your protecting.
But they work...

If you use one, a couple of things to note.
Be sure sure to do to the charge test. This sets up the rate at which the batteries are trickle charged under load.
If you don't do this, the batteries can be regularly overcharged, slowly swell over time, and damage the unit.
Also, there is an equipment protection policy, however, APC will only honor it if the power distribution equipment connected to the load outlets, if any, like power outlet strips, etc., is also APC.
 

MisterBill2

Joined Jan 23, 2018
18,176
My suggestion is to shut down the computer when not using it, and to have the UPS support it long enough foryou to do a proper shutdown when you are present and using it.
Quite a few UPS devices are able to communicate with the computer and initiate a shutdown when there is a power failure, only the cheap junk does not. And the difference in price is probably less than the cost of replacing just one hard drive. You can keep the cheap UPS devices to feed the monitors and printers and web-modems, so yu do not need a huge power UPS for just the computer itself.
 
Top