Constant 5vdc output from a 'pulsing' 5v input. - Page 1
Forum section: electronics / beginners

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 10:14:33 am
content: Hi. Noob here.I have an Asus P8Z68V motherboard, which when in sleep mode, makes the 'Power' button flash on/off at approximately 2hz (cycles per second).I would like to convert that, so that while it is 'flashing', it gives me a constant 5v, just as it does when the PC is in its normal powered state.Can anyone help with an 'easy' circuit?TIA

author: Andy Chee
author_rank: Super Contributor
timestamp: December 28, 2023, 11:13:37 am
content: The minimum component count and simplest circuit, would be a microcontroller of some sort.A 555 monostable would also work.

author: nali
author_rank: Frequent Contributor
timestamp: December 28, 2023, 11:21:53 am
content: Are the USB ports still active in sleep mode? You could just use the V+ pin if so; zero component count

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 01:01:07 pm
content: Hi, thankyou for the swift replies!I could have used the USB 5v, but my case scenerio is a bit more complex than I initially indicated.I have an 'encrypted' SSD. When power is removed, it 'locks'. Now, I want to use the sleep mode on my PC to save energy by using 'Sleep' mode. Unfortunately when I send PC to sleep, the drive loses power, 'locks' and won't resume.After fiddling with the motherboard, the only thing I can see which is still 'powered' in sleep mode, is the memory (3.3v the pins & circuits of which I cant access because its so small & fiddly) and the Power LED, which gives aformentioned output.So, I suppose I'm looking something to 'latch' a relay or some such, through which when latched, could then feed the ssd with the VSB (non-interuptable 5v supply), But which still removed power when the circuit was 'reset' when PC was 'Shutdown'.In effext, I was thinking of a small relay, which held closed whilst being fed with the 2hz pulse, but which went open when the puse stopped...After a bit of reading, would a Monostable Multivibrator using a 555 as sugested by (Andy Chee) timer work? If it gave an output pulse > than 1 second, that would hold my relay in.But would the output drop to zero as required when no input pulse was recieved?

author: SeanB
author_rank: Super Contributor
timestamp: December 28, 2023, 01:39:59 pm
content: Grab the red wire from one of the Molex HDD legacy connectors, which will be 5V when the power supply is on, and use that. If the board actually powers off the entire power supply, you really can only use the standby 5V power rail on the main power connection to power your HDD, and use a low current reed relay, 5V operation, fed with a diode and capacitor to integrate the pulses.

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 02:10:35 pm
content: Hi, thanks for your reply.I could use the red wire, but it loses power when PC goes into sleep mode.The standby supply with capaitor sounds promising though. What size capacitor though? And what is the diode for..supression?Or, perhaps a capicitor to feed something else which only needs a tiny voltage to maintain an output (then feed that output to the coil of the relay).This isnt my area of expertise

