Download Camera Interface Application Kit
Transcript
Starting Dynamic C Once the RCM3365 is connected as described in the preceding pages, start Dynamic C by double-clicking on the Dynamic C icon or by double-clicking on dcrab_XXXX.exe in the Dynamic C root directory, where XXXX are version-specific characters. Dynamic C uses the serial port specified during installation. ® If you are using a USB port to connect your computer to the RCM3365, choose Options > Project Options and select “Use USB to Serial Converter.” A Digi International® Company. Set the compiler to run the application in the fast program execution SRAM by selecting “Code and BIOS in Flash, Run in RAM” from the Dynamic C Options > Project Options > Compiler menu. Pan Motor Connect the servo motor wires to the Interposer Board — connect the pan servo motor to PWM3 (header J5). Connections The black wire is GND and the white wire is the PWM signal. Calibrate Calibrate the pan servo motor now by running the SERVO_CALIB.C sample program from the Dynamic C Pan Motor SAMPLES\CAMERAINTERFACE folder. Use the File menu to open the sample program, and press function key F9 to compile and run the program.The STDIO window will open on your PC and will display a calibration dialog box. Use a felt pen to mark a dot on the servo motor’s rotating blade, and watch the blade rotate as you repeatedly press the “l” key on your keyboard with the STDIO window active. A PAN value will also display in the STDIO window. The blade will not rotate any further when it reaches its limit, and you may hear the motor humming. Go back at least two “steps” by pressing the “r” key on your keyboard, and press the “s” key on your keyboard to save the PAN value. (Write down the value.) Answer the prompts in the STDIO window and. Now repeatedly press the “r” key on your keyboard until the blade reaches its other limit, and go back at least two “steps” by pressing the “l” key on your keyboard. Press the “s” key on your keyboard to save the PAN value and answer the prompts. (Write down the value.) Finish by continuing to press the “l” key on your keyboard until the PAN value is midway between the two limits. Tilt Motor Cut a second piece of a foam mounting strip and use it to secure a side of the other micro-servo motor to the blade on the turning axis of the pan servo motor. This other servo motor is the tilt servo motor. Setup Connect the tilt servo motor to PWM1 (header J4), and calibrate it using the “u” and “d” keys on your keyboard to rotate the blade to its limits as you did for the pan servo motor. Go back at least two “steps,” and press the “s” key on your keyboard to save the TILT values (write down the values), answering the prompts in the STDIO window. Since the SERVO_CALIB.C sample program will terminate once all four limit values have been saved, run the SERVO.C sample program to be able to press the “u” and “d” keys on your keyboard as prompted in the STDIO window until the TILT value is midway between the two limits. Install Camera Use a third piece of foam mounting strip to secure the plastic camera bracket to the blade of the tilt servo motor, and finally use the remaining foam mounting strip the attach the camera to the plastic bracket — remove any labels from the back of the camera board before attaching it with the foam mounting strip. Connect Use the 4-wire cable with polarized friction-lock plugs to connect the camera to header J9 on the Interposer Camera Board — connect the white plug to the camera, and connect the black plug to header J9. Where Do I Go From Here? If the sample servo calibration program ran fine, you are now ready to go on to other sample programs on the supplemental Dynamic C CD, which are discussed in Application Note AN412, Camera Interface Application Kit. The source code for the sample programs is provided to allow you to modify them for your own use. The RCM3365/RCM3375 User's Manual on the Dynamic C CD also provides complete hardware reference information and describes the software function calls for the RCM3365 RabbitCore modules and the Prototyping Board. If there are any problems: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Rabbit Semiconductor/Z-World Technical Bulletin Board at www.rabbit.com/support/bb/. • Use the Technical Support e-mail form at www.rabbit.com/support/. NOTE: If you purchased your Camera Interface Application Kit through a distributor or through a Rabbit Semiconductor or Z-World partner, contact the distributor or partner first for technical support. 020–0105 • 060601–A Camera Interface Application Kit Getting Started Application Kit Contents • 3 CDs — Dynamic C®, Dynamic C FAT File System module, and supplemental CD with sample programs and information related to Camera Control Application Kit — with complete product documentation on disk. • • • • • • • • • • • • • • • RCM3365 RabbitCore module. Camera Interposer Board to interface camera and micro-servo motors with RCM3365 and Prototyping Board. RCM3365 Prototyping Board, with a bag of accessory parts for use on the Prototyping Board. Miniature C328-7640 serial camera, plastic bracket, and 4-wire cable with friction-lock connectors. 10-pin header to DB9 programming cable with integrated level-matching circuitry. 2 power-supply harnesses (3-pin connector to red/black wires with bare leads). AC adapter, 12 V DC, 1 A. Ethernet cables. 2 Blue Arrow micro-servo motors. Infrared motion sensor. 4 foam doubled-sided mounting strips. Getting Started instructions. 32 MB xD-Picture Card™ (NAND flash) Rabbit 3000 Processor Easy Reference poster. Registration card. Installing Dynamic C® Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe program in the root directory of the Dynamic C CD. Install any Dynamic C modules and the software from the supplemental CD after you install Dynamic C. Rabbit Semiconductor, Rabbit, Z-World, and Dynamic C are registered trademarks of their respective holders. Hardware Connections R7 R3 R4 R5 R6 R63 R64 R65 R66 R55 R56 R57 R58 R2 C7 R59 R62 R51 R54 JP3 R10 SERIAL FLASH/ R20 MODEM C14 C15 R18 PROG D6 D7 D5 D3 D1 C28 R44 C27 R43 KEYPAD DISPLAY BOARD Programming Cable LCD1JB C29 C30 Q5 R47 R48 R37 Colored edge R38 DS7 RELAY NO1 COM1 NC1 NO2 COM2 NC2 D4 D2 D0 A1 A0 U12 Blue shrink wrap J1 RELAY RATED 0.5 A @ 30 V BD7 BD6 BD5 BD4 BD3 BD2 BD1 BD0 LCD /CS BA3 BA1 BA0 BA2 GND LED6 LED4 LED2 A3 A2 GND C20 LED0 GND /RES /CS LED3 LED1 +BKLT LED5 R41 +V SOT23-6 SOT23-6 C18 C17 R33 R34 K1 U11 J17 R42 D8 R35 JP5 C26 To PC COM port C19 R45 DIAG C22 C23 C24 C25 C21 HO2 HO3 R30 PC0 PF1 PF0 PA5 PA7 PC6 PC4 PF3 PF2 PA1 PA0 PA3 PA2 PA6 STATUS J9 R32 PC2 PC3 PC1 PA4 R45 CAMERA R31 HO1 VOUT RCM1 HO4 R19 R17 PROG R13 /RES PWM0 R59 +5 VU5 U6 GND JB +3.3 V PG0 PG1 PC5 R29 R80 R64 R77 R29 PWM J14 R36 R40 J16 R46 GND +DC GND C10 C11 C12 JP4 C13 PB2 PB3U2 PF4 PB0 C5 DS2 DS3 DS4 DS5 DS6 LCD1JA U10 U9 GND PB4 PB5 PF6 PF7 J1 D7 +5 V PB6 PB7 R6 PG2 PG3 PC7 R7 CORE MODULE C2 PE7 R9 R85 R70 R86 PD4 GND JA J7 GND IN3 J6 LCD1JC TxE RxE GND TxF RxF 485+ GND 485 IN2 IN1 C7 R3 R4 R5 R6 R7 GND C1 PD2 PD5 IN0 +5V J4 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA POWER +5V QD2A QD2B QD1A QD1B GND J5 GND JP2 NOTE: Be sure to use the programming cable (part number 101-0542) supplied with this Application Kit—the programming cable has blue shrink wrap around the RS-232 converter section located in the middle of the cable. Programming cables with red or clear shrink wrap from other Z-World or Rabbit Semiconductor kits are not designed to work with RCM3365 modules. R10 SERIAL FLASH/ MODEM JP1 JA PD7 PD3 PD5 PG3 PD4 C4 PG0 PC7 PC6 PC4 PC5 PC2 PC3 PC1 +5 V POWER R17 PF2 R18 PA0 PC0 J10 DS1 PF1 PF3 PA1 PA3 PA2 PA5 PA4 PA7 PA6 C2 GND NC GND STATUS GND RF MODULE D1 C1 +3.3 V VBAT_EXT VRAM SMOD0 /IORD /IOWR PG4 PG5 PG6 PG7 PE0 PE1 NOTE: Some PCs now come equipped only with a USB port. It may be possible to use an RS-232/ USB converter (Rabbit Semiconductor Part No. 540-0070) with the programming cable supplied with this Application Kit. Note that not all RS-232/USB converters work with Dynamic C. PE6 J11 GND PWM3 +5 V DS2 DS3 DS4 DS5 DS6 RELAY RATED 0.5 A @ 30 V BD7 BD6 D6 D2 D3 D4 D0 D1 D5 R44 C28 Q5 R46 R45 KEYPAD DISPLAY BOARD R47 DS7 RELAY NO1 COM1 NC1 NO2 COM2 NC2 BD5 BD4 BD3 BD2 BD1 BA3 BA2 BA1 BD0 A1 GND A3 LED6 A0 GND A2 GND C20 R41 D7 C30 D8 R38 TOP VIEW TILT SERVO MOTOR Once all the other connections have been made, you can connect power to the Prototyping Board. Connect the AC adapter to jack J1 on the Prototyping Board. The POWER LED on the Prototyping Board should light up. The RCM3365 and the Prototyping Board are now ready to be used. BRACKET R48 J14 C29 U12 R37 C21 HO4 GND HO1 D7 C25 D6 JP5 C26 BA0 LCD /CS U11 If you are using the motion sensor, connect its +5 V and GND terminals to screw-terminal header J6 on the Prototyping Board—the middle black wire is +5 V—and connect its gray wire to IN0. J17 R42 K1 R35 R32 CORE D5 C23 C24 LED4 RCM1 J9 C105 L4 Q2 C18 PWM2 J6 R5J7U16 Y1 C1 R9 R85 R70 R86 R29 R6 C5 U1 R4 R7 C2 C3 U3 U2 R80 R64 R77 U6 R13 R59 U5 NC NC PD6 PD7 R45 PD2 PD3 PD4 PD5 PG2 PG3 PG0 PG1 PC6 PC7 PC4 PC5 PC2 PC3 PC0 PC1 PF1 PF0 PF3 PF2 PA1 PA0 PA3 PA2 PA5 PA4 PA7 PA6 STATUS GND JA R49 S3 R29 D4 Q6 R36 C22 LED2 /RES CAMERA J12 R50 U9 J13 JB HO2 C4 R10 +5 V PWM1 Q4 LED0 JB R27 R28 Q3 C19 R43 C18 R40 C27 R33 R34 UX2 SO20W C17 DX2 /RES PWM Q2 HO3 J6 PB2 Q1 R30 R8 VOUT PB4 R67 C21 +3.3 V R21 R22 R23 R24 UX5 CX2 /CS PB5 PB0 J4 JB C16 J16 LCD1JA +BKLT PB6 GND UX4 DX1 +3.3 V R39 J15 LED5 RX18 LED3 RX16 RX17 LED1 RX13 RX14 RX15 SOT23-6 PF4 PB7 PB3 GND +5 V PF6 PF5 PWM +3.3 V CX1 R31 U4 R18 R22 C11 C61 C36 PE7 PF7 J5 GND SOT23-6 PE5 R30 C58 R44 R53 Y2 CORE MODULE PE3 PE4 +5 V +5 V +V C35 / RESET_IN SMOD1 RCM1 DS2 R82 C15 J1 R3 J2 R54 R31 PWR PWM0 J3 C3 PG1 PF0 R20 PD2 R37 R38 R36 R35 L2 C86 C80 R1 R14 R15 R26 R27 PD6 PG2 C78 +DC J1 NC SF NCMODULE J8 C14 C15 J11 R19 GND C74 U13 J2 J3 R2 PWM1 UX2 SO20W J4 Y1 PE6 R10 PF5 PWM C3 U3 U1 R4 D6 UX5 DX2 +5 V PE3 PE5 PD6 PD7 PD3 R62 CX2 J5 PE0 U16 R5 PE1C4 PE4 NC NC R63 R64 R65 R66 J11 PG4 PG6 PG7 L4 C18 C11 /IOWR D5 UX4 DX1 +3.3 V R39 J15 RX18 RX15 SMOD0 /IORD CORE PG5 R8 C105 Q2 J6 / C15 RESET_IN SMOD1 D4 RX17 UX1 SO20W J13 JB RX16 RX14 RF MODULE C9 R67 C21 VBAT_EXT VRAM R54 U4 R18 R22 +3.3 V GND J6 J7 R59 D1 C1 NC GND C61 R51 C2 C36 JP3 J10 PF4 PF6 PE7 R11 R30 R54 R31 C58 R44 R53 Y2 C35 R55 R56 R57 R58 R14 R15 R26 R27 R3 R1 DS1 C13 +5 V POWER PWM3 R82 GND C4 C3 DS2 J2 +DC C80 PWR PWM2 J3 R37 R38 R36 R35 L2 C86 DS1 J8 GND C78 S3 SF MODULE C10 C11 C74 U13 C12 JP1 JP4 JP2 C9 DS1 +DC GND J1 J2 J3 R11 J4 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA POWER +5V QD2A QD2B QD1A QD1B GND J5 PF4 PF6 PE7 +5V S2 IN0 J12 R11 R12 Q4 R50 C6 R27 R28 CX1 C10 RABBITNET R15 U10 S2 Q3 RX13 R8 U6 C6 BT1 U8 JA J9 S1 RESET Q2 GND +3.3 V Figure 2. Connect Programming Cable, Interposer Board Power, and Motion Sensor U7 C5 UX1 SO20W R25 R26 R25 R26 Q1 C19 GND STAT JA GND C20 PA7 GND C16 J11 +5 V +5 V C24 PA6 PA7 R23 CORE MODULE GND/EGND JA PA5 PA6 C28 PA5 PA3 PA4 GND PA3 PA4 PA1 PA2 +5 V PA1 PA2 GND PF3 PA0 PF3 PA0 C5 BT1 C81 PF2 PF2 U8 R21 R22 R23 R24 C67 PF1 PF1 C14 PC0 PF0 PC0 PF0 C104 PC2 PC1 PC2 PC1 JP1 PC4 PC3 PC4 PC3 R50 PC6 PC5 PC5 R84 PC7 PC6 R2 PG0 J6 R60 R61 R17 R19 PG2 PG1 PG0 JP9 PG3 PG2 C12 C9 C13 PD4 PD4 PC7 C22 PD2 PD5 PD5 PG1 JP7 PD6 PD3 PD2 JP5 LINK PD7 PD3 PG3 S1 RESET JB JP1 ACT PD6 JP4 R16 PD7 GND/EGND JP8 RCM3300 PROTOTYPING BOARD RP2 LINK RABBITNET R8 U6 C6 R9 R14 R15 C34 R20 R21 U5 R96 RP1 U4 R25 C27 JP6 C8 GND R67 R68 R69 R70 R16 R49 R52 R53 RP2 RP1 C82 /RES_OUT ACT U7 U5 C72 C71C70 R11 R12 C67 C14 PB2 C77 R79 GND +5 V GND GND +5 V PWM C104 JA PB4 PB0 GND C6 R84 GND R50 +5 V PWM PB6 PB3 U4 J6 J10 Q6 OUT OUT 00 01 02 03 04 05 06 07 /RES_OUT J9 R9 R14 PB2 PB0 STAT U3 L293D H-DRIVER C4 R13 PB4 PB3 +5 V C10 R2 PB5 L293D H-DRIVER PB5 C8 R60 R61 U3 L293D H-DRIVER C4 R52 R53 OUT R81 C19 JP9 PB7 J10 PB6 PF0_QD OUT 00 01 02 03 04 05 06 07 C76 C20 C12 C9 C13 PF5 R12 U1 PB7 R67 R68 R69 R70 L1 C24 C22 Prototyping Board PE5 U2 PF5 U2 R13 U1 R12 C79 R23 JP8 JP7 JP4 JP5 Interposer Board PF7 PE0 PE3 PE4 PF0_QD PE5 PE6 +5 V C28 R17 R19 C34 R20 R21 R96 R25 C27 JP6 Insert standoff between boards (if needed) PE1 PE6 L1 PG6 PG7 PF0_CLKD C3 PE3 PE4 PWM C81 C82 PG4 PG5 J6 D2 /IORD /IOWR C2 PE0 PE1 C3 L293D H-DRIVER PWM R81 SM0 C1 SMODE1 PG7 L1 CORE MODULE To PWR (J3) +3.3 V VRAM PG6 C42 C76 C72 C71C70 VBT /RES R1 D1 NC PG4 PG5 C2 D2 R43 C42 R43 GND /IORD DS4 C77 R79 L1 DS4 RCM3365 J8 GND SMODE1 SM0 RCM3300 PROTOTYPING BOARD on Interposer Board J2 /RES /IOWR PF0_CLKD C1 DS1 DS3 USR FM LINK ACT C79 SPEED DS1 DS3 USR FM LINK ACT J1 VRAM PF7 Install the RCM3365 on the Interposer Board as shown in Figure 1. Line up the pins on the bottom of the RCM3365 module with sockets JA and JB on the Interposer Board. Press the RCM3365 module’s pins firmly into the Interposer Board sockets. The xD-Picture Card may be inserted into header J6 on the RCM3365 at this time. Power-Supply Connections +3.3 V VBT SPEED Use a power-supply harness to connect the PWR pins (header J3, middle terminal is +5 V) on the Interposer Board to the +5 V and GND terminals on screw-terminal header J6 on the Prototyping Board. D1 NC GND IN1 R1 J8 GND IN2 Orient the Camera Interposer Board as shown in Figure 1 and line up the pins on the bottom of the Interposer Board with sockets JA and JB on the Prototyping Board. Press the Interposer Board’s pins firmly into the Prototyping Board sockets. GND IN0 +5 V GND IN3 on Interposer Board MOTION SENSOR J6 To PWR (J3) J7 1. Install Camera Interposer Board and RCM3365 LCD1JB LCD1JC TxE RxE GND TxF RxF 485+ GND 485 NOTE: A RESET button is provided on the Prototyping Board to allow a hardware reset without disconnecting power. Figure 1. Install the RCM3365 and Interposer Board on the Prototyping Board NOTE: It is important that you line up the pins on the RCM3365 module and the Interposer Board exactly with the corresponding pins of the sockets. The header pins may become bent or damaged if the pin alignment is offset, and the boards will not work. Permanent electrical damage to the modules may also result if a misaligned module is powered up. A ¼" (6.3 mm) standoff is recommended to secure the RCM3365 module and the Interposer Board to the Prototyping Board in high-vibration environments. Attach one standoff to the top side of the Interposer Board as shown in Figure 1. Then secure the Interposer Board to the Prototyping Board using the standoff already on the Prototyping Board, and secure the RCM3365 into the other standoff on the Interposer Board. 2. Connect Programming Cable and Power Supply Connect the 10-pin connector of the programming cable labeled PROG to header J1 on the RCM3365 as shown in Figure 2. Be sure to orient the marked (red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a normal serial connection.) Connect the other end of the programming cable to a COM port on your PC. FOAM MOUNTING STRIPS CAMERA Alternate Power-Supply Connections TILT FOAM MOUNTING STRIP FRICTIONLOCK CONNECTOR SERVO MOTOR All Development Kits include a harness that may be used to connect your power supply to 3-pin header J2 on the Prototyping Board. The connector may be attached either way as long as it is not offset to one side—the center pin of J2 is always connected to the positive supply, and either edge pin is negative. The power supply should deliver 8 V–30 V DC at 1 A. 3. Set Up and Connect Servo Motors and Camera FOAM MOUNTING STRIP CAMERA PLASTIC BRACKET PAN SERVO MOTOR Figure 3. Servo Motor and Camera Setup Complete the assembly of each servo motor by attaching the cross-shaped plastic blade to the motor shaft using the smallest screw from the parts bag in the motor box. Cut a piece of a foam mounting strip and use it to secure the end opposite the turning axis of one of the micro-servo motors in an unused area of the Prototyping Board close to the edge. This will be the pan servo motor. You may also use another surface located close to the Prototyping Board. This pan servo motor can be secured more firmly if it is next to something else such as a screw-terminal header, and its side is also secured with the foam mounting strip. Hardware Connections R7 R3 R4 R5 R6 R63 R64 R65 R66 R55 R56 R57 R58 R2 C7 R59 R62 R51 R54 JP3 R10 SERIAL FLASH/ R20 MODEM C14 C15 R18 PROG D6 D7 D5 D3 D1 C28 R44 C27 R43 KEYPAD DISPLAY BOARD Programming Cable LCD1JB C29 C30 Q5 R47 R48 R37 Colored edge R38 DS7 RELAY NO1 COM1 NC1 NO2 COM2 NC2 D4 D2 D0 A1 A0 U12 Blue shrink wrap J1 RELAY RATED 0.5 A @ 30 V BD7 BD6 BD5 BD4 BD3 BD2 BD1 BD0 LCD /CS BA3 BA1 BA0 BA2 GND LED6 LED4 LED2 A3 A2 GND C20 LED0 GND /RES /CS LED3 LED1 +BKLT LED5 R41 +V SOT23-6 SOT23-6 C18 C17 R33 R34 K1 U11 J17 R42 D8 R35 JP5 C26 To PC COM port C19 R45 DIAG C22 C23 C24 C25 C21 HO2 HO3 R30 PC0 PF1 PF0 PA5 PA7 PC6 PC4 PF3 PF2 PA1 PA0 PA3 PA2 PA6 STATUS J9 R32 PC2 PC3 PC1 PA4 R45 CAMERA R31 HO1 VOUT RCM1 HO4 R19 R17 PROG R13 /RES PWM0 R59 +5 VU5 U6 GND JB +3.3 V PG0 PG1 PC5 R29 R80 R64 R77 R29 PWM J14 R36 R40 J16 R46 GND +DC GND C10 C11 C12 JP4 C13 PB2 PB3U2 PF4 PB0 C5 DS2 DS3 DS4 DS5 DS6 LCD1JA U10 U9 GND PB4 PB5 PF6 PF7 J1 D7 +5 V PB6 PB7 R6 PG2 PG3 PC7 R7 CORE MODULE C2 PE7 R9 R85 R70 R86 PD4 GND JA J7 GND IN3 J6 LCD1JC TxE RxE GND TxF RxF 485+ GND 485 IN2 IN1 C7 R3 R4 R5 R6 R7 GND C1 PD2 PD5 IN0 +5V J4 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA POWER +5V QD2A QD2B QD1A QD1B GND J5 GND JP2 NOTE: Be sure to use the programming cable (part number 101-0542) supplied with this Application Kit—the programming cable has blue shrink wrap around the RS-232 converter section located in the middle of the cable. Programming cables with red or clear shrink wrap from other Z-World or Rabbit Semiconductor kits are not designed to work with RCM3365 modules. R10 SERIAL FLASH/ MODEM JP1 JA PD7 PD3 PD5 PG3 PD4 C4 PG0 PC7 PC6 PC4 PC5 PC2 PC3 PC1 +5 V POWER R17 PF2 R18 PA0 PC0 J10 DS1 PF1 PF3 PA1 PA3 PA2 PA5 PA4 PA7 PA6 C2 GND NC GND STATUS GND RF MODULE D1 C1 +3.3 V VBAT_EXT VRAM SMOD0 /IORD /IOWR PG4 PG5 PG6 PG7 PE0 PE1 NOTE: Some PCs now come equipped only with a USB port. It may be possible to use an RS-232/ USB converter (Rabbit Semiconductor Part No. 540-0070) with the programming cable supplied with this Application Kit. Note that not all RS-232/USB converters work with Dynamic C. PE6 J11 GND PWM3 +5 V DS2 DS3 DS4 DS5 DS6 RELAY RATED 0.5 A @ 30 V BD7 BD6 D6 D2 D3 D4 D0 D1 D5 R44 C28 Q5 R46 R45 KEYPAD DISPLAY BOARD R47 DS7 RELAY NO1 COM1 NC1 NO2 COM2 NC2 BD5 BD4 BD3 BD2 BD1 BA3 BA2 BA1 BD0 A1 GND A3 LED6 A0 GND A2 GND C20 R41 D7 C30 D8 R38 TOP VIEW TILT SERVO MOTOR Once all the other connections have been made, you can connect power to the Prototyping Board. Connect the AC adapter to jack J1 on the Prototyping Board. The POWER LED on the Prototyping Board should light up. The RCM3365 and the Prototyping Board are now ready to be used. BRACKET R48 J14 C29 U12 R37 C21 HO4 GND HO1 D7 C25 D6 JP5 C26 BA0 LCD /CS U11 If you are using the motion sensor, connect its +5 V and GND terminals to screw-terminal header J6 on the Prototyping Board—the middle black wire is +5 V—and connect its gray wire to IN0. J17 R42 K1 R35 R32 CORE D5 C23 C24 LED4 RCM1 J9 C105 L4 Q2 C18 PWM2 J6 R5J7U16 Y1 C1 R9 R85 R70 R86 R29 R6 C5 U1 R4 R7 C2 C3 U3 U2 R80 R64 R77 U6 R13 R59 U5 NC NC PD6 PD7 R45 PD2 PD3 PD4 PD5 PG2 PG3 PG0 PG1 PC6 PC7 PC4 PC5 PC2 PC3 PC0 PC1 PF1 PF0 PF3 PF2 PA1 PA0 PA3 PA2 PA5 PA4 PA7 PA6 STATUS GND JA R49 S3 R29 D4 Q6 R36 C22 LED2 /RES CAMERA J12 R50 U9 J13 JB HO2 C4 R10 +5 V PWM1 Q4 LED0 JB R27 R28 Q3 C19 R43 C18 R40 C27 R33 R34 UX2 SO20W C17 DX2 /RES PWM Q2 HO3 J6 PB2 Q1 R30 R8 VOUT PB4 R67 C21 +3.3 V R21 R22 R23 R24 UX5 CX2 /CS PB5 PB0 J4 JB C16 J16 LCD1JA +BKLT PB6 GND UX4 DX1 +3.3 V R39 J15 LED5 RX18 LED3 RX16 RX17 LED1 RX13 RX14 RX15 SOT23-6 PF4 PB7 PB3 GND +5 V PF6 PF5 PWM +3.3 V CX1 R31 U4 R18 R22 C11 C61 C36 PE7 PF7 J5 GND SOT23-6 PE5 R30 C58 R44 R53 Y2 CORE MODULE PE3 PE4 +5 V +5 V +V C35 / RESET_IN SMOD1 RCM1 DS2 R82 C15 J1 R3 J2 R54 R31 PWR PWM0 J3 C3 PG1 PF0 R20 PD2 R37 R38 R36 R35 L2 C86 C80 R1 R14 R15 R26 R27 PD6 PG2 C78 +DC J1 NC SF NCMODULE J8 C14 C15 J11 R19 GND C74 U13 J2 J3 R2 PWM1 UX2 SO20W J4 Y1 PE6 R10 PF5 PWM C3 U3 U1 R4 D6 UX5 DX2 +5 V PE3 PE5 PD6 PD7 PD3 R62 CX2 J5 PE0 U16 R5 PE1C4 PE4 NC NC R63 R64 R65 R66 J11 PG4 PG6 PG7 L4 C18 C11 /IOWR D5 UX4 DX1 +3.3 V R39 J15 RX18 RX15 SMOD0 /IORD CORE PG5 R8 C105 Q2 J6 / C15 RESET_IN SMOD1 D4 RX17 UX1 SO20W J13 JB RX16 RX14 RF MODULE C9 R67 C21 VBAT_EXT VRAM R54 U4 R18 R22 +3.3 V GND J6 J7 R59 D1 C1 NC GND C61 R51 C2 C36 JP3 J10 PF4 PF6 PE7 R11 R30 R54 R31 C58 R44 R53 Y2 C35 R55 R56 R57 R58 R14 R15 R26 R27 R3 R1 DS1 C13 +5 V POWER PWM3 R82 GND C4 C3 DS2 J2 +DC C80 PWR PWM2 J3 R37 R38 R36 R35 L2 C86 DS1 J8 GND C78 S3 SF MODULE C10 C11 C74 U13 C12 JP1 JP4 JP2 C9 DS1 +DC GND J1 J2 J3 R11 J4 VMB MDB1 MDB2 MDB3 MDB4 VMB+ VMA+ MDA1 MDA2 MDA3 MDA4 VMA POWER +5V QD2A QD2B QD1A QD1B GND J5 PF4 PF6 PE7 +5V S2 IN0 J12 R11 R12 Q4 R50 C6 R27 R28 CX1 C10 RABBITNET R15 U10 S2 Q3 RX13 R8 U6 C6 BT1 U8 JA J9 S1 RESET Q2 GND +3.3 V Figure 2. Connect Programming Cable, Interposer Board Power, and Motion Sensor U7 C5 UX1 SO20W R25 R26 R25 R26 Q1 C19 GND STAT JA GND C20 PA7 GND C16 J11 +5 V +5 V C24 PA6 PA7 R23 CORE MODULE GND/EGND JA PA5 PA6 C28 PA5 PA3 PA4 GND PA3 PA4 PA1 PA2 +5 V PA1 PA2 GND PF3 PA0 PF3 PA0 C5 BT1 C81 PF2 PF2 U8 R21 R22 R23 R24 C67 PF1 PF1 C14 PC0 PF0 PC0 PF0 C104 PC2 PC1 PC2 PC1 JP1 PC4 PC3 PC4 PC3 R50 PC6 PC5 PC5 R84 PC7 PC6 R2 PG0 J6 R60 R61 R17 R19 PG2 PG1 PG0 JP9 PG3 PG2 C12 C9 C13 PD4 PD4 PC7 C22 PD2 PD5 PD5 PG1 JP7 PD6 PD3 PD2 JP5 LINK PD7 PD3 PG3 S1 RESET JB JP1 ACT PD6 JP4 R16 PD7 GND/EGND JP8 RCM3300 PROTOTYPING BOARD RP2 LINK RABBITNET R8 U6 C6 R9 R14 R15 C34 R20 R21 U5 R96 RP1 U4 R25 C27 JP6 C8 GND R67 R68 R69 R70 R16 R49 R52 R53 RP2 RP1 C82 /RES_OUT ACT U7 U5 C72 C71C70 R11 R12 C67 C14 PB2 C77 R79 GND +5 V GND GND +5 V PWM C104 JA PB4 PB0 GND C6 R84 GND R50 +5 V PWM PB6 PB3 U4 J6 J10 Q6 OUT OUT 00 01 02 03 04 05 06 07 /RES_OUT J9 R9 R14 PB2 PB0 STAT U3 L293D H-DRIVER C4 R13 PB4 PB3 +5 V C10 R2 PB5 L293D H-DRIVER PB5 C8 R60 R61 U3 L293D H-DRIVER C4 R52 R53 OUT R81 C19 JP9 PB7 J10 PB6 PF0_QD OUT 00 01 02 03 04 05 06 07 C76 C20 C12 C9 C13 PF5 R12 U1 PB7 R67 R68 R69 R70 L1 C24 C22 Prototyping Board PE5 U2 PF5 U2 R13 U1 R12 C79 R23 JP8 JP7 JP4 JP5 Interposer Board PF7 PE0 PE3 PE4 PF0_QD PE5 PE6 +5 V C28 R17 R19 C34 R20 R21 R96 R25 C27 JP6 Insert standoff between boards (if needed) PE1 PE6 L1 PG6 PG7 PF0_CLKD C3 PE3 PE4 PWM C81 C82 PG4 PG5 J6 D2 /IORD /IOWR C2 PE0 PE1 C3 L293D H-DRIVER PWM R81 SM0 C1 SMODE1 PG7 L1 CORE MODULE To PWR (J3) +3.3 V VRAM PG6 C42 C76 C72 C71C70 VBT /RES R1 D1 NC PG4 PG5 C2 D2 R43 C42 R43 GND /IORD DS4 C77 R79 L1 DS4 RCM3365 J8 GND SMODE1 SM0 RCM3300 PROTOTYPING BOARD on Interposer Board J2 /RES /IOWR PF0_CLKD C1 DS1 DS3 USR FM LINK ACT C79 SPEED DS1 DS3 USR FM LINK ACT J1 VRAM PF7 Install the RCM3365 on the Interposer Board as shown in Figure 1. Line up the pins on the bottom of the RCM3365 module with sockets JA and JB on the Interposer Board. Press the RCM3365 module’s pins firmly into the Interposer Board sockets. The xD-Picture Card may be inserted into header J6 on the RCM3365 at this time. Power-Supply Connections +3.3 V VBT SPEED Use a power-supply harness to connect the PWR pins (header J3, middle terminal is +5 V) on the Interposer Board to the +5 V and GND terminals on screw-terminal header J6 on the Prototyping Board. D1 NC GND IN1 R1 J8 GND IN2 Orient the Camera Interposer Board as shown in Figure 1 and line up the pins on the bottom of the Interposer Board with sockets JA and JB on the Prototyping Board. Press the Interposer Board’s pins firmly into the Prototyping Board sockets. GND IN0 +5 V GND IN3 on Interposer Board MOTION SENSOR J6 To PWR (J3) J7 1. Install Camera Interposer Board and RCM3365 LCD1JB LCD1JC TxE RxE GND TxF RxF 485+ GND 485 NOTE: A RESET button is provided on the Prototyping Board to allow a hardware reset without disconnecting power. Figure 1. Install the RCM3365 and Interposer Board on the Prototyping Board NOTE: It is important that you line up the pins on the RCM3365 module and the Interposer Board exactly with the corresponding pins of the sockets. The header pins may become bent or damaged if the pin alignment is offset, and the boards will not work. Permanent electrical damage to the modules may also result if a misaligned module is powered up. A ¼" (6.3 mm) standoff is recommended to secure the RCM3365 module and the Interposer Board to the Prototyping Board in high-vibration environments. Attach one standoff to the top side of the Interposer Board as shown in Figure 1. Then secure the Interposer Board to the Prototyping Board using the standoff already on the Prototyping Board, and secure the RCM3365 into the other standoff on the Interposer Board. 2. Connect Programming Cable and Power Supply Connect the 10-pin connector of the programming cable labeled PROG to header J1 on the RCM3365 as shown in Figure 2. Be sure to orient the marked (red) edge of the cable towards pin 1 of the connector. (Do not use the DIAG connector, which is used for a normal serial connection.) Connect the other end of the programming cable to a COM port on your PC. FOAM MOUNTING STRIPS CAMERA Alternate Power-Supply Connections TILT FOAM MOUNTING STRIP FRICTIONLOCK CONNECTOR SERVO MOTOR All Development Kits include a harness that may be used to connect your power supply to 3-pin header J2 on the Prototyping Board. The connector may be attached either way as long as it is not offset to one side—the center pin of J2 is always connected to the positive supply, and either edge pin is negative. The power supply should deliver 8 V–30 V DC at 1 A. 3. Set Up and Connect Servo Motors and Camera FOAM MOUNTING STRIP CAMERA PLASTIC BRACKET PAN SERVO MOTOR Figure 3. Servo Motor and Camera Setup Complete the assembly of each servo motor by attaching the cross-shaped plastic blade to the motor shaft using the smallest screw from the parts bag in the motor box. Cut a piece of a foam mounting strip and use it to secure the end opposite the turning axis of one of the micro-servo motors in an unused area of the Prototyping Board close to the edge. This will be the pan servo motor. You may also use another surface located close to the Prototyping Board. This pan servo motor can be secured more firmly if it is next to something else such as a screw-terminal header, and its side is also secured with the foam mounting strip. Starting Dynamic C Once the RCM3365 is connected as described in the preceding pages, start Dynamic C by double-clicking on the Dynamic C icon or by double-clicking on dcrab_XXXX.exe in the Dynamic C root directory, where XXXX are version-specific characters. Dynamic C uses the serial port specified during installation. ® If you are using a USB port to connect your computer to the RCM3365, choose Options > Project Options and select “Use USB to Serial Converter.” A Digi International® Company. Set the compiler to run the application in the fast program execution SRAM by selecting “Code and BIOS in Flash, Run in RAM” from the Dynamic C Options > Project Options > Compiler menu. Pan Motor Connect the servo motor wires to the Interposer Board — connect the pan servo motor to PWM3 (header J5). Connections The black wire is GND and the white wire is the PWM signal. Calibrate Calibrate the pan servo motor now by running the SERVO_CALIB.C sample program from the Dynamic C Pan Motor SAMPLES\CAMERAINTERFACE folder. Use the File menu to open the sample program, and press function key F9 to compile and run the program.The STDIO window will open on your PC and will display a calibration dialog box. Use a felt pen to mark a dot on the servo motor’s rotating blade, and watch the blade rotate as you repeatedly press the “l” key on your keyboard with the STDIO window active. A PAN value will also display in the STDIO window. The blade will not rotate any further when it reaches its limit, and you may hear the motor humming. Go back at least two “steps” by pressing the “r” key on your keyboard, and press the “s” key on your keyboard to save the PAN value. (Write down the value.) Answer the prompts in the STDIO window and. Now repeatedly press the “r” key on your keyboard until the blade reaches its other limit, and go back at least two “steps” by pressing the “l” key on your keyboard. Press the “s” key on your keyboard to save the PAN value and answer the prompts. (Write down the value.) Finish by continuing to press the “l” key on your keyboard until the PAN value is midway between the two limits. Tilt Motor Cut a second piece of a foam mounting strip and use it to secure a side of the other micro-servo motor to the blade on the turning axis of the pan servo motor. This other servo motor is the tilt servo motor. Setup Connect the tilt servo motor to PWM1 (header J4), and calibrate it using the “u” and “d” keys on your keyboard to rotate the blade to its limits as you did for the pan servo motor. Go back at least two “steps,” and press the “s” key on your keyboard to save the TILT values (write down the values), answering the prompts in the STDIO window. Since the SERVO_CALIB.C sample program will terminate once all four limit values have been saved, run the SERVO.C sample program to be able to press the “u” and “d” keys on your keyboard as prompted in the STDIO window until the TILT value is midway between the two limits. Install Camera Use a third piece of foam mounting strip to secure the plastic camera bracket to the blade of the tilt servo motor, and finally use the remaining foam mounting strip the attach the camera to the plastic bracket — remove any labels from the back of the camera board before attaching it with the foam mounting strip. Connect Use the 4-wire cable with polarized friction-lock plugs to connect the camera to header J9 on the Interposer Camera Board — connect the white plug to the camera, and connect the black plug to header J9. Where Do I Go From Here? If the sample servo calibration program ran fine, you are now ready to go on to other sample programs on the supplemental Dynamic C CD, which are discussed in Application Note AN412, Camera Interface Application Kit. The source code for the sample programs is provided to allow you to modify them for your own use. The RCM3365/RCM3375 User's Manual on the Dynamic C CD also provides complete hardware reference information and describes the software function calls for the RCM3365 RabbitCore modules and the Prototyping Board. If there are any problems: • Use the Dynamic C Help menu to get further assistance with Dynamic C. • Check the Rabbit Semiconductor/Z-World Technical Bulletin Board at www.rabbit.com/support/bb/. • Use the Technical Support e-mail form at www.rabbit.com/support/. NOTE: If you purchased your Camera Interface Application Kit through a distributor or through a Rabbit Semiconductor or Z-World partner, contact the distributor or partner first for technical support. 020–0105 • 060601–A Camera Interface Application Kit Getting Started Application Kit Contents • 3 CDs — Dynamic C®, Dynamic C FAT File System module, and supplemental CD with sample programs and information related to Camera Control Application Kit — with complete product documentation on disk. • • • • • • • • • • • • • • • RCM3365 RabbitCore module. Camera Interposer Board to interface camera and micro-servo motors with RCM3365 and Prototyping Board. RCM3365 Prototyping Board, with a bag of accessory parts for use on the Prototyping Board. Miniature C328-7640 serial camera, plastic bracket, and 4-wire cable with friction-lock connectors. 10-pin header to DB9 programming cable with integrated level-matching circuitry. 2 power-supply harnesses (3-pin connector to red/black wires with bare leads). AC adapter, 12 V DC, 1 A. Ethernet cables. 2 Blue Arrow micro-servo motors. Infrared motion sensor. 4 foam doubled-sided mounting strips. Getting Started instructions. 32 MB xD-Picture Card™ (NAND flash) Rabbit 3000 Processor Easy Reference poster. Registration card. Installing Dynamic C® Insert the CD from the Development Kit in your PC’s CD-ROM drive. If the installation does not auto-start, run the setup.exe program in the root directory of the Dynamic C CD. Install any Dynamic C modules and the software from the supplemental CD after you install Dynamic C. Rabbit Semiconductor, Rabbit, Z-World, and Dynamic C are registered trademarks of their respective holders.