Application Note. Traffic Signal Controller AN-CM-231

Similar documents
Application Note. Basketball Arcade Machine AN-CM-234

Application Note. Serial Line Coding Converters AN-CM-264

Application Note. RTC Binary Counter An Introduction AN-CM-253

Obsolete Product(s) - Obsolete Product(s)

STEVAL-CCM003V1. Graphic panel with ZigBee features based on the STM32 and SPZBE260 module. Features. Description

STEVAL-ICB004V1. Advanced resistive touchscreen controller demonstration board based on the STMPE811. Features. Description

STEVAL-IHM043V1. 6-step BLDC sensorless driver board based on the STM32F051 and L6234. Features. Description

STEVAL-CCH002V2. HDMI and video switches demonstration board. Features. Description

STEVAL-ILL015V1. High brightness RGB LED array with LED error detection based on the STP24DP05 and STM32. Features. Description

STEVAL-ILL029V1. Front panel demonstration board based on the STLED325 and STM8S. Features. Description

STEVAL-IME002V1. Multi-lead electrocardiogram (ECG) and body impedance demonstration board. Features. Description

Clarke and Inverse ClarkeTransformations Hardware Implementation. User Guide

STEVAL-IHM024V W 3-phase inverter using the L6390 and STGDL6NC60DI for vector control. Features. Applications. Description

Faculty of Electrical & Electronics Engineering BEE3233 Electronics System Design. Laboratory 3: Finite State Machine (FSM)

Side Street. Traffic Sensor. Main Street. Walk Button. Traffic Lights

AN2421 Application note

Multi-channel LED driver with integrated boost controller for medium, large LCD panel backlight based on LED7708 and STM32F103C6T6A

PRODUCT INFORMATION LETTER

STEVAL-ILH004V1. 70 W electronic ballast for metal halide lamp (HID) based on the L6382D5 and ST7FLITE49K2. Features. Description

STEVAL-IHM021V W, 3-phase inverter based on the L6390 and UltraFASTmesh MOSFET for speed FOC of 3-phase PMSM motor drives. Features.

Experiment # 12. Traffic Light Controller

EVALPM8803-FWD. EVALPM8803-FWD: IEEE802.3at compliant demonstration kit with synchronous active clamp forward PoE converter. Features.

ROBOT-M24LR16E-A. Evaluation board for the M24LR16E-R dual interface EEPROM. Features. Description

Application Note PG001: Using 36-Channel Logic Analyzer and 36-Channel Digital Pattern Generator for testing a 32-Bit ALU

Obsolete Product(s) - Obsolete Product(s)

STEVAL-ILL037V1. Demonstration board for the HVLED805 IC for LED power supply. Features. Description

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Tajana Simunic Rosing. Source: Vahid, Katz

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

STEVAL-IHM038V1. BLDC ceiling fan controller based on the STM32 and SLLIMM-nano. Description. Features

Mask Set Errata for Mask 1M07J

IEC compliant smart meter system for AMI applications based on STM32, ST7570 PLM, and STPMC1/STPMS1 chipset

STEVAL-ISB008V1. Standalone USB Li-Ion battery charger demonstration board based on the STw4102 and STM32F103C6. Features.

Laboratory Exercise 7

STEVAL-IHM025V1. 1 kw 3-phase motor control demonstration board featuring the IGBT SLLIMM STGIPL14K60. Features. Description

Obsolete Product(s) - Obsolete Product(s)

GM60028H. DisplayPort transmitter. Features. Applications

Obsolete Product(s) - Obsolete Product(s)

UM0534 User manual. STEVAL-MKI014V1 demonstration kit for the LIS344ALH. Introduction

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

Combination Solder Pad for Single-chip LEDs with P-LCC-2 and P-LCC-4 Housings Application Note

HCS08 SG Family Background Debug Mode Entry

2 x 58 W high frequency ballast for T8 fluorescent tubes based on L6562A, L6569, and STL11NM60N in PowerFlat HV package

ECE 372 Microcontroller Design

STEVAL-MKI126V2. MEMS microphone system evaluation board based on the STA321MPL and MP34DB01. Description. Features

STEVAL-ILH005V W electronic ballast for HID lamps based on the L6562A and ST7LITE39F2. Features. Description

Obsolete Product(s) - Obsolete Product(s)

L7208. Portable consumer electronics spindle and VCM motor controller. General features. Spindle driver. Description. VCM driver.

You will be first asked to demonstrate regular operation with default values. You will be asked to reprogram your time values and continue operation

GM68020H. DisplayPort receiver. Features. Applications

STEVAL-IKR001V7D. Sub Ghz transceiver daughterboard with power amplifier based on the SPIRIT1. Features. Description

Using the Synchronized Pulse-Width Modulation etpu Function by:

Main components Proximity and ambient light sensing (ALS) module

Debugging Memory Interfaces using Visual Trigger on Tektronix Oscilloscopes

SPC564A80CAL176 SPC564A70CAL176

M24SR-DISCOVERY. Discovery kit for the M24SR series Dynamic NFC/RFID tag. Features

STEVAL-ILL043V1. High end, 75 W high power factor flyback LED driver based on the L6562A with two dimmable strings. Features.

Chapter 5 Synchronous Sequential Logic

BUSES IN COMPUTER ARCHITECTURE

Main components Narrow-band OFDM power line networking PRIME compliant system-on-chip

Order code Package Connection. SPDC400FC12M0.60 Open frame Comb. October 2007 Rev 1 1/9

Obsolete Product(s) - Obsolete Product(s)

STEVAL-IHM008V1. BLDC & AC motor control Power board SEMITOP 2 1kW. Features. Applications

This document describes a program for 7-segment LED display (dynamic lighting).

March 2012 Doc ID Rev 1 1/4

STEVAL-MKI126V3. STSmartVoice demonstration board based on MP34DT01. Description. Features

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

Laboratory Exercise 7

Using the HT1628 for Washing Machine Panel Display

AN3075 Application note

LAX_x Logic Analyzer

Order code Marking Package Packing. STA5630TR STA5630 VFQFPN32 Tape and reel STA5630ATR (1) September 2013 Doc ID Rev 4 1/8

California State University, Bakersfield Computer & Electrical Engineering & Computer Science ECE 3220: Digital Design with VHDL Laboratory 7

UG0651 User Guide. Scaler. February2018

STEVAL-CCA043V1. 25 Watt mono BTL class-d audio amplifier demonstration board based on the TDA7491MV. Features. Description

Universidad Carlos III de Madrid Digital Electronics Exercises

Description. Table 1. Device summary. Order codes Temperature range [ C] Package Packing. LPS2HBTR -30 to +105 HLGA - 10L

STEVAL-IHT005V2. Demonstration board with full 3.3 V ACS/Triac control using the STM32F100. Description. Features

PLTW Engineering Digital Electronics Course Outline

Digital Electronics Course Outline

ST10F273M Errata sheet

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Logic Analyzer Triggering Techniques to Capture Elusive Problems

STEVAL-IFN003V1. PMSM FOC motor driver based on the L6230 and STM32F103. Features. Description

STA3005. Dual-IF AM/FM digital radio receiver. Feature summary. Order codes

Chapter 11 State Machine Design

CPS311 Lecture: Sequential Circuits

FLIP-FLOPS AND RELATED DEVICES

TV Character Generator

STEVAL-ISA121V1. Wide range single-output demonstration board based on the VIPER37LE. Features. Description

Obsolete Product(s) - Obsolete Product(s) UM0223 User manual STEVAL-IFS001V1 evaluation kit with MEMS Introduction

Module 4: Traffic Signal Design Lesson 1: Traffic Signal (Arduino) Control System Laboratory Exercise Grade 6-8

Altera s Max+plus II Tutorial

SignalTap Plus System Analyzer

IMPORTANT NOTICE. Company name - STMicroelectronics NV is replaced with ST-NXP Wireless.

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

STEVAL-ILL019V1. 32 W offline RGGB LED driver with individual LED channel brightness regulation. Features. Description

AN555 APPLICATION NOTE AUTOMOTIVE PROTECTION WITH THE RBOxx SERIES

NS8050U MICROWIRE PLUSTM Interface

EVAL-RHF1009A. EVAL-RHF1009A product evaluation board. Description. Features

2 Sequential Circuits

Transcription:

Application Note AN-CM-231 Abstract This application note describes how to implement a traffic controller that can manage traffic passing through the intersection of a busy main street and a lightly used side street using a Dialog GreenPAK SLG46537. This application note comes complete with design files which can be found in the References section.

Contents Abstract... 1 Contents... 2 Figures... 2 1 Terms and Definitions... 3 2 References... 3 3 Introduction... 4 4 Requirements... 4 5 Implementation Scheme... 5 6 Implementation using GreenPAK... 7 7 Results... 9 8 Conclusion... 10 Revision History... 11 Figures Figure 1: Timing Requirements of The Traffic Control System... 4 Figure 2. System Block Diagram... 5 Figure 3. Finite State Machine for The System... 6 Figure 4. Implementation in GreenPAK Designer... 7 Figure 5 The Configuration of The ASM Block... 8 Figure 6: The Output RAM Configuration of The ASM Block... 8 Figure 7: Behavior of The System When Side Vehicles are Always Present... 9 Figure 8: Behavior of The System When Few Side Vehicles are Present... 10 CFR0014 2 of 12 2018 Dialog Semiconductor

1 Terms and Definitions ASM CMIC FSM LED Asynchronous state machine Configurable mixed-signal integrated circuit Finite state machine Light-emitting diode 2 References For related documents and software, please visit: https://www.dialog-semiconductor.com/configurable-mixed-signal. Download our free GreenPAK Designer software [1] to open the.gp files [2] and view the proposed circuit design. Use the GreenPAK development tools [3] to freeze the design into your own customized IC in a matter of minutes. Dialog Semiconductor provides a complete library of application notes [4] featuring design examples as well as explanations of features and blocks within the Dialog IC. [1] GreenPAK Designer Software, Software Download and User Guide, Dialog Semiconductor [2] AN-CM-231.gp, GreenPAK Design File, Dialog Semiconductor [3] GreenPAK Development Tools, GreenPAK Development Tools Webpage, Dialog Semiconductor [4] GreenPAK Application Notes, GreenPAK Application Notes Webpage, Dialog Semiconductor CFR0014 3 of 12 2018 Dialog Semiconductor

3 Introduction There often exist scenarios where flexible traffic signal sequences are required for the coordination of traffic through the intersection of a busy street and a lightly used side street. In such situations, the sequences can be controlled using different timers and a traffic detection signal from the side street. These requirements can be met through conventional methods e.g. using building blocks from discrete electronic components or microcontrollers. However, the concept of configurable mixed signal integrated circuits (CMIC) provides an attractive alternative considering its design flexibility, low cost, development time, and convenience. Many regions and countries are progressing to more complicated grids that can accommodate a greater number of variables to control traffic lights. However, many traffic lights still utilize fixed time control, such as electro-mechanical signal controllers. The purpose of this application note is to show how one can use a GreenPAK's Asynchronous State Machine (ASM) to develop a simplified traffic signal controller to replace a fixed-time controller. This traffic signal regulates traffic passing through the intersection of a busy main street and a lightly used side street. The controller would control the sequence of two traffic signals, which are installed at the main and side street. A sensor signal, detecting the presence of side street traffic, is fed to the controller that, in conjunction with two timers, would control the sequence of the traffic signals. A finite state machine (FSM) scheme is developed that ensures the requirements of the traffic signals sequence are met. The controller logic is implemented using a dialog GreenPAK SLG46537 configurable mixed signal IC. 4 Requirements Figure 1: Timing Requirements of The Traffic Control System Consider a traffic scenario with the timing requirements of traffic signals from the main and side street, as shown in Figure 1. The system has six states, and will move from one state to the other depending upon certain predefined conditions. These conditions are based on three timers; a long timer TL =25 s, a short timer TS = 4 s and a transitory timer Tt = 1 s. Additionally, the digital input from side traffic detection sensor is required. A thorough description of each of the six system states and the state transition control signals is given below: In the first state, the main signal is green while the side signal is red. The system will stay in this state until the long timer (TL = 25 s) expires or as long as there is no vehicle on the side street. If a vehicle CFR0014 4 of 12 2018 Dialog Semiconductor