author: Andy Chee
author_rank: Super Contributor
timestamp: December 28, 2023, 02:19:15 pm
content: Quote from: JimmyQ on December 28, 2023, 01:01:07 pmIs that normal behaviour for an encrypted SSD? Remaining locked after waking up from sleep? Seems unusual. I understand the need to remain locked after power loss, but I would've thought the SSD would recognise the difference between power loss and sleep.Anyway, you will need to run the SSD, relay, and 555 monostable, all from +5VSB.As long as the 555 keeps receiving pulses, it will keep the relay and SSD powered up and unlocked. The 555 will also keep the relay and SSD powered with a "constant on" instead of pulses. If the pulses or "constant on" vanish, the relay will drop out and cut power from the SSD.The immediate problem I see though is, can your +5VSB supply enough power to your SSD? The +5VSB rail isn't exactly designed for powering peripherals. A diode hanging off the main +5V red wire could potentially work to alleviate this.Quote from: JimmyQ on December 28, 2023, 02:10:35 pmThe standby capacitor and diode, is a technique usually seen in memory retention for static ram chips (the diode prevents the capacitor from backfeeding and attempting to power the entire computer, instead of just the ram chips). I don't think it will work with an SSD, you'll have to check your SSD datasheet/manual.

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 03:13:30 pm
content: Hi Again.Yes, as far as i'm aware sleep removes power to everything on mobo except memory (which stores your current session), and other things using the 'standby' rail such as usb. Therefore the SSD which runs on the normal red 5v also loses power, and subsequently locks.My PSU states 5vsb as 3A. I''ve no idea how much the memory, mouse & KB take in sleep mode. But the SSD is supposedly around 0.25W (50mA?) idle (which it should be in sleep) and 8W (1.6A?) max (writing).Do you have any paricular 555 in mind? From what I can make out, the CMOS ones have lower power draw? Is there a ready-made module which might suffice? If not, what approximate values would you suggest for the caps+resistors?For the relay, i was looking at 'Meder PCB Mount Reed Relay, 5V dc Coil, SPST, 200V dc Max, 1 A Max, 500Ω'TIA.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 28, 2023, 03:41:12 pm
content: Quote from: JimmyQ on December 28, 2023, 03:13:30 pmDefinitely use the CMOS version, for exactly that reason.I don't know any modules off the top of my head, something simple like this (not forgetting that your a n00b!) I would normally dig salvaged components out of my parts bins and knock up a stripboard. A quick ebay search for "555 timer relay" shows modules that *might* do the job, though they don't have a schematic, so I can't confirm suitability.And as for component values, I don't know off the top of my head, but I'd normally have my resistor/capacitor substitution box handy and switching through different combinations.

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 03:53:11 pm
content: Ok, well thanks for the help & pointers, I'll probably order a few bits & bobs and see if I can make it work!

author: sparkydog
author_rank: Regular Contributor
timestamp: December 28, 2023, 06:19:58 pm
content: I suggest, before doing anything else, get a multimeter and check if the PSU is actually removing 5V from its peripheral rails during sleep. My understanding is that it should not. (There doesn't seem to be any PSU mode other than "disconnected", "off" and "on". Note that "off" means 5VSB and nothing else, whichis notadequate to keep RAM alive.)It's more likely that, as part of 'going to sleep', the computer istellingthe drive to power off. If this is what's happening, the only fix is going to be insoftware. You may just need to fiddle with your power-saving options, or you may need to roll a custom kernel or even custom bios (which is to say you're hosed, practically speaking).If it really is removing power, and just keeping the power on "fixes" the problem... that's going to be complicated. 8W at 5V is 1.6A, more than I'd want to draw off 5VSB... but 5VSB might be the only rail you can reliably use for continuous power in sleep. That means you need a way to switch between 5V and 5VSB when the computer switches in/out of sleep, and a big enough capacitor to take the load during the transition. This sounds very dodgy.You probably don't want to hear this, but... if there isn't a simple software fix, amuch betteroption is to just get a "normal" SSD and use software encryption that plays nicely with suspend. Jerry-rigging power supplies to the drive that stores your precious data feels like a good way to lose said data.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 28, 2023, 06:33:21 pm
content: have you checked for bios updates, there was some problems at the time for c states etc ... some usb and other things could not resumeyou had to fiddle in the bios settings to some extend to find theses settings, and for the led normally you have bios setting for that, power led status ...

author: langwadt
author_rank: Super Contributor
timestamp: December 28, 2023, 06:42:49 pm
content: Quote from: JimmyQ on December 28, 2023, 01:01:07 pmwhat's the point of having encryption if you want to leave it unlocked?

author: sparkydog
author_rank: Regular Contributor
timestamp: December 28, 2023, 06:52:04 pm
content: Quote from: coromonadalix on December 28, 2023, 06:33:21 pmAh, yes, that's a good point; seconded. Also, check if thedrivehas any firmware updates available...Quote from: langwadt on December 28, 2023, 06:42:49 pmIf you have an unencrypted drive, and someone walks off with it, they have all your data for nearly zero effort. Even if your machine isn't configured to require a password on resume, that's an improvement over no encryption at all.

