Vorstellung industrieller Datenlogger mit AVRco

mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Vorstellung industrieller Datenlogger mit AVRco

 · 
Posted: 21.02.2012 - 11:22  ·  #1
Hallo Forums-Mitglieder,

heute möchte ich (nicht ganz uneigennützig) mein Datenlogger-Projekt der letzten Jahre mit AVRco vorstellen. Entstanden ist das ganze aus der Situation heraus, unterschiedliche Meßwerte zu erfassen und auszuwerten. Bei jedem Sensor und jedem neuen Signal fängt man an, die Hardware umzubauen und die Software anzupassen... So habe ich mir ein Universalgerät geplant und letztlich gebaut.
AVRco Pascal habe ich bei diesem Projekt ziemlich strapaziert, wegen der vielfältigen Anforderungen an die Hardware. Die Möglichkeiten des Compilers sind wirklich enorm - und die Geräte laufen 100% verläßlich stabil, im Industriebereich ein absolutes Muss!

Basierend auf einem ATMega 2561, einer 2GB SD-Card, 4-zeiligem LCD, USB und Ethernet-Anschluß im Hutschienengehäuse ist ein industrietauglicher Meßrechner entstanden, der 24 physikalische Eingangskanäle, 8 Ausgänge und 16 virtuelle (berechnete) Kanäle besitzt. Die Eingänge können per Software für analoge oder digitale Messungen umkonfiguriert werden.
Sämtliche erfassten Daten werden gespeichert und per Software automatisch auf eine PC-Datenbank synchronisiert. Dort steht ein Graphiktool mit angehängter Dokumentenverwaltung zur Auswertung bereit.
Besonderheiten des Gerätes sind die virtuellen Kanäle, die gemessene Werte rechnerisch weiterverarbeiten können: als zeitliche Ableitung oder als integrierter Wert oder nach Vorgaben des Users mit einer eigenen Formelsprache über einen integrierten Interpreter.
Ebenso funktionell ist die Anbindung des Gerätes: direkt am PC per USB, per Ethernet im LAN oder auch über geroutete Netze in externe Standorte. Zusätzlich gibt es einen Relay-Server Modus über einen Server bei unserer Firma, um über NAT-Firewalls hinweg ohne spezielle Konfiguration von außen per Internet auf die Geräte zugreifen zu können.

Ich habe ein Foto vom Gerät und einen Flyer mit den technischen Daten angehängt. Bei Interesse gern melden!

MB DataTec GmbH
Friedrich Ebert Str. 217a
58566 Kierspe
www.mb-datatec.de
info[at]mb-datatec.de

Am Ende noch einmal mein Dank an dieses großartige Forum, welches mir bei vielen Fragen geholfen hat, wo man unendlich viele Anregungen bekommt. Die Unterstützung des Compilers von Rolf Hofmann und Gunter Baab tut ein Übriges.

Gruß, M. Bremicker
You must be logged in or your permissions are to low to see this Attachment(s).
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Vorstellung industrieller Datenlogger mit AVRco

 · 
Posted: 22.02.2012 - 10:00  ·  #2
Really impressive work! I can only imagine amount of effort put into this product. It looks very nice. I use a lot of loggers, but they are in quite a different league. They are mostly all Linux based, gather data and store it internally, have web interface and/or color touch screen. They are all connected to some historian (like Osisoft PI or Industrial SQL) via OPC server communicating with the logger (mostly MODBUS RTU and TCP). To name a few: Siemens Sirec, Honeywell, Yokogawa... I know you are not competing with them with your product, but let me share some "insider" thoughts what can you do to make your logger more attractive to plant maintenance managers who make the purchasing decisions after consulting production needs and his engineers/technicians. Most Level 0 analog signals are 4-20mA. Although there are converters to 0-10V you should support 0-20mA and 4-20mA signals directly. You should also support some well known industrial communication protocol. MODBUS is most widely used, and you can't go wrong with it. 95% of loggers I deal with support it. That way, your Level 1 logger can be connected to some plant historian software and collected data can be used with some Level 2 application to show trends and reports to the management or analyze data in spreadsheets. MODBUS TCP is the most wanted protocol, but unfortunately it is not yet supported by AvrCo (only MODBUS RTU and MODBUS ASCII are supported over RS232/485). Luckily, there are many protocol converters (like some MOXA devices) that can convert MODBUS RTU or MODBUS ASCII to MODBUS TCP. Although MODBUS ASCII is much nicer for your MCU since it doesn't use additional interrupt, you will probably want MODBUS RTU since it is much wider used. So, after this beeing done, you could offer your customers both MODBUS RTU and TCP (TCP is optional with an additional adapter). After this, nothing stops you from offering some 3rd party OPC server (de facto universal communication standard in industry) like KepWare OPC server with MODBUS plugin driver, or Matrikon MODBUS OPC Server. With all this, your logger provides data not to just one PC on someone's desk, but to the whole factory - operators, technologists, technicians, managers... There are even OPC enabled alarming products that can send SMS or e-mail in case of some tags having alarm values. One thing is also important for loggers - to see trends on site. Unfortunately, you didn't use graphical display, but there might be a way to implement rudimentary trend even with character based display. You can use top line to display tag name, engineering units and numerical value, and bottom 3 lines can be used for a graphical trend. How? Well, you can make 7 user defined characters each one having only one solid horizontal line in 5x7 character matrix (1st UDF char having 1st line solid and other 6 lines empty, 2nd UDF char having 2nd line solid and other 6 lines empty...). That will give you 3 char lines x 7 lines per char = total of 21 dots of vertical resolution, and 20 chars = 20 (wide) dots of horizontal resolution. Not much but enough to see the trend of the tag, which is sometimes essential for on site operators and technicians. Having HTTP real time trends would also be nice, but would probably add to much of a complexity to the project, and you would still be limited in number of connections to the device, which could bring more trouble then benefits if a lot of users try to monitor trends with their browser at the same time.
Please do not take this as a critique, but as an bunch of ideas for V2.0, V3.0... Even if you do not implement any of this, you still have an impressive piece of work - with an AVR inside! Wish you well!
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: Vorstellung industrieller Datenlogger mit AVRco

 · 
Posted: 23.02.2012 - 17:58  ·  #3
Hello Avra,

thank you for sharing your thoughts, I will add some of them to V2.0.. Especially the MODBUS / OPC subject will be on the schedule. Also a mail trigger for noticing critical situations.

If I had dealt with 20 mA sensors so far, I have used simple burden resistors and measured the voltage. Rough, but as you know: quite sufficient in most cases. Since each channel has an internal linear equation y = mx + b , that can be adapted by m and b, it is an easy job to get the proper values.
The database in the logger is synchronized via ethernet automatically to a PC/Server based database and the graphical tool HxGraph is network capable, so many users can follow almost online (some seconds of delay) in the network the data.
I did not use a http - based web server on the logger, because I felt, that my requests like zooming, measuring, automatic scaling etc etc. were limited by the browser based tools. I prefer the Delphi-Tools, that need no installation and run out of the box.
I had written in german - thank you for taking the pain to read it - and I would like to add some specialities in english here.
The main focus in the logger had been put on the processing of the measured physical data. It is difficult to explain the Integral function (converting e.g. a signal with kW into a counter of kWh) or the Deviation in time (converting e.g. a distance-counter in m into a speed-value m/sec.). I found these mathematical conversions very useful. Last, not least I integrated a little interpreter with a simple formula-like language for calculating and doing if..then..else clauses with the values. Very nice, if you have e.g. a voltage and an ampere-signal and you can create a virtual channel with the product W = V x A.
Last, not least, I have integrated the Relay-Server Technique via the Ethernet-Interface. Plugged into a DHCP-network with internet-gateway the Logger connects automatically outgoing to a central server im my company and thus can be accessed by the control software from any spot of the earth via this server - without configuring any firewalls. Great for makeshift installations..

I wanted to create a powerful tool for getting and analysing data, but I found no better word than DataLogger for the device. It is difficult the explain the unusual features, although they are quite easy to use. But I understand, that I will have to move forward into the industry standard direction.

Thank you for your explanations, I will make use of them!

Michael
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Vorstellung industrieller Datenlogger mit AVRco

 · 
Posted: 29.02.2012 - 10:33  ·  #4
Quote by mc-electronic
If I had dealt with 20 mA sensors so far, I have used simple burden resistors and measured the voltage. Rough, but as you know: quite sufficient in most cases. Since each channel has an internal linear equation y = mx + b , that can be adapted by m and b, it is an easy job to get the proper values.
...
The main focus in the logger had been put on the processing of the measured physical data. It is difficult to explain the Integral function (converting e.g. a signal with kW into a counter of kWh) or the Deviation in time (converting e.g. a distance-counter in m into a speed-value m/sec.). I found these mathematical conversions very useful. Last, not least I integrated a little interpreter with a simple formula-like language for calculating and doing if..then..else clauses with the values. Very nice, if you have e.g. a voltage and an ampere-signal and you can create a virtual channel with the product W = V x A.

You are quite right about ease of interfacing 0-20mA sensors, but you are thinking from your point of view where you assume that everyone interested in such a feature has knowledge and will to do it. From my experience in many plants maintenance you mostly have manager(s) with bunch of electricians, technicians, process control and instrumentary guys. When a production asks for some new sensors, technical solution decision is driven partly by device interfacing features. If 0-20 or 4-20mA signal is in question, NO ONE in a big plant will purchase a device that doesn't have this feature out of the box (and big plants are one of your targets in a long term since they purchase tens of devices at once), and no one in the plant will get the job to make the needed custom electrical interface. Even if the knowledge is there. The reason is that they will not risk their production with some custom solution, when there is already a proven solution. They will pay much more if needed, to have a 24/7 sleep. Even if something goes wrong with a branded device, no one can blame the one who ordered it since he bought the best there is. I think you get the picture how hard it is to sell your devices to big plants. It would be wise to not make it even harder just because you don't have a 0-20mA or 4-20mA interface. If you don't want to mess with existing PCBs then you can make an adapter which you can also sell. I don't remember if you had an interface to various thermal sensors, but that is also interesting in a plant floor (although more complicated).

Linear equation is quite common, but you can extend transfer function from simple linear form y(x)=k*x+n to more general polynomial form y(x) = c0*x^0 + c1*x^1 + c2*x^2 + c3*x^3 + ... This can be very nicely applied in electronics since all non-linear sensors I have dealt with so far could be curve fit with just 4-5 polynomial coefficients (c0, c1, c2...) and therefore very accurately linearized without big tables and with just simple math. You can find nice free curve fitting software that finds these polynomial coefficients out of any X-Y table here: http://www.xlxtrfun.com/XlXtrFun/XlXtrFun.htm
An example process goes something like this... Let's say you have some nonlinear sensor (like temperature), and you already have a x,y table from the datasheet or you make your own table for a totally unknown sensor by heating it and writing down temperature/resistance pair values. Then you use XlXtrFun or some other software for curve fitting to find polynomial coefficients. You try 4, 5 and 6 coefficients, and you see that curve is accurate enough with 5 coefficients. Then you write them down and they are ready to be used for converting raw measurements to engineering units. Very nice and convenient.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   71   85 · Page-Gen-Time: 0.032683s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI