BASIC-Tiger Application Note No. 029 Rev Waking up sleeping tigers. Gunther Zielosko. 1. Basics Real Time Clock

Similar documents
How to modify Volvo Alarm Siren after it has given Message: Alarm system Service Required Ver. 1.2

DISCONTINUED PRODUCT. For reference only SMOKE DETECTOR WITH INTERCONNECT FEATURES. ABSOLUTE MAXIMUM RATINGS (Voltages are referenced to V SS

Replaced by A5367CA. DISCONTINUED PRODUCT SMOKE DETECTOR WITH INTERCONNECT AND TIMER FEATURES

AUTOMATIC STREET LIGHT CONTROL SYSTEM USING MICROCONTROLLER

ABOUT THIS DOCUMENT AND THE DOCUMENT STRUCTURE WE USE

ANTI SLEEP ALARM INTRODUCTION

DS1286 Watchdog Timekeeper

Table of Contents. Page Quick Set-up Instructions 1. Theory of Operation 2. Specifications 3. TM 1003W Controls and Connections 4

4-20mA CYBER Cyber Transmitter for flammable, toxic and IR gas detection Cyber Head Increased security in ATEX certified head

Exercise 1. Introduction to Sensors EXERCISE OBJECTIVE

ENERGY LIGHT USER S GUIDE ENERGY LIGHT USER S GUIDE

E PIR Motion Detector. Features. General Description. Applications. Single Sensor Application Circuit

Fire Extinguishing Control Panel INSTRUCTION MANUAL. Revision 8/ Instruction Manual Page 1 Revision 8/01.17 of 63

S INTRUSION&FIRE ALARM AND ACCESS CONTROL PANEL

IN A BOX. User Manual YOUR HOME SECURITY SYSTEM. curv360.co.uk. Support APP remote arm/disarm, parameter settings and accessories management

DEIF A/S. Description of options. Option M17, Configurable inputs and RPM supervision Engine Controller EC-1/EC-1M. Description of option

XBee Based Industrial And Home Security System

Smart GPS Antenna A1035-D

High Reliability Of Fiber Optic Amplifier For Convenient Mounting

Control box FSTronic DES-FS

Victoreen Primalert 35 Area Radiation Monitor

SD Series Optoschmitt Detector, TO-46 Metal Can Package

Part 3 Troubleshooting

GPS Evaluation Kit EVA1037/1080

Part 1: Playing with Electricity

Orion ISS. Intrusion and Fire Alarm Panel. Signal-10. User s Manual

HA-263K HA-263D. OWNER'S MANUAL Installation And Operation 8-ZONE ALARM CONTROL PANEL FOR HOME AND OFFICE PROTECTIONS OPEN THE CABINET FOR SERVICE

OPERATING MANUAL Enertronic Control System 2

Measurements & Instrumentation

CONTROL DEVICE SLIDETRONIC HD

3.2 E1 Outdoor Unit PCB Abnormality E4 Actuation of Low Pressure Sensor E5 Compressor Motor Lock 3 52

NIDS Dust sensor ED-N-DS-1408

HOA1888 Series. Infrared Assemblies Wide Gap Transmissive Sensor. MICRO SWITCH Sensing and Control

Fire Control Panel FS5100

The Remote alarm Panel, TYPE RAPv2

Welcome to MultiSight TM Vision Sensor Hands-On Lab

Models NFPA 1221-A, NFPA 1221-B Public Safety DAS Annunciator Panel. Revision E 61117

An Ambient-Light-Ignoring Infrared Active Motion Detector

Interactive Fire Control Panel IFS7002 one signal loop Instruction Manual

OVEN INDUSTRIES, INC.

All-In-One Wireless Security System V1.0. Model #: MG-6060

FCR 05, FCR 07. Power factor correction controller. User and service manual

Homework 5: Theory of Operation and Hardware Design Narrative

Refrigeration Controller Operator s Manual (HRC) PO Box 6183 Kennewick, WA

Dryer Controller M720

All-In-One Wireless Security System V1.0. Model #: MG Reference and Installation Manual

Fire Control Panel FS4000

Optical Smoke Detector Heat Detector Manual Call Point Output Unit Isolator

User s Manual. TIGER S EYE E-Series Mark V Jockey. TIGERFLOW Systems, Inc Mint Way Dallas, Texas

Control Panel. 1.0 GENERAL SCOPE OF WORK Introduction... 2

A5364. Ionization Smoke Detector with Interconnect

Design of Microwave Anti-theft Alarm Based on Microcontroller

FIS30XXseries Gas sensor module SPECIFICATIONS

User Manual. Security Systems Security System L208

Digiplex System V2.14 / V2.2ACC. Control Panel Programming Guide

DS1486/DS1486P RAMified Watchdog Timekeeper

DEIF A/S. Technical Manual. Type EC-2 Engine Control Unit D. Technical Manual

DHM5150 Human Motion Sensor Module User Manual

Interactive Fire Control Panel IFS7002 four signal loops Instruction Manual

TrueAlarm Analog Sensing

Type 8001 PRIME MOVER CONTROLS INC. ALARM ANNUNCIATOR TYPE8001 FEATURES SB 8001B

User manual. ABB i-bus EIB. Zone Terminal MT/S Intelligent Installation System ABB STOTZ-KONTAKT

Using the HT46R48 in a Gas Water Heater Application

Sierra Series 900 Single & Dual Channel System. Instruction Manual

Elite 16D Version 16 Zone Controller Arrowhead Alarm Products Ltd. Operating Guide. Proudly Designed and Manufactured in New Zealand

Implementation of an Embedded Microcontroller-Based Intrusion Detection System

STATUS ALARM HISTORY ALARM RESET

AIRPORTS. CARECALLER PowerfulSecuritySolutionsForSeriousSecurityNeeds

Wiring the DCI using a Modifry Products Plug-n-Play Harness

COMMANDER 2000: MOST FREQUENTLY ASKED QUESTIONS

FEC400 Series. Installation Manual

Ei600ZW Z-Wave Module for 10 Year Smoke Sensor with Siren

E21.X.01.6C-05 Operating Manual EB2000 MC page 1. Operating manual EB2000 MC. for up to 9 sensor modules. Version 3.0

Helicycle Crew Alerting System (CAS)

Wallace & Tiernan Controllers & Analysers ChemTrim Disinfection Controller

CONsOlIDATOR 4 & 8. MulTI- C h ANNEl CONTROllERs. ConsoliDator 4 Model PD940 ConsoliDator 4 Features. ConsoliDator 8 Features.

Smart Grid Tables. Exploring the Electrical Infrastructure Grades 9-12

NDC-F16. Access Control Panel. Installation Manual

Passive Infrared Perimeter Monitoring Alarm System

F PC and AO OUTPUT BOARDS INSTRUCTION MANUAL. Blue-White. Industries, Ltd.

Remote flower watering and monitoring, part II (automatic garden watering)

CONTROL PANEL INTERFACE ACTIVATE THE GENERATOR DISPLAY INTERFACE MENUS. Control Panel USING THE AUTO/OFF/MANUAL SWITCH

REPEATER FS5200R INSTRUCTION MANUAL

Installation & Operation Manual March 2017 Rev. 4.1

HGM1750 Automatic Generator Module OPERATING MANUAL Smartgen Electronics

Dust sensor SM-PWM-01A SPECIFICATION. Product Name: Dust Sensor Model No. : SM-PWM-01A 1 / 12

TECHNICAL BULLETIN [ 1/9 ]

LMV52 Control. Specifications. Document No. LV February 3, Product Description. Sample Specification

ZLM4 OEM Technical Manual

Smoke Detector and Siren. Manual

Controller Specification Sheet

Danfoss gas detection units

MO n : 12JMC rév A

IRS2100 Tailgate Detector Installation Guide

RS485 MODBUS Module 8AI

HOKKIM INTEGRATED AMF CONTROL BOARD MANUAL FOR MODELS: HAMF-8 AND HAMF-4

DYGIZONE GJD910 Lighting Controller & Enunciator

HEXA PROGRAMMING: STREAMLINED SECTION PROGRAMMING

The supplier and installer of the system should be approved by the local civil defence authority.

- For Continuous Radon Monitoring (CRM) Systems - Ultra Low Power Requirement

Transcription:

Waking up sleeping tigers Gunther Zielosko 1. Basics 1.1. Real Time Clock BASIC- or TINY-Tiger with built-in Real Time Clock (RTC) have a few advantages over those without RTC. This CMOS clock with its very small power requirements can be buffered with a battery over a long period of time and keeps running the current time and date with quartz precision even when the Tiger's voltage supply (VCC) is switched off, provided it was set accurately at some point. However there is another advantage, modules with RTC have an alarm output at pin 38 (BASIC-Tiger) or pin 34 (TINY-Tiger). If a TINY-Tiger adapter from Wilke is used, the alarm output again is on its pin 38, enabling to work with the Plug & Play-Lab as usual. The alarm output can switch a process when reaching a programmable alarm time, even if the Tiger's voltage supply VCC has been switched off. It gets even more interesting if the alarm is used to switch the Tiger itself on and off, allowing i.e. an application to complete specific measuring tasks (measuring temperature), then switch itself off and back on after an hour, measure again etc. Such a way of working makes sense for battery operated applications, because the BASIC-Tiger alone requires a current of 45 100 ma depending on its equipment. Even the strongest battery would not last for long. If, however, power is only needed for a few seconds, battery operation is possible for many applications. We will deal with this problem more closely in the application note at hand. 1.2. The alarm pin s secrets in the Plug & Play-Lab Everything seems to be pretty clear in the device-driver manual under Real-Time-Clock (Version 5, p.359), you take a BASIC-Tiger with RTC, build a circuit with FET as described and already the BASIC-Tiger switches itself on and off with the rest of the circuit. Trying this with the Plug & Play-Lab results in an immediate failure, as there are some more things connected to this alarm output (Manual Installation & Hardware, Version 5, p.102). But what is it and why? We are talking about a driver SN74HC245 for the signal LED of the alarm output, which is supposed to show the logical level, just like with the other BASIC- Tiger connections of the Plug & Play-Lab. This works as long as the voltage supply is switched on. But if you connect a buffer battery to pin 45 of the BASIC-Tiger, which keeps the clock running during operation breaks, this driver IC becomes a problem, if you connect a pull-up resistor to the alarm pin against battery plus. The resistor is needed, because the RTC has an open drain output at the alarm output, thus producing no high level itself. Such an output is either high-drain or connected to ground. With battery buffering and switched off VCC the SN74HC245 of course has no operation voltage either. But the pull-up resistor nevertheless puts a voltage to IC input 6, a way of operating not permitted. Namely this voltage is misused as operation voltage for this IC via input protection circuits and with that for the entire Plug & Play-Lab and collapses somewhere (typically 0.9V). If the alarm pin info@wilke-technology.com http:\\www.wilke-technology.com Page 1 of 8

should be used as a real switching output for battery operation, changes will be necessary. A battery must be connected and the wiring for the alarm pin must be changed. Bending the alarm pin upwards, as described in the manual, is probably more for the rich considering the relatively high cost for a Tiger with RTC. The author recommends another way, the following figures show the original circuit and the changes (dotted lines) at the Plug & Play-Lab, a line on the underside is to be cut and a resistor must be soldered in: Fig. 1 Wiring of the alarm output in the Plug & Play-Lab with modifications (dotted lines) Fig. 2 IC U35 on the Plug-and-Play-Lab below the BASIC-Tiger (Version 1.1) info@wilke-technology.com http:\\www.wilke-technology.com Page 2 of 8

Fig. 3 The same spot viewed from below, line to be cut and resistor to be soldered in Although the alarm LED is constantly on with this small intervention, the alarm pin can nevertheless be used as a real switching output, even with battery buffering. Think about the necessary pull-up resistor at the alarm pin against battery-plus! The battery itself can be soldered directly next to the mode switch (PC-Mode) on two solder pads, ground immediately next to the switch, plus further inwards. 1.3. Programming of the RTC Much about this is explained sufficiently in the manuals. The Real Time Clock is actually only a seconds counter, when switching the operation voltage on it starts at 0. Suitable software (e.g. the program TIMECVT.TIG) produces date and time from that, the count of 0 is interpreted as the 1 st of January 1980, 00:00:00 o'clock. A RESET has no effect on the clock, but switching off the operation voltage for the BASIC-Tiger has. If, however, the clock is buffered, it will continue to count even after the operation voltage has been switched off. Setting the current time is somewhat problematic, but there is a number of practical recommendations for this, some of which have been dealt with in previous application notes. In our example program we will set a fictitious time, the 1 st of January 2001, 00:00:00 o'clock or alternatively take over the time from the PC, probably the simplest method, in order to get info@wilke-technology.com http:\\www.wilke-technology.com Page 3 of 8

the current time (see also application note 21). You can decide which option to use by simply changing the subroutine call. The commands used to set and read the time (secondary address #0) are PUT and GET. What about the alarm time? Just like the clock, the alarm time is also set with PUT (secondary address #1), but can t be read out anymore, i.e. a once set alarm time only has an effect on the hardware the alarm pin. The program must remember the set alarm time if necessary. Our goal is to switch the operation voltage of the BASIC-Tiger on and off by software. So the program must set the alarm time (somewhere in the future, alarm pin goes high) following its execution of tasks (i.e. measuring something) and with it give the command for auto shutdown. The command for switching on again then occurs when the alarm timing has been reached (alarm pin goes low), the operation voltage of the BASIC-Tiger is switched on and a power-on reset occurs. Next the initialisation of the RTC must follow and then the measuring task can be worked through again. As long as there is no alarm time set in the program, the alarm pin stays low. This said it follows that with this simple variation of switching on and off the setting of the alarm time must be the last command to be executed, so to speak the last official action of the program, causing the alarm to go high and the BASIC-Tiger to no longer receive a VCC with immediate effect. This signal should now switch the voltage supply of the Plug & Play-Lab or a battery operated regulating circuit in a suitable way. 2. Hardware 2.1. Plug & Play-Lab The Plug & Play-Lab is a true power hog. A switched operation is therefore probably best realised with a relay. The simplest option is to switch the power supply line in the low-voltage area, because there are hardly any hazards here. With respective care and expertise it is also possible to switch the 220 V line with a relay. Doing this you have to comply with the relevant regulations for dealing with high voltages (touch protection, fuse etc.). The relay connection itself is simple, the only thing worth noting is that we are dealing with a model for 3 5 V excitation voltage (it must already switch below 3 V, but cope continuously with 4.5 V). The switching contacts must be designed for the planned purpose (voltage, current). The collector resistors at both transistors must be fitted in such a way, that the relay surely switches, but should be of as high impedance as possible, because they have an influence on the current needed while sleeping (choose transistors with highest possible amplification!). Those who wish can save a lot of power using CMOS circuits here. If the Plug & Play-Lab should be switched by the BASIC-Tiger s real time clock, a battery buffering is required (see chapter 1.2). A well-proved circuit is shown in figure 4. Its function: Following the changes to the Plug & Play-Lab the battery is connected as described above. The arm with diode and resistor at the accumulator serves for recharging the accumulator from the Plug & Play-Lab supply voltage; the resistance has to fit the type of accumulator. info@wilke-technology.com http:\\www.wilke-technology.com Page 4 of 8

The relay gets its supply voltage via two diodes, either from the battery, if the Plug & Play-Lab is switched off or directly from the VCC of the Plug & Play-Lab, when it is switched on. The ground connection of the relay is switched by the alarm output of the BASIC-Tiger through two NPN-transistors (alarm pin low -> VCC on). The key button at the input is used to start the circuit for the first time, as there is no low level at the alarm pin of the BASIC-Tiger when VCC is switched off. Following this initialisation the software takes over switching the VCC on and off. The sliding switch in the battery version has a similar function (figure 5). On every switching on the switch inevitably goes over the position in which the VCC is switched on. Fig. 4 Switching the Plug & Play-Lab with the RTC alarm pin 2.2. Battery operation If a BASIC-Tiger application is running with rechargeable batteries, a control circuit becomes necessary. Clearly a standard regulator can be inserted (e.g. 7805), the disadvantage being, that batteries with a nominal voltage above 7.5 V are needed. A better option is a step-up regulator, as described in the application note Power supply concepts. In the following example a MAX751 with its special components (choke and Schottky diode) is used, which generates a regulated voltage of 5 V (up to 150 ma) from an unregulated 3.6 V. This regulator has an input (Pin 1), with which it can be set into sleep mode. Figure 5 shows the complete circuit, whose individual components are described as follows: The 3-step sliding switch with two levels has the positions 1 completely switched off, BASIC-Tiger neither receives VCC nor battery buffering, the rechargeable batteries can be charged separated from all components with common quick chargers, e.g. pulse charging. 2 VCC is permanently on (no switching possibility e.g. with alarm output); battery buffering is on; rechargeable batteries can only be recharged with (small) directcurrent (conservation charge). info@wilke-technology.com http:\\www.wilke-technology.com Page 5 of 8

3 VCC is only on when at least one of the three free inputs of the CD4012 is low, so e.g. the alarm output of the BASIC-Tiger or one of the two remote control inputs, the BASIC-Tiger application can be switched on and off here e.g. via radio or with movement sensors. The BASIC-Tiger s battery buffering is active. The IC CD4012 is a 2-way CMOS NAND gate with 4 inputs each. The first gate switches the regulator MAX751 active when one of the inputs is low, high on all inputs sets it into sleep mode, during which it only requires a few µa. This gate enables the regulator to switch on and off by 4 different signals: Pin 2 VCC permanently on, due to switch Pin 3 Pin 4 and 5 VCC is switched with the alarm output VCC is switched by outside components (remote control, radio, motion detector etc.) The switching regulator itself and its standard components were already described in the above-mentioned application note, so that we will not mention details here again. There is something new in our circuit, at the output there is another PNP transistor in the VCCline. As can be seen, with a normal circuit for the MAX751 the battery voltage can still get to the consumer (here the BASIC-Tiger) via inductivity and the Schottky diode. So the battery is loaded even when the regulator is switched off and the BASIC-Tiger is operated with an inadmissible ca. 3V! Now when all inputs of the first gate of the CD4012 are high, the PNP transistor at the output completely switches off not only the switching regulator itself, but also the residual voltage coming from the battery via inductivity and Schottky diode. For this reason the sensor input pin 7 of the MAX751 was no longer connected with pin 8, as in the standard circuit, but with the collector of the transistor switch, so its collector emitter voltage gets compensated and we get load independent the correct 5V for VCC at the output. The PNP transistor should be a highly amplified type with low collector emitter voltage, which can put through the full current of ca. 100 ma without a large voltage drop. Fig. 5 A battery regulation circuit with comfortable control possibilities info@wilke-technology.com http:\\www.wilke-technology.com Page 6 of 8

The author has built up and tested such a universal battery power supply unit (Figure 6) for general usage with the BASIC-Tiger as part of the module project (Tiger cookbook p. 265). The circuit is rather robust and guarantees with e.g. NiMH cells a very long battery operation of the BASIC-Tiger. Fig. 6 Battery module with sleep and wake circuit 3. Software The program WECKEN01.TIG demonstrates the possibilities of time controlled switching on/off a measuring installation. For comfortable control of the switching times a real clock operation with date and time is provided. For simpler tasks without a direct time reference (e.g. measuring once per hour) the internal seconds counter of the RTC is obviously sufficient. Operation with real time requires its one-time installation, meaning the time is set to 01-01-2001 00:00:00 a.m. or to the actual time using the PC program TICO.EXE (see application note PC time in BASIC-Tiger ). For both one subroutine call is needed: CALL Time_Set (Set time to 01-01-2001 00:00:00 a.m. standard setting) or CALL PC_Time (take over actual PC-time). The program WECKEN01.TIG starts by initialising the RTC. If a BASIC-Tiger with RTC is identified, it is verified whether the BASIC-Tiger has been connected to VCC or rather battery buffering for the first time. For the sake of simplicity this is done here by testing whether the date still contains the year 1980. We remember that a restarting the RTC sets it to 0. For the time conversion software this means that it is 1 January 1980 00:00:00 a.m. In this case the program sets the time to 01-01-2001 00:00:00 a.m. or requests a transmission of the actual time from the PC. The latter means a serial connection of SER1 to the PC must be established, where the program TICO.EXE is started and the time is transmitted to the BASIC-Tiger by pressing the button SENDEN. If necessary the serial parameters of both partners have to be matched for correct function (see above mentioned application note). Once the time as been taken over, it will appear on the LC display a short while later. Now follows a jump to the subroutine Messen which does not contain much as yet, simply a measurement of the backup battery voltage. For this the pin analog GND (44) is connected to info@wilke-technology.com http:\\www.wilke-technology.com Page 7 of 8

GND and the pin A/D reference voltage in (43) to VCC. We are using the analog input 0 of the BASIC-Tiger for measurement, which is connected to the battery s terminal plus via a resistor of as high impedance as possible (several 100 kω to 1 MΩ). Why not direct? Because just as described for the LED driver in the Plug & Play-Lab above, switching off VCC would result in an unwanted voltage supply of the entire BASIC-Tiger from the battery via the analog measuring input and its protective circuits, making it impossible to switch it off! This, by the way, is a principle, which must always be observed for sleep mode of the BASIC- Tiger. Naturally this series resistor influences the result of the measurement, as the analog inputs have an input resistance of ca. 1 MΩ. One way of compensating this would be a calculative correction. First put the rather exact VCC to the analog input and observe the shown result. You can trim the display to 5000 mv by changing the calculation formula. A correct solution would be a low resistive connection of the battery voltage to the analog input via the contact of a DIL relay, which would be switched on directly via VCC. If the BASIC- Tiger is switched off, the battery is not connected to the measuring input. The measured result is displayed together with the time on the LC display and all this is transmitted serially, too. Likewise displayed are time and alarm time in Tiger format. The rest of the subroutine is determined by you. When everything is done a new alarm time is calculated, here each time the seconds reach 00. The RTC counter is read and the alarm time is newly set to this RTC time plus 50 seconds. With this the BASIC-Tiger is always switched on shortly before the full minute and a measurement is done every minute. You can of course go your own way and provide different intervals or rather different criteria for the alarm time. By handing over the alarm time to the RTC the alarm output inevitably switches to high and therefore switches everything off. This must therefore always be the last command during the course of your program. All that happens next is probably not executed, unless the charge of the VCC buffer capacitors lasts another few milliseconds. Once the alarm time has been reached the alarm pin switches back to low, everything is switched on again and the cycle starts over. A little joke, but with a serious background: Take care when calculating and setting the alarm time that you re still alive to see it switch on! The hard- and software presented allows for experiments beyond the pure time control, even with BASIC-Tigers without built in RTC. With the already hinted option to switch on the battery supply unit remote controlled via an input of the CD4012, the circuit can be used for entirely different purposes as well. You can, for example, allow a motion detector to switch on the power supply with a relatively short low pulse. The BASIC-Tiger is activated and a program starts running. This program first puts another pin of the CD4012 to low with a BASIC-Tiger output, which maintains the operation voltage, so that the original start signal is no longer required and may return to high. Once the program has run through the signal for holding the operation voltage is switched off and the BASIC-Tiger is without current. A new remote signal restarts the sequence of events. Seen in this light the presented technology can also be favourably used for BASIC-Tigers without RTC. Have fun with the new possibilities! info@wilke-technology.com http:\\www.wilke-technology.com Page 8 of 8