author: JimmyQ
author_rank: Contributor
timestamp: December 28, 2023, 06:58:00 pm
content: Hello again. To address the recent points.Thanks for the tips & info.Sparkydog: I may have to switch between vsb and normal, but thats a bridge i'll try to cross when if or when it comes. But out of interest, do you happen to know the maximum time an SSD can manage without power? For instance, as a relay changes over. Ta.Coromanadalix: I'm afraid it''s not a bios issue. The rest of the system resumes fine from sleep. And in fact did so, before I encrypted this drive.langwadt: Leave it unlocked? I'm not sure what you mean.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 29, 2023, 12:47:19 am
content: Quote from: JimmyQ on December 28, 2023, 06:58:00 pmI alluded to a simple solution to this without using a relay: a diode hanging from the +5V red wire (e.g. schottky diode anode connected to +5V, cathode connected to +VSB)However this solution only works if the +5V is slightly higher voltage than +5VSB (to overcome diode voltage drop) e.g. +5.20V red wire vs +4.90VSB.The diode prevents the +VSB circuit backfeeding and attempting to power the entire computer. I suppose a MOSFET could also be used to isolate the +5V rail.

author: baldurn
author_rank: Regular Contributor
timestamp: December 29, 2023, 01:30:49 am
content: I would use a second power supply to feed the drive and then test if that actually makes any difference. No reason to continue down this path if it turns out, that the computer is sending a shutdown command to the drive.

author: JimmyQ
author_rank: Contributor
timestamp: December 29, 2023, 09:27:44 am
content: Good morning all.Andy Chee. Yes, that's an interesting potential solution, but i'm pretty sure the voltages will be the same (though not tested).I was looking yesterday at the reed relay switchover time which appears to be in the region of 1ms. I cannot however find data regarding the length of time an SSD can manage without power. All I can find is that they seem to have power loss protection, in the form of their own built-in capacitors. If I were t use a SPDT relay to switch between rails, I was looking at a 100uF cap to cover the 1ms break. Thats just a guess, as I can't make head nor tail of the formula requiredIt also seems that a cap would not neccecarily maintain the correct voltage...though i'm unsure if that would be a factor for such a short space of time. No doubt testing will reveal all!baldurn: I've previously powered the SSD from the VSB rail, and the PC resumes perfectly. It's not a command issue.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 29, 2023, 09:36:46 am
content: Quote from: JimmyQ on December 29, 2023, 09:27:44 amWithout this critical specification, you will have to be extremely liberal and give plenty of margin in your capacitor size for any relay changeover. There's no harm in going up to 1000uF or more, provided you have the physical space to accommodate the large capacitor.

author: JimmyQ
author_rank: Contributor
timestamp: December 30, 2023, 03:43:15 pm
content: Hello again!Well, I actually found a ready-made timer module online, which when input signal changes from steady 5v (normal power mode) to 1hz pulse 5V on 5V off (sleep mode) closes the output relay. I've set it to 5 seconds, so it doesn't tiimeout before next pulse arrives. Timeout is reset with each pulse keeping relay closed for duration of sleep, and then switch back upon restoration of normal mode.I've yet to test this on my SSD, as my caps havent arrived yet, but just running a multimeter thtugh the relay contacts, I can hear the beep pause for a very short time, upon relay changeover.Regarding the hold-up cap, is there any downside to have a larger cap? EG. Would it create spikes or anything that might damage the SSD?TIA

author: Andy Chee
author_rank: Super Contributor
timestamp: December 30, 2023, 03:50:18 pm
content: Quote from: JimmyQ on December 30, 2023, 03:43:15 pmLarge electrolytic 1000uF won't create spikes, though at the same time, electrolytics aren't good at filtering spikes themselves. It would be easy to add a small polyester 0.1uF in parallel to the 1000uF. The polyester capacitor handles spikes much better.