is present on the side street after the expiration of the long timer, the system will undergo a state change moving to the second state. In the second state, the main signal turns yellow while the side signal remains red for the duration of the short timer (TS = 4 s). After 4 seconds the system moves into the third state. In the third state, the main signal changes to red and the side signal remains red for the duration of transitory timer (Tt =1 s). After 1 second, the system moves to the fourth state. During the fourth state the main signal is red while the side signal turns to green. The system will stay in this state until the expiry of long timer (TL = 25 s) and there are some vehicles present on the side street. As soon as the long timer expires, or there is no vehicle on the side street, the system will transition into the fifth state. During the fifth state the main signal is red while the side signal is yellow for the duration of the short timer (TS = 4 s). After 4 seconds the system will move into the sixth state. In the sixth and the last state of the system, both the main and side signals are red for the period of the transitory timer (Tt =1 s). After that, the system goes back to the first state and starts over again. The third and sixth states provide a buffer state where both (main and side) signals stay red for a brief period of time during changeover. State 3 and 6 are similar and may seem redundant, however this allows the implementation of the proposed scheme to be simple. 5 Implementation Scheme A complete block diagram of the system is shown in Figure 2. This figure illustrates the overall structure, function of the system, and lists all the required inputs and outputs. The proposed traffic signal controller has been built around the finite state machine (FSM) concept. The timing requirements described above are translated into a six state FSM as depicted in Figure 3. Figure 2. System Block Diagram CFR0014 5 of 12 2018 Dialog Semiconductor

Figure 3. Finite State Machine for The System The state-change variables shown above are: Vs A vehicle is present on the side street TL The 25 s timer (long timer) is on TS The 4 s timer (short timer) is on Tt The 1 s timer (transitory timer) is on The Dialog GreenPAK CMIC SLG46537 has been chosen for the implementation of the FSM. This highly versatile device allows a wide variety of mixed-signal functions to be designed within a very small, low power single integrated circuit. Furthermore, the IC contains an ASM macrocell designed to allow the user to create state machines having up to 8 states. The user has the flexibility to define the number of states, the state transitions, and the input signals that will cause transitions from one state to another state. CFR0014 6 of 12 2018 Dialog Semiconductor

6 Implementation using GreenPAK The FSM developed for the operation of the traffic controller is implemented using SLG46537 GreenPAK. In the GreenPak Designer the scheme is implemented as shown in Figure 4. Figure 4. Implementation in GreenPAK Designer PIN3 and PIN4 are configured as digital input pins; PIN3 is connected to the side street vehicle sensor input and PIN4 is used for system reset. PINs 5, 6, 7, 14, 15 and 16 are configured as output pins. PINs 5, 6 and 7 are passed to the side signal s red, yellow and green light drivers respectively. PINs 14, 15 and 16 are passed to the main signal s green, yellow and red-light drivers respectively. This completes the I/O configuration of the scheme. At the heart of the schematic lies the ASM block. The inputs of the ASM block, which regulate state changes, are obtained from combinatorial logic using three counter/delay blocks (TS, TL and TT) and the input from the side vehicle sensor. The combinatorial logic is further qualified using the state information fed back to LUTs. State information of first, second, fourth and fifth states is obtained using combinations of B0 and B1 outputs of the ASM block. The combinations of B0 and B1 corresponding to the first, second, fourth and fifth states are (B0 = 0, B1 = 0), (B0 = 1, B1 = 0), (B0 = 1, B1 = 1) and (B0 = 0, B1 = 1) respectively. The states information of the 3rd and 6th states is obtained directly applying the AND operator to the main red and side red signals. Feeding these states information to the combinatorial logic ensures that only the relevant timers are triggered. Other outputs of the ASM block are assigned to the main traffic lights (main red, main yellow, and main green) and side traffic lights (side red, side yellow, and side green). CFR0014 7 of 12 2018 Dialog Semiconductor

