Phase 7

( Click on images for more detail )

 

 

Data Aquisition and Process Control

 

This page will detail the construction of  a general purpose sensing and data logging system using a PC/Laptop. Before starting this project I had practically no electronics experience at all, I learnt a lot along the way and if nothing else, learned to reduce piles of dead components to a minimum! ;o)

The system will consist of three distinct elements: 1) The sensor modules 2) The interface module and 3) The PC/Laptop data acquisition software module. 

The initial minimum requirement for sensors will be for RPM, temperature and pressure measurement. Standardised outputs from the sensors will be 0V-5V or at least within a 5V range to suit the interface ADC inputs. There will also be output options for use with a panel or volt meter so that the sensors can be used as stand-alone modules.

 The interface module requirement is to accept a maximum of 5V input ranges and output 5V ranges with good resolution and with enough input/outputs for all the sensors needed. The protocol between the interface and PC/laptop to be relatively simple to use through the parallel port.

The initial data acquisition requirement is for clear real-time display of all sensor inputs using analogue style gauges and logging of all the sensor data to a file for later analysis. Further requirement for a means to automatically control the various systems. Initially this will simply be monitoring of the sensors, in particular the RPM and temperature so that an automatic shutdown can be initiated if necessary.  

Ultimately, I will be able to provide the modules, interface, and software in kit form so you can build the circuits yourself with the minimum of hassle. ;o)

 

 

RPM Circuit Schematic, Breadboard and PCB design

 

 The first requirement is an RPM sensor that I designed and built myself using minimal tools as there was nothing suitable on the market.

Above are the schematic diagrams of the circuit, breadboard setup for testing purposes  and the resulting PCB layout. The breadboard is just a piece of plywood drilled and tapped with cups and screws. Bell wire was used for making the connections which is great because there is no need to 'tin' the ends and it stays in place when you bend it! ;o) I designed the schematic and PCB layout using freely downloadable software from an electronics circuit board manufacturer of which there are many examples. When the PCB layout is printed it is printed at exactly the same size as the board will be.

The design criteria for the RPM circuits were: 1) that it should be able to read to 150,000rpm with an accuracy of +/-500 rpm, 2) Primary output option to allow use of any digital volt/panel meter for display in units of RPM as opposed to frequency, 3) Outputs to allow optional use of automotive digital tachometers and input into analogue to digital convertors for input into a microprocessing device 4)  Work off a 12V power supply and finally from a physical point of view, 5) Small ( 2" x 2" ), cheap and stackable as I will be needing at least four for my purposes, one for each of the two turbo's one for the freepower turbine and one for the aero engine.

 

 

Preparing and Drilling the Circuit Board

 

As the first board is a prototype, I decided to try and make the circuit board with minimal facilities and low cost. Materials included the single-sided copper clad fibreglass board, a Dremmel milling tool bit of 0.7mm for making the holes, an etch resist marker pen ( any permanent marker will do the job ), some copper etch powder and finally a special abrasive 'eraser' designed for cleaning and de-greasing the copper in one go. I began by printing out the circuit on an ordinary ink jet printer. I then tacked the diagram in place with some Araldite. I oiled the paper to make it transparent so that I could clearly see the where to drill the holes. The holes were drilled using the 0.7mm Dremmel bit mounted in an ordinary electric drill. 0.7mm is just the right size for the component wires and even the 'legs' of the DIP sockets. The only holes that I needed to widen slightly were the ones that took the 5V voltage regulator.  

 

Laying The Tracks

Once the holes were drilled, I removed the paper, cleaned the board of residual Araldite, used the abrasive eraser to clean and de-grease the copper and then proceeded to 'join the dots'!. This was very painstaking and took a while to complete to my satisfaction. The technique to applying the marker pen is to apply it in 'blobs' or 'dots', letting this dry and then re-applying the marker pen. This ensures that the the ink is solid and there are no holes in the tracks. I deliberately designed the tracks to be as wide as practically possible to allow me the maximum area for soldering.

 

 

