28176 Parallax Inc, 28176 Datasheet - Page 154
28176
Manufacturer Part Number
28176
Description
KIT PARTS PROCESS CONTROL W/TEXT
Manufacturer
Parallax Inc
Datasheet
1.122-28176.pdf
(330 pages)
Specifications of 28176
Accessory Type
Process Control
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® 2 and Board of Education
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
- Current page: 154 of 330
- Download datasheet (11Mb)
Example Program PwmTest.bs2
' -----[ Title ]-----------------------------------------------------------
' Process Control -
' Uses Pulse Width Modulation to control fan speed
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Declarations ]----------------------------------------------------
Opto_SW
Fan
Opto_Count
RPM
SP_Data
CyclesPerRev
Duty
Max_Count
Per_RPM
x
' -----[ Initialization ]--------------------------------------------------
PAUSE 500
' -----[ Main Routine ]----------------------------------------------------
GOSUB Calibrate
DO
LOOP
' -----[ Subroutines ]----------------------------------------------------
Apply_Drive:
FOR Duty = 100 TO 0 STEP 10
NEXT
√
√
DEBUG "!TEXT (PTIME),98A,0.8A,(BLACK),",DEC Duty,CR
GOSUB Apply_Drive
COUNT Opto_SW,100,opto_count
Per_RPM = Opto_Count * 100 / Max_Count
DEBUG DEC Duty,",",DEC Per_RPM ,CR
FOR x = 1 TO 15
IF duty > 0 THEN HIGH Fan
DEBUG IBIN OUT2,CR
PAUSE Duty
Attach the 4-cycles/revolution encoder to the fan (cut-outs can be found in
Appendix A.
Enter, save and run PwmTest.bs2, then close the Debug Terminal.
PIN
PIN
VAR
VAR
VAR
CON
VAR
VAR
VAR
VAR Byte
PwmTest.bs2
8
2
Word
Word
Word
4
Byte
Word
Word
' Opto-Reflector
' Fan drive pin
' Count from opto-reflective switch
' Calculated RPM
' Data returned from StampPlot
' Encoder used
' Duty cycle value 0-255
' Maximum count for calculating Per_RPM
' Percent of RPM 0-100
' General counting variable
' Connection stabilizing time
' Apply drive with a 100msc period
' Apply for 15 repetitions
' Check if any HIGH time
' Plot digital state of drive
' Apply for amount of high time
' Drive PWM from 100% to 0%
' Measure counts for 100mSec
' Calculate percent RPM
' Plot data
' Label plot
Related parts for 28176
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: