Sensor project question

Thread Starter

forder

Joined Sep 20, 2007
11
I'm working on a temperature sensor project. The analog from the sensor will be converted into digital signal. The digital signal then will be transferred via RF module. From the RF receiver, the signal will then be displayed on two 7-segment displays. (only display from 0 degree up to 99 degrees.. other than that the displays are blank)

Now, here's how I plan to tackle the problem. The sensor is a thermocouple sensor. The A/D converter will convert the analog signal into 8-bit digital signal. The 8 bits will then go through a parallel-in/serial-out shift register to allow the signal to be transmitted via RF. At the receiveing end of the RF module, there will be serial-in/parallel-out shift register so that the signal will be in parallel. The 8-bit signal will then be decoded by two SN74LS47 decoders, where SN74LS47 decoder is BCD-to-7-segment Decoder. The first 4 outputs of the shift registers will go to one SN74LS47 decoder and the last 4 ouputs of the shift registers will go to the other SN74LS47 decoder. Each of the two decoders will then produce 7 outputs that will drive a 7-segment display.

But I'm not really know about the following issues:
1. The A/D converter will convert voltage difference from the sensor. So, for example, if the temperature sensed 65 degrees, the voltage produced is for example, say 15mV. Then the digital signal produced from the A/D converter will represent 15mV. Then how do I scale the signal back so that at the displays, the number will be 65?

2. The RF receiver will receive signals continuously. Each signal will be represented with 8 bits. And the signals will be serial signals, since the signal just came out of the parallel-in/serial-out shift register before being transmitted. How do I determine which bit is the first bit of one particular 8-bit signal and which bit is the last bit of that particular signal? Because I realized that the if one signal arrived at the RF receiver, then the next signal will follow. How do I diffrentiate between the two signals?
 

beenthere

Joined Apr 20, 2004
15,819
1. Determine the value of the least significant bit in temperature. Multiply the conversion number by that value to get the sensed temperature.

2. You will have to do some fiddling with the circuit. Insure there is a longer delay between each pair of values sent than between each individual value, and use that to sense 1st and 2nd temperatures. Or place an unambiguous bit patttern between each temperature transmission that will let the recriver (or following logic) be able to recognize each transmission.
 

Thread Starter

forder

Joined Sep 20, 2007
11
what component should i use to do the multiplication?? and also one more thing about the project, i'm not allowed to use microcontrollers and PLD (programmable logic device).
 

SgtWookie

Joined Jul 17, 2007
22,230
You could use the output of the thermocouple to drive the input of an operational amplifier, like an LF353 or other JFET input op-amp. High impedance will likely be important, as putting a load on the output of the thermocouple will skew your readings.

Run the thermocouple to the + input, and put a potentiometer between your +Vcc and -Vcc to the - input. You can use this pot to zero the output when the thermocouple is immersed in ice.

Then comes the scaling. Put a pot between the op amp's output and the - input. This will provide negative feedback as gain control. You adjust this pot to read 10.0v when your thermocouple is immersed in boiling water.

Then go back and check the reading at zero again. You'll have to run through this end-calibration procedure a couple of times until you get consistent readings.

This will take care of the math problem without resorting to an absurd number of discrete logic IC's.

Of course, how accurate you are in the middle of the range will depend upon how linear your op amp circuit and your thermocouple are. Modeling the thing in something like CircuitMaker Student (Google it) will help make you more successful on your first breadboarding attempt. As a bonus, it comes with a slew of example circuits which you can examine.

As far as the communications, seek out RS-232 IC's. They have a great deal of functionality built into them, yet aren't microcontrollers nor PLD's.

Another thought - you only really need to use one SN74LS47; you can "time share" (multpilex) it between the two displays. Use 3-state output shift registers for cranking in the transmitted bits, and their OE lines driven with an inverter gate between them, the inverter input being driven by the clock. Those same two OE lines should drive the corresponding 7-seg display, so that when the output is enabled, the display is illuminated. The multiplexing will happen so fast, you won't be able to see it flicker.
 

thingmaker3

Joined May 16, 2005
5,083
There is an additional challenge to overcome. Binary is not the same as binary coded decimal.

Examples:

decimal 11 = binary 0000 1011 = bcd 0001 0001

decimal 54 = binary 0011 0110 = bcd 0101 0100

Use a 1K x 8-bit EPROM for conversion. Put your 8 bit binary into the address lines and read BCD on the data lines.
 

Thread Starter

forder

Joined Sep 20, 2007
11
I have one more question.. how do i know that the signal i convert using the A/D converter is in binary or BCD? and how do i actually make the digital signal to be in 8-bit BCD?
 

beenthere

Joined Apr 20, 2004
15,819
The A to D spec sheet will explicitly state if the output is binary or BCD. See thingmaker3's post for the conversion of binary to BCD.
 

Thread Starter

forder

Joined Sep 20, 2007
11
Alright.. I have confirmed the output of the A/D converter is in binary. I need to convert them into BCD so that I can display decode the signal using BCD to 7-segment decoder. The thing is, how do I convert the binary signal into BCD signal. I searched the internet and I found a chip that can convert 8 bit binary to BCD, which is the 74185 chip. But the product has been discontinued. I found an idea to convert binary to BCD using two 74199 shift registers, 7452 gates and 7483 adders. But still not so sure about it. Anyone has any idea of converting binary signal to BCD?
 

SgtWookie

Joined Jul 17, 2007
22,230
Your best bet there might be to burn a PROM or EPROM, too - perhaps just load a static RAM with the values.

For whatever 8-bit binary value the ADC puts out, load it's corresponding BCD value into the PROM, EPROM or RAM's address. Unless your PROM, EPROM or RAM is more than 9 bits wide, you'll lose the MSB's - but you're only displaying two digits anyway, right?
 

Thread Starter

forder

Joined Sep 20, 2007
11
i'm sorry if i got this wrong.. but isn't the EPROM considered as PIC (microcontollers, which i 'm not allowed to use)??
 

Thread Starter

forder

Joined Sep 20, 2007
11
is there any other way to convert 8 bit binary to BCD without using PROM or EPROM? For example, a combination of gates and some shift registers maybe??
 

beenthere

Joined Apr 20, 2004
15,819
If you place the binary value into a couple of binary counters and clock them down to zero while counting three BCD counters up, it should do the conversion.
 

zxlew

Joined Apr 20, 2008
2
1. Determine the value of the least significant bit in temperature. Multiply the conversion number by that value to get the sensed temperature.

2. You will have to do some fiddling with the circuit. Insure there is a longer delay between each pair of values sent than between each individual value, and use that to sense 1st and 2nd temperatures. Or place an unambiguous bit patttern between each temperature transmission that will let the recriver (or following logic) be able to recognize each transmission.
i don't understand what is mean by "Determine the value of the least significant bit in temperature. Multiply the conversion number by that value to get the sensed temperature." can anyone give me some example?
 

beenthere

Joined Apr 20, 2004
15,819
Sorry about the confusion - the converter's LSB represents the smallest analog value of the conversion. If the converter has a full scale input of 5 volts, then the LSB value will be 5/256, or 19.5 millivolts. If you determine the change in temperature that makes the sensor output vary by that amount, then that gives you the means to go from the digital value to the sensed temperature.
 

beenthere

Joined Apr 20, 2004
15,819
Let's try a less confusing example. I am assuming you know that an A to D converter makes an analog voltage into a digital value - for 8 bits, that will be 0d to 255d.

Lets make our thermocouple have a working span of 64 deg.C, and use a conditioning circuit to make the analog voltage out of it go from 0 to 5 volts, the same as the input range of the A to D converter. That means that the sensitivity of the A to D conversion will be 64/256, or .25 deg.C. And to convert the A to D value to engineering units, simply divide the value by 4.
 

zxlew

Joined Apr 20, 2008
2
Let's try a less confusing example. I am assuming you know that an A to D converter makes an analog voltage into a digital value - for 8 bits, that will be 0d to 255d.

Lets make our thermocouple have a working span of 64 deg.C, and use a conditioning circuit to make the analog voltage out of it go from 0 to 5 volts, the same as the input range of the A to D converter. That means that the sensitivity of the A to D conversion will be 64/256, or .25 deg.C. And to convert the A to D value to engineering units, simply divide the value by 4.
Thanks for your further explanation. i know how it work now. thank you.
 
Top