Bluetooth (SKKCA-21) Remote Control. Version 1.1. Jan Cytron Technologies Sdn. Bhd.

Similar documents
MD10C Enhanced 10Amp DC Motor Driver

8-Channel RC RX MUX. User s Manual

Bluetooth to Serial Adapter

DSO138 oscilloscope program upgrade method

Using Xbee in Serial Communication

How to setup a serial Bluetooth adapter Master Guide

Advanced Data Capture and Control Systems

User Guide Reflow Toaster Oven Controller

Lab Experiment 1: The LPC 2148 Education Board

GSM Interfacing Board

Testing Data Radio Modem with Serial Port Tool V1.20

Serial Communications

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

RC2200DK Demonstration Kit User Manual

Serial to Bluetooth Adapter

RS232 Board datasheet

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

DK40 Datasheet & Hardware manual Version 2

TTL-232R-3V3 USB to TTL Serial Converter Cable

iloq P10S.10/20 Programming device User's Guide

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

PRODUCTIVITY THROUGH INNOVATION 600 CONTROL DIRECT DRIVE TECHNICAL/OPERATION MANUAL

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

Current Cost Data Cable User Guide. Installing and configuring the data cable

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

PM1122 INT DIGITAL INTERFACE REMOTE

How to read this guide

Tutorial for MPLAB Starter Kit for PIC18F

Bluetooth HC-06 with serial port module Easy guide

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Switch board datasheet EB

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

Keep it Simple Timing

How to connect to a Class II router using a mobile-phone data cable specifically for Solwise & Safecom routers

Accurate Measurement of the Mains Electricity Frequency

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

Display Message on Notice Board using GSM

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

MANUAL FOR RX700 LR and NR

USB - FPGA MODULE (PRELIMINARY)

M72. Quectel Cellular Engine. EVB User Guide M72_EVB_UGD_V1.0

ET-BASE AVR ATmega64/128

Software User Guide UG-461

AN4128 Application note

Universal Serial Bus (USB) to DH-485 Interface Converter

User Manual. AS-Interface Programmer

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

Guide for Remote Control PDA

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

EasyPIC4 User s Manual

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

MCB3101 (Class I) WiRobot Serial Bluetooth Wireless Module User Manual

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

E-Blocks Easy Internet Bundle

Bluetooth to serial HC-06 wireless module

An Introduction to MPLAB Integrated Development Environment

Bluetooth Installation

RN-XV-RD2 Evaluation Board

User's Guide. Integrating Sound Level Datalogger. Model Introduction

RS-422/485 Multiport Serial PCI Card. RS-422/485 Multiport Serial PCI Card Installation Guide

Smarthome SELECT Bluetooth Wireless Stereo Audio Receiver and Amplifier INTRODUCTION

M3 ORANGE Snap-On. User Guide. Product Model: A-SNO-ATYP-060-R00. Compatible Device: M3 ORANGE. Version 2.2 Released in March 2013

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available

EE318 Electronic Design Lab Project Report, EE Dept, IITB, April Wireless Microcontroller Programmer

Modification of an AOR AR-8600 receiver to tune it with a ACECO FC-3002 frequency finder

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

USB Port Extender Kit

CNR-BTU5 Bluetooth Dongle

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

Chapter 13. PIC Family Microcontroller

K8048 PIC PROGRAMMER BOARD

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

FLYPORT Wi-Fi G

L16. Quectel GNSS Engine. EVB User Guide L16_EVB_UGD_V1.0

Part Number Description Packages available

Wireless Temperature

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

STIM202 Evaluation Kit

USER GUIDE EDBG. Description

Serial Communications

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Designing VM2 Application Boards

CAN bus board. EB018

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

3. Identification of water pumps through RFID technology. 4. Wireless control of remote water pump using RF technology.

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

How to setup a serial Bluetooth adapter

Vmed QUICKSTART PC-DISPLAY INSTALLATION & PC-Display and Bluetooth Instructions

VSCOM USB PRO Series Industrial I/O Adapters

Transcription:

Bluetooth (SKKCA-21) Remote Control PR6A Version 1.1 Jan 2010 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 Technology 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 This document describes the development of Cytron Technologies DIY (Do It Yourself) Project PR6A. This project will be using the SK40C. We will also be using the KC Wireless Bluetooth Module Starter Kit SKKCA-21. The Schematic and source code is provided. FEATURES PIC16F877A - 8-bit microcontroller with 33 I/O - operate with 5V supply - operating speed 20MHz BLUETOOTH (SKKCA-21) - 5V powered - default baud rate of 115.2 Kbps - 5V UART interface, ready for microcontroller interface Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 1

SYSTEM OVERVIEW TEXT Bluetooth dongle SKKCA-21 KC-TX KC-RX CPU PIC 16F877A BCD to 7 segment encoder SK40C 7-segment LED display GENERAL DESCRIPTION PR6A is an open source microcontroller Do It Yourself kit. This PIC microcontroller based project perfectly designed for user to start develops the Bluetooth wireless control. By this project, the user can clearly know how to interface the microcontroller PIC16F877A with the KC Wire-free Bluetooth Starter Kit (i.e. SKKCA-21). The 7-segment LED display is used to show the number that typed in the text of CPU. SK4C is used so that the user can save development and soldering time. PIC16F877A 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 40- or 44-pin package. Figure 1 Figure 1 shows the pin diagram for PIC16F877A. Features of the device are: 256 bytes of EEPROM data memory self programming 2 Comparators 8 channels of 10-bit Analog-to-Digital (A/D) converter 2 capture/compare/pwm functions synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI ) or the 2-wire Inter-Integrated Circuit (I²C ) bus Universal Asynchronous Receiver Transmitter (UART). All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances and consumer applications. For more information about the PIC microcontroller, please refer to the datasheet. The datasheet can be found in microchip web site at: http://www.microchip.com. SK40C SK40C is enhanced version of SK40B. It is designed to offer an easy to start board for PIC MCU user. This board comes with basic element for user to begin project development. This kit comes with: 5V voltage regulator (1A max) 20MHz crystal oscillator (user may change other crystal oscillator) Reset button 2 x programmable push button Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 2

UART connector USB port 2x16 characters LCD display Connector for UIC00A On/Off switch for main power DC adaptor socket as power input Figure 3 shows the diagram for SKKCA-21. The features of SKKCA-21 are: KC21 mounted USB Plug and Play UART function 5V powered 5V UART interface, ready for microcontroller interface Default baud rate of 115.2 kbps Range up to 20 meters Compact yet easy and reliable platform As serial port replacement (wireless) The specifications are listed below: Figure 2 Figure 2 shows the diagram for SK40C. The kit offers perfectly fit for 40 pins 16F and 18F PIC. All 33 I/O pins are nicely labeled to avoid miss-connection by user. It can also save development and soldering time. Please refer to SK40C user manual from Cytron Technologies which can be downloaded from Cytron website under product page. The Absolute Maximum Rating for SKKCA-21 as shown below: SKKCA-21 This is the fantastically easy to use KC Wire-free Starter Kit from Cytron Technologies. SKKCA-21 has been designed for 5V TTL logic interface. With minimum interface, it is ready to connect to microcontroller for embedded Bluetooth development. Furthermore, on board USB to UART converter offer easy yet reliable communication to PC for functionality test or even creating Bluetooth wireless connection. Please refer to SKKCA-21 user manual from Cytron Technologies which can be downloaded from the link below: http://www.cytron.com.my/attachment/skkca%20us er's%20manual.pdf BCD TO 7-SEGMENT ENCODER (CD4511) This BCD to 7-segment encoder has four addresses input (D0 to D3), an active low blinking (BL) input, lamp test (LT) input, and latch-enable (LE) input. Figure 4 below shows the pin diagram for CD4511. Figure 3 Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 3

Figure 4 Figure 5 Figure 5 shows the display characteristic for typical 7- segment display. The functional diagram and functional table for CD4511BE are shows at Figure 6 and Figure 7 respectively. Figure 7 For more information, please refer to CD4511BE user manual from Cytron Technologies which can be downloaded from the link below: http://www.cytron.com.my/datasheet/cd54hc4511.pdf HARDWARE This project will require following hardware: a. 1 x PIC16F877A b. 1 x Printed Circuit Board (PCB) c. 1 x 7 segment LED display d. 1 x BCD to 7 segment encoder (CD4511BE) e. SKKCA-21 f. SK40C g. Other related electronic component Figure 6 Power supply for the circuit Figure 8 The power system for the circuit is already embedded in the SK40C. AC to DC adaptor (not included in the DIY project set) is used to power up the circuit. Higher input voltage will produce more heat at LM2940 voltage regulator. Typical voltage is 12V. Anyhow, LM2940 will still generate some heat at 12V. There is only one type of power connector for the circuit, DC Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 4

plug (J1). Normally AC to DC adaptor can be plugged to J1 type connector. Refer to Figure 3, the D2 is use to protect the circuit from wrong polarity supply. C2 is use to stabilize the voltage at the input side of the LM2940 voltage regulator, while the C1 and C3 are use to stabilize the voltage at the output side of the LM2940 voltage supply. LED is a green LED to indicate the power status of the circuit. For more information, please refer to schematic diagram of SK40C from SK40C user manual. The user manual can be obtained from Cytron Technologies which can be downloaded from Cytron website under product page. Push Button for PIC microcontroller Figure 11 Figure 9 Three push buttons are also embedded in SK40C, one is used for RESET and two is used as SWITCH. RB0 and RB1 pins are used for switch push button as input of PIC microcontroller. The connection of the push button to the I/O pin is shown in Figure 9. When the button is being pressed, reading of RB0 pin will be in logic 0, while when the button is not pressed, reading of that I/O pin will be logic 1. The same operation is also applied for the RESET and RB1 pin. Figure 10 above shows the connector for UIC00A programmer which embedded in SK40C. The pins MCLR, RB6 and RB7 need to be connected to the pins of connector for Circuit Programmer (UIC00A). Figure 11 shows the way of connection to program the PIC microcontroller. SK40C should be powered from DC adaptor when load the program to the PIC microcontroller. The programmer (UIC00A) 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. Interface SK40C with SKKCA-21 and CD4511 encoder For more information, please refer to schematic diagram of SK40C from SK40C user manual. The user manual can be obtained from Cytron Technologies which can be downloaded from Cytron website under product page. Connector for UIC00A Programmer Figure 12 Figure 10 Figure 12 above shows the way of connection of SK40C. RC6 and RC7 are connected to RXD and TXD of the SKKCA-21 respectively. Besides, RD0 to Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 5

RD3 are used as the input for BCD to 7-segment encoder (CD4511BE). Refer to schematic diagram in Appendix for more understanding. SOFTWARE Flow Chart: Start Initialize PIC Waiting ok Get the number from text GETTING START User can obtain the hardware set for this project (PR6A) 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 by refer to the schematic. Schematic is provided in Cytron website. Caution: Make sure all the connectors are soldered in proper side. Beware when soldering each component especially SK40C and SKKCA-21; avoid any soldering connection within the pins. Improper soldering might cause the component malfunction when battery plugged in. Warning: Before the battery (Power) is plugged in, make sure the polarity is correct to prevent the explosion. Wrong polarity of battery connector may cause explosion. 2. Please download the necessary files and documents from Cytron Technologies website. These included documentation, sample source code, schematic, component list and software User can downloaded the sample program and NO YES Number? Display number on 7 segment display 3. The next step is to install MPLAB IDE and Hi-Tech CPRO into a computer. Please refer MPLAB 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. Refer to the sample, since the baud rate for SKKCA-21 is 115200, we have set baud rate for the PIC to be the same as SKKCA-21 which is 115200. Figure 13 shows how to set the baud rate. 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. Figure 13 6. Load the hex code into PIC microcontroller. The hex code is provided by Cytron Technologies. User may generate own hex code with build the sample program. Please note that hex code generated from MPLAB Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 6

IDE will be named according to project name, not C file name. 7. To load the hex code, user can choose either use UIC00A or Serial port to load program into PIC. However, user is recommended to use UIC00A programmer because it provides simple and fast method to load program. Please refer UIC00A User Manual to load hex into PIC. 8. For users who want to know about load hex file using serial port, they may refer SK40C User s Manual. 9. After load the program to PIC microcontroller, user can start to setup PC for Bluetooth interface. 9.1 USB dongle setup (IVT Blue Soleil) Before the USB can be used, the driver and the software IVT Blue Soleil have to be installed. After that, the USB dongle have to link with the Bluetooth module. Install the software IVT Blue Soleil that is in the CD included with the USB dongle. After the software has been successfully installed, plug in the USB dongle and run the software. Switch on the power for the circuit with the SKKCA-21 On the screen, you should be able to see a window as in figure below. Click the orange ball in the center of the window or press F5 Figure 15 Next, right click on KcSerial and click pair device. The software will appear a window to Enter Bluetooth Passkey. Enter the passkey and click OK. The passkey should be 1234. Figure 16 Now, double click on the SKKCA Bluetooth icon(kcserial), Bluesoleil will start inquiring for available service or profile offered by SKKCA. After some time (around 1 to 3 seconds) Bluetooth Serial Port Service should be highlighted as shown in below figure. Figure 14 Press F5 to search the devices. Once the Bluetooth module is detected, it will appear in the window. Figure 17 Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 7

Double click on Bluetooth Serial Port Service. If everything is working perfectly, a window will pop up showing the virtual COM port which is connected to computer. In this case, a COM64 has been created. Click Yes if users want to connect the device automatically. Figure 20 Figure 18 The baud rate (bit per second) selection depends on the baud rate of the Bluetooth module and also the source code that was written. As in step 2, we have mentioned that the baud rate for SKKCA-21 is 115200. So select the baud rate as 115200. BlueSoleil will try to create Bluetooth Wireless link with SKKCA and offer serial port service. Figure 21 Once the setting is completed, type 'o' followed by 'k' and the wording 'Cytron Press any number' will appear in the window. The 7 segment will also change from '0' to '1' Figure 19 9.2 Interface Using Hyperterminal We will be communicating with the Bluetooth module through HyperTerminal that was also used for bootloader. Setup the HyperTerminal just like what we did for bootloader. The only difference is the serial port selection and the baud rate The serial port selection depends on the serial port that was designated by Blue Soleil software Figure 22 Type any number and it will be displayed on the 7 segment The number that you entered will not appear in window. If you wish to display it, select file->properties. After that select settings-> ASCII. Select 'echo typed characters locally'. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 8

AC to DC adaptor: User is use an AC to DC adaptor as the power source to the circuit. Figure 25 (Not included in DIY project set) Figure 23 WARRANTY No warranty will be provided as this is DIY project. Thus, user is advice to check the polarity of each electronic component before solder it into board. Figure 24 The 7 segment is only an example of a typical device that can be controlled by the microcontroller. If you wish to apply it for other appliances, just connect the device to the microcontroller and change the program accordingly However, for Window Vista user, there is no HyperTerminal program. Therefore, user required to install any compatible HyperTerminal such as HyperTerminal Private Edition. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 9

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