Using Teensy for industrial control application

Status
Not open for further replies.

arbj

Member
Hi,

I would like to use the teensy module in an industrial control application, here is what is required to do.

The module will control the following.

1. A stepper motor indexer, operating on +5 V DC inputs.
2. A RS 485 transciever for communicating via RS 485 network
3. Some DIP switches, thumbwheel switches.
4. Some optical limit switches, signal levels are +5 VDC

All the components above use +5V DC levels, I can step down the levels to 3.3V DC levels no problems with that, but I would like to know if the teensy can perform in an industrial environment, where the temperatures would be high 40-50 degC, the teensy would be enclosed in an aluminium box, and kept close to a stepper motor that would be running almost constantly.

The entire system would be powered by a +24 VDC SMPS, but will be stepped down to +3.3 VDC as required by the teensy. The system would be placed among other industrial equipment like high voltage 3 phase motors, contactors relays etc. (ie: The environment will have high electrical noise).

At present I am using PIC mico-controllers, and they do work well. But there are some aspects with the teensy that is quite appealing, such as bootloaders, integration with wireless, ethernet modules, also a standard C/C++ development environment.

Also can I use Eclipse C++ development IDE for developing applications for teensy ??

thanks
a
 
Last edited:
I've long worked as a consulting engineer and have some comments re your question

  1. What does your contract/employment obligation require in terms of quality assurance and intellectual property rights? How do those affect the candidate products you assess?
  2. Does the end item with interfaces have any safety specs or best-practices to support? HAZMAT? Potential liabilities if controlled machinery is mismanaged by the firmware or controller?
  3. At 50C + packaging rise - and the Teensy 3's are overclocked as a rule - I'd be very careful about analyzing this and not deciding based on empirical test results of a small lot of boards
  4. Consider that Teensy is good for a proof of concept rapid-app need. But PJRC is not yet an organization with a staff of engineers with redundant skills for the long run.
  5. I don't use Arduino libraries for professional work due to high risk and life-cycle issues. NXP-Freescale and more so ST have extensive and supported libraries and tools for the ARM world.
  6. IDEs - opinion: for a complex project with lots of code modules, I find in necessary to use a professional grade IDE. In my case, it's either IAR's EWARM or it's MS VIsual Studio 2013/Community (free) + Visual Micro. Another good one is VisualGDB. I've suffered Eclipse in several prior projects but I avoid it due to it slowing my progress too much, and increasing my billing costs - not good for repeat business and referrals
  7. Your power supply and I/O filtering and level shifting are your problem! Unless you use a much more costly industrial controller (I recommend ARM M0+/M4 based) that has these designs in place. Will save the customer $ in the long run in terms of reduced NRE, unless thousands of a new design of yours will be built. Point is: Teensy itself and its peers have no inherent hardware for the noisy environment you describe.

These are opinions and as we know, everyone has them.
 
Last edited:
thanks stevech your explanation is quite clear enough. I can see the problems with using teensy.

I don't use Arduino libraries for professional work due to high risk and life-cycle issues. NXP-Freescale and more so ST have extensive and supported libraries and tools for the ARM world.

Does the teensy use arudino libraries ?? I thought it was an option available for the developer, so If I develop an application in C++ then do I need Arduiono librarires ??

thanks
a
 
For running at hot temperatures, I would also advise keeping the clock at Freescale's guaranteed 72 MHz, or even underclock 48 MHz if your application works at that slower speed. I'd also look carefully at the Wiznet chip. I can't speak to its specs, but I can tell you those Wiznet ethernet chips run hot, even when used at room temperature.

For RS485, Teensyduino has Serial1.transmitterEnable(pin) to automatically control the RS485 chip's control pins. That greatly simplifies writing code for half-duplex RS485 communication.

The Teensy 3.1 digital pins are 5V tolerant. Of course, if the signals have large amounts of noise or could be subjected to spikes or other transients (eg, long wire runs outside a small enclosure), you'll need protection circuits, just as you would with signals going to nearly any type of chip with digital I/O pins.

