GF of 9 THE GADGET FREAK FILES CASE #165. Analog Clock Measures Time in Meters

Similar documents
Lifetime Power Energy Harvesting Development Kit for Wireless Sensors User s Manual - featuring PIC MCU with extreme Low Power (XLP) Technology

Controlling DC Brush Motor using MD10B or MD30B. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

LED Infinity Mirror Controller, 32 LEDs, Multiple Patterns.

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Ocean Controls KT-5221 Modbus IO Module

Ten Tec DDS Board Assembly Procedure

Lazy Clock Electronics and Software

Bill of Materials: Metronome Kit PART NO

MiniProg Users Guide and Example Projects

Microprocessors A Lab 4 Fall Analog to Digital Conversion Using the PIC16F684 Microcontroller

Custom Integrated Circuit (MSM9520RS) Replacement Module

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

LED Field Strength Indicator Kit

Breadboard Arduino Compatible Assembly Guide

QUASAR PROJECT KIT # /24 HOUR GIANT CLOCK

Bill of Materials: PWM Stepper Motor Driver PART NO

AVL-10000T AUDIO VIDEO LINK TRANSMITTER TECHNICAL MANUAL

MAKEVMA502 BASIC DIY KIT WITH ATMEGA2560 FOR ARDUINO USER MANUAL

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

Microprocessors B Lab 4 Spring Motor Control Using Pulse Width Modulation (PWM)

Circuit Board Assembly Instructions for Babuinobot 1.0

6. HARDWARE PROTOTYPE AND EXPERIMENTAL RESULTS

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Circuit Board Assembly Instructions

Breadboard Primer. Experience. Objective. No previous electronics experience is required.

Penrose Quantizer Assembly Guide

ESE141 Circuit Board Instructions

Laboratory 11. Pulse-Width-Modulation Motor Speed Control with a PIC

1 Second Time Base From Crystal Oscillator

Pacific Antenna Field Strength Indicator Kit

AAØZZ Control Board for Si570 Daughtercard

Houngninou 2. Abstract

6V to 12V dc-dc boost converter using 555 timer IC

Microcontrollers and Interfacing

Lab 2: Blinkie Lab. Objectives. Materials. Theory

CMU232 User Manual Last Revised October 21, 2002

Brushed DC Motor Control. Module with CAN (MDL-BDC24)

QRPGuys SMT Digital Dial/Frequency Counter

BMC052. Chordizer Last updated

Quantizer step: volts Input Voltage [V]

Introduction to Using the PIC16F877 Justin Rice IMDL Spring 2002

12V Dimmer Kit, version 2

PS2-SMC-06 Servo Motor Controller Interface

PID MOTOR CONTROLLER. Version 1.0. October Cytron Technologies Sdn. Bhd.

The Skiidometer. Hardware Description By: Adam Lee ; Etec474; Prof. Morton; WWU

Midimuso CV-12 ORAC (Overflow, Re-trigger, Aftertouch, Chainable)

ECE 511: FINAL PROJECT REPORT GROUP 7 MSP430 TANK

Build this Direct Digital Synthesizer "Development Kit" By: Diz Gentzow, W8DIZ

Dual Band Filter Assembly Manual

Functional description of BSD-01v2 Module

Stand Alone VXO (SAVXO) Assembly Manual Manual Version 1.0B_

Normally, digital speedometers

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

Switch closes when V GS 4Vdc. Figure 1. N Channel MOSFET Equivalent Circuit

transformer rectifiers

MAX11300PMB1 Peripheral Module and Munich (USB2PMB1) Adapter Board Quick Start Guide

RC Filters and Basic Timer Functionality

JUMA-TRX2 DDS / Control Board description OH2NLT

The 6LE8 One Tube Broadcaster

Handy dandy little circuit #17 #17

N3ZI Kits General Coverage Receiver, Assembly & Operations Manual (For Jun 2011 PCB ) Version 3.33, Jan 2012

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

LITTLE NERD v1.1 Assembly Guide

EE 308 Spring S12 SUBSYSTEMS: PULSE WIDTH MODULATION, A/D CONVERTER, AND SYNCHRONOUS SERIAN INTERFACE

DR-TRC105-EV Evaluation Kit. User s Guide

WSPR Audio Signal Source

5 Channel Multifunctional PWM Controller. HomLiCon LCH5T. Technical Specifications

Introduction 1. Download socket (the cable plugs in here so that the GENIE microcontroller can talk to the computer)

Microcontroller Based Wind Direction Measurement System

FC3 Project Info: PIC18F /500MHZ Frequency Counter & RF Meter. This project is developed for Amateur Radio Community by:

Programmable Timer Teaching Notes Issue 1.2

Micro-Trak All-In-One APRS Transmitter

EVDP610 IXDP610 Digital PWM Controller IC Evaluation Board

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

Data Conversion and Lab Lab 3 Spring Analog to Digital Converter

ZKit-51-RD2, 8051 Development Kit

K8055N. USB Experiment interface board. Interface your computer with the world using 5 digital in and 8 outputs, 2 analogue in-and outputs.

Screening Audiometer

Elektor Datalogger Review

PICee Development System

DIY Function Generator XR2206

12 Bit 1 GS/s Return-to-Zero DAC Evaluation Board

DDS VFO 2 CONSTRUCTION MANUAL. DDS VFO 2 Construction Manual Issue 1 Page 1

Introduction. Circuit diagram

LBI-39061A. Installation Manual. DTMF Encoder 344A4209P23 (MHDE5U) ericssonz

EXAMPLE. Use this jack for the red test lead when measuring. current from 0 to 200mA. Figure P-1

About LC Meter This is one of the most accurate and simplest LC inductance / capacitance Meters that one can find, yet one that you can easily build y

Experiment #3: Micro-controlled Movement

Lab 11: 555 Timer/Oscillator Circuits

Fox Delta FC Amateur Radio Projects & Kits. FC3 Project Info: PIC18F /500MHZ Frequency Counter & RF Meter

ELEXBO A-Car-Engineering

CECS LAB 4 Prototyping Series and Parallel Resistors

PCAN-MicroMod Evaluation Test and Development Environment for the PCAN-MicroMod. User Manual. Document version ( )

FMS Flight Simulator Encoder

EXPERIMENT 6: Advanced I/O Programming

TRC EV DR TRC EV DR TRC EV

EE 314 Spring 2003 Microprocessor Systems

EE 308 Lab Spring 2009

Servo click. PID: MIKROE 3133 Weight: 32 g

The µbotino Microcontroller Board

Transcription:

GF 165 04-05-2010 1 of 9 THE GADGET FREAK FILES CASE #165 Analog Clock Measures Time in Meters Alan Parekh took a different approach to time keeping with his electronic clock that registers hours, minutes, and seconds on individual multimeters. A microcontroller keeps track of time and calculates the current each meter needs to move its needle at the proper rate. A separate MCU output drives each meter. Instead of simply lining up the meters, Alan also created a unique way to display them. Build the circuit now: Time waits for no one! This Gadget Freak project requires some knowledge of PIC microcontrollers and how to program them. Alan provides both hexadecimal code ready for use as well as source code written in PICBASIC PRO. Download these two files and a larger version of the schematic diagram at: www.gfreak.com/gf165/gf165.zip. View Alan's video at: http://alan-parekh.com/multimeter_clock.wmv.

GF 165 04-05-2010 2 of 9 How It Works Three outputs on a Microchip Technology PIC 16F628A microcontroller drive three multimeters that individually display Hours, Minutes, or Seconds. Alan set his meters to measure 0.5 ma DC full scale and connected the three negative leads to ground and each positive leads to its own MCU PWM-output pin through a 4.7-kohm current-limiting resistor. Builders can adjust this resistor value depending on the current scale of their meters. The information in Table 1 suggests resistor values for four meter scales. Keep in mind the PIC MCU can deliver a maximum of 25 ma to each meter, so a meter with a lowest current setting of greater than 25mA would not work without additional circuitry. Builders also should ensure they can drive the meter to full scale. If a meter lacks accuracy it could take 10 or 20 percent more current than expected to move the meter needle to full scale. Table 1. Resistor-Current Suggestions for Meter Scales.

