VINCULUM-BASED TEMPERATURE / HUMIDITY / VOLTAGE DATA LOGGER FEATURES:

Similar documents
Evaluation Boards for the DLP-USB245M USB Adapter

USB-BASED 8-CHANNEL DATA ACQUISITION MODULE

USB-Based 14-Channel Data-Acquisition Module

PRELIMINARY Prototyping Platform for the DLP-RF2 Transceiver

DLP-FLASH USB-Based FLASH Programmer

FEATURES: 1.0 INTRODUCTION

FEATURES: 1.0 INTRODUCTION

The DLP-USB232R is available in a lead-free (RoHS compliant), compact 18-pin, 0.1-inch standard DIP footprint.

MegaAVR-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

BASIC FEATURES APPLICATIONS ** PRELIMINARY DOCUMENT-SUBJECT TO CHANGE **

USB-Based Temperature & Humidity Sensor

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

RN-174. WiSnap M2 Super Module. Features. Description. Applications. ~ page 1 ~ rn-174-ds v1.1 6/1/2011

RN-174. WiFly GSX Super Module. Features. Description. Applications. rn-174-ds v1.1 4/20/2011

AKKON USB CONTROLLER BOARD

RN-174 WiFly Super Module

USB-Based 20-Channel Data-Acquisition Module

RN-174. WiFly GSX Super Module. Features. Description. Applications. rn-174-ds v1.1 3/3/2011

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Reprinted by permission of T&L Publications Inc. Copyright 2001 USB MICROCONTROLLERS FOR THE MASSES

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

PICado Alpha Development Board V1.0

RN-174. WiFly GSX Super Module. Features. Description. Applications. rn-174-ds v1.1 1/24/2011

FERROELECTRIC MEMORY-BASED MICROCONTROLLER MODULE

Rapid40i PIC Prototyping PCB User Manual

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

LPC2468 Industrial Reference Design Platform System Development Kit Version 1.2. August 2008

PVK40. User's manual. Feature Rich Development and Educational Kit for 40-pin Microchip PIC microcontrollers

32 bit Micro Experimenter Board Description and Assembly manual

PIC-32MX development board Users Manual

BC-USB-Kit Manual. First Edition. February, BeatCraft, Inc.

DEV-1 HamStack Development Board

F2MC MB90385 series Evaluation Board Documentation. Revision Date Comment V New document

Mega128-Net Mega128-Net Mega128 AVR Boot Loader Mega128-Net

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

Bolt 18F2550 System Hardware Manual

Note: The Silicon Labs USB Debug Adapter is not included in this kit and is required to reprogram the board.

DEVELOPER FRIENDLY USB: A detailed look at how easily a USB-based device can be developed

RN-134. WiFly GSX Super Module SuRF Board. Features. Description. Applications. ~ page 1 ~ rn-134-ds v1.

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

Getting acquainted with the development tools June 27, 2006 ELE492 Embedded System Design Exercise 1

Rapid40iXL PIC Prototyping PCB User Manual

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

RN-171-EK Evaluation Board

Goal: We want to build an autonomous vehicle (robot)

PIC-P40 development board Users Manual

CM5000 DATASHEET v0.1

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

ARDUINO LEONARDO ETH Code: A000022

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

PIC 28 Pin Board Documentation. Update Version 5.0

Rapid28iXL PIC Prototyping PCB User Manual

Future Technology Devices International Ltd

PIC-LCD-3310 development board Users Manual

PIC-P28-USB development board Users Manual

KPIC-0818P (V050919) Devices Included in this Data sheet: KPIC-0818P

OLED Engineering Kits User Manual

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

AC/DC. Adapter. Serial. Adapter. Figure 1. Hardware Setup

AN10955 Full-duplex software UART for LPC111x and LPC13xx

Preliminary F40 SoC Datasheet

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

USB-Based 14-Channel Data-Acquisition Module

SBR The Chameleon Converter II

Future Technology Devices International Ltd

SK18A. 18 Pins PIC START-UP KIT. User s Manual V1.1. Dec 2007

Embedded Navigation Solutions VN 100, VN 200 & VN 300 Development Board User Manual

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

Table 1. RS232 Serial Adapter DEBUG Connector Pin Descriptions

Manual 601: : USB/RS232. Specifications. Contents. Options

AVR-P20 development board Users Manual

Preliminary. PACKAGE - 28-pin MLP (5mm X 5mm) Example Circuit Diagram CP V. 48MHz Oscillator. USB Function Controller 512B EEPROM

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

keyestudio Keyestudio MEGA 2560 R3 Board

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

The Atmel ATmega328P Microcontroller

RKP08 Component List and Instructions

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

DMX512-4 Channel PWM Driver Board #805

ARDUINO LEONARDO WITH HEADERS Code: A000057

AC/DC. Adapter. Ribbon. Cable Serial. Serial. Adapter. Figure 1. Hardware Setup using an EC2 Serial Adapter

EasyPIC5 Development System

LPC1768 Industrial Reference Design Platform System Development Kit Version 1.3. May 2009

Wireless Sensor Networks. FireFly 2.2 Datasheet

Shown here with the TI G2 LaunchPad (Sold Separately)

Keywords Digital IC tester, Microcontroller AT89S52

Doc: page 1 of 9

This manual provides information for the final user application developer on how to use SPC57S-Discovery microcontroller evaluation board.

ST400C-NT USER S GUIDE. Table of Contents

Dual Serial Shield User Manual

Product Specification

Supplement for module D041 incl. ATMega8 Prozessor

Future Technology Devices International Ltd. USB to RS422 Serial Converter Cable. Datasheet

QUASAR KIT No DIGITAL DOWN TIMER 99 MIN WITH PIC

ARDUINO MICRO WITHOUT HEADERS Code: A000093

TDSDB Features. Description

Future Technology Devices International

I/O232-A User s Guide

Web Site: Forums: forums.parallax.com Sales: Technical:

Transcription:

DLP-VLOG *LEAD-FREE* VINCULUM-BASED TEMPERATURE / HUMIDITY / VOLTAGE DATA LOGGER FEATURES: Virtually Unlimited Data Storage Utilizing FTDI s New Vinculum USB Host IC Data Logged to USB Flash Drive Low-Power Modes for Long Battery Life System Power via Two AA Batteries Lead-Free; RoHS Compliant DEVELOPMENT KIT INCLUDES: DLP-VLOG Module C Source Code for the Microcontroller Firmware Windows Support Software for Real Time Clock Setup Windows Data Conversion Software C Compiler and Device Programmer/Debugger 2xAA Batteries DC-DC 5V 3.3V Reg Temp/Humidity Sensor USB Flash Drive FTDI Vinculum VNC1A PIC 16F88 Microcontroller Real Time Clock 2-Channel Analog Input Buffer 0-30VDC In Rev. 1.2 (July 2009) 1 DLP Design, Inc.

