Is Arduino the correct approach for this project

Hello,

Let me first say that I have some experience with Arduino and that is why I am considering it as the starting point for this project. Second, if I build this project it is going to be over a fairly large time period and I have no problem taking the time to learn what I don't know in order to make it work. What I'm looking to do is replace a device that can be purchased from industry for more than $200k with something I build myself hopefully in the $20k range. This isn't a hobbyist idea my background is in mechanical engineering and like I said I have some Arduino experience.

I need to be able to read an RFID signal, and trigger some relays based on that signal. Next I need to move a device similar to a 3 axis CNC with stepper motors, while the motors are moving I need to be able to receive signals from a camera and track objects likely using a separate program on my PC such as OpenCV, and control the movement of the steppers based on the output from OpenCV. Next I need to read signals from several photosensors, and infrared sensors, and have the ability to trigger relays based on the readings from these sensors. Also I need to save the data from these sensors to a file on my PC. Once this part of the operation is compete I again need to move the steppers and then finally trigger a series of relays to complete the operation. Before beginning all over again, and running continuously for many days.

The reason I'm asking if this can be done with Arduino connected constantly to a PC which handles the image processing and saves the files is because I know how to interact with the sensors and steppers through Arduino.

My biggest question is: Is what I described possible or should I be finding some other means of making the PC talk to the steppers, sensors, camera, and OpenCV software.

Thanks

It all seems a pretty typical project where Arduino acts as an interface between a PC terminal and all those sensors. Except for

  1. the camera. If the camera doesn't come with its own smarts and simply sends relevant data to Arduino, you may find Aduino is not up to handling the video. Maybe the PC does the video processing.

  2. the philosophy. I find it hard to see an hobbyist developmental board reducing the cost of some industrial monster by 90%. If that was viable, you need to ask why somebody hasn't already done it.

What kind of RFID are you using? Passive or active? What frequency? The reason I ask is because I wrote an article on allaboutcircuits.com that may be of use to you. https://www.allaboutcircuits.com/projects/rfid-technology-using-arduino-mega/

I have only seen an Arduino use in a "commercial" product twice. One was the 3D printer called the Ultimaker. I was pretty surprised to see it in there.

Another was a photonics company for a PID controller for some constant power laser diode controller. Some physicist stuck it in there because they had no idea what else to use. I am pretty sure he could have used something else. But the point is, it worked, and the units sold and they still made money. Maybe they should have hired an engineer ;)

Nick_Pyner: It all seems a pretty typical project where Arduino acts as an interface between a PC terminal and all those sensors. Except for

  1. the camera. If the camera doesn't come with its own smarts and simply sends relevant data to Arduino, you may find Aduino is not up to handling the video. Maybe the PC does the video processing.

  2. the philosophy. I find it hard to see an hobbyist developmental board reducing the cost of some industrial monster by 90%. If that was viable, you need to ask why somebody hasn't already done it.

Nick, perhaps I can answer you with a real example. I have a customer that used an Arduino Nano as a controller for their product. We built perhaps 40-50 boxes for them. They had several rewrites of the code for the Arduino. I have not heard from them in 4-5 months. Today I looked at their web site and see they are using a fancy, very professional looking controller box. I now know the Arduino and controls were prototype devices to get the bugs out of their system and learn how to control things the way they wanted.

So, the Arduino is very useful as a learning device. But is way too expensive to use in a commercial product in a competitive market place. I suspect the Arduino has saved them 90% in development costs.

Paul

As far as the use of this machine, if I build it it will be for my own business use not for sale so profit is not a concern. The $200k figure is somewhat misleading because in talking to people who own the machines that is the cost for the first machine with necessary building infrastructure, extra personnel for start-up, operator training, and having a company with 20 years of building machines to call if there is a problem plus their necessary profits and recovering the years of development cost. The second and subsequent machines are closer to half that price. So figuring on spending 20k to building the physical structure that can be purchased for about 100k isn't as crazy but still might be somewhat crazy.

I look at it like this I could go to the Ford dealer and pay $65k for a new diesel F250 or I could do what my cousin did and put a rebuilt Cummins and new transmission in the F250 he owned and run that. Are they the same? No. But they both pull his trailer down the road. My machine doesn't need hours of testing behind it and the costs associated with that if I decide to build it I'm willing to give up some of the expected reliability and support of a large company for the cost savings. I'll still have the old fashioned facility around as a backup if necessary.

Now after getting off topic my real question now, after being told that arduino is an acceptable way to communicate between the computer, sensors relays and steppers, and perhaps I should be asking this on the OpenCV forum is: if the camera sees an image and OpenCV picks out the correct object in that image is there a way for OpenCV to tell the computer to tell the arduino to tell the steppers move to the right until the object is in the center of the image?

I'll freely admit this may be too big a project or may become so expensive I prefer the available machines. But I like the idea of being able to control it and make changes to the machine as I see the need without having to go through someone else to do it. I'm not trying to do this for the first time I'm looking at the existing machines and saying I think I can copy that using off the shelf components, some of them used, and open source software to get a version that is acceptable to me. The thing now is if the consensus is that arduino isn't capable or will be pushed to the limit connecting the PC with the machine components then I won't waste time thinking about arduino and will look at alternatives.

I wouldn't use the Arduino as is in a final project, but you can certainly use the same 328/1284/2560 microcontrollers in a custom board integrated with your other electronics, I do that for folks all the time.

NobleF: that is the cost for the first machine with necessary building infrastructure, extra personnel for start-up, operator training, and having a company with 20 years of building machines to call if there is a problem plus their necessary profits and recovering the years of development cost.

Don't underestimate the value of that experience and support.

Consider, for example, the cost of 2 weeks of downtime on your machine while you figure out a bug and build and test a replacement for the parts that went up in smoke.

If you are a small business then there are probably other things for which you are indispensible - talking to customers, perhaps. If you machine is broken you will have to decide whether to fix it or talk to the customer. And for most people the stress of all of that will significantly reduce their ability to focus on debugging problems.

Complex computer projects always take four times as long and the parts cost twice as much as the initial rose-tinted estimates.

I think you need to ask yourself is your business making widgets? or is it making the machines to make widgets?

...R

...is there a way for OpenCV to tell the computer to tell the arduino to tell the steppers move to the right until the object is in the center of the image?

Absolutely. There are several ways. The easy way is to just keep the Arduino plugged into the USB port and use serial communication. The concept is not hard, but the protocol you design might get moderately complex. Be aware that OpenCV is just a platform. Someone has to write a program that uses the OpenCV libraries to do what you need done. That program can easily enough interface with the serial port and talk to the Arduino, but there has to be a program of some kind on the PC as well.

As far as putting an Arduino into a final project -- I do it all the time. There are a few things you should be aware of, though.

1) Connections. Pushing little jumper wires into headers is not a very good long-term solution. For prototypes and your own temporary projects, maybe. But those connections corrode and you'll find yourself needing to futz with the wires. Eventually you'll want to either get an Arduino variant with screw terminals or one with no headers at all. Just solder the wires in and the problem is solved.

2) Get a decent enclosure.

3) Ruggedness. This is why people pay 50X as much for a PLC that is harder to program and has nowhere near the capabilities as an Arduino. Like Robin2 says, they don't want down time. For my projects, I built it so I can fix it. I just keep a spare around and make my project modular so it's easy to swap out. In my experience, the Arduino isn't the most likely part to fail. I have replaced way more sensors and connectors than Arduinos.