Etching the Board

 Once the tracks were laid  it was ready to immerse into the etching solution. Before immersion, and as an extra precaution, I applied a little grease to each of the holes in the board to block them off. This was to ensure that the etching solution didn't undercut the holes. Immersion in the solution normally takes about 20 minutes to fully complete depending on the temperature. The above pictures show the results with a few of the components already mounted on the board.

 

The Finished Board

This is the finished board. I had to make an adjustment with a couple of the tracks as they weren't correct. This involved cutting the tracks and soldering a couple of cross-over wires. This done, the board worked perfectly just like the bread-boarded setup.

 

The Display

Panel meter display. 5V-15V supply, and selectable two modes of operation 0V-2V and 0V-20V, cost around £10. Connected directly to the board for power and signal input. I could have used an ordinary digital voltmeter but purchased this with a view to making a standalone tach unit.

 

The Sensor

 

Laser diode and photodiode sensor pair. Note that I use a photodiode as opposed to a phototransistor. Although a phototransistor could be used, in the particular situation where the laser is reflected off the nut, the phototransistor can not switch fast enough and in practice limits the tachometer to about 16,000rpm. A phototransistor has a response time of around 10 micro seconds, a photodiode has a response time on the order of 1000 times faster! The laser diode mounted in 10mm brass compression fitting, photodiode temporarily mounted in brass 10mm to 8mm reducer. Both will be eventually mounted in brass compression fittings for ease of installation in a variety of situations.

 

 

Testing

I needed a simple rotating body for initially testing the tachometer against. This is a 12V computer fan with blades removed, a nut epoxied to the hub and a small metal disk epoxied to the nut. The nut had two of the faces polished and the others blackened with a permanent marker. The metal disk was similarly marked.

Here the fan is rotating at around 10,000 rpm. The laser is aimed at the nut which produces two reflections per revolution. The tachometer has been jumpered to a divide by two setting. There are options for 1:1, 2:1, 6:1 and 8:1 depending on the type of rotating body that the tachometer is to be used with. The panel meter is currently displaying 99mV which indicates that the fan is rotating at 9900 rpm, +/- 100 rpm. Full scale reading is 1.500V which indicates an rpm of 150,000.

The bottom picture shows an improved tach testing device. Made from the turbine and shaft section of a small Nissan turbo. Shaft mounted on small ball races, oiled simply using Diesel for low friction. Operation involves attaching a vacuum cleaner to the welded tube on the turbine outlet which spins things up very nicely..!  Hope to get +60,000rpm which should be more than enough to test the sensor part of the tach.  

 

Packaging

The tachometer circuit will be fitted into the metal box shown above for which the size of the circuit board was designed. I've decided that the whole package will be designed primarily for use with the PC interface with only two input/output cables. One will carry the 12V power supply and signal output wires and will connect to the  interface board via 3-way jack plugs. The other cable will be for the sensor, carrying laser power and photodiode signal wires and which will split into separate laser and photodiode 'heads'. The tach unit could easily be converted into a standalone device by splitting the tach/interface cable into seperate power and display cables to feed a panel meter such as the one used for testing. You could even make a handheld device, but this would required repackaging in a larger box with a suitably small 12V battery supply.

 

Final Thoughts..

This method of producing circuit boards is fine if you are making small one off boards like this but it is not to be recommended for larger or multiple boards! There are many other more convenient ways for transferring a circuit design onto circuit board and I recommend you try these! Alternatively there are a number of companies out there that will make up a few small boards for minimal cost. Once the prototype has been proven to work I intend to use a manufacturer for creating duplicate boards.

 

 

Temperature Measurement

All temperature measurement, e.g. exhaust gas, oil, fuel, etc, will be performed using thermocouple devices. This is to keep things as simple and consistent as possible so that less work is required. Examples are shown above with different length probes. A thermocouple is a special type of wire that generates a very small voltage in proportion to the amount of heat applied. It is possible to take a direct reading using a digital voltmeter but this will not result in a very accurate readings. Instead there is an IC that will accept the small voltage signal from a  thermocouple and amplify it into a corresponding voltage which can be read by a voltmeter or fed as input into an ADC as I will be doing. Thermocouple devices come in a variety of temperature ranges and packages such as probes for immersing into hot gases or liquids or clamps that will allow you to clamp the probe to a pipe for taking external readings. The thermocouple of choice is the K-type which is good for +1200 degrees centigrade.

 

 

