Electronic Design

Novel Decoding/Threshold-Sensing Technique

Here’s an Idea For Design that’s more Idea than it is Design. Using inexpensive memory devices, you can construct a voltage, current, or count sensing system that can be permanently programmed for one set of input conditions or programmable for custom sensing of input parameters.

In Figure 1, we have a parallel-output analog-to-digital converter wired to a typical EPROM. The EPROM has been programmed with zeroes for the first 128 bytes, the 129th byte contains the value 1, and the remaining bytes are zeroes. Let’s assume the ADC has a 0- to 5-V input and a fairly linear output. As the input voltage swings from 0 to 5 V, the analog-todigital output goes from binary 0 to binary 255. At approximately 2.5-V input, the output will be the binary number 129, and the EPROM, decoding address 129, will output its stored value (one). Data line 0, here labeled “alarm output,” will go high, signaling that the input has reached the level we’re monitoring. If an inverted output is needed, simply substitute ones for zeroes and zeroes for ones.

By programming all ones in memory addresses 129 and up, our alarm output becomes an overvoltage indicator. Alternately, by putting ones into addresses 0 to 129, and zeroes above, we have an undervoltage sensor. By putting single-bit numbers (4, 8, 16, etc.) into the EPROM, one could monitor up to eight different input levels, each with an individual output.

When a frequency-to-voltage converter is used as an input to the ADC, a dandy little frequency-drift monitor results. By programming the EPROM with different values, the direction and extent of the drift can be determined.

In Figure 2, a 4040 ripple counter is connected to our EPROM. This circuit will count from zero to 4096, then ripple out to zero, etc. Suppose we need to know when the input has received exactly 2345 pulses (or any arbitrary number). By programming the EPROM with all zeroes, except for memory location 2345 which contains a one, the circuit will output when the desired pulse count is reached. If you need to count a given number of pulses and then reset to start over, the D0 output can be brought back to the 4040’s RESET input. As in the example above, by putting single-bit numbers into specific memory locations, up to 8 different pulse counts can be monitored. By cascading counter chips, one could monitor pulse counts into the millions.

Still referring to Figure 2, if the EPROM is programmed with the numbers 0 to 255 in memory locations 0 through 255, and the number pattern is repeated throughout the rest of the memory locations, the EPROM becomes a frequency divider with output D0 = input/2, D1 = input/4, etc. up to D7 = input/256. Each output maintains a 50% duty cycle, regardless of the input signal’s duty cycle. By carefully selecting other bit patterns, division by any number from 2 through 128 is possible. For example, the byte pattern 0,0,1,0,0,1, etc., will provide a divide by-3 function with a 33% duty cycle, and 0,1,1,0,1,1 yields a 67% duty cycle.

By connecting the EPROM’s address lines to a typical data bus,you can monitor the bus for a given bytevalue. This may be useful as an inexpensive data-acquisition system.

By connecting the EPROM’s address lines to a typical address bus, you can monitor the bus for a given address value. A non-valid address would indicate a “crashed” or “insane” processor. The alarm output then could be used to reset the processor.

Of course, this circuit configuration isn’t limited to using an EPROM. Depending on the application, SRAM, NVSRAM, flash, etc. might be substituted. With a microprocessor or microcontroller monitoring the output of the memory chip, it becomes possible to reprogram the chip on-the-fly, thus enabling the circuit to monitor a vast multitude of varying input conditions. This could be useful for scaling an unknown or widely varying analog input.

The circuit diagrams presented here are intentionally lacking in detail, in the hope that this will stimulate the readers’ imagination and encourage further experimentation with the techniques presented.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish