PRESS Button Cycler Enhancements

The goal of the project is to update a button cycler system used in qualification testing of electro-mechanical switches on human-machine interfaces (HMI) designed by Advanced Input Systems.
=Problem Definition=
Exhaustive testing HMI associated with dependable technology equipment is necessary to assure that they remain fully functional throughout the anticipated usage life. The goal of our project is to design a next-generation button-testing system and software package that can be easily configured to a broad range of keyboard and console geometries. The test will reduce human labor required for data acquisition and visualization as well as provide information about changes in switch health throughout the testing procedure.
==Background==
Advanced Input Systems develops HMI, such as keyboards, consoles and smart surfaces, for a broad range of applications including military and medical devices. Some of these devices are vital to human health and safety, so it is extremely important they know how long each of their switches is guaranteed to function without failure.
To determine this, AIS uses a system with the following capabilities:
* Incremental counters detect and display the number of switch closures since last reset.
* Bimba force can be controlled somewhat by adjusting input pressure.
* Multiple air cylinders (Bimbas) can be used to test multiple keys on a device.
System drawbacks to be considered:
* No way to monitor or accurately adjust force applied by Bimbas.
* No way to measure or quantify switch health.
* Switch closure count does not indicate when and error has occurred.
This final point is most important. The cause and context of each switch failure is crucial information when determining the life expectancy of a button.
==Deliverables==
Four levels of priority were initially assigned to the product design:
Priority 1: Necessary for product prototype
:An apparatus and LabVIEW program which emulates the current system capabilities, as well as provides switch debounce detection and meaningful datalogging.
Priority 2: Preferable but Optional
:Incorporate Bimba force detection and user input for force selection.
Priority 3: Optional
:Incorporate in situ switch characterization using force/displacement/resistance hysteresis curves to monitor switch health.
Priority 4: Preferable for future product
:Modernize hardware setup for final button cycler system.
During early development, priorities 1-3 were considered. Due to the learning curve for LabVIEW development, priority 1 became the entire scope of this year-long project.
==Specifications==
::The following is a list of 
 
Category 	Metric #	Metric 	Priority
Function 	1 	Graphically assign test parameters prior to start 	1
 	2 	Upon start, system dials in desired button test force followed by a calibration routine before testing commences	2
 	3 	Changes in switch resistance must be monitored during cycling 	1
 	4 	Verify switch open/closure upon each button press and log if and when it fails 	1
 	5 	Switch bounce on switch open and closure needs to be detected, datalogged, and flagged to the operator 	1
 	6 	System will datalog Metrics 4 and 5. 	1
 	7 	System will provide a means of compressing, sub-sampling, and/or summarizing data statistically or graphically 	1
 	8 	Monitor maximum applied button force during cycling 	2
 	9 	Adjust force up or down based on switch's "health" 	2
 	10 	Characterize switches F/D/R behavior at pre-programmed test intervals 	3
 	11 	Solution must be expandable to accommodate 1 to 30 buttons 	1
 	12 	System must support 1-5 Hz Bimba cycle rate (per cylinder) 	1
