EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: danners430 on February 11, 2018, 04:30:50 pm

Title: 5V supply from 14-16V square wave input
Post by: danners430 on February 11, 2018, 04:30:50 pm
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!
Title: Re: 5V supply from 14-16V square wave input
Post by: TheInfernoMan on February 11, 2018, 06:26:45 pm
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
Title: Re: 5V supply from 14-16V square wave input
Post by: danners430 on February 11, 2018, 06:44:20 pm
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
Brilliant - I'll do some testing :-)

Many thanks!

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: 5V supply from 14-16V square wave input
Post by: Benta on February 11, 2018, 07:18:44 pm
Bridge rectifier and smoothing cap is how it's done in the locomotives, so that should work.
Title: Re: 5V supply from 14-16V square wave input
Post by: danners430 on February 11, 2018, 07:31:04 pm
Bridge rectifier and smoothing cap is how it's done in the locomotives, so that should work.
Perfect - 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

Title: Re: 5V supply from 14-16V square wave input
Post by: grifftech on February 12, 2018, 03:34:39 pm
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
I would use an lm7805
Title: Re: 5V supply from 14-16V square wave input
Post by: Old Printer on February 12, 2018, 04:41:45 pm
How does a signal that runs +&- qualify as DC? Noob here, but this is the first I have heard of rectifying a DC signal.
Title: Re: 5V supply from 14-16V square wave input
Post by: Zero999 on February 12, 2018, 04:48:29 pm
How does a signal that runs +&- qualify as DC? Noob here, but this is the first I have heard of rectifying a DC signal.
It's not DC but AC PWM.

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!
What 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?
Title: Re: 5V supply from 14-16V square wave input
Post by: Old Printer on February 12, 2018, 05:02:59 pm
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.
Title: Re: 5V supply from 14-16V square wave input
Post by: danners430 on February 12, 2018, 05:11:54 pm


What 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.

The 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.
See https://dccwiki.com/File:DCCSIG.PNG for the diagram :-)

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?

The 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

Title: Re: 5V supply from 14-16V square wave input
Post by: Benta on February 12, 2018, 07:39:30 pm
Quote
Is the OP's "DC" spec just a typo, or is this an actual form of DC.

It's a typo.
Title: Re: 5V supply from 14-16V square wave input
Post by: Zero999 on February 12, 2018, 07:47:03 pm
How does a signal that runs +&- qualify as DC? Noob here, but this is the first I have heard of rectifying a DC signal.
It's certainly an error. DCC stands for Digital Command Control.
https://dccwiki.com/DCC_Power (https://dccwiki.com/DCC_Power)




What 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.

The 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.
See https://dccwiki.com/File:DCCSIG.PNG (https://dccwiki.com/File:DCCSIG.PNG) for the diagram :-)

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?

The 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
You 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 (https://www.mouser.co.uk/ProductDetail/CUI/VXO7805-1000?qs=%2fha2pyFaduiEIMOeRYVCgIh28VRZWvYzaKIzMz0E4Jjizkg%252bdHgklQ%3d%3d)
Title: Re: 5V supply from 14-16V square wave input
Post by: danners430 on February 12, 2018, 09:33:25 pm
How does a signal that runs +&- qualify as DC? Noob here, but this is the first I have heard of rectifying a DC signal.
It's certainly an error. DCC stands for Digital Command Control.
https://dccwiki.com/DCC_Power (https://dccwiki.com/DCC_Power)




What 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.

The 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.
See https://dccwiki.com/File:DCCSIG.PNG (https://dccwiki.com/File:DCCSIG.PNG) for the diagram :-)

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?

The 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
You 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 (https://www.mouser.co.uk/ProductDetail/CUI/VXO7805-1000?qs=%2fha2pyFaduiEIMOeRYVCgIh28VRZWvYzaKIzMz0E4Jjizkg%252bdHgklQ%3d%3d)
Brilliant - 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