author: JimmyQ
author_rank: Contributor
timestamp: December 30, 2023, 05:49:28 pm
content: Ok thanks Andy. Also, would I need a diode, to prevent the capacitor discharging back into the PSU/any other equipt?

author: Andy Chee
author_rank: Super Contributor
timestamp: December 31, 2023, 02:15:11 am
content: You might want to draw a diagram of your entire setup and post it here for review. You shouldn't need a backfeed diode, but let's see your prototype setup first.

author: JimmyQ
author_rank: Contributor
timestamp: December 31, 2023, 11:43:09 am
content: I've actually got a working circuit using the timer. The caveat is I'm only happy running 1 SSD off the Standby Rail. I've figured out how to unlock the other drive (powered from 5vMain) in windows, just need to write a script to do it automaticlly.The circuit to power all SSD's from 5vMAIN, switching over to STANDBY when in SLEEP, & potentially requiring diodes & Cap would look something like this. I don't know how to draw in this site so:-Schottky R1/1+5VMain |\ | NC------------------------| >|-------------o\ ______|/ | \ common | |\o-----------------------| SSD |-----------|0V+5VSB |\ | | |______|------------------------| >|-------------o ||/ | NO ||||------------||---------------|0VC1 1Farad (5.5V)_______+5V Trigger | |---------------------------------------------------------------------| TIMER |---------|0V| R1 ||__ __ _|It definately looked better in Notepad++

author: zilp
author_rank: Frequent Contributor
timestamp: December 31, 2023, 11:49:52 am
content: Quote from: JimmyQ on December 28, 2023, 01:01:07 pmNow, I have no idea what Windows is capable of, but given that it's a somewhat regular occurence that someone reverse-engineers the "encryption" of "encrypted" storage devices and finds the encryption to either be non-existant or to be hilariously broken ... have you considered using software-based storage encryption? Even with proprietary software, there is more transparency than with black-box devices, so you can be pretty sure it's at least not completely braindead ... plus, maybe Windows is capable of resuming from a software-encrypted volume? Would be weird if it wasn't ...

author: mariush
author_rank: Super Contributor
timestamp: December 31, 2023, 11:51:02 am
content: The blinking led is powered from the chipset and it's very low current, like 5-10mA, and most likely it's 3.3v voltage. It's too little power to boost to 5v and have meaningful amount of power.You already have 5v stand-by power produced 24/7 by the power supply, so there's no need to make a circuit to obtain 5v from a blinking led. Just look at the 24 pin ATX connector pinout, and connect your +5v to the 5v SB pin , and the ground to any ground pin.Seehttps://bardimin.com/en/hardware-en/24-pinout-voltage-at-atx-power-supply-to-the-motherboard/- the 5v sb is the pin opposite and one step to the side to the missing pin in the atx connector (the missing pin is for -5v, which is deprecated, no longer required in modern power supplies)

author: JimmyQ
author_rank: Contributor
timestamp: December 31, 2023, 11:57:32 am
content: Good Morning.Zilp: I chose hardware encryption because it's faster, especially on my old system. I'm really not sure about the rest of your comment as you appear to be contradicting yourself.mariush: It appears you have not read, or did not understand my OP.

author: nali
author_rank: Frequent Contributor
timestamp: December 31, 2023, 12:10:21 pm
content: A massive 1F capacitor is likely to cause problems: it will basically appear as a short-circuit on start up so may prevent the power supply from starting, blow the schottky, or both.It's a kludgy setup... you may be better off just getting another small 5V PSU to power the SSD(s) - they're cheap enough - and enabling or switching it with your trigger arrangement.

author: zilp
author_rank: Frequent Contributor
timestamp: December 31, 2023, 12:26:37 pm
content: Quote from: JimmyQ on December 31, 2023, 11:57:32 am... because no encryption is taking place? ;-)But is it actually slower in a relevant way? I mean, AES-NI is not exactly new, so software-based storage encryption hasn't really been a bottleneck in a long time for most use cases, unless you are really using pre-AES-NI hardware.Quote from: JimmyQ on December 31, 2023, 11:57:32 amHow so? I just re-read it and don't see any errors.