Electronics 	13 	DAQ (NI USB-6008) 	1
 	14 	Keyboard electrical connector (0.1" pitch dual-row female connector) 	1
 	15 	MOSFET or Relay bank to drive solenoids from DAQ 	1
 	16 	General size wire for system (18 gauge) 	1
Hardware 	17 	Test hardware must mimic that of the current setup at AIS 	4
 	18 	System must fit within 12" H x 24" L x 36" W 	1
 	19 	Gantry rails must support fluctuating loads of up to 10 Bimbas at maximum force 	4
Pneumatics 	20 	System must implement with existing facilities pneumatic supply (100 psi) 	1
 	21 	3-2 solenoid to operate each Bimba (McMaster 61975K413) 	1
 	22 	System will use existing Bimba spring-return air cylinders from AIS to press buttons 	1
 	23 	On/off valve and manual electronic pressure control valve to regulate pressure & input button force 	1
 	24 	General size for system pneumatic tubing (0.125" OD) 	1
 	25 	Inline air tank (regulator) employed to help maintain constant pressure 	1
 	26 	Manifolds will split air lines to run to each Bimba 	1
 	27 	Solenoids will have a regulated exhaust pressure (7.5 psi) to prevent full return and reduce noise 	1
Software 	28 	Solution will use LabVIEW instrumentation and software 	1
 	29 	System will use PC hardware running Windows 7 or Windows 10 	1
User interface 	30 	User-friendly means to see present values (ave, min, max) and look at previous tests to examine trends 	1
 	31 	Means to pause/resume testing and/or make adjustments 	1
 	32 	Means to re-start a test that just completed 	1
 	33 	Means to save & recall test setups 	1
 	34 	Operator can enter parameters at pre-test 	1
Additional Req's	35 	Initial Budget: $2,000 	1
 	36 	Project Deadline: 8-MAY-2020 	1
=Hardware Development=
thumb|right|300px|CAD render of the first test bench for DOE
The first test bench was modeled and built to mimic one Bimba on a single gantry rail from the current AIS system. It was designed to accommodate up to six Bimbas for later testing phases. Bimbas, their mounts (machined as AIS), and the rail were supplied by the client. The rail mounting fixtures and keyboard tabs were 3D printed with PETG filament (for strength and simplicity). Hardware was purchased through McMaster-Carr and local hardware stores.
The first step in the product design was to ensure that the current AIS system could be emulated and sufficient data could be collected. In order to bootstrap experimentation while equipment was on order, an Arduino setup was built into the first design of experiment (DOE) in place of LabVIEW and a data acquisition device (DAQ). This presented opportunities to design and improve the pneumatic system components.
A solenoid valve was used to control the actuation of each Bimba. In order to allow higher cycle rates and reduce noise from the return strokes, output valves were fitted to each solenoid to control Bimba back pressure. A regulator tank was employed to maintain consistent pressure values. The test bench hardware will currently support four Bimbas.
Early testing showed a significant drop in air pressure (2-3 psi) through the system with only one Bimba actuation. Considering this would cause issues when the system scaled to multiple Bimbas, and since a further goal was to implement force selection, a regulator tank was installed to ensure a more consistent air supply. With the tank added to the system, pressure drop from four Bimbas firing simultaneously was less than 2 psi. When scaling to 30 Bimba, it may be necessary to split supply over several reserve tanks. Further study is needed to determine how many Bimbas can be continuously supported on a single 100 psi supply.
=Software Development=
Further study would be necessary to determine that the gantry rail fully loaded (6-10 Bimbas) can withstand a maximum load firing once the software supports a multi-button system. With this obstacle in mind, consideration was made to the firing order of cylinders. The resulting LabVIEW code uses a simple loop to “gallop” the series of Bimba firings (one after another) by cycling through the cylinder indices used for the data array. This ensures that no two Bimbas fire simultaneously and prevents data collisions. The trade off is that on a long rail, e.g. 10 Bimbas, the “gallop” will limit the cycle rate parameter. More testing is needed to determine how much of a limitation this creates.
Excel VBA macros were designed to analyze post test data saved as a .csv file. This provided a good visualization tool for what the final analysis would look like. However, an Excel spreadsheet can only contain 2^20 (just over one million) rows, and tests are expected to run at least 1.5 million cycles. Not to mention .csv files that large would take excessive processing time to run through the VBA macros and are susceptible to corruption.
Instead, the VI saves log data to binary .dat files. These much more compact and secure files are then loaded into a separate tab in the VI for analysis. Currently, individual cylinder data can be visually analyzed with a mixed plot chart. Further implementation would be necessary to format failure logs for all Bimbas.
=LabVIEW Programming=
From the LabVIEW wiki:
LabVIEW, short for Laboratory Virtual Instrument Engineering Workbench, is a fully featured Integrated Development Environment (IDE) produced by National Instruments.
Coding in LabVIEW is not text based, but rather a block diagram flow chart. Functions and objects are represented as panels and blocks. Inputs and outputs are wires connected between blocks. This provides an entirely visual workflow environment to develop programs, or Virtual Instruments (VI).
Here is an example snippet of code pertaining to the manipulation of arrays:
thumb|center|600px|LabVIEW code snippet
=Final Design=
Final product features include:
* Output signal loop actuates air cylinder at regular intervals 
* Input signal loop reads resistance measurements from keyboard through DAQ 
* Merged loops accept input parameters (cycle rate, total cycles) 
* VI records number of successful closures based on resistance threshold 
* Debounce detection module accurately determines debounce times 
* Calibration cycle successfully applies test parameters 
* Cache cycle properly stores data without interfering with input readings 
* System accommodates up to four cylinders 
thumb|center|600px|Test User Interface
The user can save and recall test settings with a .csv configuration file. Individual parameters may then be altered for a particular test. The user selects which Bimbas will be active for the test and assigns each switch ID (if needed). Then the test may start. At any time during a test, the user may pause and adjust parameters and active cylinders, or simply terminate the test. Otherwise, the test will continue until the cycle limit is reached.
thumb|center|600px|Cylinder Data Charts
These charts represent the performance of a single cylinder over the course of a test. They plot open and closed resistance averages, debounce times and failures. This allows engineers at AIS to visually analyze button performance, recognize trends in switch health and find further insight into the context of failures.
At this stage, when the system supports four cylinders, issues arise with proper array indexing, leading to occasional data drops or corruptions, as seen in the cylinder performance charts.
=Validation=
Requirement 	Test 	Test Subject 	Target Date	Result
Force set and calibrated prior to test start 	- 	- 	- 	Next Steps
System must function off existing pneumatic supply (100 psi) 	Full battery short test 	Full system, regulator tanks 	22-OCT-2019	Confirmed
Characterize switch F/D/R at preset intervals 	- 	- 	- 	Future Project
Monitor switch resistance 	Produce waveform of switch resistance over time 	LabVIEW VI 	23-OCT-2019	Confirmed
Flag switch bounces > 10 ms 	Manual test 	LabVIEW VI 	04-DEC-2019	Confirmed
Increment count of switch closures and flag failures 	Short run test 	LabVIEW VI 	05-NOV-2019	Confirmed
Datalog bounces and failed closures 	Short run test 	LabVIEW VI 	03-FEB-2020	Confirmed
System must accommodate 1-30 buttons per test 	Simultaneous cylinders: 1, 4, 10, 30 	System prototypes (during development) 	04-MAR-2020	Next Steps
System must fit within 12Hx24Lx36W inches 	Measure full system block volume 	Full system prototype 	23-OCT-2019	Confirmed
System must have a cycle rate of 1-5 Hz 	Check all functions at 1, 2, 3, 4, and 5 Hz 	Full system prototype 	23-OCT-2019	Confirmed
Rail must be stable under max load 	Use strain gauges to measure rail feedback from max force/max Bimbas at each preset cycle rate	Full system prototype 	04-MAR-2020	Next Steps
Test parameters are to be graphically assigned 	Run several iterations of small sample tests to verify input parameters 	Full system, electronic pressure valve, LabVIEW VI	03-FEB-2020	Confirmed
LabVIEW/Windows 10 implementation 	Small sample run 	Priority 1 system 	31-OCT-2019	Confirmed
GUI must show present values during test 	Create indicator to report data 	VI Interface 	20-OCT-2019	Confirmed
GUI must include Start, Stop, Pause, Resume, and Restart test options 	Program state implementation 	VI Interface 	15-NOV-2019	Confirmed
GUI must provide means to save and recall test setups 	Import and save settings to .csv config file 	VI Interface 	04-MAR-2020	Confirmed
GUI must provide means to save and print Excel reports 	- 	- 	- 	Next Steps
System must summarize or otherwise reduce data into meaningful statistics	LabView Analysis and Charts 	 	 	Confirmed
=Next Steps=
While much was accomplished in this project, there are many opportunities for future work to improve the button cycler. Here are recommendations on future projects:
# Debug array indexing issue leading to data drops
# Confirm functionality for 10, 20, and 30 simultaneous Bimbas
# Upgrade VI to export formatted Excel reports
# Implement Bimba force detection
# Implement force selection as a test parameter
# Test distortion effects of maximum load firing on gantry rail
# Test capacity of regulator tanks to drive multiple Bimbas
# Develop method for integrated switch characterization (F/D/R curves)
# Modernize hardware design to minimize error (e.g. dual-acting Bimbas)
=Team Members=
	Andrew Overby
Major: Mechanical Engineering 
Hometown: Cour d'Alene, ID 
Responsibility: Team Organizer 
Email: over5500@vandals.uidaho.edu
	Cody Kasper
Major: Mechanical Engineering 
Hometown: Lewiston, ID
Responsibility: Budget and Ordering 
Email: kasp4410@vandals.uidaho.edu
	Chris Crozier
Major: Mechanical Engineering:
Hometown: Moscow, ID
Responsibility: Wikipage Editor 
Email: croz7168@vandals.uidaho.edu
=Additional Documentation=
Presentations
Category:Capstone design