Application Note. Basketball Arcade Machine AN-CM-234

Similar documents
Application Note. Traffic Signal Controller AN-CM-231

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

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

Obsolete Product(s) - Obsolete Product(s)

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

STEVAL-IHM043V1. 6-step BLDC sensorless driver board based on the STM32F051 and L6234. 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.

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

STW High voltage fast-switching NPN power transistor. Features. Application. Description

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

Obsolete Product(s) - Obsolete Product(s)

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

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

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

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

Obsolete Product(s) - Obsolete Product(s)

Logic Analyzer Triggering Techniques to Capture Elusive Problems

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

Triple RTD. On-board Digital Signal Processor. Linearization RTDs 20 Hz averaged outputs 16-bit precision comparator function.

March 2012 Doc ID Rev 1 1/4

Obsolete Product(s) - Obsolete Product(s)

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

AN3075 Application note

BUL128 HIGH VOLTAGE FAST-SWITCHING NPN POWER TRANSISTOR

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

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

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

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

Chapter 5 Flip-Flops and Related Devices

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

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

Main components Proximity and ambient light sensing (ALS) module

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

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

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

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

Symbol Parameter Value Unit V CES Collector-Emitter Voltage (V BE = 0) 700 V V CEO Collector-Emitter Voltage (I B = 0) 400 V Emitter-Base Voltage

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

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

AN2421 Application note

Digital (5hz to 500 Khz) Frequency-Meter

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

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

Technical Article. TD350 IGBT driver IC including advanced control and protection functions. Introduction. Device description

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

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

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

16-BIT LOAD CELL/DUAL STATUS INPUT

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

Mask Set Errata for Mask 1M07J

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

Main components Proximity and ambient light sensing (ALS) module

AN555 APPLICATION NOTE AUTOMOTIVE PROTECTION WITH THE RBOxx SERIES

Embedded Systems Lab. Dynamic Traffic and Street Lights Controller with Non-Motorized User Detection

TA0311 TECHNICAL ARTICLE High Temperature Electronics 1 Introduction 2 Why the need for high-temperature semiconductors?

ST10F273M Errata sheet

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

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Obsolete Product(s) - Obsolete Product(s)

Obsolete Product(s) - Obsolete Product(s)

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

STEVAL-TDR007V1. 3 stage RF power amplifier demonstration board using: PD57002-E, PD57018-E, 2 x PD57060-E. Features. Description

HCF4054B 4 SEGMENT LIQUID CRYSTAL DISPLAY DRIVER WITH STROBED LATCH FUNCTION

VT5365. Single-chip optical mouse sensor for wireless applications. Features. Applications. Technical specifications. Description.

Chapter 11 State Machine Design

Computer Systems Architecture

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

PRODUCT INFORMATION LETTER

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

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

16 Stage Bi-Directional LED Sequencer

TIL311 HEXADECIMAL DISPLAY WITH LOGIC

HCF40193B PRESETTABLE UP/DOWN COUNTERS (DUAL CLOCK WITH RESET) BINARY TYPE

ECE 372 Microcontroller Design

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

STANC0. Stereo HD-PA digitally programmable active noise cancelling audio engine. Features. System. Input and output.

Special Applications Modules

Operating Manual Ver.1.1

GM60028H. DisplayPort transmitter. Features. Applications

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

UG0682 User Guide. Pattern Generator. February 2018

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

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

STEVAL-IHM034V2. Dual motor control and PFC evaluation board featuring the STM32F103 and STGIPS20C60. Features

Arc Detecting and Protection System

PRODUCT INFORMATION LETTER

ET BLU MIX RX-Condo-3

Obsolete Product(s) - Obsolete Product(s)

IoT Toolbox Mobile Application User Manual

BUL1203EFP HIGH VOLTAGE FAST-SWITCHING NPN POWER TRANSISTOR

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

PHYS 3322 Modern Laboratory Methods I Digital Devices

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

Chapter 3: Sequential Logic Systems

GM68020H. DisplayPort receiver. Features. Applications

UG0651 User Guide. Scaler. February2018

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

Basics Of Digital Logic And Data Representation

STEVAL-SPBT2ATV2. USB Dongle for the Bluetooth class 2 SPBT2532C2.AT module. Features. Description

Keyboard Controlled Scoreboard

Transcription:

Application Note AN-CM-234 Abstract This application note describes how to create the electronic components for a simple basketball arcade machine using a pair of Dialog GreenPAK SLG46537's. 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 Core Hardware... 4 5 State Transitions... 5 6 Main Routine... 5 7 GreenPAK Main Routine... 6 8 Coin Detection... 9 9 Ticket Dispenser... 9 10 Conclusion... 11 Revision History... 12 Figures Figure 1: System Diagram Schematic... 5 Figure 2. Stage 1 Section... 7 Figure 3. GP2Y0A60SZLF Voltage/Distance Curve... 7 Figure 4. Stage 2 Section... 8 Figure 5. Stage 3 Section... 8 Figure 6: The Change and Control between the UP/DOWN Functions as well as the Signals that Drive CLK... 10 Figure 7: The DFFs That are Used for Counter, Each One with the Necessary LUTs for Its Correct Operation... 10 Figure 8: Motor_On is High When Any of the DFFs are High... 11 CFR0014 2 of 13 2018 Dialog Semiconductor

1 Terms and Definitions ASM CMOS LED Asynchronous state machine Complementary mixed oxide semiconductor 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-234.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 13 2018 Dialog Semiconductor

3 Introduction In this application note, a pair of Dialog GreenPAK SLG46537 s is used to create the electronic components for a simple basketball arcade machine. These machines tally baskets scored within a certain amount of time. They can often be found in arcades like Chuck E. Cheese s or Dave & Buster s. Basketball arcade machines exist in both free-to-play and pay-to-play varieties, and may or may not dispense tickets based on the number of baskets scored. We will ignore these extra options, and focus on the main elements that the machine should have. 4 Core Hardware The core function of the system is sensing the ball going through the basket, so we need a proximity sensor well suited for small distances. A good pick for this job is the GP2Y0A60SZLF analog distance sensor, which has low power consumption and has been used with other GreenPAK app notes. We are also going to need a display. Knowing that the intended use is for entertainment, and having a budget in mind, we selected two 7-segment displays of 6.5 inches in size. These parts are a couple of YSD-1100AR7B-15 units from SparkFun electronics. The YSD-1100AR7B-15 parts need a minimum voltage of 12 V to work, so driving them directly with a GreenPAK is not a good idea. Instead, we are going to drive the displays using two CD4026 ICs, which are used for driving 7-segment LED displays with voltages up to 18 V. We are also going to need a buzzer to emit the sounds of the game. Luckily, a simple 5 V buzzer is sufficient for this application, as most of them have decent volume. Finally, to help the TTL signals from the GreenPAK drive the CMOS inputs of the CD4026 ICs, we need to drive the 12 V supply of the ICs. An excellent way to shift the voltage levels is using a MOSFET and a Pull UP resistor like in the Schematic 1. (A PDF of it is included). CFR0014 4 of 13 2018 Dialog Semiconductor

Figure 1: System Diagram Schematic 5 State Transitions The arcade machine should be able to adhere to the following routine: State 0 - The arcade is powered on and the score display shows the last game s score. State 1 - The start button is pressed, the score display is cleared, and beeping signals the start of the game. State 2 - This is the main game stage. It should last 60 seconds, receiving the signals that a ball has fallen inside the basket. State 3 - A loud beep signals game over and the score flashes before settling in a continuous fashion. State 0 - Repeat. This main routine has the core functionalities of a basketball arcade machine focused on personal use. 6 Main Routine In this section we are going to specify what kind of processes are going on in each of the stages. Stage 0 The asynchronous state machine (ASM) is in state 0 waiting for the start button to be pressed, after which it will move onto stage 1. Stage 1 CFR0014 5 of 13 2018 Dialog Semiconductor

The start button was pressed and now the system is in stage 1. The system is going to emit a beep 3 times, signaling the start of the game and moving the system into stage 2. Also, it s going to reset the score shown on the display. Stage 2 Stage 2 is going to be activated for exactly 60 seconds. During these 60 seconds, the output of the system will be signaling a CD4026 with the quantity of times the ball passed through the basket. Stage 3 After the 60 seconds have passed, the system moves onto stage 3. A loud beep and the flashing lights of the display are going to signal game over, after which we reset into stage 0. 7 GreenPAK Main Routine The functionality in this section relies heavily on the GreenPAK s ASM block. It only uses 4 states, but it does use all 8 of the ASM s outputs. Since the ASM has 4 unused states, we could use them to implement additional functionality. However, we will stick to the basics of the game. Figure 1. ASM Figure 1 shows the ASM process started with just the press of the start button. Each one of the stages is separated in the GreenPAK design to make them easier to explain. Stage 0 consists only of the start button, which needs no further explanation. Stage 1 consists of a CLK divider that pulses every 512 milliseconds, which is used to generate the 3 starting beeps. It has a counter that will count 4 pulses of the CLK divider, and once it reaches the fourth pulse, it will trigger a signal to advance to Stage 2. CFR0014 6 of 13 2018 Dialog Semiconductor

Voltage AN-CM-234 Figure 2. Stage 1 Section This counter will maintain a HIGH on its output until it is reset. We use its output to reset itself, and the signal State 0 to provide all the conditions necessary to reset the counter and ensure the functionality of the system in further iterations of the game. Figure 2 shows Stage 1, plus the Stage 3 condition to drive the buzzer. Stage 2 has two different components. The first is to keep track of the successful shots. At a hardware level, the ball will be detected by the GP2Y0A60SZLF proximity sensor, which will produce a certain voltage depending on the distance between itself and the ball. The GreenPAK is constantly measuring the voltage, but it will only react if two conditions are met: the GreenPAK detects a voltage greater than 4 V (selected using the GP2Y0A60SZLF table shown in Figure 3) and the system is in Stage 2. Concrete Green Voltage Wood Voltage Plastic (Black) Voltage Car (white) Voltage 5 4 3 2 1 0 4.25 4.18 4.27 3.45 3.29 3.39 3.07 2.27 1.85 2.04 1.98 1.77 1.42 1.63 1.53 1.17 1.44 1.36 1.26 1.05 1.18 1.3 1.2 0.97 1.17 1.08 1.06 0.91 1.04 1.03 0.98 0.88 0.96 0.98 0.91 0.85 0.92 0.86 0.86 0.82 0.79 5 10 20 30 40 50 60 70 80 90 100 Distance in cm Figure 3. GP2Y0A60SZLF Voltage/Distance Curve The second component of Stage 2 is to keep track of the 60 seconds in which the game is played. To do that we use a pair of counters and a LUT to create a 60 s timer. Figure 4 features both these processes and a very similar reset condition as the one presented in Stage 1. CFR0014 7 of 13 2018 Dialog Semiconductor

Figure 4. Stage 2 Section Stage 3 should emit a long beep and blink the display five times. To do this we again need to use a CLK divider. We configure it to pulse every 200 milliseconds and count 5 pulses. As the display is always HIGH during the game, we use an XOR block to make it blink. The condition of the long beep is visible in Figure 2, and the conditions of stage 3 are shown in Figure 5. Figure 5. Stage 3 Section So far, the budget for the electronic parts of the system is $47.50 USD (plus shipping expenses). The overall budget will change depending on the materials of construction (wood, steel, glass fiber, etc.), but in general terms the electronic parts are going to cost pretty much the same (unless we mass produce which would certainly reduce the manufacturing price per unit). To get a clearer picture, a device with similar characteristics but featuring 2 players can be found at a price of $360.00 USD plus shipping. Implementing a second player on our system would cost an additional $47.50 USD. Adding on $50.00 USD for the structure of the arcade machine would give us a price tag of $145.00 USD plus shipping. Again, this manufacturing price will go down depending on the production scale. This concludes the main objective of this app note. But if the intended use of this machine is as a forprofit arcade machine, the following designs may help with that implementation. Please note that all these solutions rely on more hardware and an additional GreenPAK. CFR0014 8 of 13 2018 Dialog Semiconductor

8 Coin Detection Solutions can be classified as hardware solutions or software solutions, or a mixture of both. The easiest way to implement coin detection would be to use sorting hardware and a simple software implementation. The hardware solution is a rail with a gap big enough to make rejected coins fall, but small enough to let the accepted coins pass. An infrared LED emitter and receiver will signal that a coin has passed. This solution is simple enough to be implemented as an additional stage in the main routine, or even using a LATCH block. Using the LATCH means the HIGH value of the coin detector is going to be HIGH until we reset the LATCH using a reset condition, which will be Start_Button AND Token_Memory being HIGH at the same time. 9 Ticket Dispenser For this we are going to use a second GreenPAK, and using the score output signal we are going to create a condition. First, we have to define two signals: SCORE_UP and TICKET_OUT. The first signal will go through a frequency divider, so every two points the CLK is going to finish one cycle. The second signal is going to count one cycle with every pulse. We also have a 3 bit UP/DOWN counter that we are going to use to monitor the number of tickets we are going to give away. This design is able to give away a maximum of 7 tickets, if the player scores 14 points in the sixty seconds of the game. Once stage 2 is over, a motor is turned on as long as any of the 3 bits is HIGH. That counter is going to decrease once a ticket is sensed by the TICKET_OUT signal. The stages of this design can be observed in Figure 6, Figure 7, and Figure 8. CFR0014 9 of 13 2018 Dialog Semiconductor

Figure 6: The Change and Control between the UP/DOWN Functions as well as the Signals that Drive CLK Figure 7: The DFFs That are Used for Counter, Each One with the Necessary LUTs for Its Correct Operation CFR0014 10 of 13 2018 Dialog Semiconductor

Figure 8: Motor_On is High When Any of the DFFs are High It can only be turned on when the UD signal is LOW, which signals the counter should be going down. The design of this ticket dispenser is simple but very useful. Since the truth table was designed to avoid overflow, the maximum stays at 7, even when the player scores more than 14 shots. 10 Conclusion Using a Dialog GreenPAK SLG46537, we were able to successfully implement a homemade which counts baskets and displays the score on 7-segment LEDs. It can also dispense tickets to the user. Thanks to GreenPAK and its GreenPAK Designer Software, this project was easy and affordable to implement. CFR0014 11 of 13 2018 Dialog Semiconductor

Revision History Revision Date Description 1.0 14-Mar-2018 Initial Version CFR0014 12 of 13 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 North America Dialog Semiconductor Inc. Phone: +1 408 845 8500 Hong Kong Dialog Semiconductor Hong Kong Phone: +852 2607 4271 China (Shenzhen) Dialog Semiconductor China Phone: +86 755 2981 3669 Germany Dialog Semiconductor GmbH Phone: +49 7021 805-0 Japan Dialog Semiconductor K. K. Phone: +81 3 5769 5100 Korea Dialog Semiconductor Korea Phone: +82 2 3469 8200 China (Shanghai) Dialog Semiconductor China Phone: +86 21 5424 9058 The Netherlands Dialog Semiconductor B.V. Phone: +31 73 640 8822 Taiwan Dialog Semiconductor Taiwan Phone: +886 281 786 222 Email: enquiry@diasemi.com Web site: www.dialog-semiconductor.com CFR0014 13 of 13 2018 Dialog Semiconductor