I would like to make an arduino board that is capable of handling 24V i/o.

Powering the Arduino would be done through either a linear or switching regulator of some sort. Low amperages, so efficiency isn't the main problem.

For input: 24v to 5v input scaling could be created with a voltage divider.

As far as I know, there will never run a high current into the arduino? So the power loss is minimal?

For output: 5v to 24v can be easily achieved using a MOSFET? Since this will ramp up the possible load (higher amperages) given that I'm using a 24v supply/separate line.

So I could choose to make half the I/O only input and half only output.

  1. Could I combine the MOSFET and voltage divider, and in what way?
  2. Are my "assumptions" about the I/O correct, or are there beter ways of handling it?
  3. What other things should I think of? Over voltage protection? Polarity inversion? Protection against too high currents?
  • 1
    Sounds like you want isolated level switching, not just voltage dividers and MOSFETs. At least, that's what I hear when someone says "industrialize"... – Ignacio Vazquez-Abrams Jan 7 '16 at 9:00
  • Like this. – Ignacio Vazquez-Abrams Jan 7 '16 at 9:02
  • Sound more like a job for opto-isolators. – Gerben Jan 7 '16 at 10:10
  • Or this: rugged-circuits.com/ruggeduino – Majenko Jan 7 '16 at 11:24
  • Very good points, indeed, putting opto-isolators in might be a better move. I kinda want to abstain from using a relais as I heard they can burn so that they won't stop outputting signal. So my best shot would be 2-way opto-isolators that can work with 5V at one side and 20V (larger amperes) at the other side? This would make it unable to use analog inputs for other than 0-5V though, but I'm not sure if it's neccesary to have those. The voltage dividor with an overvoltage protector might do for analog inputs? I guess I'm going to check more of those other designs, before I try to make my own – Paul Jan 7 '16 at 18:09

You mentioned 2 items: the supply voltage to the Arduino and scaling up to 24V output.

If the supply voltage you have available is 24V, then I would suggest you look for a DC-DC converter that scales down to 12V. Or, if you are looking to design your own PCB then perhaps use a 78xx voltage regulator. The 78xx are 3 pin devices and only require 2 caps to operate - I suppose a heat sink will not be needed.

To scale up the outputs to 24V I would suggest one of the following options:

a) Relay board / These will take the 5V from your Arduino and close a mechanical switch. If the relays are good quality they will go on for ages. And you can switch loads from 0 to 240V and more, DC or AC. Plus of the relays are sturdiness and that they are quite forgiving for short current overloads. Minus are that relays are " slow" when compared to semiconductors and they can arce when the contacts open - especially when driving inductive loads and that. Arcing will wear down your contacts and in extreme cases generate EMI that might interfere with your electronics. Arcing can be remediated in AC with a capacitor accross the contacts or in DC with a flyback diode.

If you will make your own PCB don't forget the flyback diode on pins connecting to the relay coils or you will possibly fry the Arduino due to a voltage spike!

Many of these boards are available on the web, so it's a quick solution.

b) Optocouplers / Also a good option. Functionally they act as a relay. They are a bit less forgiving to current overloads, so chose them wisely. They are silent and fast acting. Available for AC or DC and up to 600V. Minus side is that the tend to be a bit more expensive than relay boards. I'm talking about industrial grade devices and not some el-cheapo web site :-)

c) MOSFETS or Bipolar transistors / If you are designing your PCB then this could be an option. Here you can use a MOSFET or a PNP transistor of the adequate ratings and you would be done. Though maybe considering yur time investment the options above could be less expensive in the end. I this case you get complete control of PCB layout which might be a consideration. If you go this way, don't forget to add a flyback diode to the output of these devices to protect from spikes when switching inductive loads (= motors, solenoids).

A big advantage of Relays and Optocouplers is the galvanic isolation they provide, both from the load to the board as between the loads themselves.

If you could supply more detailed specs of the loads, environments etc I can help you narrow down your choices.

| improve this answer | |
  • I was indeed looking for a "broad" solution, as in using the arduino like a PLC. So at this point I don't have any more details on the environment. Also, I posted this to check if my ideas were right. I found that opto-couplers might fit best, or even in a combination with some relaises. I was unaware of the existence of optocouplers, so this really helped. – Paul Jan 8 '16 at 17:46

24 VDC industrial circuits are typically based around 4-20mA measurement (AI) transmitters and outputs (AO) to valves and other actuators. There are also 24 VDC DI & DO's. I believe that you should investigate Analog Devices and Texas Instruments chips for 4-20 mA interfacing. They have a number of chips for reading in and outputting 4-20 mA. You can get started if you Google "analog devices 4-20ma application note" or "texas instruments 4-20ma application note." If you Google "4-20mA application note," you will find that there are any number of people that make these chips and lots of people that provide application notes for 4-20mA loops.

Any information provided here is on a Caveat Emptor basis.

| improve this answer | |
  • It just came to my mind that an PLC wouldn't directly power something. I always had that thought because it was 24V (but amperes would be critical, and nobody is going to run 2A through a PLC?) So I could get some 2way opto-isolators and just hook them, like a regular PLC, as they aren't made for powering directly either. – Paul Jan 9 '16 at 19:03

This is a pretty old post but I'm sure people still search this topic from time to time. If what you are after is making an arduino into the plc replacement of sorts, look at these links. I've done these tasks and they worked pretty easyily for me. When you compare the cost of a plc to these alternatives, you won't find a new plc for the same price:



https://www.visuino.com/ - A visual ide

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.