Much of Steve's comments read like the old adage "nobody ever got fired for buying IBM". When projects involve safety or large amounts of money, some people do think in terms of "who are you going to sue" (which is probably silly, since plenty of court cases have established even huge corporations escape pretty much all liability, even when they're grossly negligent, for software and most technical issues by simple click-through licenses with disclaimers). Indeed PJRC is a tiny company. I believe we deliver a lot of great value, mainly targeted at DIY enthusiasts and hobbyists and students and sometimes entrepreneurs, and at very competitive prices! But if you need a huge "deep pockets" corporation to feel safe, PJRC certainly isn't anything on that sort of scale.

Like pretty much any electronic components, from companies large and small, you need to assume responsibility for your design.
 
Last edited:
Mr. 'stevech' and Mr. Stoffregen's comments are relevant. Having said that, have done internal projects where the T3.1 is the brains for controlling ATE, environmental chambers, and burn-in rooms. At 48MHz, have done test runs from -20 to +50degC with no significant effects other than the ADC noise is even worse at very low ambient, and the INL and DNL are at published limits. Last week, while at local EMC lab for testing of a production item (test setup per CISPR 22 and 24), sneaked my T3.1-based PV data logger into the 10m chamber for a radiated emissions scan, and there was one sharp peak that exceeded Class B (about -2dB) if USB was plugged in, but the box met Class A limits where, again, clock was 48MHz, which is ok for industrial stuff.

The other issue is regulatory. Stuff for sale that is intended for use in other than residential shall conform to 29CFR1910 (OSHA workplace safety regs that require NRTL mark on electrical equipment). But if intended for internal company use, essentially anything goes for an engineering lab that is not considered explosive environment.

Agree with comments on Eclipse - burn it in a magnesium fire then nuke it from orbit, and use almost anything but the ardy IDE. There are several build systems/scripts just for the Teensy, look at github - most have been discussed in the PJRC forums. Typically use Linux, but am experimenting with VS, but only for the people in the factory and not for me.
 
Much of Steve's comments read like the old adage "nobody ever got fired for buying IBM". When projects involve safety or large amounts of money, some people do think in terms of "who are you going to sue" (which is probably silly, since plenty of court cases have established even huge corporations escape pretty much all liability, even when they're grossly negligent, for software and most technical issues by simple click-through licenses with disclaimers).

maybe so. Using the megacompany (IBM as a poor example since they stupidly tried to morph into a CSC type) metaphor is most overreaching. Only certain types of projects in industry can accept the risk of a using a sole proprietorship. The day usually comes when the proprietor gets run over by the proverbial truck, and that includes a decision to make a lifestyle change, medical issues, elder issues, and so on.. Olimex, Technologic, Newport Controls, National Instruments, and dozens of others around the world are not IBMs. These are 50-up employee companies, many of which have been operating for decades.

One has a different mindset when there's a $M R&D project at stake, and damned-awful schedules, and key-guy-quit-mid-project issues, and so on.
 
Last edited:
o If I develop an application in C++ then do I need Arduiono librarires ??
 
You never 'need' to use Arduino libraries. You can write everything from scratch if you really want to. Wouldn't recommend it, because you would be doing loads of redundant work with next to no gains. It's highly improbable your code will be more efficient or reliable than many of the established libraries.
 
Regarding the Arduino IDE and Arduino libraries or whatever libraries here's a tip you can thank me for years from now when you need to fix code on some old project.

When your close to done with a project that will be in hardware for a long time, copy all the libraries and header files that your project (#include)s into the folder your sketch is in. Look at the compiler output and make sure all the duplicate libraries are from this folder. This way when the libraries are updated or you get a new pc or whatever your code will still call up the same old code you delivered the project with. This won't help for all the other libraries (but they don't change as much ) so you may want to put the Arduino and Teensduino version numbersused in comments at the top of your main sketch so you can pull up an old version if required.

This is simplified version control.
 
Status
Not open for further replies.
Back
Top