Author Topic: 5v Logic supply from 24v  (Read 4781 times)

0 Members and 1 Guest are viewing this topic.

Offline donkey77Topic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
5v Logic supply from 24v
« on: September 03, 2015, 07:20:07 pm »
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
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16281
  • Country: za
Re: 5v Logic supply from 24v
« Reply #1 on: September 03, 2015, 07:31:42 pm »
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.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: 5v Logic supply from 24v
« Reply #2 on: September 03, 2015, 07:36:23 pm »
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.
 

Offline darkness_electro

  • Contributor
  • Posts: 41
Re: 5v Logic supply from 24v
« Reply #3 on: September 03, 2015, 11:18:39 pm »
You can find on ebay 1$ lm2590 switching regulators that are good for like 3amps.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19484
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: 5v Logic supply from 24v
« Reply #4 on: September 04, 2015, 08:52:33 am »
I presume the equipment you have installed previously has been certified as "safe" (whatever that might mean) for use in your industrial environment. 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9938
  • Country: nz
Re: 5v Logic supply from 24v
« Reply #5 on: September 04, 2015, 09:19:43 am »
A little PCB mount isolated 5V DC/DC is the best option for a simple solution.

Then you just need some opto IC's

Do 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?
« Last Edit: September 04, 2015, 09:23:28 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline donkey77Topic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: 5v Logic supply from 24v
« Reply #6 on: September 04, 2015, 03:13:44 pm »
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.
« Last Edit: September 04, 2015, 03:21:03 pm by donkey77 »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9938
  • Country: nz
Re: 5v Logic supply from 24v
« Reply #7 on: September 04, 2015, 09:48:18 pm »
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.

« Last Edit: September 04, 2015, 09:58:25 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline donkey77Topic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: 5v Logic supply from 24v
« Reply #8 on: September 04, 2015, 10:15:30 pm »
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.
 

Offline donkey77Topic starter

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: 5v Logic supply from 24v
« Reply #9 on: September 10, 2015, 09:40:36 pm »
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.

Richard

Edit, forgot to mention although each valve pulls 0.3a the control signal to be switched is only around 7ma.
« Last Edit: September 11, 2015, 07:49:46 am by donkey77 »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12855
Re: 5v Logic supply from 24v
« Reply #10 on: September 13, 2015, 12:10:03 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf