Often times the thing i see asked here the most especially in hardware is how do i input voltages to the Arduino that are not 0-5V. there are 1000 answers to this question but i would like to provide some tried a true knowledge and today while looking for something completely different i came across something that i looked long and hard for a long time ago.
I work in the industrial control sector as my paid job, we deal with PLCs (Programmable Logic Controllers) which are just a very expensive way of saying a micro-controller that safely interfaces with real world applications. In the field we don't often have many things that are 5v, 12v or less we deal with the "standardized" and accepted control voltage of 24V, because of its stability across long wire runs through hazardous and sometimes idiotic wire placements. the big names are out there Schnieder, Allen Bradley, but just like Arduino, at the end of the day the one that most often wins is the one who can get it done the cheapest easiest and sometimes the safest. For the most part this turns out to be Allen Bradley.
and just like with cars and trucks you have die hard camps of people who prefer AB over all the rest, so alot of what you see or end up working in is AB. They have a solid platform and a bunch of ubiquitous applications. Some severely outdated PLCs can even be had on fleabay for microcents on the dollar of what they used to cost. and a lot of them are still good for applications placed in the field today. One of these is the SLC500. there is plenty of information about it all over the net. Most of the discrete modules can be had for under 10$ and discrete inputs is most of what you will want to have input to the Arduino. for example maybe check the status on a window switch at the other end of the house using 12V as the switching voltage, see if a battery is installed and hooked up or maybe just monitor mains voltage to see if a circuit breaker is on (which i do not recommend for all of the less informed people, mains could probably kill you if you don't understand the guiding principles. )
which brings me to this, AB published a sort of service manual for their discrete modules, it gives detailed schematics for what each input channel conditioning circuit looks like for both ac and dc circuits as well as discrete output circuits. I have verified these against actual physical modules and found them to be correct, the diagrams only give you the "found in the wild" high voltage side of the optocoupler but I'm sure most of you know how to connect the other side to Arduino.
i felt i should share this because even though there are 1000 ways to do this, this way has 30+ years of proven ability to work, and in electronics that's as close as you are going to get to the "right" way of doing things.
here's the link so that you can get a copy, i also uploaded the pdf version for posterity. Feedback is welcome but i wont be directly monitoring this post to reply.
The automotive industry has been handling it for at least that long, as well.
I disagree that a 30+ track record is as close as you can get to the right way of doing things. It demonstrates the validity of methods, however since the demonstration applies to an entire industry, it is not specific about exactly which methods. Many methods are doubtless employed by different enterprises. So I don't see the usefulness in this generality.
It is far better to both survey the installed base, and also fully understand the principles in play.
The document you linked and posted to, completely lacks full explanations of the circuits presented. This makes it not useful for design, especially by beginners.
i would love to see automotive industry internal schematics for old FI computers, that would in companion to this give you the range for 9.6v to 15v which could be used as a comparison between industrial control and automotive industries way to do things. becasue just like a dpfe valve is driving one or 2 inputs high to indicate flow of gas in a car, a float valve drives 1 or 2 inputs high on a PLC to indicate the level of fluid. it is all the same beast, just different blood in its veins.
well please point me in the direction of what needs further explanation and perhaps i can provide that myself to make this more useful, as i do understand what it does and why.
furthermore i dont believe that if you pull up a beginners entry point to input that the schematic that is given is ever fully explained. you wont find fritzing diagrams (haha) that say why r1 is 4.7k, because it presents a bias to the controller and dissipates current in order to bring the bus into capacitive spec (totally off the top of my head example)
tbillion: Your understanding of Automotive is lacking a bit of information. I have worked in both industrial and automotive and from experience industrial although hard is much easier then Automotive. Ask several experts how to do an input and you will get several expert answers all correct all different. You need to consider the application as well. Put your PLC in 125C environment without outside air for cooling and what happens? Do the same with an automotive ECM (Engine Control Module) and it feels at home.
257 degrees f is going to be the temp in the cooling jacket, not the temp under the hood. Ecms of models from 1981 to 2015 have ranged from, the driver in ER fender well, the passenger kick panel, under the dash on the driver side , to in the air box. None of these places are 257degrees f. What car application are you referring to where the ecm is located in a position that reaches this temperature. In fact there was an industry shift in 2005 that was to put most computers in the passenger cabin based on the fact that in the cabin the environmental conditions are more compliant with the optimal conditions for a computer to run.
Please don't make assumptions on my level of.understanding , I worked in the automotive industry for 10 years as an ASE Master mechanic. I have torn down ecms and seen the guts on the inside . Most modern ecms are potted in a silicate based thermal gel which transfers whatever heat to the case , in the 80s computers just had a small layer of sealant to make them waterproof unless you are talking diamler or vw who have been potting their ecms the entire time . Point being if you took any plc, potted it in the mail gel and surrounded it in aluminum it would perform the same, based on the fact that the components themselves are based on the same base characteristics . Now the chips have different parameter because a cars electrical system is dirtier, and some chip manufacturers make different packages that are more tolerant to vibrations and shock and if the chip will be installed somewhere that the manufacturer is not sure that it will be in an ecm then the thermal parameters are expanded, but 9 times out of 10 it all comes down to what the bored engineer wants to put in there .
So if your telling me that considering the application would make deterministic changes on wether you could take good information and change wether it would function I say yup ok it really just comes down to the flavor of the week what someone wants to do. Those people weren't the targeted audience for this. The people who don't know where to begin and are messing with things they have never dealt with before and they might want to expand their horizons with information beyond the general scope and 1900 instructables where the schematic isn't verified and half the time is erroneous... Those people is who this was for. Anyone who works in industry knows the fastest cheapest solution always wins so whichever has the least components shortest longevity in order for it to work for a period of time and need replacement so that the company profits is the "right" way in capitalist industry.
I could have sworn the Arduino community was about more, and being better . Message received though I'll keep my info to my self from now on and I'll stop helping because in the end this isn't all that important to me .
There is a set of AEC Q-100 series of specifications for automotive. Not all have OEM's have adopted this, many many OEMs are more stringent. Here is one line from the spec: Grade 1: -40°C to 125°C. Grade 2: -40°C to 105°C. Grade 3: -40°C to 85°C. As of May 29, 2020. You will find different areas have different temperature ranges. FYI 257F = 125C = Grade 1. There is no one electronic set of standards that covers all OEMs that I know about.
To further this topic then for the better diversification of infor mation here is the ecm schematic for inputs and outputs for 1986 Chevrolet vehicles , the information for these are pretty ubiquitous as most hot rodders have been modding them since their inception, the ecm had 3 plug positions it was a single board in a empty aluminum case, everything was trough hole and the program roms were changeable.
As you can see from this schematic they rely on inverter buffers primarily to convert and buffer inputs, another worth while thing to point out about car electronics is everything that has a sensor also has its power source from a precision clean 5v reference .
There are a bunch of schematics for early 80s escms Here if anyone wanted to compare and contrast
The AEC-Q100 standard you referenced has to do with the quality of the components that are used, while I agree that this is something the end user should evaluate during the creation of the product it is not part of the how, as in how it's done or how it works. I feel we may have gone abit off track in that regards because while there is value in "how it keeps working" my original post was about how it's done .
And if we narrow the scope further we would actually be talking about the AEC-200 that lords over the passive component aspects and then if you wanted to include the optoisolators then you would apply the AEC-Q101 standard about passives.
So then To turn this to the positive since the three of us are in agreement that perhaps my op wasn't definitive enough then we could use this space to add valuable information pertaining to how this is done with examples.
Challenge: provide credible examples of input or output circuitry by schematic that will interface with the wild world . Perhaps the most positive way to pass on credible knowledge.
Say design parameters being : input circuits capable of 7v to 220v ac or DC and outputs capable of the same voltage range , call the thread the ABCs of I|O from the community members of the forum. This way indeed when we are here in the forum and we see those posts that are more tedious to answer we can just refer here ... Just a thought
TMI. This is all well and good, but since it typically takes 10 to 30 posts to resolve even the simplest issues posted in this topic (and I've seen it go over a 100!), I fail to see the value of pitching PLC's on the Arduino General Electronics topic. Clearly PLC's are anything but general electronics, and pitching them to beginners is simply ludicrous. Look at the other current posts. "What value resistor should I use for my led ?" Really, you have to be kidding. As soon as I figure out the resistor I'll order a PLC...(lol). (And yes, I have used PLC's and recently took an online refresher course (PLC Ladder Simulator) but have yet to find a use for it at work. I was in Industrial Electronics for 40 years (Medical Equipment (bedside patient monitors), lasers, semiconductor equipment, factory automation, grid edge power management (smart VAR controllers for utility companies), autonomous vehicle, commercial vehicle conversion (diesel to full EV), Ultra Depth optics prototype build for Google, and recently got into aerospace (I know, who hires someone with 40 yrs experience and none of it aerospace ? I was shocked to get the job. The only time I ever used PLCs was when I was a field service tech for Heathering Furnace (2000 degree C furnace for
industrial applications. The engineer gave me the source code and told me to key it into the PLC. I failed to get a job at a Nuclear Reactor company because I had no PLC experience. Point is, they have their place, and it's not the General Electronics topic. If you'll excuse me, I have to get back to my led...
Hi,
What is the going cost of the IDE for HIGH END PLCs these days.
We use Codesys at work, no cost, but AB and Siemens used to charge like wounded bulls.
Two more trolls and a musical score and I could make a movie that could fund stem learning for 10 years .
Nope not pitching plcs - was pitching the use of discrete component signal conditioning and isolation as a solid universal method of signal translation for ANY general purpose microprocessor. Which lead to a discussion on the variances in how this is done between the industrial applications and automotive, to which I provided 2 examples of information with schematics on how this is done. Was hoping some more supportive folks would step in and maybe post what they have used and worked well for them so that as a community we could build information that is in a general sense useful so that it didn't take 30 posts to accomplish a simple task. However I am quickly learning that the reason it takes 30 posts is because everyone has to establish dominance over the narrative instead of reading understanding and submitting. I literally made this post to share general information that is very hard to search for which will give you field tested circuits you can attach to an Arduino and begin taking voltage ac or DC from 10 to 220v ...
Collaboration is dead but apparently witless humor is very alive in this forum .
To be honest , there was just too much information in the manual and no easy way to search for specific applications. Pretty much all pf it is already covered in the guides at the beginning of this topic which are written for beginners. I didn't say the information you posted was not useful. I say there's just too much of it and it's
far too advanced for the beginners posting here.
The reason they are posting here is because they
are not advanced enough to use cookbooks or google the circuit they need becsuse they don't even know what it's called.
I understand that your insulting me because I rejected your post and your offended. I don't dispute that the manual you referenced is a one stop shop for useful circuits but It's much faster to just google the type of circuit you need and get a million times more information. The problem is that the beginners here wouldn't even know what to look for. I have tons of reference docs too but I don't dump them on beginners who don't even know why so many circuits hzve 0.1 uF caps. FYI,
if you disagree with someone's reply, it's unprofessional to insult them. You should know that by now with all your experience. It's not a good look for someone who presents themself as a professional to start slinging mud because someone didn't think your post was appropriate
for this topic. The manual has usefull information
but if you had any experience in this topic you would know that even at 2:00am you can get the kind of signal conditioning circuit help in less time
than someone could read a single page of the document you posted. I can name half a dozen members who know everything in your document and can offer the right one much faster than someone could read that doc. In fact, the reason this forum and this topic exists is so someone doesn't have to read something that was written to help people when there was no internet.
On demand free consulting on your specific circuit application beats wading through tons of heavy material any day.
Thank you for sharing...
Please supply the "new way" of using the same 5 components that have been in existence since the dawn of time ....
Offended I am not, sad and disheartened by the plight that is instant gratification humanity, with emphasis on your expansion into the words "too much information. " There is no such thing .
Furthermore my intention was not to insult you at all I read infinitely on this forum I seldom post because everytime you do post in a topic or create a topic people's egos get in the way of real advancement. I feel that trolling should be an addition to the 7 deadly sins, if you cannot positively contribute to a topic of conversation the. You have nothing to say.
To see it in your light then I'd say instead of saying that my contribution was to complicated point in the direction of a simpler answer. Submit that and the wealth of knowledge grows and the. In the end it is up to them to make the decision about the why's and the what's .
I have Google's alot and as I have said in the earlier posts, a lot of the information posted that is good is often convoluted and bad information . Doing an image search for the words " Arduino optocouoler" has 20 erroneously drawn schematics by itself .
Religious folks have the Bible, people starting in electronics have a mess of crap to wade through . Having it asked over and over again only makes the problem worse .
People starting in electronics have Arduino Forum General Electronics Topic and a search on the forum for 'optocoupler' will yield numerous CORRECT schematics and instructions in terms simple enough for a beginner to understand.