1.0 INTRODUCTION The DLP-VLOG is intended as both a demonstration platform for the new Vinculum IC as well as a learning tool. The Development Kit is designed to log temperature, humidity and voltage data to a USB Flash drive. Using the Vinculum IC from FTDI, this system demonstrates how one can provide virtually unlimited data storage for a small microcontroller. This system can be beneficial to electronics enthusiasts with virtually any level of technical expertise. Based on the Vinculum Host Controller IC and the Microchip PIC16F88 Microcontroller, the DLP-VLOG can function as a digital design trainer, a microprocessor development system, or as a rapid path to learning how to implement a USB Host Controller for interfacing a USB Flash drive to a small microcontroller. Programming headers on the board allow for firmware updates to both the microcontroller and the Vinculum IC so that the board can be updated with additional features developed by the user as well as firmware updates for the Vinculum. A highly optimized C compiler from Custom Computer Services is provided with the kit that supports the microcontroller firmware. Changes made to the firmware can be debugged and reprogrammed into the microcontroller using the CCS ICD Programmer/Debugger module, which is also included with the kit. The sensor used in this design is the Senserion SHT11. While this sensor will acquire temperature data in the range of 40 to 123.8 C (-40 to 255 F), it is recommended that you restrict exposure of the module to the commercial temperature range of 0-70 C. The humidity range for the sensor is 0-100% (non-condensing). Refer to the datasheet for the SHT11 for detailed specifications. 2.0 DOCUMENTATION The following items are available from the VLOG download page (http://www.dlpdesign.com/vdn9/): An expanded version of this datasheet/manual The electrical schematic in both PDF and Orcad formats Microcontroller firmware source code The modified version of the DS1302.c source code file A Windows utility for creating the Real Time Clock setup file A Windows utility for converting DLP-VLOG output data to floating point values Rev. 1.2 (July 2009) 2 DLP Design, Inc.

3.0 FLOW DIAGRAMS 3.1 STARTUP SEQUENCE Power Up / Reset Flash LEDs Power Up and Synchronize with Vinculum #use rs232(baud=9600, xmit=pin_b5, rcv=pin_b2, FORCE_SW) //send 'E' until echoed back putc('e'); //send 'e' once putc('e'); USB Flash Drive Present? // "D:\>" or "No Disk" returned N Power Off Vinculum ---------------------------- Sleep 10 Seconds (100uA) Y On power up or after a device reset, the firmware needs to know if a USB Flash drive is connected to the board. In order to do this, the microcontroller must first synchronize with the Vinculum. This is accomplished by sending an upper-case E to the Vinculum via the serial interface until it is returned by the Vinculum. Once the E is returned, a lower-case e is sent to complete the process. Next, the firmware sends the carriage return control code 0xD. The Vinculum will respond with either D:\> indicating that there is a Flash drive connected and ready or No Disk, which indicates that no drive is connected. If no drive is found, then the firmware remains in a loop waiting for a drive to be connected so that data can be saved. While the system waits for a drive, it will spend most of its time sleeping with the Vinculum powered off to conserve battery power. Rev. 1.2 (July 2009) 3 DLP Design, Inc.

3.2 REAL TIME CLOCK SETUP printf("dir timeset.dat"); "Command Failed" or "TIMESET.DAT" returned Real Time Clock Setup File Found? Y Read File And Write Data To Real Time Clock N printf("rd timeset.dat"); //datafile contents returned Proceed To Main Loop Proceed To Main Loop Once a Flash drive has been connected to the system, the next step is to determine whether the user has placed a setup file for the Real Time Clock on the Flash drive. If the file is present, it is read from the drive, the data is written to the Real Time Clock, and then the file is deleted so as to prevent the time data from being overwritten in the Real Time Clock the next time the module is reset. Rev. 1.2 (July 2009) 4 DLP Design, Inc.

3.3 MAIN LOOP Power Down Vinculum And Sleep For 10 Seconds ------------------------- ** Wake And Read Temp, Humidity and Voltages ----------------------- Save To Arrays (RAM) Close Data File printf("clf data.dat"); One Minute Interval (Seconds = 50)? Y Power Up & Synchronize With Vinculum N Write Data To File printf("wrf "); putc(0x0); putc(0x0); putc(0x01); putc(0x08); printf("%ld\t", VDATA);...Repeat For All Data... USB Flash Drive Present? Y Open Data File printf("opw data.dat"); N Reset Microcontroller ** Wakes at Seconds = 00, 10, 20, 30, 40, and 50 Once a Flash drive is connected and the Real Time Clock is set with the current time, the main loop can begin taking readings. Again, the system remains in sleep mode between readings to conserve power. The microcontroller comes out of sleep mode about once every 600mS to read the Real Time Clock and see if it is time to wake up. If a new ten-second interval has begun, then all readings are taken Rev. 1.2 (July 2009) 5 DLP Design, Inc.

and stored to microcontroller RAM in raw form as A/D counts. If the Real Time Clock indicates the end of a one-minute period, then the data is written to the Flash drive. If the Flash drive is not present, then the user has removed it for data analysis and the microcontroller simply resets itself to restart the process at the end of the one-minute interval. Note that neither removing the Flash drive nor resetting the microcontroller via the reset button will erase the time in the Real Time Clock. Removing power from the module is the only way to erase the current time. 4.0 CIRCUIT DESCRIPTION 4.1 CURRENT MONITOR PORT Great care has been taken in the design of this system to ensure that battery power is conserved wherever possible. When no Flash drive is connected and the system is powered and waiting for the drive from the user, it remains in sleep mode. The system also stays in sleep mode between readings. While in sleep mode, the current draw from the batteries is approximately 100uA. The 2xAA battery pack is mounted to the bottom of the PCB. Power enters the PCB from the battery pack and immediately connects to R10; a zero-ohm resistor. To monitor the current draw from the batteries, remove R10 from the board and connect a current meter in series at JP1. 4.2 DC-DC CONVERTER U3 is a synchronous boost converter that will convert the 3 volts from the batteries to regulated 5-volt power. This device was chosen in part due its low power consumption. When the DLP-VLOG is in sleep mode and only drawing 100uA from the batteries, U3 is only consuming 25uA itself. 4.3 REAL TIME CLOCK U7 is the Real Time Clock. Three I/O port pins are required for communication with the microcontroller. Once the time and date are written to the registers in the IC, it will keep the correct time so long as power is applied. 4.4 SENSOR U1 is the temperature and humidity sensor. Only two I/O port pins are required for communication with the microcontroller. The data I/O line on the Real Time Clock and the data line for the sensor both share a port pin on the microcontroller (DATA/PGC). 4.5 MICROCONTROLLER CLOCK U4 is a Microchip PIC16F88 Microcontroller. Since all communication with the devices on the board are either asynchronous or at 9600 baud, no crystal or ceramic resonator is required to clock the microcontroller. Instead, its internal oscillator is run at 8MHz. Rev. 1.2 (July 2009) 6 DLP Design, Inc.

4.6 VINCULUM POWER SOURCE Power for the Vinculum and Flash drive is controlled by the microcontroller via Q1. At the one-minute interval, the microcontroller pulls VPWR low to turn on Q1 and check for the presence of the Flash drive. This action supplies 5-volt power to the Flash drive and 3.3-volt power to the Vinculum (via the U5 regulator). 4.7 PROGRAMMING INTERFACES Firmware is written to the program memory in the microcontroller via the CCS ICD Programmer/ Debugger and IDE software. A small adapter PCB is provided that connects to both the 5-pin header (H1) on the DLP-VLOG and the modular cable connected to the ICD. Should the firmware in the Vinculum need to be updated, a 6-pin header (H2) is provided for connection to the TTL-232R 3.3V USB-to-serial cable. This cable is available for purchase from Mouser Electronics under part number TTL-232R-3V3, or from the FTDI on-line store. Be sure to use the 3.3 volt version of this cable. The Windows software that performs this programming process is available for download from the Vinculum website (http://www.vinculum.com/). To update the Vinculum s firmware, start by removing the batteries from the battery holder. Place a shorting jumper across JP3 (MCLR) to hold the microcontroller in the reset state, and another shorting jumper across PROG# and GND at JP2. Then connect the TTL-232R cable to header H2 with the black wire going to pin 1 of the header. Finally, run the VPROG.exe utility to erase and reprogram the Vinculum. 4.8 ANALOG BUFFERS Analog voltages can be measured on the CH1 and CH2 inputs. Voltages present at these inputs are first divided by R11, R12, R16 and R17 to provide an input range of 0-30 volts, and then buffered by U8, which has been configured for unity gain. 5.0 FIRMWARE DESCRIPTION This section will only cover items that some developers may find confusing. Questions that arise from the source code listing that are not covered here should be directed to support@dlpdesign.com. 5.1 INTERNAL CLOCK As mentioned earlier, since the serial interface to the Vinculum runs at 9600 baud, the internal oscillator in the PIC 16F88 will work just fine for the system clock source. The internal oscillator is enabled and selected via the CONFIG register when firmware is programmed into the microcontroller. The source code line #use delay(clock=8000000,restart_wdt) tells the compiler the speed at which the micro is running and enables use of the delay functions. 5.2 SERIAL PORT SETUP Rev. 1.2 (July 2009) 7 DLP Design, Inc.

The PIC16F88 Microcontroller has an on-chip UART that can be utilized for communication with the Vinculum. Please note that while the UART has interrupt capability, interrupts were not used for this project in an attempt to make the code easier to understand. The #use RS232" pre-processor directive is shown but not called, so the Vinculum can remain powered off in low-power mode. The "Force Software" parameter will cause software serial I/O routines to be generated even though the UART pins on the micro are specified. As soon as the #use RS232 directive is issued, the TX line will be taken high to the idle state. If this line is high while the MOSFET is off and no power is applied to the Vinculum, there will be current draw into the Vinculum via the TX line through the protection diodes. 5.3 CONSTANTS A few constants are defined towards the top of the code listing; for example, #define S1 "OPW data.dat". This was done as opposed to using the SPRINTF or PRINTF commands so as to save program memory. 6.0 REAL TIME CLOCK UTILITY At power up, the data registers in the Real Time Clock IC contain invalid time and date data. The correct date and time must be written to these registers in order for valid time data to be logged to the data file. Setting the date and time in the Real Time Clock is accomplished by running the software utility SetupFileGen.exe that is located on the Flash drive supplied with the kit. When run, this program creates a binary file containing both date and time information. You can simply copy the binary file to the root folder in the Flash drive, and when the Flash drive is reconnected to the DLP-VLOG module, the Real Time Clock will be updated with the correct time. You will note that there is a several-second delay from when the reset button on the DLP-VLOG is pressed to when the data is actually read and stored into the Real Time Clock. 7.0 DATA CONVERSION UTILITY In an effort to conserve program memory in the microcontroller, no floating-point calculations are performed. All temperature, humidity and voltage data is written to the Flash drive in raw form as A/D counts. The software utility VLOG File Convert.exe is provided to convert the raw data file to usable floatingpoint data. To utilize this, simply run the application, select the file to be converted, click on Convert & Save and select a location for the output file. The utility will convert the raw data from this: 08/26/06 15:26:00 6705 1091 0819 0226 0552 To this: 08/26/06 15:26:00 27.38 84.14 37.1 26.59 12.15 2.661 Rev. 1.2 (July 2009) 8 DLP Design, Inc.

The nine data elements produced are as follows: Date Time Degrees C Degrees F Humidity % Voltage CH1 Voltage CH2 Voltage Battery 8.0 DISCLAMER DLP Design, Inc., 2006 Neither the whole nor any part of the information contained herein nor the product described in this datasheet may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are supplied on an as-is basis, and no warranty as to their suitability for any particular purpose is either made or implied. DLP Design will not accept any claim for damages whatsoever arising as a result of the use or failure of this product. Your statutory rights are not affected. This product or any variant of it is not intended for use in any medical appliance, device, or system in which the failure of the product might reasonably be expected to result in personal injury. This document provides preliminary information that may be subject to change without notice. 9.0 CONTACT INFORMATION DLP Design, Inc. 1605 Roma Lane Allen, TX 75013 Phone: 469-964-8027 Fax: 415-901-4859 Email: support@dlpdesign.com Internet: http://www.dlpdesign.com Rev. 1.2 (July 2009) 9 DLP Design, Inc.