750-00004 Parallax Inc, 750-00004 Datasheet - Page 11

no-image

750-00004

Manufacturer Part Number
750-00004
Description
POWER SUPPLY 24VDC 600MA
Manufacturer
Parallax Inc
Datasheet

Specifications of 750-00004

Form
Wall Mount (2 Prong)
Voltage - Output Per Connector
24VDC
Current - Output
600mA
Polarization
Positive Center
Cord Plug
2.1mm I.D. x 5.5mm O.D. x 12mm Female
Voltage - Input
120VAC
Power - Output
14W
Transformer Type
Linear, Unregulated
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Efficiency
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
This is a 12-bit ADC. As a result, the two least significant bit seem to jump around quite a bit. Here are
a couple of suggestions on how to deal with this.
The first difference is that the samples taken are the latest four samples. Each time a new sample is
taken the oldest is forsaken, replaced with its next newer sample. Essentially, this is a moving average.
After each new sample is taken, the average is calculated based on the new sample and the previous
three. This approach works well for control systems with fast moving variables. Contact Parallax if you
are interested in implementing a PID control algorithm, which is beyond the scope of this document.
Due to the protective input circuitry present on each analog input channel, the value given for each
channel is attenuated by approximately 4%. For example, if you were to read an input of exactly 5 VDC,
the number given would be about 3932 instead of 4095. The easiest way to account for this difference is
to multiply the number read by 1.042. This is easily done within the BASIC Stamp’s program. Please
review the Stamp PLC Core program listed within this document.
Stamp PLC Demo Program
' =========================================================================
'
'
'
'
'
'
'
'
'
'
'
' =========================================================================
' -----[ Program Description ]---------------------------------------------
'
' This program provides a set of core routines that can be used to create
' operational programs for the Stamp PLC.
' so that the code can run on any 24-pin BASIC Stamp 2 module.
'
' Notes on reading ADC channels:
'
' The inputs are protected and reduce the voltage felt on the MAX1270 input
' pins.
'
' The raw value (counts) from the ADC will be returned in "adcRaw", converted
Parallax, Inc. • Stamp PLC (#30064) • Version 1.8 • 12/29/2003
1) If you do not need 12-bits of resolution, simply divide the number down to the desired resolution.
2) If your application requires 12-bits of resolution, you may average or filter the result. Averaging
File....... StampPLC.BS2
Purpose.... Stamp PLC Core Routines and Framework for Apps
Author..... Parallax, Inc. (Copyright 2003 - All Rights Reserved)
E-mail..... support@parallax.com
Started....
Updated.... 21 DEC 2003
{$STAMP BS2}
{$PBASIC 2.5}
Ex: if you require 8-bits of resolution, just: "adresult = adresult>>4". This will eliminate the
lower four bits are provide a nice stable number.
is just that - simply take a number of samples, each time adding the sample to an accumulator,
then divide the accumulator by the number of samples taken. This approach will provide a stable
number and is a satisfactory approach for a control system whose numbers change relatively
slowly. Filtering is similar to averaging in that several samples are taken and averaged, the
difference is the way that the numbers are sampled and averaged.
This accounts for code to get a full-scale count of 4095.
Conditional compilation is used
Page
11

Related parts for 750-00004