5v Logic supply from 24v - Page 1
Forum section: electronics / beginners

author: donkey77
author_rank: Regular Contributor
timestamp: September 03, 2015, 07:20:07 pm
content: Hi All,My background is industrial machinery, PLC's and automation etc. I need to build an interface between 2 pieces of kit and have used individual opto coupler modules with din rail mounts in the past but as this new project is going to need quite a few signals the cost will ramp up. I am looking to knock up a simple interface pcb, probably with about 15 channels on it, going through opto's but I need to use the 24v dc supply existing in the machine to power it. What is the best way to design this supply? Voltage regulators, DC - DC convertors, voltage dividers? A point in the right direction would be gratefully received.Many thanks,Richard

author: SeanB
author_rank: Super Contributor
timestamp: September 03, 2015, 07:31:42 pm
content: Depending on current a Dc-DC converter will win out for anything over around 200mA, under around 100mA you can use a linear voltage regulator, though you probably will want to use a regulator rated for automotive use, as those will survive the nominal 24VDC bus in industrial logic. If you use a plain 7805 you will need input protection and probably preregulation to around 9V before it to keep it from being destroyed by spikes.

author: Ian.M
author_rank: Super Contributor
timestamp: September 03, 2015, 07:36:23 pm
content: Assuming your 5V rail shares a common ground with the 24V rail, first decide how much current you need available from the 5V rail, then multiply that by the voltage drop across a linear regulator, which would be 19V if your 24V rail is at its nominal voltage. That gives you the regulator's dissipation, and if its over a watt or so, a switched mode regulator using a buck converter topology would be a far better solution.Use an isolated DC-DC converter if you actually need an isolated 5V rail.

author: darkness_electro
author_rank: Contributor
timestamp: September 03, 2015, 11:18:39 pm
content: You can find on ebay 1$ lm2590 switching regulators that are good for like 3amps.

author: tggzzz
author_rank: Super Contributor
timestamp: September 04, 2015, 08:52:33 am
content: I presume the equipment you have installed previously has been certified as "safe" (whatever that might mean) for use in yourindustrialenvironment. In that case you will need to consider what you will need to do to ensure that your board does not compromise that, not least in terms of invalidating insurance.You mention optocouplers for isolation, but you don't mention whether the PSU has to have any isolation between input and output.

author: Psi
author_rank: Super Contributor
timestamp: September 04, 2015, 09:19:43 am
content: A little PCB mount isolated 5V DC/DC is the best option for a simple solution.Then you just need some opto IC'sDo you need 24V outputs going to 5V inputs or the other way around? Or both?There is a possibility you don't need a 5V powersupply at all.If the 5V devices are all outputs and can supply 5mA or so they can run the opto LEDs directly.Can you post a link to the DIN rail optos you used in the past?

author: donkey77
author_rank: Regular Contributor
timestamp: September 04, 2015, 03:13:44 pm
content: Hi, thanks for all the replies. I will have 24v dc signals going both ways so I guess I will need either 2 separate circuits, one powered from one side and the other powered from the other side or could I use an isolated converter?The two systems "interfacing" aren't designed by me. One is a big printing press with the manufacturers own make control system which will have been fully type approved. The other is a Pump system that normally runs as a stand alone system. I am just joining the two together but so as to not interfere with either system I don't want to take power, corrupt signals etc from either system.The din rail units I used before are:http://uk.rs-online.com/web/p/optocouplers/5330081/I originally only needed 4 but as the project has moved on I now require 9 going one way and 5 going the other. Obviously the cost of using the individual ones have got prohibitive.To solve the immediate issue the PCB will just be opto's, probably around 24 channels in total with LED indicators however I think to reduce wiring and further expense with PLC (mainly Siemens S7) expansion I/O modules I will add a microcontroller in later versions to carry out a little of the logic.Hope that explains it better.Thanks again,Richard.

author: Psi
author_rank: Super Contributor
timestamp: September 04, 2015, 09:48:18 pm
content: Ok, so that DIN module has like $1-$2 worth of parts inside it.You can make a circuit to do exactly what that module does. It even has the circuit diagram on the side.I assuming you normally just wire the input side of that DIN module to a device and it drives the LEDs directly?If so, then you dont have to worry about power for the opto inputs and you only need power for the outputs, so they have something to pull high.Since you are working in both directions you will want two isolated power rails +5V and +24V for the system inputs on each side.You could use a +24V AC-DC wall adapter (as long as its a good quality one and properly isolated) and then feed this into a 5V isolated DC/DC module. This would give you +24V and +5V from the mains.

author: donkey77
author_rank: Regular Contributor
timestamp: September 04, 2015, 10:15:30 pm
content: Exactly, ok when you're only using a couple of them but bloody expensive green plastic when you need 15-20 of them!!There is and indicator LED built into these which would be useful on my PCB to indicate high/low state.I need to use 24v logic signals from the printing press and also send a couple of 24v signals back to it. The pump system also uses its own system to I am effectively just switching their signals.The power supply in my interface box is something like this :http://uk.rs-online.com/web/p/din-rail-panel-mount-power-supplies/5145574/which powers my PLC and a couple of contactors.

author: donkey77
author_rank: Regular Contributor
timestamp: September 10, 2015, 09:40:36 pm
content: Expanding this project a little quicker than expected I will have to also add some control for operating 4 hydraulic valves. 2 of the valves are straight forward enough, 24v to one of two pins - to pin1 for CW/Left, Pin2 for CCW/right. The other 2 valves are proportional and have a 24v supply voltage to them along with a control signal that varies from 6v - 18v with 12v the mid stationary position of the valve.I will need 5 different voltages for each valve, I expect I will need to trim the voltages to balance both valves, as I will need to operate the valves in 2 directions at two different rates. i.e. 6v, 9v, 12v, 15v, 18v.I was planning to use a simple voltage divider circuit with trimmer pots for fine adjustment to achieve the voltage rails (unless someone has a more elegant recommendation) however to switch these signals using my PLC outputs is going to cause me to run over the maximum permitted number of output channels for this model of controller. The cost of using the next spec up of controllers makes the project a no go so I was wondering about switching the voltages on my PCB. What would be the best way forward for this? Multiple transistors/Mosfets etc, relays or is there some kind of digital switch in an IC package? (I don't know what these are called if they do exist)Thanks again for any pointers.RichardEdit, forgot to mention although each valve pulls 0.3a the control signal to be switched is only around 7ma.

author: Ian.M
author_rank: Super Contributor
timestamp: September 13, 2015, 12:10:03 pm
content: I assume these valve control signals need to be isolated as well.Can your PLC output PWM signals?If so, you can opto-isolate the PWM signal, then convert it to a proportional analog voltage which can be scaled to a 6 to 18 V range. Trimming the output voltage for 6V at minimum PWM duty cycle and 18V at maximum PWM would be done with trimpots in the scaling circuit, but trimming the actual chosen control voltage steps would be done by programming the PLC for a different PWM duty cycle.If the PLC doesn't have PWM but does have analog outputs, a voltage to frequency converter followed by optoisolation and a frequency to voltage converter will let you do more or less the same thing.If isolation is not required its a whole lot easier.Otherwise if you only have a limited number of digital outputs and it isn't practical/economic to add an expander or upgrade to to a more capable PLC, you will need to make a list of all the possible states all the valves need to be capable of being set to. Hopefully some combinations of valve positions are not used. The PLC would output the state as a binary number and your circuit would have to decode it to generate the actual valve control signals. Provided more than half the possible combinations of valve positions are not used, it will need fewer PLC output than controlling the valves individually by switching voltages would.