author: mariush
author_rank: Super Contributor
timestamp: December 31, 2023, 12:46:35 pm
content: Quote from: JimmyQ on December 31, 2023, 11:57:32 amI did ... you sayQuoteIf it's a standard 24pin atx connector, there should be 5v stand-by present. I've marked it in the picture.5v stand-by would be needed to power at least a couple of usb ports or ps/2 ports if configured in bios for wake on key press / mouse click - usb or ps/2 would need to be powered for devices to wake up pc from sleep.If it's not possible to tap into the 24 pin connector, you could tap into the 3.3v or 5v going to the chipset - look around the chipset for a capacitor close to the chipset, like maybe the one circled in yellow ... and if it's not that one the other ones with a ? near them are potential candidates.Probe the circled capacitor on the back of the board and if that has 5v or 3.3v in sleep, just solder a couple wires to it on the back of the board.Super easy would be to just use an external 5v power supply and just use a couple ideal diodes or some very low drop diodes to auto switch between 5v sources - the SSD will not care about around 0.15v - 0.3v drop on a diode, because it will have a switching regulator inside to convert 5v to 3.3v and other voltages anyway.For example, a LM66200 is good for 1.5A of current from 2 inputs, the highest voltage being passed through :https://www.digikey.com/en/products/detail/texas-instruments/LM66200DRLR/15856663If you don't want solder mount, use a common cathode diode array for low voltage drop, like for examplehttps://www.digikey.com/en/products/detail/vishay-general-semiconductor-diodes-division/VS-40L15CTS-M3/5426200orhttps://www.digikey.com/en/products/detail/stmicroelectronics/STPS40L15CT/1039687- you'll get under 0.3v drop at 2-3 A of current the SSD may pull. Or cheaper, this one:https://www.digikey.com/en/products/detail/panjit-international-inc/SB1040LCT-T0-00001/15796152If you don't want to mess your power supply cables, you could just get a molex - sata or molex to 2 x sata adapter cable or sata to 2 x sata and introduce the diodes on the wires and solder the external power supply to the wires of the second sata connector.sata/molex to psu sata/molex plug ----- diode ==>| -- splice point for the second diode to external 5v -- ssd5v from external --- diode ==>| --- splice point - ssd

author: JimmyQ
author_rank: Contributor
timestamp: December 31, 2023, 01:13:38 pm
content: ZLIP: You said" but given that it's a somewhat regular occurence that someone reverse-engineers the "encryption" of "encrypted" storage devices and finds the encryption to either be non-existant or to be hilariously broken ... have you considered using software-based storage encryption?"You appear to start by negating encryption, but then go on to suggest software encryption. Either way, whilst I respect your opinion, I'm not here to debate the relative merits of one solution against another, simply to get advice on implementing my strategy.mariush: I don't think you've understood what i've already done, and am currently attemping. I'd already tapped into the +5vsb on the motherboard header (many years ago in fact!). The signal from the LED IS 5V. The +5VSB is a permanent supply, which was useful, but in itself did not suit the task at hand (read my second post!) Perhaps I had not conveyed this sufficiently in my earlier posts, as I did not see that information as relevant to what I was trying to accomplish.Just for info, the timer circuit is working perfectly, and I can resume from S3 sleep with a hardware encrypted drive (unlocking the other drive from within windows). That was my original goal. The further circuit (in the diagram) is simply an alternative.nali: Would not a resister of some description limit the inrush current to the cap? And if so, what size would you reccomend?TIA

