HELP!! - Need simple 4 sensor digital circuit...
HELP!! - Need simple 4 sensor digital circuit...
(OP)
Hi,
I am a programmer by trade, so some of the electrical engineering stuff goes over my head. I will do my best to explain my problem and I would love anyones input.
PROBLEM:
I have an Elexol Ethernet IO24 Digital I/O Module, with an Elexol 8 CH Opto-Isolated I/O Board connected to it.
So now I have 8 digital channels to work with.
I need to build a module that connects to the 8 CH I/O board and supports 4 sensors.
If each sensor has 8 bits of precision, I will need to limit them to 6 bits of "readable" precision. And use the last 2 bits (on my I/O module) for control. Here is some pseudo code to explain my logic, hope it makes sense.
//array is io board, pins 6,7 are control pins, while 0-5 are data pins (from sensors)
$ioBoard = array(0, 0, 0, 0, 0, 0, 0, 0);
//poll sensors based on value of pins 6,7
$ioBoard = getSensorData($ioBoard[6], $ioBoard[7]);
//the sensor circuit
function getSensorData($pin6, $pin7)
{
//6 bits data
$data = array(0,0,0,0,0,0);
//magic circuit logic
switch ($pin6.$pin7)
{
//sensor 1
case '00':
$data = SENSOR_1_8_BITS_TRUNCATED_TO_6;
break;
//sensor 2
case '01':
$data = SENSOR_2_8_BITS_TRUNCATED_TO_6;
break;
//sensor 3
case '10':
$data = SENSOR_3_8_BITS_TRUNCATED_TO_6;
break;
//sensor 4
case '11':
$data = SENSOR_4_8_BITS_TRUNCATED_TO_6;
break;
}
return $data + array($pin6, $pin7);
}
I am a programmer by trade, so some of the electrical engineering stuff goes over my head. I will do my best to explain my problem and I would love anyones input.
PROBLEM:
I have an Elexol Ethernet IO24 Digital I/O Module, with an Elexol 8 CH Opto-Isolated I/O Board connected to it.
So now I have 8 digital channels to work with.
I need to build a module that connects to the 8 CH I/O board and supports 4 sensors.
If each sensor has 8 bits of precision, I will need to limit them to 6 bits of "readable" precision. And use the last 2 bits (on my I/O module) for control. Here is some pseudo code to explain my logic, hope it makes sense.
//array is io board, pins 6,7 are control pins, while 0-5 are data pins (from sensors)
$ioBoard = array(0, 0, 0, 0, 0, 0, 0, 0);
//poll sensors based on value of pins 6,7
$ioBoard = getSensorData($ioBoard[6], $ioBoard[7]);
//the sensor circuit
function getSensorData($pin6, $pin7)
{
//6 bits data
$data = array(0,0,0,0,0,0);
//magic circuit logic
switch ($pin6.$pin7)
{
//sensor 1
case '00':
$data = SENSOR_1_8_BITS_TRUNCATED_TO_6;
break;
//sensor 2
case '01':
$data = SENSOR_2_8_BITS_TRUNCATED_TO_6;
break;
//sensor 3
case '10':
$data = SENSOR_3_8_BITS_TRUNCATED_TO_6;
break;
//sensor 4
case '11':
$data = SENSOR_4_8_BITS_TRUNCATED_TO_6;
break;
}
return $data + array($pin6, $pin7);
}





RE: HELP!! - Need simple 4 sensor digital circuit...
RE: HELP!! - Need simple 4 sensor digital circuit...
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
RE: HELP!! - Need simple 4 sensor digital circuit...
I need to build a module that connects to the 8 CH I/O board and supports 4 sensors.
Essentially, how to turn my code into a circuit.
As far as the sensors I am using, I don't have any yet... But I have seen 8 bit digital sensors...
I would probably like to connect sensors of the following 4 types:
-Temperature
-Rel Humidity
-PSI for liquid
-And maybe some photoelectric cells to tell me how much light they are recieving.
Hope this makes more sense and once again, apologies about my lack of knowledge.
RE: HELP!! - Need simple 4 sensor digital circuit...
A potentially cleaner approach is to use serial output sensors. Then each sensor would get its own I/O channel and you needn't worry about how to select one sensor and disable the rest.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: HELP!! - Need simple 4 sensor digital circuit...
My 2 control, 6 read idea was just something that made sense to me, but I do NOT know what i'm talking about.
So let me simplify my question.
Given the 8 channel I/O board, how can I read maximum precision from 4 or more sensors?
Thanks again for everyones patients and input. If anyone needs some code help, I'm here for them.
RE: HELP!! - Need simple 4 sensor digital circuit...
RE: HELP!! - Need simple 4 sensor digital circuit...
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: HELP!! - Need simple 4 sensor digital circuit...
IRstuff: If I understand what you mean by serial sensors, then that seems like a good solution. I'm not quite sure what UARTs are, so here are a few specs from the Ether I/O 24:
The Ether I/O 24 is an UDP/IP controlled digital Input/Output module. The module features three 8-bit ports with 5V level signal lines. Each of the 24 lines can be independently programmed as either an input or output.
# 24 independently programmable signal lines with configurable CMOS, TTL or Schmitt Trigger thresholds and programmable pull-ups per line
# Easy connection by three 10 way box headers to suit low cost, standard IDC or Crimp connectors
# Integrated Switch Mode Voltage Regulator allows power from any 8-32V DC Power source
# User 5V 500mA output to power external Interface boards or sensors
RE: HELP!! - Need simple 4 sensor digital circuit...
Do either of these seem apliciable?
SHT11 Temperature and Humidity Sensor Module
When it comes to precision temperature and humidity measurement, Sensirion has simplified the process their SHT1x sensor series. Through a two-wire serial interface, both temperature and humidity can be read with excellent response time and accuracy. Parallax has simplified the use of the SHT11 by mounting it in a user-friendly 8-pin DIP module. The module includes a data-line pull-up and series limiter.
DS1620 Temperature Sensor
The DS1620 is as a digital thermometer with +/-0.5C accuracy from a -0C to +70C. The temperature is read out over a 3-wire serial bus in 2's complement format with 9 bits of resolution. Higher resolution readings can be calculated using data from the DS1620 counter and slope accumulator registers.
RE: HELP!! - Need simple 4 sensor digital circuit...
This is the component behind an RS-232 serial interface.
Unfortunately, your board does not support serial. It's basically 3 parallel ports and that's about it.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: HELP!! - Need simple 4 sensor digital circuit...
RE: HELP!! - Need simple 4 sensor digital circuit...
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
RE: HELP!! - Need simple 4 sensor digital circuit...
Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com
RE: HELP!! - Need simple 4 sensor digital circuit...
TTFN
FAQ731-376: Eng-Tips.com Forum Policies