24V DC Input to Arduino Pro Mini (5V) board

Dear All, I am making Project For Industrial Application. And all my inputs are of 24V DC. I am powering my Arduino using 24V DC-5VDC Buck converter. And I am thinking of using voltage divider for converting 24VDC to 5VDC using (38K ohm and 10K ohm resistance).

And we will be making 50 units of this. Because of which we will be making the PCB(From PCB Way/JLPCB) and in that PCB will will be mounting Buck Converter, Voltage divider Resistance.

Because we will be using this project for industrial application I am having following questions :-

1) Using Voltage divider for converting 24VDC to 5VDC is it reliable and best option . 2) Is Using the Arduino with Buck converter for industrial application is good (Temperature Range :- -10 deg C to 50deg C) 3) What Additional hardware I can fit in my PCB to increase the reliability of my system.

In my case reliability and robustness of the system is more important then cost . But definitely using PLC is too costly therefore I am not thinking of going for that.

Hire an engineer... no, no and who knows depending on your needs.

If the 24 volt signals are rather free from electronical noise voltage dividers would work. If noisy signals, use opto couplers.

The same goes for using the 24 volt and Buck converting, reasonably noise free source, okey. Else use a separate 5 volt generator.

Railroader, Thank for your positive reply .

My arduino Board will be mounted on Truck Chassis and the power supply will be coming from Truck Chassis battery. Therefore the voltage variation from 22 to 26V will be there.

Same goes for my input signal.

As per your suggesting I have decided to Go for optocoupler. I chose 4 Channel PC817 Optocoupler (PC847) for this and circuit for the same i have attached also.

but following are my doubts:-

  1. Is the circuit I have prepared is Okay.
  2. Whether 10K resistor at Optocoupler IC is required for safety or I can rely on inbuild pullup High resistor of IC.
  3. What are my options other then buck converter for noise free voltage (as my power input source is battery only and cannot install additional 5v power source).

OP's circuit:


You can omit the 10k pull up resistors on the Arduino side, and just configure the inputs with the INPUT_PULLUP option, if the optocouplers are physically close to the Arduino (on the same PCB or on a module attached to it with short wiring).

Uhm nope

"Uhm nope" what is your reasoning?

The output will be indeterminate

You wrote: "My arduino Board will be mounted on Truck Chassis and the power supply will be coming from Truck Chassis battery. Therefore the voltage variation from 22 to 26V will be there. ".

Are you telling us your truck battery uses 11 cells? That is where you would get 22 to 26 volts.

The rest of the world trucks and aircraft with nominal 24 volt systems use batteries with 12 cells and get 24 volts nominal voltage and 28 volts while charging.

Another question. Do you expect your system to operate while the starter motor is engaged starting the truck engine?

Paul

Good points Paul, much of this is outside the scope of diy. I cringe when I see industrial and automotive. Having done stuff in both the testing is stringent and designs have to be fool proof for obvious reasons.

If someone wanted us to help with an organ transport device I would react the same.

For a 24V signal from a regulated source with shared ground I'd use a voltage divider, or - even simpler - a diode pointing towards the signal and the enabling internal pull-up.

As it's automotive you may need to protect against negative transients, this accounts for both the signals and the power supply.

In OP's circuit from #3 you can indeed omit the 10k pull-ups on the optocoupler output, and use the internal pull-ups of the Arduino instead. No problem there.

What kind of trucks are we talking about? Is it electrical trucks powered from a traction 24 volt battory, or is it petrol powered trucks only using the 24 volt battory for starting? For 14 years I worked with 24 and 48 volts electricaly powered trucks. Look up, if the still exist, Hesselmann 24 volt motors. At start they pulled so much current that the voltage from the 24 volt battory got as low as some 10 - 15 volts, and the truck computer cut out. Which ever, be aware of negative voltage spikes. I recommend the opto approach.

A proper switchmode converter will handle even that extreme variation in voltage.

Optocouplers come in four-packs and should be just fine as above. The high INPUT_PULLUP value allows quite low current to the opto-LEDs but it is important that the optocouplers are located proximate to the MCU. You should use the opto-couplers to their best effect by ensuring the grounds on the LED side are separately led out to the wiring harness and the logic ground goes separately direct to chassis by a short path.

Still don't follow the

wolframore: Uhm nope

:roll_eyes:

nevermind me... it works fine... suggest some protection circuitry if this is automotive.

Thank you all for your responses

4 aarg :- I will omit the 10K pull up resistor and use the internal pull up resistor of arduino :)

Optocoupler will be mounted on the same PCB.

7 Wolframore :- The Output won't be indeterminate i feel as when Opto is off , Arduino will get ~+5V (Logic 1)(Due to internal pull up high resistor) and when opto is on arduino will get ~ 0(Logic 0)

8 Paul_KD7HB :- Paul the Truck will be having the standard 2x 12VDC (24VDC) battery only.

if you refer the article :- https://www.autobatteries.com/en-us/battery-testing-and-maintenance/car-battery-voltage-and-testing

it shows that when the battery is charged potential will be 12.6 VDC i.e (2 x 12.6 :- 25.2 V DC ) across battery terminal and while charging or during high throttle it can go up-to 14.7 V DC(29.4 VDC) .

Truck is Diesel truck hence while starting the truck , We observe a drop of potential of around 1 V DC hence on safer side I have mentioned 22 V DC .

Yes my system will be connected and is expected to work while starter motor is engage and starting the truck engine.

9 Wolframore :- Exactly I want my design to be fool proof , Kindly suggest to improve it's reliability

10 wvmarle :- you mean ,as I am using optocoupler the protection against negative transients won't be required (am i right in understanding your point?)

:- I will definitely remove the 10K pull up resistor.

11 railroader :- it's a diesel truck , with two 12V battery. (Thanks I will be using optocoupler )

12 Paul__B :- I will be using LM-2596-5 buck converter

:- I will be using PIC847 (4 packs opto coupler) , Optocoupler will be mounted on the same PCB as that of Arduino board :- I did not exactly get your ground part kindly confirm if my understanding is correct :- You mean that i should separately route the optocoupler input ground and Optocoupler output ground. But what would be the benefit of it as the chassis ground and battery ground will be same (After Euro-4 all the chassis is connected with battery ground).

My Questions :-

1) LM-2596-5 Buck converter I am using is correct or some better alternative is available.

2) As suggested by Paul__B , What's would be the benefit of routing separate optocoupler input and output ground as ultimately the chassis and battery ground is same.

3) As suggested by wolframore :- Kindly suggest some protection circuitry that I can add to increase system robustness and reliability

4) LM 2596-5 voltage variation will be between (4.8 to 5.2 V DC) so should I connect it to VCC pin of Arduino ? ( as the RAW pin accepts voltage between 6V to 20V DC)

kkaranag:

7 Wolframore :- The Output won't be indeterminate i feel as when Opto is off , Arduino will get ~+5V (Logic 1)(Due to internal pull up high resistor) and when opto is on arduino will get ~ 0(Logic 0)

That's correct.

10 wvmarle :- you mean ,as I am using optocoupler the protection against negative transients won't be required (am i right in understanding your point?)

Indeed. Depending on the source of the signal you may not even need the isolation of those optocouplers, but it won't hurt. Best to have a buck converter that's designed for automotive use (lots of those on the market sold as mobile phone chargers at least for regular cars at 12V, I suppose as well for 24V truck use), as it's the power supply side that may see those transients. Short in duration and rarely happening, but it can be destructive to electronics.

While the optocouplers do not draw a lot of current, the whole and only benefit of using them at all is to keep all the voltages and current on the input side away from the voltages on the output side - and that includes the ground currents.

If you connect the same ground to the input and output sides, they have negligible advantage over using an ordinary transistor in the same configuration - emitter to ground, an input resistor on the base and the collector to the Arduino input.

You should only (ever) connect a regulated supply Voltage to VCC; 5V for a 5V board (3.3V for a 3.3V board). To power a Pro Mini directly from a battery, you should connect the battery +V to the RAW pin. The RAW pin is the input to the on-board regulator. :wink: ::slight_smile: :confused: