Repository navigation
Our Process
The design and construction of this project required us to learn about several different types of systems and implement each of them into one cohesive, final product.
The PC fan used in our prototype required 12 volts to run, since the Arduino is only capable of producing 5V, an additional 9V battery had to be added to the system. After the power was resolved, the goal was to activate the fan only when the system was triggered by the correct dumbbell weight. This is where the PN2222 comes into play, it must essentially serve as a switch for the PC fan.
- The transistor has three terminals, base, collector, and emitter. The collector is wired to ground, emitter to the negative lead of the fan and the gate is driven by the Arduino and/or battery. Since we are using the transistor as a switch, this mimics a grounded-emitter transistor circuit (similar to a light switch). As the base voltage rises, the emitter and collector currents rise exponentially. Collector voltage drops because of reduced resistance. If the voltage difference between the collector and emitter is near zero, the collector current is limited only by load resistance (the fan) and the battery supply voltage. This state is referred to as saturation, the current can flow from the collector to the emitter freely. In laymen's terms, the fan is on.
While testing the fan, we simply used a push button as an arbitrary trigger before we added it to the full system.
The LCD is a standard LCD for Arduinos and other small projects, it was set up using the LiquidCrystal.h library and following the instructions found here on the Arduino site: https://www.arduino.cc/en/Tutorial/LiquidCrystalDisplay It runs off of the 5V provided by the Arduino and displays 2 rows of text. The brightness of the screen is adjusted by a potentiometer attached to it. Our LCD displays the weight of dumbbell that should be put onto the rack, and when the weight is put on it, it will then display the weight. If the incorrect weight is put on, it will instead state that and repeat what weight should be put on the rack.
The scale constantly sends data to the Arduino to be read and determine if the dumbbell has been placed back on the scale. When it detects a significant change in weight between measurements (>= 0.3 pounds) it checks to see if the weight put on is correct. It has a tolerance of +/- 0.5 pounds, as the scales will not always measure to exactly 5 pounds, depending on how the dumbbell was placed. When the correct dumbbell is first put on, the LCD screen is cleared and changed to display the weight, a timer starts using the Arduino's internal clock, and the cleaning process begins. The servo motor rotates, causing the spray bottle to spray, and the fan turns on. Once the timer reaches its end, the fan turns back off, as the dumbbell has now been sufficiently dried. This timer is able to run in the background while other processes are still running, which means the rack does not need to stop measuring during the cleaning cycle. When the dumbbell is removed, the LCD is once again cleared and the default message is re-displayed on it. The timer will also be automatically killed if it is running, so that the cleaning process does not continue to run when there is no longer an object to clean.