5V supply from 14-16V square wave input - Page 1
Forum section: electronics / beginners

author: danners430
author_rank: Regular Contributor
timestamp: February 11, 2018, 04:30:50 pm
content: Hey guys,Another question to do with model railways, but much more "purely electronics".I'm wanting to power a microcontroller board (5V) from my DCC power supply. This is a 14-16V DC variable square wave supply (see image below). Which kind of power supply would be suitable for this?Cheers in advance!

author: TheInfernoMan
author_rank: Contributor
timestamp: February 11, 2018, 06:26:45 pm
content: I think one way to do this is to rectify the signal with a full-bridge-rectifier and Smooth the signal with a capacitor. Afterwards you can use a cheap Buck Converter to step down the ~14V DC to 5V DC

author: danners430
author_rank: Regular Contributor
timestamp: February 11, 2018, 06:44:20 pm
content: Quote from: TheInfernoMan on February 11, 2018, 06:26:45 pmBrilliant - I'll do some testing :-)Many thanks!Sent from my ONEPLUS A3003 using Tapatalk

author: Benta
author_rank: Super Contributor
timestamp: February 11, 2018, 07:18:44 pm
content: Bridge rectifier and smoothing cap is how it's done in the locomotives, so that should work.

author: danners430
author_rank: Regular Contributor
timestamp: February 11, 2018, 07:31:04 pm
content: Quote from: Benta on February 11, 2018, 07:18:44 pmPerfect - saves a second power supply in future, and allows me to do a certain type of circuitry :-)Cheers!Sent from my ONEPLUS A3003 using Tapatalk

author: grifftech
author_rank: Frequent Contributor
timestamp: February 12, 2018, 03:34:39 pm
content: Quote from: TheInfernoMan on February 11, 2018, 06:26:45 pmI would use an lm7805

author: Old Printer
author_rank: Frequent Contributor
timestamp: February 12, 2018, 04:41:45 pm
content: How does a signal that runs +&- qualify as DC? Noob here, but this is the first I have heard of rectifying a DC signal.

author: Zero999
author_rank: Super Contributor
timestamp: February 12, 2018, 04:48:29 pm
content: Quote from: Old Printer on February 12, 2018, 04:41:45 pmIt's not DC but AC PWM.Quote from: danners430 on February 11, 2018, 04:30:50 pmWhat frequency is the signal?You might need to use a faster bridge rectifier, than what would normally be used for mains frequencies. The filtering capacitor can probably be quite small though.How much current is required at 5VDC?Does anything powered from the 5VDC supply need to look at the duty cycle of the 14VAC input?

author: Old Printer
author_rank: Frequent Contributor
timestamp: February 12, 2018, 05:02:59 pm
content: Is the OP's "DC" spec just a typo, or is this an actual form of DC. There are many things I don't understand about AC yet, but I am under the impression that a signal that swings + & - is considered AC. Not nit picking, just trying to learn. Thanks.

author: danners430
author_rank: Regular Contributor
timestamp: February 12, 2018, 05:11:54 pm
content: Quote from: Hero999 on February 12, 2018, 04:48:29 pmThe frequency varies depending on the digital signals, but nominal signals are 58µs duty cycle for high bits, and 100µs duty cycle for low bits.Seehttps://dccwiki.com/File:DCCSIG.PNGfor the diagram :-)Quote from: Hero999 on February 12, 2018, 04:48:29 pmThe 5V supply is going to supply microcontrollers (PICAXE), which in turn have switches attached as well as multiplexed LEDs controlled through standard transistors. The only strange one is a set of PNP and NPN MOSFETs which control the solenoid point motors. The supply for them is separate however, the 5V is only to actuate the MOSFETs.Hope this helps :-)Sent from my ONEPLUS A3003 using Tapatalk

author: Benta
author_rank: Super Contributor
timestamp: February 12, 2018, 07:39:30 pm
content: QuoteIt's a typo.

author: Zero999
author_rank: Super Contributor
timestamp: February 12, 2018, 07:47:03 pm
content: Quote from: Old Printer on February 12, 2018, 04:41:45 pmIt's certainly an error. DCC stands for Digital Command Control.https://dccwiki.com/DCC_PowerQuote from: danners430 on February 12, 2018, 05:11:54 pmYou need to measure how much current your circuit draws, if you can't predict it.The maximum frequency is high enough to wrarant something faster than the 1N4002. Use the UF4002, which is much faster.If the current is low <a few hundred mA, a linear regulator, such as the LM7805 will do. For higher currents, a large heat sink will be required, so it makes more sense to use a switched mode regulator and Schottky diodes for lower power loss. Fortunately there are some ready built switched mode regulator modules, available at a reasonable price. See the link below. Cheaper can be bought from Amazon, ebay etc. but a electronics distributors tend to give more product information and a shorter lead time.https://www.mouser.co.uk/ProductDetail/CUI/VXO7805-1000?qs=%2fha2pyFaduiEIMOeRYVCgIh28VRZWvYzaKIzMz0E4Jjizkg%252bdHgklQ%3d%3d

author: danners430
author_rank: Regular Contributor
timestamp: February 12, 2018, 09:33:25 pm
content: Quote from: Hero999 on February 12, 2018, 07:47:03 pmBrilliant - I'll prototype the circuit once I get my breadboards back following Model Rail Scotland, and hook up an ammeter to see the current draw. Shouldn't be too bad... But up to about 50 LEDs aren't without their power draw... :-)Cheers for the help guys :-)Sent from my ONEPLUS A3003 using Tapatalk