# For a plane, getting 8 or more analog signals into a PC

J

#### Joe Plane

Jan 1, 1970
0
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

Thanks

S

#### Spam Hater

Jan 1, 1970
0
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

Thanks

Do you know about these folks?

<http://www.dataq.com/>

SH7

M

#### Mario Trams

Jan 1, 1970
0
Hi Joe,
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

I don't know how familar you are with electronics and/or microcontrollers
and and what you are able to do by yourself or you need to buy.
The hardware you refer to appears to be a little bit unusable for

I would suggest you to take a small Microchip PIC or Atmel AVR
micro controller. There are models with 8 analog channels that
is exactly sufficient for your needs. The resolution is 8 bits
what should be enough for your application.

These microcontrollers usually have an UART as well that can
be used to drive an RS232 port. All you need is such a
level-shifter (MAX232) as shown one the page you cited.

Also watch out for PIC or AVR evaluation/development boards.
They have all this stuff usually on-board and you don't have
to solder anything.

All you have to do then is to write a small loop for the
micro controller that reads the analog voltage, sends the
sample via the UART to the host computer, prepare the
AD-converter for the conversion of the next channel, wait
a little bit, and repeat the procedure. The achievable update
rate for all channels should be more than sufficient for you.
All this stuff is really easy to do.

As for the 10V levels, you could simply use resistive
voltage dividers to bring the range down to 0-5V (or whatever
the maximum input voltage is). The resistors shall not be too
output (consult the data sheet of the sensor).
If you cannot meet both criterions, than you have to use an
active voltage scaling using an operational amplifier. That
is, however, not a big deal as well.

I hope I could give you a comprehensive starting point.

Regards,
Mario

I

#### Iwo Mergler

Jan 1, 1970
0
Joe said:
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

Thanks

<disclaimer>

While it is perfectly feasible to use a PIC or a
commercial data acquisition device, I would suggest
you also add more conventional instrumentation.

Just imagine, the oil pressure looks bad and you now
have to decide wether you have a bug in your software
or an emergency landing situation.

</disclaimer>

This one has 8 differential +-10V inputs:

http://www.superlogics.com/specpage.asp?Items=8517

Kind regards,

Iwo

G

#### GrahamH

Jan 1, 1970
0
Joe Plane said:
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

Thanks

Have a look at http://www.datx.com/products_hardware/prod_dt9800-series.htm
for a neat USB module

J

#### Joe Plane

Jan 1, 1970
0
Mario Trams said:
Hi Joe,

I don't know how familar you are with electronics and/or microcontrollers
and and what you are able to do by yourself or you need to buy.
The hardware you refer to appears to be a little bit unusable for

I would suggest you to take a small Microchip PIC or Atmel AVR
micro controller. There are models with 8 analog channels that
is exactly sufficient for your needs. The resolution is 8 bits
what should be enough for your application.

These microcontrollers usually have an UART as well that can
be used to drive an RS232 port. All you need is such a
level-shifter (MAX232) as shown one the page you cited.

Also watch out for PIC or AVR evaluation/development boards.
They have all this stuff usually on-board and you don't have
to solder anything.

All you have to do then is to write a small loop for the
micro controller that reads the analog voltage, sends the
sample via the UART to the host computer, prepare the
AD-converter for the conversion of the next channel, wait
a little bit, and repeat the procedure. The achievable update
rate for all channels should be more than sufficient for you.
All this stuff is really easy to do.

As for the 10V levels, you could simply use resistive
voltage dividers to bring the range down to 0-5V (or whatever
the maximum input voltage is). The resistors shall not be too
output (consult the data sheet of the sensor).
If you cannot meet both criterions, than you have to use an
active voltage scaling using an operational amplifier. That
is, however, not a big deal as well.

I hope I could give you a comprehensive starting point.

Regards,
Mario

Yes you did thanks

A couple more questions if you have the time. I am starting to learn
and am rapidly approaching the point of where my imagination is
becoming dangerous in its scope of possible projects.

I have 10 analog inputs and 2 pulses I need to count. I have picked up
a smattering of assembly for the 8051 chain and I should be able to
code it as you pointed out above. I see there is another chip the 808
which has 8 analog inputs . Is one possibility to get two of these
together and then the PC sends a signal across the serial line such as
'5' which the 8051 picks up via the serial interrupt then knowing
sensor '5' is on the first 808 chip selects this chip, sends across
the appropriate 3 bits for the appropriate chanel reads and copies
over the signal and then the 8051 copies it from port (1 for example)
and then sends it to SBUF?

I also heard about the 8031 chip which has a built in serial line.
Does this mean the 8031 can be hooked directly to the max232? And how
does one determine which analog signal to chose on the 8031 (in the
the conversion process?

Many thanks again.

W

#### Wouter van Ooijen

Jan 1, 1970
0
I would suggest you to take a small Microchip PIC or Atmel AVR
micro controller. There are models with 8 analog channels that
is exactly sufficient for your needs. The resolution is 8 bits
what should be enough for your application.

I dunno about AVRs, but the PICs have 10 bit A/D. The cheapest with 8
inputs is the 16F676. No UART, but there is plenty of bit-banging UART
code around. IIRC the 16F88 has both A/D and UART.

Wouter van Ooijen

-- ------------------------------------
http://www.voti.nl
PICmicro chips, programmers, consulting

D

#### Dave VanHorn

Jan 1, 1970
0
Wouter van Ooijen (www.voti.nl) said:
I dunno about AVRs, but the PICs have 10 bit A/D. The cheapest with 8
inputs is the 16F676. No UART, but there is plenty of bit-banging UART
code around. IIRC the 16F88 has both A/D and UART.

AVR is 10 bit

M

#### Mario Trams

Jan 1, 1970
0
Hi Joe
A couple more questions if you have the time. I am starting to learn
and am rapidly approaching the point of where my imagination is
becoming dangerous in its scope of possible projects.

I have 10 analog inputs and 2 pulses I need to count. I have picked up
a smattering of assembly for the 8051 chain and I should be able to
code it as you pointed out above. I see there is another chip the 808
which has 8 analog inputs . Is one possibility to get two of these
together and then the PC sends a signal across the serial line such as
'5' which the 8051 picks up via the serial interrupt then knowing
sensor '5' is on the first 808 chip selects this chip, sends across
the appropriate 3 bits for the appropriate chanel reads and copies
over the signal and then the 8051 copies it from port (1 for example)
and then sends it to SBUF?

Yes, that is well possible. So far I haven't done anything
with the 8051 architecture. But when you say that there
is this 808 that can be attached to the 8051 bus, it should
be well possible to attach more than one of these.

As for the data transmission protocol, your proposal would
be alright as well. An alternative might be that the micro
controller permanently samples all 10 channels in a round-robin
fashion. Once it got a sample, it would send the data
computer can decide to which channel the sample belongs to.

I used such a fashion in a sensor design I did recently
(http://www-user.tu-chemnitz.de/~mtr/plane_sensor_page/)
But perhaps your on-demand sample request is more suitable
I also heard about the 8031 chip which has a built in serial line.
Does this mean the 8031 can be hooked directly to the max232? And how
does one determine which analog signal to chose on the 8031 (in the
the conversion process?

Again, I have to admit that I'm not yet familar with the 8051
architecture. All I know is that the 8051 has a conventional
external bus and IO registers are very likely mapped into the
(I doubt this device has 8 AD-converters inside), some other
control-and-status registers, and a data register that holds
consult the appropriate data sheets.
Probably you need some external glue-logic for address decoding
in order to attach external devices to the 8051 bus.

I don't know whether there are 8051s that have everything
integrated what you need. I checked the PIC pallet and there
are several devices that include all you need in a single chip.
For instance:
Check out www.microchip.com for details.
Of course, dealing with an architecture that is new for you might
cause some difficulties.

Regarding the serial line: Yes, these UARTs usually have a
simple digital input and output (RX and TX) and all that
needs to be done is to feed them appropriately through this
MAX232 (or some alternative device).

Regards,
Mario

M

#### Mario Trams

Jan 1, 1970
0
Wouter said:
I dunno about AVRs, but the PICs have 10 bit A/D. The cheapest with 8
inputs is the 16F676. No UART, but there is plenty of bit-banging UART
code around. IIRC the 16F88 has both A/D and UART.

Yes, you are right. There are some PICs with 10Bit AD and even some
with 12Bit (PIC16C774, for instance).

Regards,
Mario

J

#### Joe Plane

Jan 1, 1970
0
I don't know whether there are 8051s that have everything
integrated what you need. I checked the PIC pallet and there
are several devices that include all you need in a single chip.
For instance:
Check out www.microchip.com for details.
Of course, dealing with an architecture that is new for you might
cause some difficulties.

I ordered a 8051 kit and have spent 1 day reading all I could find so
it is no big loss if I switch to a different processor design. When
going to couple book stores I found many books on the PIC but only one
on the 8051. Is PIC somehow the way to go? It seems like there is more
buzz on it but I have no idea on why one might be better than another.
If it is easier/more powerful and the world is moving in this
direction then I'll go this route.

Does the PIC need the max232 as well?

If the data point is 10 or 12 bits how does this get copied over the
serial line and get represented? Two 8byte characters?

Thanks again

M

#### Mario Trams

Jan 1, 1970
0
Hi Joe,
I ordered a 8051 kit and have spent 1 day reading all I could find so
it is no big loss if I switch to a different processor design. When
going to couple book stores I found many books on the PIC but only one
on the 8051. Is PIC somehow the way to go? It seems like there is more
buzz on it but I have no idea on why one might be better than another.
If it is easier/more powerful and the world is moving in this
direction then I'll go this route.

The PICs are famous, the 8051s are famous, the AVRs are famous
and others are famous as well...
They all have their reason for being there, somehow....
I wouldn't say that PICs are easier or better, but there are tons
of PIC varieties available. When you try to program them in
assembly language, you will even find them a little bit "strange"
because the PICs do not have an ordinary register architecture.
But it's not a big deal to handle this, actually.
Does the PIC need the max232 as well?

Yes. Almost all UARTs deliver or accept just a logic level.
This is done in order to have the freedom to choose
among different physical layers (such as RS485/422, LVDS,
optical, radio, ... , or RS232).
If the data point is 10 or 12 bits how does this get copied over the
serial line and get represented? Two 8byte characters?

Of course. It's the small protocol or packet format that you have to
develop for your application. In this sensor board I mentioned,
data packets are built from multiple 8 bit symbols. I'm even
transmitting only 4 bit of actual data per byte. The rest is for
forward error correction and redundant packet flow control
purposes. The first 4 data bits are a packet ID where the receiver
can determine what kind of packet it is and how many symbols

Regards,
Mario

J

#### Joe Plane

Jan 1, 1970
0
Of course. It's the small protocol or packet format that you have to
develop for your application. In this sensor board I mentioned,
data packets are built from multiple 8 bit symbols. I'm even
transmitting only 4 bit of actual data per byte. The rest is for
forward error correction and redundant packet flow control
purposes. The first 4 data bits are a packet ID where the receiver
can determine what kind of packet it is and how many symbols

Regards,
Mario

Thanks

I'll stick with the 8051 as that is what I have and from what I read
more than capable of this generic functionality.

This is another beginner 101 question but with the generic NS804 ADC
chip I could see how I could flip a series of bits to tell it to start
a conversion and then transmit it over 8 registers which would be
recieved by port1. When looking for more functional chips such as the
which has a 14 bit count but does not user 14 registers as a copying
mechanism (I can see how this could be inefficient) the doc says it
has a 'ser-8051' port.
I take it to mean I can hook up the 'DOUT' pin to the 'RXD' pin and I
will get notified of 2 bytes arriving?

The docs say for the 'SCLK' pin 'The user must supply a serial clock
on this input'. Is this serial clock somehow coordinated with other
components? What type of clock would one use?

M

#### Mario Trams

Jan 1, 1970
0
Joe said:
I'll stick with the 8051 as that is what I have and from what I read
more than capable of this generic functionality.

This is another beginner 101 question but with the generic NS804 ADC
chip I could see how I could flip a series of bits to tell it to start
a conversion and then transmit it over 8 registers which would be
recieved by port1. When looking for more functional chips such as the
which has a 14 bit count but does not user 14 registers as a copying
mechanism (I can see how this could be inefficient) the doc says it has a
'ser-8051' port. I take it to mean I can hook up the 'DOUT' pin to the
'RXD' pin and I will get notified of 2 bytes arriving?

The docs say for the 'SCLK' pin 'The user must supply a serial clock
on this input'. Is this serial clock somehow coordinated with other
components? What type of clock would one use?

Joe, the things are a little bit different (meaning more complicated).
Lots of these AD-converters have a serial interface rather than a
parallel one. That is, you have control and status registers and
data registers as well, but you cannot access them like memory
cells. Instead, you have to use a small serial protocol where
information is shifted bit by bit. The samples made by the AD7856
are not "just coming" out of the chip.
Instead, you usually have to select the register you want to read
or write in a first transaction, and the data is transferred in a
second cycle.
See the data sheet of the AD7856 for details.
Whether you can connect DOUT of the AD-converter to your 8051 RXD
depends on your 8051. RXD actually sounds like something for an UART.
But perhaps it can also be used for this purpose.
At least the PICs and the AVRs have a so-called SPI subsystem.
There you would connect SCLK with SCLK, DIN with DOUT, and DOUT with DIN.
Perhaps there are also a few sideband signals such as chip select
(when you have multiple slaves). AD converters usually also provide
a signal that marks the availability of a new sample.

Anyways, I think the AD7856 is a little bit overkill for your
application. What do you want with almost 300000 samples per second?

Regards,
Mario

J

#### Joe Plane

Jan 1, 1970
0
Anyways, I think the AD7856 is a little bit overkill for your
application. What do you want with almost 300000 samples per second?

Regards,
Mario

Perhaps so, I don't need such a high sampling rate. It would be nice
to have a 12 bit sampler especially for 2 low signal thermocouples
(exhaust gas temperature and cylinder head temperature).

temperature compensation and a number of other terms with the theme of
'much more precise'. I don't know if something like the NS804 or NS808
which was what I was planning on using is close, wildly inaccurate,
etc..

Also on another question. How much electronic noise (what is the
metric to measure this?) will this circut typically produce (don't
want to get noise in my headphones) and are there any generic tips for
keeping the noise lower?

Many thanks once again.

M

#### Mario Trams

Jan 1, 1970
0
Hi Joe,
temperature compensation and a number of other terms with the theme of
'much more precise'. I don't know if something like the NS804 or NS808
which was what I was planning on using is close, wildly inaccurate,
etc..

Again, I do not know these devices you mention. When they are some
standard and cheap parts they are very likely not very good. But perhaps
more than sufficient for your application. I would refuse to use such
simple AD converters that are mostly even integrated in micro controllers
for measurements where precision is required. However, when I just
want to know whether a temperature is around 20 degrees or 30 degrees
then they might be a good (economic) choice.
Also on another question. How much electronic noise (what is the
metric to measure this?) will this circut typically produce (don't
want to get noise in my headphones) and are there any generic tips for
keeping the noise lower?

Yes. The general rule is that your design is no antenna. That is
achieved by having no current loops. Or better said, the area that
is spun up by a current loop (think of a cable that you lay out
like a Greek Omega and you pulse some current through it) is as
small as possible.
Here are a few more concrete rules:
- Fast switching digital signals should be avoided when they are
not required.
- Connectors and cables should contain sufficient ground wires and
the cables should be shielded, of course
- Ideally, one would use symetrical differential methods for
data transmission (e.g. RS422/485).
- Printed Circuit Boards have to be well designed (e.g. solid
ground plane, good decoupling).
- The whole thing might be placed in a closed metal case.

But don't be afraid. I guess, even when you do not respect these
rules, the electrical noise generated by your desktop computer
is still higher than a small micro controller circuitry built
on an experimental board. That is because the involved frequencies
and currents are not very high.

Regards,
Mario

C

#### Chon Tang

Jan 1, 1970
0
I fly an experimental plane and would like to have a small on board
PC display many of the analog sensors in the plane, exhaust gas
temperature, cylinder head temperature, oil temperature, outside
temperature, oil pressure, fuel pressure & tach. With the exception
of the tach all sensors report the readings as a voltage.

I found a nice site at http://www.iguanalabs.com/adc2051.htm that
talks about how to get one 0-5v source measurement in, these voltages
are usually 0-10v and there are 8 or so.

Any ideas on how I can get these 8 different voltage readings
into a PC in real time?

Thanks

There's a broad range of possibilities out there... here's one more:

http://www.tern.com/fc_b.htm

$99 unit, +$30 for 8 ch. 16-bit ADC. C/C++ programmable x86-based
embedded controller. There's onboard CompactFlash if you can get away
with doing logging, or 2 RS-232 ports if you really need PC display.
(You can write up a VB app on your PC pretty easily.)

.... and if you need immediate display, you can hook it up with:

Building your own is definitely "cheaper", from a per-unit point of
view... but the time spent solderin' this stuff together has to be
counted.

Replies
3
Views
907
Replies
12
Views
2K
Replies
3
Views
580
Replies
2
Views
936
Replies
10
Views
1K