Home

PR22 PR22 - Cytron Technologies

image

Contents

1. N AIW N ON ni BB GolPl oO LED Backlight GND negative input LCD Figure 6 Interface PIC16F876A To use the capacitive sensor users have to solder 4 pin header pin to the sensor Capacitive Sensor with Capacitive Sensor GND 3 3 SDA SCL AD7746 Figure 8 The capacitive sensor needs a 3 3V supply to operate The RC4 and RC3 pins are SDA pin and SCL pin of PIC16F876A which require pull up resistors Refer to I C interface of PIC16F876A 3 3V section Interface Module with PIC16F876A To use the compass module users have to solder 4 pin header pin to the module Compass Compass Module jWcs352 mO GND GND maa 33 UCC gt SDA SCL Figure 9 Created by Cytron Technologies Sdn Bhd All Rights Reserved 4 ROBOT HEAD to TOE ytron PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors GND 3 3 SDA SCL HMC6352 Figure 10 The compass module requires 3 3V supply to operate The RC4 and RC3 pins are SDA pin and SCL pin of PIC16F876A which require pull up resistor Refer to I C interface of PIC16F876A 3 3V section Interface Barometric Pressure Sensor with PIC16F876A To use the barometric pressure sensor users have to solder 7 pin header pin to the sensor Barometric Pressure Sensor SCPi1eee 2 DRDY os DRDY as CSB CSB l MISO MOSI
2. ROBOT HEAD to TOE ytron gt S PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors For AD7746 capacitive sensor channel 1 is selected by default To select the channel 2 as input please modify the code as stated in the program For more information about the software for this system please refer to the source code provided The explanation of each instruction is provided in the source code as the comment of each line The source code is provided free and Cytron Technologies will not be responsible for any further modification or improvement GETTING START User can obtain the hardware set for this project PR22 either by online purchasing www cytron com my or purchase it in Cytron Technologies Shop 1 Once user has the hardware set soldering process can be started Please solder the electronic components one by one according the symbols or overlays on the Printed Circuit Board PCB Ensure the component value and polarity is correctly soldered Please refer to PCB Layout in Appendix A Caution Make sure all the connectors 2510 are soldered in proper side Those electronic components have polarity such as capacitor diode PIC LM7805 LM2910 transistor and LED should be soldered in right polarity or it may cause the circuit board fail to work Warning Before the battery Power is plugged in make sure the polarity is correct to prevent the explosion Wrong polarity of capacitor also
3. SCK 3 3 GND GND 3 3 SCK MOSI MISO CSB DRDY SCP 1000 D01 Figure 12 The barometric pressure sensor requires 3 3V supply to operate The SCK MOSI MISO and CSB pins logic 1 is 3 3V Thus it requires conversion of 5V signal from PICI6F876A to 3 3V Refer to SPI interface of PIC16F876A 3 3V section The status of DRDY pin can be read from SPI bus and thus is left not connected Power supply for circuit JP1 DI VCC 3 IN a OUT 5 to C4 c5 16V 100uF Istor CCAP a LM7805 CCAP 330 100pF 100pF 1 Figure 13 User can choose either AC to DC adaptor not included in the DIY project set or 9V 12V battery not included in the DIY project set to power up the circuit Higher input voltage will produce more heat at LM7805 voltage regulator Typical voltage is 12V Anyhow LM7805 will still generate some heat at 12V There are two type of power connector for the circuit DC plug J1 and 2510 02H Power Connector Normally AC to DC adaptor can be plugged to J1 type connector Refer to Figure 13 the D1 1s use to protect the circuit from wrong polarity supply Cl and C4 are used to stabilize the voltage at the input side of the LM7805 voltage regulator while the C2 and C5 are used to stabilize the voltage at the output side of the LM7805 voltage supply The SV is a green LED to indicate the power status of the circuit R1 is resistor to protect LED from
4. PR22 Reading Compass Module Capacitive And Barometric Pressure Sensors Version 1 0 August 2008 Cytron Technologies Sdn Bhd Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates It is your responsibility to ensure that your application meets with your specifications No representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy or use of such information or infringement of patents or other intellectual property rights arising from such use or otherwise Use of Cytron Technologies s products as critical components in life support systems is not authorized except with express written approval by Cytron Technologies No licenses are conveyed implicitly or otherwise under any intellectual property rights OVERVIEW FEATURES This document describes the development of Cytron PIC16F876A Technologies DIY Do It Yourself Project No 22 8 bit microcontroller with 22 I O PR22 This project will use PIC16F876A capacitive Operates with 5V supply sensor compass module barometric pressure sensor LCD 2X16 characters and LCD The function of the circuit is to read 2X16 characters display Capacitive sensor compass module and barometric Operate at 5V supply pressure sensor and display the readings on LCD Compass Module Optional Circuit schematic and PIC s
5. RI5 Resistor 4K7 R16 Resistor 4K7 Figure 16 When the MSSP module of PIC16F876A is configured as IC mode RC3 and RC4 pins become bidirectional ports SCL RC3 and SDA RC4 lines must have an open drain in order to perform the wired AND function of the bus External pull up resistors are used to ensure a high level when no device is pulling the line down SPI interface of PIC16F876A 3 3V The MSSP module can be configured as either I C or SPI mode only Since it has been configured as C mode for capacitive sensor and compass module a manual control protocol must be created to communicate with barometric pressure sensor which using SPI protocol There are 4 pins required by SPI protocol that are SCK serial clock SDO serial data master out slave in SDI serial data master in slave out and CSB chip select enable slave SCK SDO and CSB are outputs from PIC16F876A whereas SDI is input for PIC16F876A Since SCP1000 D01 operates at 3 3V any signal between it and PIC16F876A must be converted to voltage level that is applicable by the other For manual control the RCS is programmed as SDI RC6 is programmed as SCK RC7 is programmed as SDO and RA3 is programmed as CSB The following figures show the circuits for conversion Q Resistor 2N2222 1K Figure 17 3 3V SDI to 5V RCS RII Resistor IK Figure 18 5V RC6 to 3 3V SCK R13 Resistor IK Figure 20 5V R
6. may cause explosion For AD7746 user can connect the pad to the channel input as shown in figure 22 below Figure 22 2 Please download the necessary files and document from Cytron Technologies website These included documentation sample source code schematic component list and software 3 The next step is to install MPLAB IDE and HI TECC C PRO into a computer The MPLAB IDE and HI TECC C PRO can be downloaded from www cytron com my Please refer MPLAB IDE installation step document to install the software The documents can be used to any version of MPLAB IDE software 4 After the installation complete open the project file provided using MPLAB IDE Please refer MPLAB Open Project document to open the sample program 5 Plug in power supply for the circuit User can choose to use battery or AD to DC adaptor AC to DC adaptor STELETRON AC DC CONVERTER BAON TEL ETI ON INDUSTR prap mo IKAK JOHOR wi Polarity Figure 23 not included in DIY project set 9V battery connector Figure 24 not included in DIY project set Connection to the PCB board Figure 25 6 Build the project and load the hex file into the PIC microcontroller using the USB In Circuit Programmer UICOOA When user build the project MPLAB IDE will generate hex file The hex file generated from MPLAB IDE will be named according to project name not C file name Cytron Technologies also provide hex file for user D
7. over current which might burn LED The output of LM7805 is connected to input of LM2910 3 3V voltage regulator as supply The output of LM2910 is stabilized by C3 and C6 Push Button as input of PIC microcontroller VOC R3 Resistor 10K fs Figure 14 One I O pin is designated for a push button as input to PIC microcontroller The connection of the push button to the I O pin is shown in Figure 14 The I O pin should be pull up to 5V using a resistor with value range 1K 10K and this configuration will result an active low input When the button is being pressed reading of I O pin will be in logic 0 Meanwhile the button is not pressed reading of that I O pin will be logic 1 Created by Cytron Technologies Sdn Bhd All Rights Reserved 5 ROBOT HEAD to TOE ytron 5 PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors ICSP for microcontroller programming PIC UICOOA 2 n T a 6 g T 9 10 Header 5X2 Figure 15 MCLR RB6 and RB7 need to be connected to the USB In Circuit Programmer UICOOA to program the PIC microcontroller The programmer UICOOA is not included in DIY project set since it can be used several time for different project set User can also choose other type of PIC programmer to load the program For the instruction of using PIC programmer please refer to the particular PIC programmer user s manual IC interface of PIC16F876A 3 3V
8. the PIC microcontroller please refer to the datasheet The datasheet can be found in microchip web site at http www microchip com HARDWARE This project will require following hardware a 1x PIC16F876A b 1x PR22 Printed Circuit Board PCB c 1x LCD 2X16 character d Related electronic components Optional e 1x Capacitive Sensor AD7746 f 1x Barometric Pressure Sensor SCP1000 DO1 g 1x Compass Module HMC6352 Please refer to Appendix A for the board layout of PR22 The board layout is provided free therefore Cytron Technologies will not be responsible for any further modification or improvement Interface LCD 2 x 16 characters with PIC16F876A To use the LCD display users have to solder 16 pin header pin to the LCD display LCD used in this project is JHD162A for other type of LCD please refer to its data sheet Created by Cytron Technologies Sdn Bhd All Rights Reserved 3 ROBOT HEAD to TOE ytron PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors Figure 5 Figure 5 is a 2X16 character LCD LCD connection pin and function of each pin is shown ame SS CC Positive upply 5V for LCD E Brightness adjust Select register RCO select instruction or data register Select read or write Start data read or write DBO DBI Nn mi z es 5 Al lt lt I lt IZ Wo bo LED Backlight positive RC2 input DB DB DB DB DB J
9. A3 to 3 3V CSB Created by Cytron Technologies Sdn Bhd All Rights Reserved 6 C yer On ROBOT HEAD to TOE Technologie PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors PCB circuit board SOFTWARE Flow Chart Display Startup Message Start Y YES SW1 SW2 M 1 pressed Mode pressed wu Cytron COM my LCD SW3 pressed Figure 21 Component YES RESET button SW 1 button SW2 button SW3 button ae SeWo S1 Slides switch Circuit Power ON OFF ae DC plug socket To 7 12V AC to DC adaptor Power connector 7 12V Box header To ICSP programmer AD7746 Capacitive Sensor 0 HMC6352 Compass Module e 1 SCP1000 D01 Barometric Pressure Sensor pressed Please refer to Appendix A for the PCB layout of PR22 The PCB layout is provided free therefore Cytron Sub Mode Read Compass sw3 Technologies will not be responsible for any further me Module amp Hee Displ LCD modification or improvement eee NO Sub Mode TPS Calibration E SW3 2 Mode amp pressed Display on LCD NO YES LCD Sa ee a Exit Calibration amp Display on LCD i Sub Mode SW3 N 23 pressed YES Reset Offset amp Disolav on LCD NO YES Calibration Ca ee amp Display p SwW3 on LCD Sensor g pressed Display on LCD YES Read Barometric sw3 Pressure Sensor amp Display on LCD pressed Created by Cytron Technologies Sdn Bhd All Rights Reserved 7
10. Barometric Pressure Sensors Compass Module HMC6352 WcC6352 S GND UCC Figure 2 The Honeywell HMC6352 is a fully integrated compass module that combines 2 axis magneto resistive sensors with the required analog and digital support circuits and algorithms for heading computation Features Compass with Heading Output e Full integration of 2 axis magnetic sensors and electronics e Firmware included Low voltage operation 2 7V to 5 2V e IC 2 wire serial interface Applications Wireless phones Consumer electronics Vehicle compassing Antenna Positioning For more information about Compass Module please refer to the datasheet of the Compass Module Created by Cytron Technologies Sdn Bhd All Rights Reserved 2 Cytron Technologie Barometric Pressure Sensor SCP1000 D01 i SCP1000 e DRDY ww CSB MISO Figure 3 SCP1000 is pressure sensor that measures absolute pressure The SCP1000 performs almost complete data processing on chip The pressure and temperature output data are calibrated and compensated internally Features e 30kPa 120kPa measuring range e Single 2 4 3 3V supply e Four measuring modes plus power down mode e On chip temperature measurement e Fully calibrated and compensated component e Standard digital output SPI Applications e Barometric pressure measurement and altimeter applications e Home weather stations e Advanced medical applica
11. nt in the list with component of the same functionality without prior notice 2910 3 3V replaced with LM1117T 3 3V Prepared by Cytron Technologies Sdn Bhd 19 Jalan Kebudayaan 1A Taman Universiti 81300 Skudai Johor Malaysia Tel 607 521 3178 Fax 607 521 1861 URL www cytron com my Email support cytron com my sales cytron com my Created by Cytron Technologies Sdn Bhd All Rights Reserved 10
12. o not forget to switch ON the power The programmer is not included in the hardware set but it can be found at Cytron website User manual is provided at website 7 Test the functionality of the Compass Module Capacitive Sensor and Barometric Pressure Created by Cytron Technologies Sdn Bhd All Rights Reserved 8 Cy tron on ROBOT HEAD to TOE gie yuro PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors Sensor Use SWI and SW2 to change the mode sensor and SW3 to enter the mode 8 Modify the program 9 Have fun Test Method 1 After power is connected and switched ON LCD will display Cytron Tech PR22 After some delay LCD will display Sensor HMC6352 OK 2 Press SW1 to decrease mode Press SW2 to increase mode 4 Press SW3 to execute current mode W WARRANTY No warranty will be provided as this is DIY project Thus user is advice to check the polarity of each electronic component before soldering it to board Appendix A Created by Cytron Technologies Sdn Bhd All Rights Reserved 9 Cy tron ROBOT HEAD to TOE yiron PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors PCB Layout 2510 02 H Connector TI Ea IITE D RON ray ep C iiia Ja Cag gt Aan PO Cid Gis tre GERLI DA a wes id l AAC el ler gt oo Cytron Technologies reserved the right to replace the compone
13. ource code will be Works in strong magnetic field environments provided Operates at 3 3V supply Capacitive Sensor Optional Includes temperature sensor Operates at 3 3V supply Barometric Pressure Sensor Optional Includes temperature sensor Operates at 3 3V supply Created by Cytron Technologies Sdn Bhd All Rights Reserved l Cytron Yon SYSTEM OVERVIEW Push Buttons GENERAL DESCRIPTION Capacitive Sensor AD7746 Figure 1 AD7746 is a high resolution capacitance to digital converter CDC The capacitance to be measured is connected directly to the device inputs The AD7746 has two channels capacitance input channels The part has an on chip temperature sensor with a resolution of 0 1 C and accuracy of 2 C The AD7746 has a 2 wire I C compatible serial interface Features e Capacitance to digital converter with full scale range 4 pF Temperature sensor on chip Voltage input channel Internal clock oscillator 2 wire serial interface I C compatible Power 2 7V to 5 25V single supply operation Operating temperature 40 C to 125 C Applications Automotive industrial and medical systems for Pressure measurement Position sensing Level sensing Flowmeters Humidity sensing Impurity detection For more information about Capacitive Sensor please refer to the datasheet of the Capacitive Sensor ROBOT HEAD to TOE PR22 Reading Compass Module Capacitive amp
14. tions e Level gauging For more information about Barometric Pressure Sensor please refer to the datasheet of the Barometric Pressure Sensor PIC16F876A This powerful 200 nanosecond instruction execution yet easy to program only 35 single word instructions CMOS FLASH based 8 bit microcontroller packs Microchip s powerful PIC architecture into an 28 pin package and is upwards compatible with the PIC16CSX PICI2CXXX and PICI6C7X devices Feature of the device 256 bytes of EEPROM data memory Self programming ICD In Circuit Debugging function 2 Comparators 5 channels of 10 bit Analog to Digital A D converter e 2 capture compare PWM functions ROBOT HEAD to TOE PR22 Reading Compass Module Capacitive amp Barometric Pressure Sensors e The synchronous serial port can be configured as either 3 wire Serial Peripheral Interface SPI or the 2 wire Inter Integrated Circuit I2C bus e Universal Asynchronous Receiver Transmitter UART 28 Pin PDIP SOIC SSOP 28 gt RB7 PGD 27 RB amp PGC MCLR Vpr RAQ AND RAVANT LI RAZ AN VREF ICVREF LI RASIANSVREF RAJNTOCKICACUT RASANASSICZOUT L cow om on B wh a OSC1 CLKI L OSC2 CLKO 10 RCO TIOSO TICK 11 RCITIOSICCP2 12 RCIICCP1 13 RCJSCKSCL 14 PIC16F873A 876A Figure 4 Figure 4 shows the pin diagram for PIC16F876A For more information about

Download Pdf Manuals

image

Related Search

Related Contents

DEHUMIDIFIER - Inventor Air Conditioners  Getting Started Guide Version 3.0 March 2010  Fellowes Powershred C-380C  manual de usuario  Apple iPhoto 5 Tutorial  LHI 825 - GEMA Herramientas  Canada - Buyandsell.gc.ca  

Copyright © All rights reserved.
Failed to retrieve file