122-28176 Parallax Inc, 122-28176 Datasheet - Page 165

GUIDE STUDENT PROCESS CONTROL

122-28176

Manufacturer Part Number
122-28176
Description
GUIDE STUDENT PROCESS CONTROL
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-28176

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
PlotData:
RETURN
This program reads slider controls from StampPlot. One sets value the of the
variable, which will be used as the
number of samples to measure (0-255) before re-applying the PWM drive.
Note the measured voltage as the duty cycle is increased as illustrated in Figure 5-12.
The RC Network filters the PWM to the average of the voltage applied. What voltage is
measured when the PWM Value control is set to 150? From the plot, the value is
approximately 3 V. Does this make sense?
Or, looking at it in terms of PWM resolution, 5 V is covered over 255 steps of PWM,
giving each PWM increment a resolution of:
At a
DEBUG DEC ADC_DataIn ,",",
PAUSE 50
PWM
Test your control of the voltage by setting the PWM Value slider control in
StampPlot to various positions.
Set the “# Samples” slider to approximately 50.
Adjust the PWM Value from 0 to maximum in increments of 25 as the plot
progresses. Clicking to the far right of the slider will cause a change of 25.
%Duty = PWM Duty x 100/255 = 150 x 100/255 = 58.8%
Vavg = Vmax x %Duty = 5 V x 58.8% = 2.94 V.
5 V/255 = 0.0196 V.
Set the PWM Value control to 1 and note the voltage.
Set the PWM Value to 2 and note the change in voltage.
"[",DEC ADC_DataIn,",*,0.0196]",CR
Duty
The ADC used to measure voltage also has a resolution equal to that of the PWM,
which may lead to results that are not reliable for true analysis. Measure the voltage
with a separate voltmeter if possible.
of 150: 150 x 0.0196 = 2.94 V.
PWM
' Send voltage data to StampPlot
command’s
Duty
argument, and the other sets the
PWM_Val

Related parts for 122-28176