New Grad working in Industry, want to use MCU's to collect and send 24v DC

So I have recently graduated with an EE and we spend lots of time using and working with MCUs. In my (and most) industry(ies) they all use AB PLCs to do all of their controls. Those are very expensive and I am obviously more familar in writing in C language than ladder logic. I hope to create some in house testing equipment and would love to show off MCUs. One main product lines uses 24v DC so I would need to drop that down for whichever MCU I used. The simple voltage divider circuit could handle that (peak current ~4 A, typical ~1-2), but would love to get some ideas of sending back out 24V signals. I could have 24v coming to board and design a circuit to pull the line up to that voltage? Or if im using a buck converter to step down could use one to step up? Which Duino would you suggest? Thoughts gentlemen (and ladies)?

Can you explain what you mean by

send 24V

Is this a digital signal, ie 0V or 24V. Or is this signal variable between those two voltages.

One note. I doubt you will do any better than the PLCs, its a very mature market, with well designed, and robust

I was thinking the same thing. If it is variable voltage then why not use an OpAmp to generate the voltages needed. If it is digital, you might be able to get by with a level converter or some sort of fast switching logic level mosfet.

That being said, PLCs are used when you need mission critical systems. They are designed to fail safely and are HEAVILY HEAVILY HEAVILY tested for these features. I'm not joking on this, a guy on another forum mentioned that a typo made it through certification on a PLC they made (at an unnamed major PLC maker). It was left that way because changing the typo would cost around $3million in recertifaction costs.

aflambe: The simple voltage divider circuit could handle that (peak current ~4 A, typical ~1-2)

You serious??? 2+A through a simple voltage divider? From 24V down to 5V, that would be 38W wasted giving an efficiency of 20%.

Or if im using a buck converter to step down could use one to step up?

Do not use voltage regulators for level shifting signals they really are not suitable for this.

I wasn't entirely sure why dividers and buck converts were mentioned either.

Voltage divider for signal conditioning .e.g prior to use in the A2D is ok, but the original posted posed some strange questions.

I also find it a bit odd that a degree in Electrical Engineering didn't cover these topics during the course.

Let me try and clarify some of the questions.

Yes its a digital signal On or off (0v or 24V). Like if a photo eye were being tripped (light detect or dark detect).

I am not hoping to replace a PLC driven culture, but I do think that MCUs can do the same/similar things. Turn pin on, turn pin off, detect if pin runs high or low, use crystals/oscillators as timers.

No its not efficient to use a voltage divider to drop down from 24 to five with a higher current, but it can be done. (that's why I asked for some suggestions, more efficient ones) I mentioned the buck boost because I needed to jump back my voltage back up to 24V from the 5V from the board. The opamp is an obvious and better solution.

Maybe my original post was worded poorly. I'll try again.

Which Arduino platform would you guys suggest to detect and retransmit simple digital 24V DC (on/off) signals (stepping them down and back up to interface with the MCU via some step up and step down circuitry)

Thanks.

still not sure. if you have a power source and a device for that 4 amps, you can easly put in a verly low ohm resistor and measure voltage drop witout generating heat, or impacting the power.

you can use an optoisolator to send out an on=off signal. very much like the divider but with an isolated output.

For 24vdc digital signals to be read by a 5 volt MCU, just use a optoisolator IC. To convert a 5vdc digital output signal to 0 & 24vdc, again use a optoisolator alone or an opto driving a transistor if higher current is required. Translation of digital signal to and from TTL to 24vdc is no big deal. Reading and outputting Analog 4-20ma is more complex and expensive.

If you can run your system on 24V and just regulate down to 5V to for the Arduino (eg a switching type regulator / buck converter). then you just need to switch the 24V main supply to give you your 24V output

ie use a relay or a FET to switch the 24V using the output from the Arduino

If your controller needs to run from 5V and output 24V the only solution would be to create 24V using a Boost/Buck converter and then switch that voltage using the relay or FET.

But if possible you are better off running your main supply voltage as 24V e,g using a mains PSU that gives out 24 (they are quite easy to get hold of)

Re: Input. I'm not sure I see any problems here at all.

If the inputs are 24V (ON / OFF) just drive an opto isolator via the appropriate value resistor and then use the output of the opto as the input.to the Arduino

If the inputs are linear, either use a voltage divider, (resistors) or if you need isolation, you'll need to use some sort of isolation amplifier / isolation opto

PLCs have microcontrollers, but it's easier to "train" the so-called "technicians" to do ladder logic.

Re: Input. I'm not sure I see any problems here at all.

If the inputs are 24V (ON / OFF) just drive an opto isolator via the appropriate value resistor and then use the output of the opto as the input.to the Arduino

If the inputs are linear, either use a voltage divider, (resistors) or if you need isolation, you'll need to use some sort of isolation amplifier / isolation opto

DITTO THAT. They use 24V for a reason. I am just taking a wild guess here but it seems the reason is the long wire runs possible using 24V. On the other hand , that's why they use CAN BUS and MOD bus . There is also something called HOTEL BUS for large multistory hotels.