Sip-and-Puff Controller

Welcome! My name is Elizabeth and I am currently a rising senior at Notre Dame High School. My extensive project, the sip and puff controller, aims to grant those with a disability that impairs their hands the ability to successfully type the letters of the alphabet.

Elizabeth T.

Area of Interest:

Electrical Engineering and Human Factors Engineering and Computer Science

Notre Dame High School

Grade:

Incoming Senior

Reflection

Showcase Night:

When imagining what BlueStamp would be like, I found myself picturing a room full of individuals with stoic expressions concerned solely on the completion of the task at hand. Despite my prior expectations, I was met with a group of individuals where when it was time to work there was no shortage of furrowed brows, yet all were exceedingly passionate about the environment in which they were in. The sense of balance that I was greeted with among the students truly set the stage for my time here. There was a sense of fear of not knowing enough, but over time every question served as an element that only furthered my development. Every speed bump was a chance for me to become an even stronger individual and prove to myself that the goal I set at the beginning was achievable. I was inspired to persevere through the challenges due to the lingering hope of creating something that would target a marginalized and often forgotten population. My desire to achieve this goal was not hindered by the completion of my final milestone, which instead sparked a want to further expand my device’s capabilities. The last six weeks have truly been a blessing that I will be forever grateful for.

My Final Milestone

Explore my journey:

This video displays the output of dots or dashes depending on the distance of an object from the ultrasonic sensor.

My next, and last, step in successfully creating a sip and puff controller was returning back to the original pressure sensor. After the instrumentation amplifier was reconstructed, the sensor began to read a steady value when it remained untouched. An instrumentation amplifier is a type of differential amplifier that contains input buffer amplifiers that in turn make it effective to test and measure inputs. What made the sensor reliable was the fact that every time it was unplugged and then plugged back into the computer the range of values remained the same. This allowed for the creation of a threshold between 100 and 140. If the value was below that range as triggered by a sip, a dot would be the output and therefore added to the string. The same would apply to the output being a dash except the reading is higher than the threshold. The next task at hand was creating a method that would allow for the conversion of the dots and dashes to letters. The method of convertLetter began with a for loop which set “i” to be zero and then stated that “i” needed to be less than 26 as the first value of the array is considered to be in the 0th position making the last and 26th value in the 25th position. The next part of the for loop incremented “i” to increase by one every time the code was run. Within the for loop was an if statement that stated if the string breathOutputs, which is made up of all the outputted dots and dashes, matched any of the established items within an array that named “morsecode”, which contained all the letters in Morse code, the ASCII value of “A” which is 65 would be added to “i” creating a new variable called myChar. An ASCII, or American Standard Code for Information Interchange, value is an already established and connects integers to letters. I was able to correspond the one single number of 65 to other letters by adding the number one. By continuously adding the number one other letters could be accessed. This would then lead to what myChar is to be returned. If no match is found then the word “error” would, in turn, be returned. After the code was completed and then tested, the second part served to be ineffective as only the dots and dashes were printed. The problem ended up being a result of an incorrectly placed bracket, as it kept the returned statement of “error” from being outside of the for loop leading to that one particular result which in turn kept the other code from running. Another issue I faced was the occurrence of the continual addition of either each dot and dash to the previous string making it invalid after a certain length. In an effort to combat this issue I created an if statement that limited the number of characters to be less than or equal to four as that was the greatest amount of characters that classified as a letter.  In addition, I added an if statement that regulated if the reading was between 100 and 140, or the values when there was no input, the string would equal to “”, or a blank string, allowing for the addition of dots and dashes to a new canvas.
Check out my code on GitHub

My Second Milestone

Explore my journey:

This video displays the output of dots or dashes depending on the distance of an object from the ultrasonic sensor.