author: zilp
author_rank: Frequent Contributor
timestamp: December 31, 2023, 01:31:41 pm
content: Quote from: JimmyQ on December 31, 2023, 01:13:38 pmNot encryption, "encrypted" devices, i.e., storage devices that claim that they encrypt your data for you. Those have been shown numerous times to either not actually do such a thing, or to do it in such a nonsensical way as to be just as useless as if there were no encryption in the first place.Quote from: JimmyQ on December 31, 2023, 01:13:38 pmGee ... I am not debating the merits, I am simply pointing out that I would think that software encryption would presumably solve your underlying problem of not being able to resume from an encrypted volume, while also not being worse, and somewhat likely better, as far as the goal of encrypting your data is concerned.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 31, 2023, 01:40:31 pm
content: Quote from: JimmyQ on December 31, 2023, 11:43:09 amYou can use the "insert code" tag to make ASCII art properly formatted (in my browser it's the hashtag # button above the "head banging" emoji)I would just use a single diode in the common line, rather than two diodes in NC and NO as you've drawn it.Also what's the datasheet on your 1F capacitor? If that's a so-called "supercapacitor" then that may NOT be suitable due to its relatively high impedance.

author: JimmyQ
author_rank: Contributor
timestamp: December 31, 2023, 01:58:55 pm
content: zilp: Clearly that's your opinion, and not the topic of this thread.Andy Chee: Yes it's meant to be a supercapacitor. I though they were meant to be ideal for this type of thing? If it had high impedance, would it not limit the current?Rated voltage 5.5V Rated discharge capacitance 1.0F AC Imp 20ΩDC Imp 30Ωcapacitance tolerance -20% -+80% Leakage current(24h)≤0.02mA Working temp -40-70°CWeight 3.5g

author: zilp
author_rank: Frequent Contributor
timestamp: December 31, 2023, 02:05:57 pm
content: Quote from: JimmyQ on December 31, 2023, 01:58:55 pmNo, it isn't just my opinion that "encrypted" storage devices have been shown numerous times to not actually effectively encrypt the stored data.And it also isn't just my opinion that software encryption probably would solve your underlying problem.And as such, it is obviously the topic of this thread.But I understand that you get annoyed when people try to help you, so ... forget it.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 31, 2023, 02:11:56 pm
content: Quote from: JimmyQ on December 31, 2023, 01:58:55 pmThese supercapacitors were intended for backup of static ram, not for powering SSDs (which use flash memory, eeprom or similar).Yes they do impede current, but for their intended application, static ram is also high impedance low current anyway.I should add that there are new supercapacitors out there that are indeed low impedance, but I think the one you have chosen is for static ram backup.

author: nali
author_rank: Frequent Contributor
timestamp: December 31, 2023, 02:23:03 pm
content: Quote from: JimmyQ on December 31, 2023, 01:58:55 pmWow, 30? Forget what I said about shorting the supply lol. With that internal impedence even at the minimal 50mA sleep current you'll lose 1.5V internally from the ~4.8V you charged it with.(In answer to the resistor question though - yes you can, and it's normal practice to put a diode in antiparallel with the current limiting resistor. Size the resistor so the maximum current draw doesn't exceed available current from the PSU)Use a proper capacitor and size it accordingly. You know the current draw & discharge time. You need to determine the minimum voltage your SSD will tolerate so can determine C size.(formula fromhttps://electronicbase.net/smoothing-capacitor-calculator/)

author: JimmyQ
author_rank: Contributor
timestamp: December 31, 2023, 03:03:40 pm
content: Andy Chee: Ah yes, the 2 diodes, that was actually meant for another circuit where I had 2 timers in parallel operation, 2 prevent circulating currents. I won't post that circuitIt all seems to be getting a bit too complicated. 40 or 50 years ago I built a little PSU for my CB Radio out of a scavenged transformer, bridge rectifier, a regulator chip, a couple of diodes and big capacitor, and it still works today. I don't remember having to calculate anything much, it just worked!My memory clearly isn't what it used to be. Original mission accomplished, I Think i'll leave it there. Thanks to all who helped.Goodbye.

author: Andy Chee
author_rank: Super Contributor
timestamp: December 31, 2023, 03:09:37 pm
content: For the record, what was the actual 555 timer relay you ended up buying, just as reference for anyone who might want such a module.