Temperature Circuit Schematic, Breadboard and PCB design

Temperature module. Using K-Type thermocouple for measuring 0 to +1250 degrees centigrade.

 

 

Pressure measurement

Pressure measurement will be performed by dedicated IC's, a few examples of which are shown above from a number of manufacturers. These are designed to take pressure readings and convert these into temperature compensated  proportional voltages. Voltage ranges from 0V-5V full scale can be produced which are ideal for reading by a voltmeter or ADC.

 

 

Pressure Circuit Schematic, Breadboard and PCB design

Insert diagrams here..
 

 

PC/Laptop Interface

Once again cost and suitable specifications were the criteria for deciding to design and build my own interface. The interface board will initially have 11, 12-bit resolution ( 1.2mV resolution over a 5V input range ) analogue-to-digital ( ADC ) inputs for the sensors and 8, 8-bit resolution ( 20mV resolution over a 5V output range) digital-to-analogue ( DAC ) outputs for driving various motors for control purposes. These IC's  use a specific interface protocol called SPI (Serial Peripheral Interface) that needs to be used to 'talk' to these IC's in order to control them.

 

 

Interface Schematic, Breadboard and PCB design

PC interface circuit. I haven't built or tested this circuit yet, but based on a fair amount of research and expert advice it should work.. in theory..! ;oP I chose these particular IC's because they provided the best compromise in terms of packaging, specification and interface protocol (SPI) for which the PC parallel port lends itself very well. The ADC and DAC chips will be driven by a separate software module which will effectively constitute a standalone voltage reading/writing device for testing purposes. This module will then be bolted onto the main software at a later date.

 

 

 

PC/Laptop Data Capture and Logging Software.

Above shows the laptop to be used, which I got given free. It's an old Toshiba Portege 300CT,  Intel Pentium 133Mhz, 32Mb onboard memory expandable to 64Mb, 1.5Gb hard disk and a 10.4" screen with a maximum resolution of 1024x600. Below is a universal in-car laptop charger bought new and cheap through Ebay. It works off a 12V car battery, and has selectable output voltages, a perfect and simple solution to onboard power supply! ;o) The software is to be implemented using Visual Basic 6 and the graphics implemented using the simple Windows GDI interface. There are a few requirements for the software. One is to be able to read the voltages from the various sensors via the ADC and display them for easy readability. The software is to implement a simple read/write interface across all the input/output devices regardless of type. Another requirement is to allow for the logging of that information for later analysis. A third requirement is to provide some form of control interface that will allow the user to set parameters for the controlling of motors/actuators based on sensor inputs. This last requirement is a large task to implement in itself as it requires the control interface to be designed so that it makes it easy for the user to choose any permutations of input and to control any permutations of output.

 

Instrument Panel

I started to write the software from scratch primarily because I wanted a dedicated interface. There are software modules that you can purchase for the displaying of data using classic analogue 'needle' or 'dial' type gauges but these are relatively expensive and from what I've seen not fully customisable. I wanted at least a fully customisable needle gauge and also a 'bar' style percentage gauge for temperature readings for example.  Some examples of the implemented gauges are shown above. The current implementation allows for any style of needle to be designed based on simple drawing primitives and whether that needle is of the ordinary type or 'flood' type. The face of the dials can be any background graphic. The examples above are ones I pulled from the net and tweaked in Photoshop. Shown is the software running on a 1.8Ghz PC. I've transferred the software over to the laptop and despite it's relatively low spec it runs surprisingly well although a little slow on the 'Flood' type gauges at full scale deflection but certainly still usable. A memory upgrade to 64Mb may help a little, or possibly a faster laptop at a later date..

 ..To be completed..

 

 

 

 

What components get up to when your back is turned...

 

Here are some images that you may find amusing...( they're not mine,  I promise, I found them on the internet, author unknown..! ). I reckon this could have explained the cause for many of my frustrations with electronics...the little bu**ers..! ;o)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last updated

Sunday, 10 August 2008