Figure 5 The Configuration of The ASM Block The configuration of the ASM block is shown in Figure 5 and Figure 6. The states shown in Figure 5, correspond to the defined first, second, third, fourth, fifth and sixth states shown in Figure 3. The output RAM configuration of the ASM block is shown in Figure 6. Figure 6: The Output RAM Configuration of The ASM Block The timers TL, TS and TT are implemented using the counter/delay blocks CNT1/DLY1, CNT2/DLY2 and CNT3/DLY3 respectively. All these three blocks are configured in delay mode with rising edge detection. As shown in Figure 3, the first and fourth states trigger TL, the second and fifth states trigger TS, and the third and sixth states trigger TT using combinatorial logic. As the delay timers are triggered, their CFR0014 8 of 12 2018 Dialog Semiconductor

outputs remain 0 until the configured delay completes its duration. In this way the TL, TS and TT signals are directly obtained from the outputs of CNT1/DLY1, CNT2/DLY2 and CNT3/DLY3 blocks. TS is directly fed to the second and fifth states transition input while TT is passed to the third and sixth states transition inputs. TL, on the other hand, is passed to combinatorial logic blocks (LUTs) giving the signals TL Vs and TL + VS which are fed to the transition inputs of the first and 4th states respectively. This completes the implementation of the FSM using the GreenPAK designer. 7 Results For testing purposes, the design is emulated on the GreenPAK Universal Development Board using the SLG46537. The traffic lights signals (equated to digital output pins 5, 6, 7, 14, 15 and 16) are used to activate the LEDs that are already available on the GreenPAK Development Board to visually observe the behavior of the FSM. In order to fully investigate the dynamic behavior of the developed scheme, we used an Arduino UNO board to interface with the SLG46537. The Arduino board provides the vehicle detection sensor input and system reset signals to the scheme while it gets the traffic light signals from the system. The Arduino board is used as a multi-channel logic analyzer to record and graphically show the temporal functioning of the system. Two scenarios that capture the general behavior of the system are developed and tested. Figure 7 shows the first scenario of the scheme when some vehicles are always present on the side street. When the reset signal is asserted the system starts in the first state with only main green and side red signals on and all the other signals turned off. Since side vehicle are always present the next transition into the second state follows 25 seconds later turning on the main yellow and side red signals. Four seconds later the ASM enters the third state where the main red and side red signals remain on for 1 second. The system then enters the fourth state with main red and side green signals turned on. Since the side vehicles are always present, the next transition takes place 25 seconds later moving the ASM to the fifth state. The transition from fifth to sixth state occurs 4 seconds later as TS expires. The system stays in the sixth state for the duration of 1 second before the ASM reenters the first state. Figure 7: Behavior of The System When Side Vehicles are Always Present Figure 8 shows the behavior of the scheme in the second scenario, when a few side vehicles are present at the traffic signal. The behavior of the system is found to be functioning as designed. The system starts in the first state with only main green and side red signals on and all the other signals CFR0014 9 of 12 2018 Dialog Semiconductor