During the last few weeks, a different plan of action has been created which includes the use of a different sensor, specifically an ultrasonic sensor. This course of action was deemed necessary due to the lack of evidence of a specific pattern with the prior sensor. There are four pins of the ultrasonic, two of which are VCC and ground, which connect to the power source of five volts and ground respectively. The last two pins are Trig and Echo, both of which are connected to two PWM (Pulse Width Modulation) pins on the Arduino. The Trig pin is the output, while the Echo pin is the input. The first part of the code aimed to translate the distance of an object into either a dot or a dash depending on a certain range. The first step after determining a plan through pseudocode, which is the necessary steps of code in simple English, was declaring the multiple variables that would be used throughout, such as duration and distance. A string was then created of Morse code in the order of the alphabet which would then allow for the translation of the dots and dashes into letters if a match was found. To accomplish the first goal of creating dots and dashes, the Trig pin was first cleared and then it was put into a high state for ten milliseconds. The Echo pin was then read and the sound wave travel time was returned in microseconds. The distance of an object was then calculated using the duration, as the distance is equal to ((duration*0.034)/2). If the distance was below or equal to ten then the output of a “.” would be added to the string called movementOutputs. The same would apply if the distance was between ten and twenty-five, except that a dash would then be the output and added to the string of movementOutputs. Together these dots and dashes work together to represent letters set by the known pattern, Morse code. That string would then be printed by the serial monitor, as demonstrated by the second video. One of the most difficult tasks was working with the original pressure sensor as a pattern was quite difficult to establish leading to an incredibly challenging experience of trying to create code. One of my first attempts included the usage of millis() which is an internal timer that then allowed me to determine the elapsed time as elapsed time is equal to the difference of current time and start time. The intended idea was that if the elapsed time was greater than a certain range would allow for the determination that the breath was a dash rather than that of a dot. Another method was using the actual serial reading but due to their inconsistency, this served to be quite difficult. My goal is to accomplish my goal with the use of the pressure sensor during the time for modifications.

My First Milestone

Explore the beginning of my journey:

This video displays the effect a sip or puff has on the serial reading.

One of my first major accomplishments was completing the circuit board on a breadboard. There are three main components: the pressure sensor, an instrumentation amplifier, and an Arduino Uno. The pressure sensor has four different pins, one of which connects to ground, another to the 5v pin on the Arduino, a third which is connected to the non-inverting input, and the last which is connected to the inverting input of the amplifier. I was able to create an instrumentation amplifier of one piece which contains a total of four input and four output pins, allowing for all three operational amplifiers to be available in one component. Through the usage of multiple 10k resistors along with a 2.7k and 2.2k resistors, which are used as a substitution for unavailable 5k resistors, to connect the different inputs and outputs to create a system that is known as an instrumentation amplifier. After constructing the amplifier I was able to calculate that the difference of V2 and V1 multiplied by 10.36 is equal to the output after the signal travels through the amplifier. The gain resistors of the instrumentation amplifier are then connected by 2.4k resistors completing this part of the circuit. In order to test if this works the output of the amplifier was connected to “Analog 1” of the Arduino, as the output is analog and not digital. I was then able to print the input of analog one through the serial reader. When no pressure is added to the sensor there is a reading of a consistent number and when an input is added the number fluctuates until there is no interference.                                        One of the most difficult steps to reach this goal was creating the instrumentation amplifier. This challenge arose when the needed part was not available to use but a similar component could be adapted to create the needed part. This served to be challenging as the pins of the AD8223 do not directly match up with those of the TLC2274 operational amplifier. After using an available schematic I was able to connect the various inputs of the one operational amplifier to another which in turn achieved the set goal.

Starter Project

What is a light organ and how does it work?

My startup project is a light organ which makes LEDs work in accordance with a microphone to a beat or sound that is above a specific level. The source of power is a 9-volt battery which connects to one end of a resistor. When using the analogy of driving, the resistors serve as a speed bump as they limit and slow the current. These resistors are then connected to a series of transistors. When using the same analogy transistors are similar to that of traffic lights. This particular circuit used two types of transistors: PNP and NPN. These two transistors have opposite charges meaning in one a negative charge flows within and vice versa. In a transistor electrons diffuse from the “n” type to fill the empty holes in “p”. Once all of those holes are filled, the switch is then turned off as there is a prevention of a flow between the sections. When it is in the “on” state, a positive voltage is added to the gate which then reduces the barrier and creates a channel of flowing electrons. This circuit also contains two types of capacitors: electrolytic and disc. With electrolytic capacitors being polar, as they contain a positive plate that is then connected to a negative sheet, the way in which it is positioned matters. On the other hand, a disc capacitor is made through the layering if conductor sheets and ceramic material. All of these components connect the battery to the microphone which in turn connects to the five LEDs alerting the user of the result. Throughout the process, challenges arose specifically around that of soldering and desoldering. The project began with the incorrect placement of components to which then led to a significant amount of desoldering using both a wick and a pump. In addition, there was the problem of the breakage of wires as they were composed of thin copper. Despite the constant hurdles, an end result was reached through hope and persistence.

Build This Project:  

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering