Remote Technologies RPC-320 manual Noise Notes, Temperature Measurement

Page 38

ANALOG INPUT

into an array which requires 6 bytes per entry. The second example takes only two byes per entry, can save to extended m emor y, b ut requir es a longer time to get a data point.

The pr ogram below take s about 1. 5 ms per data point.

10 DIM A(254)

20 FOR X=0 TO 254

30 A(X) = AIN(0)

40 NEXT

This next program saves data above MTOP . M TOP was previously set. However, if you have 128K or more RAM, you can POKE into segment 1 or higher. It takes approximately 2 mS per data point and is not affected by the memory location saved to.

10 A = 30000

20 FOR X=0 TO 999

30 POKE W0,A,AIN(0)

40A=A+2

50NEXT

Data is retrieved using the PEEK W command.

Noise Notes

An input channel can appear noisy (change readings at random) if unused inputs are allowed to float . To minim ize noise (and increase accura cy), connect all unused inputs to ground.

A high im pedance inp ut is, by definition, sensitive to voltage pickup. Noise is minimized by running wires away from A C power lines. A low impedance voltage source helps to reduce noise pick up. Shielded cable can help reduce noise from high impedance sources. Make sure the shield is not used for power ground. U sing the shield for power ground defeats its purpose.

Wire pairs can also be twisted. 5-6 twists/foot provides a reasonable amount of noise cancellation.

Noise is defined in this section as any random change from a known input. The amount of noise you can exp ect und er nor ma l op er atin g ci rc um sta nce s is ±3 counts for any input range.

One way to compensate for noise is to take a number of samples and average the results . Taking 6 or more samples would, in theory, cancel out any effects of noise. A problem with this is noise tends to group together. Ta king 6 readings at one time might show no change fr om the no rm. Another 6 reading s might be a ll high . If possible, try to spread out readings over a

SECTION 10

period of time (several seconds if possible).

Another way is place a capacitor (0.1 to 1 mfd) between the input terminal and ground. This is useful when the source resistance is high.

Noise is, by definition, random . If you wer e to plot out the deviations from a norm, it would roughly resemble a bell shaped curve. Exper iments on the RPC-320 have shown that 99% of the readings are w ithin the ±3 count reading and 60% are ±1 count. Noise readings were made with all inputs shorted to ground.

Temperature Measurement

Refer ence IC U14 outp uts a voltage pr oportiona l to its temperature. This information is used to determine approximate ambient temper ature in order to turn on fans or heater s.

Vo = 2.1(T + 273)

 

 

or

 

T =

Vo/2. 1 - 273

 

 

or

 

T =

Vc * .581428 - 273

 

Where T =

Te mp er atu re in °C

Vo = Output voltage in mV

Vc = Count returned using AIN , 0 - 5V range

At 25°C the output voltage is approximately 625 mV, or 506 counts. Vo is expressed as a milli-volt number (625) not .625.

The output from U14 must be buffered. To measure temperature, jumper H1[1-3]. Remove resistor R13. Jumper H1[2-4]. Tem perature is read at analog channel

0.T he sensitivity is incr eased by jum pering H 1[5-7] to ground. T his will double the output voltage and any voltage changes due to temperature.

100 T = AIN(0) * .581428 - 273

T retur ns the tempera ture in celsius.

Sensitivity is increased by jumpering H1[5-7] to ground. This doubles the output voltage and any voltage changes due to temperature.

NOTE: Tem peratur e measu rem ents are a pproxim ate and are meant as a guide to indicate ambient temperature.

Page 10-3 RPC -320

Image 38
Contents Revision REVTrademarks Table of Contents Interrupt Characteristics Sect ION 11 Watchdog Timer DescriptionExternal Reset Sect ION 13 Multi Mode Counter DescriptionSoftware Revision History Description OverviewSection Manual OrganizationSymbols and Term inology Technical SupportOverview Section System layoutEquipment Operating PrecautionsIntroduction First Time Operation Using a PCUsing a Terminal Uploading and Downloading ProgramsEditing programs and program ming hints Where to GO from Here TroubleshootingEprom Saving ProgramsSaving a Program W3 autorun jumperLoading a Program AutorunningPreventing Autorun Changing Eprom SizeBload CommandsAlternate Eproms BsaveCOM1 Serial Port Serial PortsCOM0 Serial Port RS-422/485 Termination network Serial Ports SectionRS-422/485 Operating Information Multidrop Network Accessing Serial BuffersTwo wire RS-485 Serial Port PIN OUT Accessing COM0 and COM1Disabling CONTROL-C RXD CTS RAM Memory Battery BackupChecking the battery Changing MemoryReserved Memory Storing Variables in RAMAssembly Language Interface Block Data TransferDigital Por t J3 Digital and Opto PortsDigital I/O Ports High Current Port L8 Digital I/O CommandsDigital Port P6 Optically Isolated InputHigh Current Output Digital I/ O prog ramm ing exam ple Interfacing to switches and other devicesInterfacing Digital I/O to an opto-module rack Ls e Width Modulation PWM Digital and Opto Ports Section Conne ctor pin ou t J3Line Config LineCount Line BM E Setting Date and TimeDate Section Programming Example Connecting DisplaysWriting to the Display Display Connector PIN OUT Display TypesKeypad Port Program explanationKeypad Port PIN OUT J5 Initialization Connecting Analog InputsAnalog Input Overvoltage conditionsAcquiring Analog Data Differential ModeExamples u sing CON FIG AIN Temperature Measurement Noise NotesAnalog Input Section Data logging on a timer tick Measuring Higher VoltagesMeasuring 4-20 mA current loops Converting Analog MeasurementsAmplifiers Calibration Watchdog Timer External ResetProgram Example Interrupt CharacteristicsOptically Isolated Interrupt Optically isolated and TTL interrup ts Load ProgrammingGND GateCOU NT0 Power Management Further Power ReductionPower Management Section Program Examp leElectrical Specifications Technical InformationJumper Descriptions Mechanical SpecificationsMemory and I/O Bank MAP Bank