52 Replies Latest reply on May 22, 2019 12:12 AM by dougw

    is arduino reliable for industrial environment for industrial application?

    parth.shah

      hi all,

      i have used arduino uno to make datalogger for industy.i used sd card,rtc,lcd and some basic ic in my circuit.plz do rply.is it reliable to use arduino in industry?

        • Re: is arduino reliable for industrial environment for industrial application?
          michaelkellett

          It does rather depend on the industry and where you have sourced the parts but I would say that Arduino type parts are not designed for industrial use and are probably not suitable. Electronics for use in induutry will have to satisfy requirements special to the application as well as general requirements such as EMC certification, safetey approvals (if relevant) etc.

           

          On the other hand if your application is a one off piece of test equipment an Arduino based device may be OK.

           

          MK

          1 of 1 people found this helpful
          • Re: is arduino reliable for industrial environment for industrial application?
            peteroakes

            Agree with Michael

             

            Arduino is an echo system to allow rapid development and education without having to get out the soldering Iron for instance, the boards in general lack the protection circuits often required in industrial applications to protect the controller as well as many other potential safety and environmental considerations. I have some experience building systems for the gas industry and in this kind of environment it would not be allowed for instance.

             

            This does not mean that the micro-controller (ATMEGA328 on the UNO) is not suitable for use in industry, you just have to add all the other electronics required to meet the standards. The same goes for TI MCP430 series or other brands. In some areas like Automotive there are very strict requirements which is why you will find a significant percentage of cars use Motorola Micro controllers (Yes they do make them and yes you may never had heard of it). The chips are approved for use in this industry, the approval is expensive but there you go.

             

            As Michael said though, it depends on the specific industry and use and must be evaluated on a case by case basis. If it is a one off then you may simply have to make suitable modifications to the board and container to meet the legislations required for that use. If it is going in a field to measure temp and humidity, there is pretty much not much required except protecting from the elements (Unless the field is in a certain town in England sitting on top of 20M cubic feet of natural gas at 1000PSI  yes it exists and I put a controller there )

             

            anyway I think you get the idea.

             

            Have fun, be safe

             

            Peter

            1 of 1 people found this helpful
              • Re: is arduino reliable for industrial environment for industrial application?
                parth.shah

                Thank you peter.

                should i move to basic controller?.suggest me some board or controller which i can use in industry.

                • Re: is arduino reliable for industrial environment for industrial application?
                  ravibouroji

                  hello peter

                  iam new to arduino i just done temperature monitor project with arduino,now i want to develop a project using current sensor CT coil that senses the running current of a ac application.

                  can you suggest me in this.

                  thanks in advance

                    • Re: is arduino reliable for industrial environment for industrial application?
                      peteroakes

                      Well the one nice thing about using a current sense coil or a hall effect current sensor is your circuitry is isolated from the mains but you still have to wire your sensor into it by disconnecting the mains wire and feeding it through the coil or the hall sensor current side circuit, this is the most dangerous part

                       

                      once this is done, the low side monitoring is relatively straight forward but depending on your skill level may change your approach (AND YOU STILL HAVE TO BE AWARE MAINS IS IN CLOSE PROXIMITY AND WILL KILL YOU GIVEN A CHANCE )

                       

                      First you need to ensure the output of the sensor is within range of the Arduino being used, for an UNO this would be 0 - 5V. now your current sense coil probably gives out an AC signal still so it will need to be rectified (Simple Diode  should work here) and then optionally smoothed with a capacitor to then be read by an ADC in the UNO. the other option here is to take the rectified signal but not smoothed into the ADC and sample at a quicker rate, you could then also measure the AC frequency and possibly perform true RMS calculations on the data to get more accurate readings.

                       

                      Without knowing the actual parts your going to use for the current sensing it is hard to provide better info but this should give you enough to think about your approach

                       

                      Provide a little more details and we can help better

                       

                      for practice and experimentation prior to hooking up to the mains I would suggest using a transformer with say a 3V AC output and get skilled at measuring this using the Arduino first, this way your not worrying about the actual measurement once your adding the current sensing into the mix

                       

                      At the measurement end there is no difference, the Arduino can not measure current. Actually most multimeters don't measure current, they nearly all convert it to a voltage first and measure that. Hence the use of a current shunt resistor

                       

                      hope this gets you started

                       

                      Peter

                      1 of 1 people found this helpful
                    • Re: is arduino reliable for industrial environment for industrial application?
                      mv911

                      I am working on a project with working of MRF(Magneto Rheological Fluids) & i want to control multiple stepper motors & dc motors, can i use arduino uno  &  if not can you suggest me another device? Thank You, Every help is appreciating.

                    • Re: is arduino reliable for industrial environment for industrial application?
                      peteroakes

                      Arduino is a basic controller, or more specifically the ATMEGA328 on board it is

                       

                      and it all depends on the application your using it for. it is impossible to say yes or no as a generic statement, if you provide more info as to your intended use then people on the forum could provide more appropriate advise.

                       

                      The arduino is an excellent platform to learn on, it is a good basis for low volume runs of a custom system where it is not cost effective to build a custom board or where you are in a rush to get a solution out there

                       

                      but as stated before it depends where your going to use it and for what. Even the country or province your deploying it in can have different rules about safety or requirements that you may have to adhere to.

                       

                      in a lot of cases if it is for personal use then the regulations are more lax, but the moment your selling a solution or putting it into a controlled environment the rules can change

                       

                      I guess the old adage "If in doubt... DONT" comes to mind

                       

                      There are loads of people on the forum that can provide advise but at the end of the day it is your that is responsible to confirm local requirements and rules and it is you that will carry the blame if rules are broken

                       

                      now having said all that in most normal hobbyist cases there are no issues to worry about and you will be ok, but it is worth a bit of research if it is not for our personal use.and or your selling the final product

                       

                      peter

                      1 of 1 people found this helpful
                      • Re: is arduino reliable for industrial environment for industrial application?
                        parth.shah

                        Thank you peter.

                        here i put all document which i have regarding my project.i made data logger which store data in sd card this is basic application.

                        how whole system work?

                        i have used retro reflective sensor to sense the rpm of motor.sensor will give 17v dc when it sense the reflector.after getting this 17v in circuit .i used this 17v and convert it to 5 volt with the help of voltage regulator(7805 and 7812).i used oprocupler ic(MCT 2E) and give 5v to arduino intrupt pin 2.with the help of coding i count the rpm and store it in sd card.

                          • Re: is arduino reliable for industrial environment for industrial application?
                            peteroakes

                            The only thing I would suggest there is to remove the two regulators your usng to drop the voltage and simply use the  optocoupler

                             

                            a bit like this

                            220v-power-interface-diagram.gif

                            just lower the value of the R1 to about 10K should do the trick (It will work with DC too)

                             

                            you dont need to use the two regulators, just the resistor to limit the current into the opto coupler

                             

                            I am assuming that the arduino is not powered by this 17V as well

                              • Re: is arduino reliable for industrial environment for industrial application?
                                mcb1

                                It would be unwise to assume anything.

                                 

                                The ATmega328 in any form has no watchdog timer, hence it can get locked up.

                                Any application that requires it working 100% should include a watchdog device to reboot it and warn that it is not running.

                                 

                                You may need to custom design a suitable power supply using switching regulators in order to ensure the 40deg temperatures don't start affecting it.

                                 

                                As Peter and Michael have indicated it depends on the requirements.

                                If you're looking for a cheap data logger to provide some information .... then fine.

                                If you intend to use this to collect critical data and provide warnings about impending disaster ... then NO.

                                 

                                Mark

                                 

                                Edit

                                It seems that there is a WDT and the link shows how you can implement it.

                                1 of 1 people found this helpful
                                  • Re: is arduino reliable for industrial environment for industrial application?
                                    peteroakes

                                    Regarding Watchdog...

                                     

                                    Page 1 of the ATMEGA328 user guide http://www.atmel.com/Images/doc8161.pdf

                                     

                                    Peripheral Features

                                    – Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode

                                    – One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode

                                    – Real Time Counter with Separate Oscillator

                                    – Six PWM Channels

                                    – 8-channel 10-bit ADC in TQFP and QFN/MLF package

                                    Temperature Measurement

                                    – 6-channel 10-bit ADC in PDIP Package

                                    Temperature Measurement

                                    – Programmable Serial USART

                                    – Master/Slave SPI Serial Interface

                                    – Byte-oriented 2-wire Serial Interface (Philips I2C compatible)

                                    Programmable Watchdog Timer with Separate On-chip Oscillator

                                    – On-chip Analog Comparator

                                    – Interrupt and Wake-up on Pin Change

                                    • Special Microcontroller Features

                                    – Power-on Reset and Programmable Brown-out

                                     

                                    10.10.5 Watchdog Timer

                                    If the Watchdog Timer is not needed in the application, the module should be turned off. If the Watchdog Timer is

                                    enabled, it will be enabled in all sleep modes and hence always consume power. In the deeper sleep modes, this

                                    will contribute significantly to the total current consumption. Refer to ”Watchdog Timer” on page 50 for details on

                                    how to configure the Watchdog Timer

                                     

                                    Reset Sources

                                    The ATmega48A/PA/88A/PA/168A/PA/328/P has four sources of reset:

                                    • Power-on Reset. The MCU is reset when the supply voltage is below the Power-on Reset threshold (VPOT).

                                    • External Reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum

                                    pulse length.

                                    Watchdog System Reset. The MCU is reset when the Watchdog Timer period expires and the Watchdog System

                                    Reset mode is enabled.

                                    • Brown-out Reset. The MCU is reset when the supply voltage VCC is below the Brown-out Reset threshold (VBOT)

                                    and the Brown-out Detector is enabled.

                                     

                                    and a howto http://forum.arduino.cc/index.php?topic=128717.0

                                     

                                    Peter

                                    1 of 1 people found this helpful
                                    • Re: is arduino reliable for industrial environment for industrial application?
                                      dougw

                                      I hate to contradict, but can't leave people with an incorrect impression of the ATmega328. This chip does have a watchdog timer and it even has a programming lock for software security. The watchdog can be accessed in an arduino by including the avr watchdog library. There are many examples on the internet.

                                      As for using arduinos in industrial applications, it is the same selection process as using any other chip or module - make sure they meet all the required specifications. One weak area to pay particular attention to is the connectors - neither the power connector nor the signal connectors are locking and may not be reliable in a high vibration applications and may have problems with humidity and thermal cycles. This might be improved by using hard-wired solder joints instead of header connectors and you can get arduinos where the cpu is not in a socket but soldered down. Similarly any other weaknesses may be addressed in your system design. For example power supplies are available with any rating you might require and the electronics can be protected from the environment with suitable packaging.

                                      1 of 1 people found this helpful
                                      • Re: is arduino reliable for industrial environment for industrial application?
                                        parth.shah

                                        no i don,t want to collect critical data.i want accuracy around 90%.

                                      • Re: is arduino reliable for industrial environment for industrial application?
                                        parth.shah

                                        no peter arduino is powered by 12v which is driven from 7812ic.

                                          • Re: is arduino reliable for industrial environment for industrial application?
                                            peteroakes

                                            YYou Ned to check the schematics

                                             

                                            atmega is either a 5v or a 3.3v device due pending on the model of arduino, in your case it is a 5v device and there is no 7812 on board, maybe a 7805 or a buck regulator for 5v but defiantly not a 12v

                                              • Re: is arduino reliable for industrial environment for industrial application?
                                                parth.shah

                                                i have used arduino uno and oprated voltage of arduino is 7-12v.

                                                  • Re: is arduino reliable for industrial environment for industrial application?
                                                    peteroakes

                                                    you are correct with regard to the voltage applied to the round input power jack but this is not the voltage the actual atmega328 works at (AKA its operating voltage, that is its supply voltage. in the UNO it is a 5V micro-controller device, in other Arduinos it can be 3.3V. If you plug in power via the USB rather than the jack, it is running at a nominal 5V typically, if you supply via the headers it is also 5V or 3V3 depending on the model.

                                                     

                                                    I think I may be miss understanding what your describing, Are you referring to the fact that you have a 12V power supply that is being used to power the Arduino, not the supplies used within the Arduino board itself. In which case, sorry for getting the wroong end of the stick .

                                                     

                                                    though I would like to point out that using 12V for an extended period of time will cause the on-board regulators to dissipate a lot of heat (More than 50% of the power out of the 12V supply to be precise) as you will be dropping 7V before consuming any of it.

                                                     

                                                    If you can switch out the 12V supply for an economical 5V USB power brick you will be much better off (Assuming this is what your referring to of course)

                                                    2 of 2 people found this helpful
                                          • Re: is arduino reliable for industrial environment for industrial application?
                                            parth.shah

                                            Thank you to all.

                                            are you able to judge system performance if i provide you whole system video?i heard arduino is nothing but it,s only ATmega 8 bit chip.is it true?

                                            • Re: is arduino reliable for industrial environment for industrial application?
                                              parth.shah

                                              Thank you peter.

                                              as a understood.i ll try to give 5v supply to arduino uno through usb port.and will come back if it not work,and once again thank you all.it is nice to talk with you all. thanx for the support.

                                               

                                              Parth shah.

                                              • Re: is arduino reliable for industrial environment for industrial application?
                                                paulfurley

                                                I know this post is a bit old now but I thought it would be worth contributing for people finding this in the future.

                                                 

                                                I did a write up at Arduino Isn’t Just For Hackers ← Paul M Furley about the success we had integrating Arduino into two systems on a digital printing machine (a large industrial application).

                                                 

                                                As others have rightly pointed out, there's no one answer for whether Arduino is suitable for industry - in our particular case it was a great fit but there are plenty of applications with different requirements.

                                                 

                                                Paul

                                                 

                                                Update: I'm not involved any more but I'm sure my dad (who runs the business) would be happy to answer any question, his email is here: Contact & Location for JF Machines Ltd

                                                1 of 1 people found this helpful
                                                • Re: is arduino reliable for industrial environment for industrial application?
                                                  parth.shah

                                                  thank you all.i will contact to your dad Paul Furley.

                                                  • Re: is arduino reliable for industrial environment for industrial application?
                                                    albertprieto84

                                                    Dear all,

                                                    Arduino board, as a component is reliable 100% as a industrial PCB. All pcb boards use similar components. But some connectors or function voltage is diferent that industrial voltage or connector plug in. You can see industrial shields wich is using an orginal Arduino boards but with industrial case for Din Rail and are mounting with 24vdc shields, analog 0-10Vdc and relays in its product range.

                                                    In my experience Arduino Mega and Arduino leonardo is 100% usable of industrial environment with current industrialshields.

                                                    br

                                                    Albert

                                                    1 of 1 people found this helpful
                                                      • Re: is arduino reliable for industrial environment for industrial application?
                                                        peteroakes

                                                        I agree that the main components on an Arduino or Launch pad are suitable for industrial applications, it is the physical and electrical construction of the Arduino or Launch Pads that are the primary issue, they do not use industrial grade connectors, do not have suitable input ,output protection , Isolation etc and so many other minor points that would need correcting for a commercial / industrial application. this does not mean there a bad design, there actually very good for their target audience (Education) and built to a budget

                                                         

                                                        There are many boards, and as you say DIN Rail mountable industrial controllers that are "BASED" on the Arduino or Launchpads or others but have been "Ruggedized" for the target environment

                                                         

                                                        for instance : http://www.industrialshields.com/

                                                        2 of 2 people found this helpful
                                                          • Re: is arduino reliable for industrial environment for industrial application?
                                                            balearicdynamics

                                                            To be honest I follow a different approach.

                                                             

                                                            The Arduino board by a mechanical point of view, as it is an industrial PCB it is true it is 100% reliable. But in a more extended view, the use of a Arduino, the physical object I mean, in an industrial environment IMHO maybe not the better solution; one of the reasons is just the connectors problems. But there are plenty of other "simplifications" in the board circuits that can generate problems and issues during the usage and that can be avoided with some few improvements.

                                                            A good reference of the most commons upgrades I have found on a nice ruggedcircuits post. Some other depends on the specific application the board is, and - again - the connectors are another problem that can make the difference.

                                                             

                                                            In conclusion, as the AVR328p (or similar other circuits Arduino-based) is almost simple and well documented in hundreds of sites, when I need to make a board to do something specific (i.e. my click remote project, just to make an example), I think that the better solution is to redesign the Arduino board with some basic improvements adding on the same board the other components and eliminating those connectors or parts that does not need to be used. Thinking to this approach you can see too that as the project custom components will be on the same Arduino-like custom board also the number of external connectors decreases dramatically while most of the connections become tracks on the PCB. With a great advantage in the simplification of the entire project, less wiring and less weak points exposed to risk factors.

                                                             

                                                            Enrico

                                                            1 of 1 people found this helpful
                                                        • Re: is arduino reliable for industrial environment for industrial application?
                                                          DAB

                                                          It all depends upon your operational environment.

                                                           

                                                          If you put the arduino in a sealed box with proper EMI protection and keep it out of any atmospheric or moisture areas, it could be fine.

                                                           

                                                          I would recommend that you take a good look at the local hazards in the area where you want to put it and assess if any of them would harm or interfere with you Arduino.

                                                           

                                                          Then it is just a matter of mitigating those hazards.

                                                           

                                                          How long do you intend to have your system data logging?

                                                           

                                                          If you are going to check on it often and keep it clean, you may get more use out of it.

                                                           

                                                          DAB

                                                          1 of 1 people found this helpful
                                                          • Re: is arduino reliable for industrial environment for industrial application?
                                                            lihuizhan

                                                            Hello everyone, my name is Daren. I am an Engineer and Arduino software developer.

                                                            This is the question I started asking when I had clients that needed specialized automation systems for industrial applications. I liked the Arduino IDE and had my eyes set on the Due but had no idea what I was getting myself in to. Before I begin to share my experiences and attempt to answer the question of Arduino’s suitability within a large industrial control environment, I should first preface my answer with some insight about the hardware.

                                                             

                                                            Firstly, the Arduino Due is the only board that even comes close to being useful for industrial applications; at least for the main control board. The Uno and Mega are fine for collecting sensor data from remote areas and sending the readings/thresholds to a more capable board via Ethernet for the main logical processing. The primary reason is that the Due is Arm Core 32-bit and doesn’t have the global variable restriction like the Mega for example. The Mega can only have around 200 or so declared variables before it won’t compile which is ridiculously tiny; compared to the Due which can have thousands of variables, only restriction being the flash memory itself. The Due doesn’t have a global variable memory allocation limit like the Mega. That introduces a HUGE increase in software capability that blows the Mega away; the Mega is also very laggy with big sketches even if well written. The Due can handle more than 15,000 lines of code without even breaking a sweat and tops out at somewhere around 26,000 lines and handles an AMAZING 54 interrupts compared to a measly 6 on the Mega which is perfect for complex systems.  If your automation system has 26,000 lines of code I hope its mopping the floor too. There are also more powerful Arduino IDE compatible microcontrollers made by Texas Interments and Intel but I don’t have any experience with those and the Due so far has been more than powerful enough.

                                                             

                                                            Another thing worth mentioning is that the Due has no user programmable EEPROM, which makes it seemingly useless for industrial applications, right? Wrong, use the SD card to save all variable states in a prudent interval or under certain conditions and then load all the variables back from the SD upon boot-up. A guy named Alex Shu (http://overskill.alexshu.com/saving-loading-settings-on-sd-card-with-arduino/) made a wonderful example how to very easily and effectively store and recall variables from/to the SD card and its way more simple and effective than using an EEPROM and can have 4GB+ of data.

                                                             

                                                            And lastly, in a big factory often sensor inputs or control outputs will not be close enough to the microcontroller to be effective and usually even a Due will not have enough GPIOs to accommodate a complex environment. So we have resolved this by using Ethernet shields to transmit encoded data to and from all the Due’s, Mega’s and Uno’s throughout the environment. So you can use as many microcontrollers as you need to accommodate your specific needs. We use Telnet servers and clients on the various boards to send the encoded signals between the remote Arduinos and main Arduino(s). Would you believe that Arduino can run multiple telnet server at the same time? It CAN, we used a Telnet server (port 23) on the main board to interface with it, look at logs, start stop machines, etc. and use other ports like 22 on a second Telnet server running on the SAME board to be used only for sending / receiving encoded signals between the networked microcontrollers. This is amazing, you can have many Arduino’s even thousands of feet away (over fiber optic or wireless bridge) from each other sending and receiving signals and threshold data in <10ms intervals before things start to breakdown due to buffer overflow. 10ms intervals is more than low enough for nearly all applications. We have ran at least 4 Telnet servers on a single Due with no problem. I can Telnet into the Due, send commands to the Due that will then trigger a relay on another Arduino over yet another Telnet connection. We have done all of this in large factories with more than 100 IOs spread across 5+ Arduinos, no problem. The important thing to note is that Ethernet or TCP/IP is not going to be susceptible to noise and interference on long sensor runs in the same manner that a GPIO circuit would be. If anyone wants to know how to use Telnet in this manner, let me know. I'm happy to help.

                                                             

                                                            Moving on, the most predominant issue with using Arduino for industrial applications will be interference and likewise inaccurate readings or erroneous pin input signals. You may find in a complex environment that if powering the microcontroller with your laptop everything is fine, then when you power it with an external power supply everything is not fine, and or when your relays trigger something with high current your readings will suddenly become erratic. This leads me to my main point which is that Arduino by itself is neither appropriate nor inappropriate for industrial applications; it is simply a microcontroller, a CPU stamped on to a piece of PCB with conductors leading to and from it. Its incoherent to assert that Arduino by itself inherently is or is not appropriate for industrial applications. That being said, in my professional opinion some Arduinos are of excellent quality and reliability, excellent thermal characteristics an tolerance (40c is not even close to being an issue) and its totally up to all the supporting terminals, components and electronics that determine its industrial worthiness; and of course the manner in which the software is written. But the platform itself I don’t believe is inherently unsuitable for the purpose industrial applications; it’s just a CPU that runs embeded C with IO pins. Sure there are more professional solutions but the price of doing it with Arduino is attractive, the reliability can be obtained, the Arduino IDE has its advantages, the available sensors to choose from is immense and the supporting community is awesome. It is the amalgam of rapid prototyping and production readiness.

                                                             

                                                            Additionally there are purpose built Arduino IDE compatible industrial PLC boards that are what they say, end of discussion.

                                                            http://www.e-gizmo.com/KIT/PLC64.html

                                                            https://industruino.com/page/home

                                                             

                                                            But, to pursue implementation of a general purpose board a multi-channel Opto isolator board is highly recommended for IOs on the microcontrollers that have sensor input to your environment.

                                                             

                                                            Like this:

                                                            http://www.ebay.com/itm/8-channel-Opto-Isolator-board-5-24VDC-in-3-3-5VDC-out-Industrial-FRC-Arduino-/131874890430

                                                            or this:

                                                            http://www.ebay.com/itm/311520477631

                                                             

                                                            In my experience I have never gotten Arduino to work properly when not powered by a USB cable from a computer unless I isolated the input power from the utility power. Every time I used a regular 220v to 12v switching power supply or wall type transformer sensors were always flaky or didnt work at all. If your sensor reading are erratic, there is interference coming from your power source.

                                                             

                                                            • Use a standard inductive type transformer (like 230v AC to 24v AC)
                                                              • This is to isolate the AC circuit and eliminate noise from contaminating IO signals on the microcontroller.
                                                              • It should physically not be less than 1 meter from the microcontroller.
                                                              • Preferably ground the transformer casing and input neutral line to copper grounding rod or if in USA run to ground.
                                                            • Then use a bridge rectifier with a capacitor (like 50v DC 2200 µf or greater)
                                                            • Then use a DC to DC step down voltage regulator or DC to DC buck-booster to achieve the correct voltage.
                                                              • This is to conform and regulate the 24v DC to 6-11v DC needed for Arduino regulated input.
                                                              • I’ve found that a Due runs most reliable @ 11v DC if you use the Tip&Ring regulated input.
                                                              • http://www.ebay.com/itm/311552007557 this is an adjustable 5 Amp step down regulator bucker. Use this to feed a breadboard regulator @ 7v (750-1000ma Max) or use two of them to drive the Due and Breadboard combined circuit @ 3.3v and 5v @ 5000ma respectively.
                                                              • Remember to connect all 3.3v and 5v grounds together.

                                                             

                                                             

                                                             

                                                            Don’t underestimate this, power and noise caused %99 of all problems we encountered during our research and development. Not only that but some sensors will fail to operate correctly with even the slightest drop in voltage which will occur if you only use power provided by the Arduino itself and have more than only couple things plugged in. The Arduino power regulator put out only something like 140ma and the Due’s CPU itself consumes most of it.

                                                             

                                                            • Use ONLY Opto coupled relays for output and use those relays to control bigger relays that control the actual motor, solenoid, contactor etc.
                                                            • Even with an Opto coupled relay, large solenoid coils can make Arduino do funny things. The inrush current feeding the solenoid coil creates an electric field going through relay that not even an opto coupled relay can protect the microcontroller from, always use an opto coupled relay that then connects to yet another relay located physically away from the microcontroller that will control devices with high inrush current or for ANY 110v/220v device.
                                                            • Always use 22 gauge SOLID core wire or larger for sensors. It is highly not recommended to use 26 gauge Ethernet cable, or 26/24 stranded wire for sensors
                                                            • Remember that long wires are like antenna, use shielded cable 24+ gauge wire for long runs.
                                                            • With proper cable and software filtering you should have no problem going 100 ft or more to read signals feeding INPUT_PULLUP pins with excellent reliability. For extremely noisy environments use single or double opto couplers and for long runs. To be honest, we have long runs in noisy environments and have no issues even without input opto couplers but wiring makes that difference, withstanding certain situation will always require one or more opto couplers on a giver circuit.
                                                            • Also consider using RS-485 Arduino adapters for your long runs or noise problematic circuits.
                                                            • Use standoffs to keep the Arduino from touching the backboard its mounted to.  1/4" PE tubing cut into short pieces works great for standoffs. Use on top and bottom and sandwich the Arduino in between the two cut pieces of tubing.
                                                            • For very noisy signals use long debounce thresholds, like 1000-2000ms

                                                             

                                                            Another thing that is absolutely critical for using Arduino in industrial applications is software signal filtering and debouncing. Look at the example below:

                                                             

                                                            NEVER use the “delay” command except for ultrasound (which uses delayMicros). Always use millis()

                                                             

                                                              if (digitalRead(button6) == LOW) {

                                                                if (button6ReadingPrep == true) {

                                                            button6LastDebounceTime = millis();

                                                            button6ReadingPrep = false;

                                                                }

                                                                if (millis() - button6LastDebounceTime > buttonDebounceDelay) {

                                                                  button6State = true;

                                                                }

                                                              } else {

                                                            button6ReadingPrep = true;

                                                              }

                                                             

                                                            Then if this is a toggle scenario you can further filter out bogus readings by an additional %50 by disabling that input until the opposing input has been toggled.  Like this:

                                                             

                                                            If (button6Toggle == true) {

                                                              if (digitalRead(button6) == LOW) {

                                                                if (button6ReadingPrep == true) {

                                                            button6LastDebounceTime = millis();

                                                            button6ReadingPrep = false;

                                                                }

                                                                if (millis() - button6LastDebounceTime > buttonDebounceDelay) {

                                                                  button6State = true;

                                                                  button6Toggle = false;

                                                                }

                                                              } else {

                                                            button6ReadingPrep = true;

                                                              }

                                                            }

                                                             

                                                            Then if the next stage reaches it condition the “button6Toggle” becomes "true". This is also a way to reduce CPU usage and bogging by terminating unneeded comparisons. Use subroutines often and use the "return" command whenever a process finishes before the end of the loop. contrary to what some developers suggest, the return command is unquestionably beneficial for use in Embedded C on CPU limited hardware. Contrary to what some people claim, Arduino is neither C nor C++; it is embedded C which is its own thing. Traditional rules of C dont always apply nor are always prudent. Microcontroller programming is it's own world and thats why it has it's own language.

                                                             

                                                            Another note, would be to make sensors achieve a quorum of consistency with its readings given a margin before action is taken. Like this:

                                                             

                                                            tankSystemPermeateUltraSoundDuration = pulseIn(tankSystemConfigPermeateEchoPin, HIGH);

                                                            tankSystemPermeateUltraSoundDistance = tankSystemPermeateUltraSoundDuration / tankSystemConfigPermeateEchoValue;

                                                                  if (tankSystemPermeateUltraSoundDistanceCount == 0) {

                                                            tankSystemPermeateUltraSoundDistanceFilter = tankSystemPermeateUltraSoundDistance;

                                                                  }

                                                                  if (tankSystemPermeateUltraSoundDistance == tankSystemPermeateUltraSoundDistanceFilter || tankSystemPermeateUltraSoundDistance + 1 == tankSystemPermeateUltraSoundDistanceFilter || tankSystemPermeateUltraSoundDistance - 1 == tankSystemPermeateUltraSoundDistanceFilter) {

                                                            tankSystemPermeateUltraSoundDistanceCount += 1;

                                                                  } else {

                                                            tankSystemPermeateUltraSoundDistanceCount = 0;

                                                                  }

                                                                  if (tankSystemPermeateUltraSoundDistanceCount == 3) {

                                                            tankSystemPermeateUltraSoundDistanceFinal = tankSystemPermeateUltraSoundDistanceFilter;

                                                            tankSystemPermeateUltraSoundDistanceCount = 0;

                                                                  }

                                                            tankSystemPermeateUltraSoundReadingStep2 = true;

                                                            tankSystemPermeateUltraSoundReadingStep3 = false;

                                                                }

                                                             

                                                            Basically here, the “tankSystemPermeateUltraSoundDistanceFinal” is result of 3 consistent readings that were within at least 1cm of each other.

                                                             

                                                            Another word of advice from experience, use waterproof enclosures to seal your microcontrollers and connect your microcontroller box to another input output wiring enclosure. I live in the Philippines and its always hot, wet and damp, very dirty power and fluctuation; everything gets pushed to the extreme here.

                                                             

                                                            I recommend using 66M1-50 (66-Block) punch down blocks for input and output connection and connect the two enclosures together using RJ-21 cable/connectors. That will allow you to quickly detach the microcontroller box from the wiring box for service.

                                                            http://www.ebay.com/itm/25-pair-Telco-Cable-Cat-3-PBX-KSU-RJ21-AMP-connectors-M-F-6Ft-/121812808381

                                                             

                                                            These are the best enclosures. Made by Gewiss, they can be partially unscrewed and then swung open, very convenient. You can easily drill holes for buttons and displays.

                                                            http://www.ebay.com/itm/PLASTIC-ENCLOSURE-TERMINAL-BOX-ADAPTABLE-GEWISS-GW44209-300X220X120MM-/262494746306

                                                             

                                                            Use bullet terminals to easily detach enclosure from power sources.

                                                             

                                                                            If your looking for the Pro way to do this, DON’T use a breadboard, that always has the potential to be flakey. Buy your own female/male Dupont terminals and a crimp tool so you can make your own connections from Arduino pins using your own 22 gauge wire with dupont terminal and then punch the the other end into a 66 block, then screw all the ground leads to a common ground screw terminal using fork/spade terminals. This insures that all input ground leads are solidly connected to ground, that all inputs/outputs easily are reroutable via the 66 block and that you have 22 gauge wire all the way from Arduino to the sensor, switch, whatever. Those dupont wires are such crap, 28gauge wire and the pins are flaky. If you follow this suggestion you can have 100+ IOs and not get bogus readings and if you have expensive pumps, motors or critical safety sensors you'll have wiring you can depend on. Always write your software so safety/critical switches are configured in a NORMALLY CLOSED configuration, that way if you have a wiring failure you can check the sensor before the system even starts.

                                                             

                                                            In closing, we have automated factories that have more than 100 IOs with sensors more than 40m away. Arduino is reliable and serves us well. Embedded C language is very well suited for automation and we have been very pleased with the results. Our sketches are in excess of 14,000 lines of code. As a core I recommend Due or grater, be careful how you write your code, make as few concurrent comparisons as needed and if you need to have many concurrent elapsed time counters, use a common global timer and use comparators to compare start times and ending/current times. I have written a very simple global timer/comparator, I know time calculations can be tricky so just ask if you need it.

                                                             

                                                            I'm sure I’m forgetting some things but I hope this helps. If anyone has any questions or needs help feel frees to ask. If you have a specific environment you need help creating I can give you general guidance. I know how to make Arduino rock soiled for industrial applications and I'm willing to share that with anybody in need. And of course, if anyone has learned cool things please feel free to share aswell. If anyone knows about RS-485 interfacing for example, id love to learn more about that…

                                                            2 of 2 people found this helpful
                                                              • Re: is arduino reliable for industrial environment for industrial application?
                                                                marek.buriak

                                                                Hello Daren,

                                                                 

                                                                thanks for some useful information. Great to see Due being used in such installations. I am planning on using it for my home automation and I got a few questions if you don't mind answering them.

                                                                1. A switch on a long wire. So let's say you have Due on one side of the room and a switch quite a few meters away. You mention that you usually just use a shielded 24+awg wire. Is that directly connected to Due pin with internal pullup on? I am guessing that normally the line is pulled down to GND (normally closed circuit) and when switch is pressed, circuit opens and the line is pulled up to 3.3V. Is that how you connect it? A long wire can cause significant voltage drop so could not it happen that if the circuit is closed the voltage on input will not drop below the threshold (2V) due to voltage drop on that long wire and the pin will stay high? Also are you not afraid that a voltage spike (I guess it can happen even though the cable is shielded) will damage Due's input pin?I guess I would at least go with something like this at a minimum if connecting directly. But considering optocouplers are much more safe I'll probably go with them for inputs and outputs.

                                                                 

                                                                2. I must say I got a bit lost when reading about different options for powering Due and sensors. So I'll ask this way. What's the best way of powering Due and external sensors from the noise perspective? Is it better to be powered from the same source or from different ones? I am planning on using Mean Well 230V/5V (like PS-05-5 (5W) or PS-15-5 (15W)) to power Due via usb connector. So Due will be powered via on-board 3.3V regulator. Now, some sensors are 3.3V, some are 5V. Considering Due's regulator would probably not be able to power all 3.3V sensors, I guess I need a dedicated regulator for them (a linear one, like AMS1117 3.3V). That should hopefully also help with noise that Due and sensors put back onto their power lines. 5V sensors would be powered directly from the Mean Well supply and I am not really sure about that. Mean Well supply is a switching one (albeit it should be a quality one). I fear that the switched output will cause erratic readings from the 5V sensors. Would I be better off starting with let's say a 7V power supply, feeding that to DC power input of Due (which has it's own 5V switching and 3.3V linear regulator) and also to a 5V linear regulator for powering 5V sensors. Output of that 5V linear regulator would also be used for powering a 3.3V linear regulator for 3.3V sensors. Thoughts?

                                                                Btw. "Alternatively you can power the Arduino Due directly by feeding the breadboard power regulator output directly to the unregulated 3.3v and 5v pins on the Due.". According to documentation, "Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.". Just sayin'.

                                                                 

                                                                3. From reading I get you connect Due via Dupont connectors. Do you find it reliable? I mean they must be wobbly at least a bit. The best thing would be to solder the wires directly to Due's pins but it's fiddly and makes Due not really replaceable. So I think the second best thing is to make a shield that uses pin headers. Pins on those are a bit thicker than dupont pins (so hopefully a better connection) and the shield won't wobble (it's also used as a way to connect arduino in products like this).

                                                                 

                                                                Marek

                                                                  • Re: is arduino reliable for industrial environment for industrial application?
                                                                    michaelkellett

                                                                    The solution in your link would not be reliable.

                                                                    Typical micro-controller pins require to be pulled down to less than 20% of the supply to register a low input or above 80% to register  a high.

                                                                    To achieve this:

                                                                    Change the pull up resistor to 10k and keep the input resistor at 1k.

                                                                    The 10uF cap across the switch is too large and may shorten the life of the switch (this will depend on the switch of course - if using small pcb button type switches replace it with a 1uF 50V (or greater) ceramic capacitor which can be wired either way round.

                                                                    The 20M input resistor is far too big(so the micro pin will be susceptible to interference and leakage currents)  - the diodes will limit the input voltage even under fault conditions to less than 2V above or below the supply rails - you need to limit the current into the micro's input protection diodes to less than 1mA so that 20M could be 2k and you would be no less protected. I would use 10k which means that the micro input 'sees' source resistance of 20k (switch open) and 10.9k (switch closed).

                                                                    The ferrite ring is often helpful - put both wires though the same one.

                                                                     

                                                                    Although opto-couplers can be helpful the LED in them can still be damaged by transients and might even be energized by RF picked up in long wires. They are much tougher than a typical micro-controller input. The disadvantage is that they need power on the input side and unless you use isolated supplies for this you lose quite  alot of the advantage. For home automation I don't think you need optos.

                                                                     

                                                                    MK

                                                                    1 of 1 people found this helpful
                                                                • Re: is arduino reliable for industrial environment for industrial application?
                                                                  tiennguyen

                                                                  Hi Parth Shah,

                                                                   

                                                                  You could use this Indruino

                                                                  3 of 3 people found this helpful
                                                                    • Re: is arduino reliable for industrial environment for industrial application?
                                                                      mht2020

                                                                      In General you can use arduino board for indsutrial application as long as the environment in which it is operating is not so harsh or noisy. In case you want to operate your project in such environments make sure your arduino can pass the requirements such as operating temperature and emc compliance.

                                                                      Since Arduino is open hardware and software platform, you could redesign the core hardware and make it suitable for industrial environments exactly as guys at rugged-circuits have done so far. Visit their website at https://www.rugged-circuits.com/ruggeduino/  and take look at the ruggedized versions of MEGA and UNO boards. In case of software I recommend you to adopt RTOS instead of super loop method as deterministic nature of RTOS assures correct and timely programe execution. You could either use FreeRTOS version for arduino or STM32duino FreeRTOS( Of course if you are using the STM32 arduino core).

                                                                       

                                                                      SiNA TArOKH

                                                                      1 of 1 people found this helpful
                                                                        • Re: is arduino reliable for industrial environment for industrial application?
                                                                          michaelkellett

                                                                          I agree more or less up to the RTOS bit - there is no guarantee that using an RTOS will make a system more reliable. Many ultra reliable systems for aerospace and other regulated environments deliberately avoid the use of RTOS because it adds to system complexity and makes it harder to prove compliance, but many systems do use RTOS, so it is not clear cut.

                                                                          I certainly would not use an RTOS on the 8 bit AVR architecture, and my experience of low cost RTOS (but not FreeRTOS which I have not used) on ARM Cortex M4 architectures would not encourage me to try one in that environment either.

                                                                           

                                                                          MK

                                                                          1 of 1 people found this helpful