GF 165 04-05-2010 3 of 9 0.5mA 1mA 5mA 10mA M eter Scale 4.7K ohm 2.4K ohm 510 ohm 240 ohm R esistor to Use The MCU uses pulse-width modulation (PWM) to pulse the current to each meter, which allows for precise needle positioning. If the minute meter must move its needle to display 30 seconds, for example, the PWM output would provide pulses half the width needed to move the needle to full scale, or 60 seconds. (For the moment, ignore the meter's printed scale. You'll learn how to create custom scales later.) When the clock MCU starts, the code creates a 50-percent duty cycle for the three PWM outputs so an accidental overdrive doesn't damage the meters. ("Pinning" a meter with too high a current can actually bend the needle and ruin a meter.) In a prototype design, the current limiting resistances included a calibration potentiometer that would properly adjust each meter's full-scale current. The final design, however, includes a scaleadjustment mode that lets you set the PWM value needed to move each meter needle to its fullscale position. The MCU saves this value in non-volatile memory so you never need to adjust it again. Because the Seconds meter experiences a current change every second, the meter needle tends to "bounce" from one value to the next. Wrist watches have a second hand that moves either smoothly or that "jumps" from second to second, so Alan wanted his clock to emulate either mode. If you place a jumper across the Smooth Seconds pins (S5), the MCU changes the current output for the seconds meter every 0.1 second to cause the Second meter needle to move smoothly. Alan designed the clock to run from a 9-to-12V DC mains-powered wall cube or "wall wart" power supply, but he wanted to maintain the time during a power outage. So the circuit includes a 4.5V battery that will supply backup power. The circuit must know when the clock runs on backup power so it can reduce its power consumption. When the Main Power Monitor signal on MCU pin 1 changes to ground, the MCU will reduce power to the three meters and to the heart-beat LED, D6. The circuit uses four diodes, (D2, D3, D4, and D5) and a resistor (R5) to implement the battery backup and provide the Main Power Monitor signal. Diode D2 causes the LM7805 voltage regulator (U2) to raise the regulated power output to about 5.7V. Diode D4 produces a 5V Main Power Monitor signal when the clock operates from mains power. If the circuit loses mains power, resistor R5 pulls the Main Power Monitor signal line to ground. Diode D3 passes 5V power to the clock circuit. The optional 4.5 volt battery-backup power connects to the 5V power via diode D5. You can use three AA-size batteries in a plastic battery holder and connect its two leads to terminal block TB2 as shown in the schematic diagram. How to Use the Multimeter Clock

GF 165 04-05-2010 4 of 9 When the clock first receives power, the three PWM outputs default to about 50-percent of the each meter's full-scale current reading, as noted previously. So, you must adjust the scale of all three meters. To start, place a jumper across the Scale Adj pins at S4. In this mode the MCU will power only the meter you choose to adjust. As you perform the following steps, you aim to move the needle on each meter to its full-scale, or maximum reading, position. 1. Use the Hour pushbutton (S1) to select the meter to adjust. Each button press selects the next meter in a repeating sequence. 2. Use the Minute pushbutton (S2) to decrease current to the selected meter; that is, to move the needle away from full scale, or its maximum reading. 3. Use the Second pushbutton (S3) to increase current to the selected meter; that is, to move the needle toward the full scale, or its maximum reading. After you have the three meters properly set for the full-scale position of their needle, remove the Scale Adj jumper (S4) to return to normal clock mode. The MCU stores the calibration information for each meter and you can move on to set the current time. Use the Hour, Minute, and Second pushbuttons. The Hour button increments the current time by one hour. The Minute button increments the current time by one minute. The Second button resets the seconds to 0. After you enter the proper time, the MCU will keep track of time. An interrupt "fires" every 0.1 second and the interrupt service routine increments a 10 th -second counter by one. Another routine checks to see if the counter has reached one second, at which time the current time increments by one second. If you choose the Smooth Seconds setting, the "Second" meter receives a new current every 0.1 second instead. Building the Clock You can use a piece of perforated board with a 0.1-by-0.1-inch spacing of holes to hold the MCU and discrete components. This type of "perf board" gives you a lot of flexibility in how you lay out the circuit. Construct the circuit according to the schematic diagram. When you power the circuit-- with the programmed PIC MCU installed--the blue LED (D6) will give you a visual indication that things are working, during the power up phase the LED will light steady-on and as soon as the clock starts to run it will flash on for one second and off for one second.