to be off 25 seconds later the next transition follows since there is a side vehicle present. The main yellow and side red signals are turned on in the second state. After 4 seconds, the ASM enters the third state with main red and side red signals turned on. The system stays in the third state for 1 second and then moves to the fourth state keeping main red and side green on. As soon as the vehicle sensor input goes low (when all the side vehicles have passed), the system enters the fifth state where main red and side yellow are on. After staying in the fifth state for four seconds the system moves to the sixth state turning both main and side signals red. These signals remain red for 1 second before the ASM re-enters the first state. Figure 8: Behavior of The System When Few Side Vehicles are Present Actual scenarios would be based on a combination of these two described scenarios which are found to be working correctly. 8 Conclusion In this app note a traffic controller that can manage traffic passing through the intersection of a busy main street and a lightly used side street was implemented using a Dialog GreenPAK SLG46537. The scheme is based on an ASM that ensures the traffic signals sequence requirements are met. The behavior of the design was verified by several LEDs and an Arduino UNO microcontroller. The results verified that the design objectives were met. The key advantage of using the Dialog product is to obviate the need of discrete electronic components and microcontroller to build the same system. The existing design can be extended by adding an input signal from a push button for passage of pedestrian looking to cross the busy street. The signal can be passed to an OR gate along with signal from the side vehicle input sensor to trigger the first state change. However, to ensure safety of the pedestrian now there is an additional requirement of some minimum time to be spent in the fourth state. This can easily be accomplished using another timer block. The green and red signals on the side street traffic signal can now also be fed to the side pedestrian signals on the side street. CFR0014 10 of 12 2018 Dialog Semiconductor

Revision History Revision Date Description 1.0 13-Mar-2018 Initial Version CFR0014 11 of 12 2018 Dialog Semiconductor

Status Definitions Status DRAFT APPROVED or unmarked Definition The content of this document is under review and subject to formal approval, which may result in modifications or additions. The content of this document has been approved for publication. Disclaimer Information in this document is believed to be accurate and reliable. However, Dialog Semiconductor does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information. Dialog Semiconductor furthermore takes no responsibility whatsoever for the content in this document if provided by any information source outside of Dialog Semiconductor. Dialog Semiconductor reserves the right to change without notice the information published in this document, including without limitation the specification and the design of the related semiconductor products, software and applications. Applications, software, and semiconductor products described in this document are for illustrative purposes only. Dialog Semiconductor makes no representation or warranty that such applications, software and semiconductor products will be suitable for the specified use without further testing or modification. Unless otherwise agreed in writing, such testing or modification is the sole responsibility of the customer and Dialog Semiconductor excludes all liability in this respect. Customer notes that nothing in this document may be construed as a license for customer to use the Dialog Semiconductor products, software and applications referred to in this document. Such license must be separately sought by customer with Dialog Semiconductor. All use of Dialog Semiconductor products, software and applications referred to in this document are subject to Dialog Semiconductor s Standard Terms and Conditions of Sale, available on the company website (www.dialog-semiconductor.com) unless otherwise stated. Dialog and the Dialog logo are trademarks of Dialog Semiconductor plc or its subsidiaries. All other product or service names are the property of their respective owners. 2018 Dialog Semiconductor. All rights reserved. Contacting Dialog Semiconductor United Kingdom (Headquarters) Dialog Semiconductor (UK) LTD Phone: +44 1793 757700 Germany Dialog Semiconductor GmbH Phone: +49 7021 805-0 The Netherlands Dialog Semiconductor B.V. Phone: +31 73 640 8822 Email: enquiry@diasemi.com North America Dialog Semiconductor Inc. Phone: +1 408 845 8500 Japan Dialog Semiconductor K. K. Phone: +81 3 5769 5100 Taiwan Dialog Semiconductor Taiwan Phone: +886 281 786 222 Web site: www.dialog-semiconductor.com Hong Kong Dialog Semiconductor Hong Kong Phone: +852 2607 4271 Korea Dialog Semiconductor Korea Phone: +82 2 3469 8200 China (Shenzhen) Dialog Semiconductor China Phone: +86 755 2981 3669 China (Shanghai) Dialog Semiconductor China Phone: +86 21 5424 9058 CFR0014 12 of 12 2018 Dialog Semiconductor