GF 165 04-05-2010 5 of 9 Alan used the PICBASIC PRO compiler from microengineering Labs (www.melabs.com) to created the clock software. So you will need that software if you plan to change the clock's functions or operation. The present code leaves about 20 percent MCU's code memory available for your "hacking." If you want to duplicate Alan's Multimeter Clock, you can download the hexadecimal code and use a PIC programmer to load it into the MCU. A Microchip Technology PICkit 3 pod (part no. PG164130) provides a means for in-circuit programming of a PIC MCU and the free Microchip MPLAB Integrated Development Environment (IDE) tools. For more information: "PICkitTM 3 Programmer/Debugger User s Guide." ww1.microchip.com/downloads/en/devicedoc/pickit_3_user_guide_51795a.pdf. "In-Circuit Serial Programming." ww1.microchip.com/downloads/en/devicedoc/31028a.pdf. To program the MCU you will need a way to program the device. Alan uses a stand-alone programmer and WinPIC 800 software (www.winpic800.com) to "burn" the HEX file into the MCU's flash memory. You can find other PIC programmer modules and kits via a Google search. Look at, for example, the VEK8048 - PIC Programmer & Experiment Board ($US 49.95) from Carl's Electronics at www.electronickits.com/kit/complete/prog/ck1700.htm. The company sells other types of PIC programmers, too.

GF 165 04-05-2010 6 of 9 Quasar Electronics in the UK sells the 3149E - USB or Serial-Port PIC Programmer (approx. $US 75). Visit www.quasarelectronics.com. Canakits in Canada sells the UK1301 - Mini USB PIC Programmer (assembled, $US 49.95; kit, $US 34.95). Visit: www.canakit.com. Adapt the Meter Faces The multimeter faces, or scales, require modification to provide scales that someone can use to directly read hours, minutes, and seconds. Alan used a program called MeterBasic by Tonne Software (www.tonnesoftware.com/meter2.html). To make a new meter face you enter the measurements of the meter face, the name for the meter and scale information. In the end you have a perfect matching scale for your meter. Just ensure you can remove the multimeter face to attach the new scale. Clock Housing You can create a housing for the Multimeter Clock to match your office furniture, shelves, lab bench, and so on. Alan created a CAD version of a Simpson 260 multimeter and cut it out on a CNC machine. Why the Simpson 260? That was the first analog meter he used in college.

GF 165 04-05-2010 7 of 9

GF 165 04-05-2010 8 of 9 Parts List

GF 165 04-05-2010 9 of 9 A mt Par t Descr iption Allied Part # 1 Perforated Prototype Board (about 2 X 3 in.) 237-0112 5 Two-Position Terminal Block 409-0730 1 100μF Capacitor, 35V 852-7050 1 47μF Capacitor, 16V 852-7002 1 0.1μF Capacitor, 50V 648-0303 2 22pF Capacitor, 50V 507-0201 5 1N4001 Diode 411-0001 1 L7805 Voltage Regulator 248-0415 4 4700Ω Resistor, 1/4W* 296-4769 4 2400Ω Resistor, 1/4W* 296-6509 4 510Ω Resistor, 1/4W* 296-6513 4 240Ω Resistor, 1/4W* 296-6495 1 1000Ω Resistor, 1/4W* 296-4741 1 Blue LED 265-9058 1 20-MHz Crystal 614-0055 1 18-Pin DIP IC Socket 374-5536 1 16F628A PIC Microcontroller 383-0400 3 Tactile Button, Normally Open 676-0217 2 Two-Position Pin Header 863-0308 2 Pin Header Jumper 863-0339 1 AA Battery Holder (4.5V) 839-3059 1 9V DC Plug-In Power Supply 653-0250 1 Plug-In Supply US Adapter 653-0260 3 Analog Multimeter See below * You will need one of these resistor values will be needed based on the chosen meter. See Table 1 for resistor suggestions. Typical Inexpensive Multimeters: Sears Craftsman Analog Multimeter, No. 03482362000 Actron CP7849 Analog Multimeter Tester -----end-----