Group SD0607

From ECE Department Wiki

Jump to: navigation, search
Open Enclosure

Contents

Controlled Toilet Paper Dispenser: Project Description

The automatic toilet paper dispenser allows persons with disabilities to use restrooms without using excessive amounts of toilet paper. A person can wave his or her hand in front of the sensor, and the device unrolls a set amount of toilet paper. This process can be repeated a preset number of times, after which, no additional toilet paper is dispensed until the stall is vacated.

Our client has problems with toilet paper overuse causing clogging of toilets, which led to overflow and involved expensive cleanup. This problem is unique because previously, no effective solutions existed. One possible method to prevent toilet paper overuse is supervision; however, privacy concerns prevent effective monitoring of use in restrooms. While automatic paper towel dispensers exist, no known automatic toilet paper dispensers are commercially available.

Members

From left: Eric Swenson, Jay Sheldon, Andy Wallace

Requirements

  • The device shall control the amount of toilet paper dispensed per visit to the bathroom.
  • Pushing a button or waving a hand in front of a sensor shall trigger dispensing.
  • The amount of toilet paper dispensed is to be controlled with a switch on the stall door, allowing another set amount of toilet paper to be dispensed after the door has been opened and shut again.
  • The device shall not allow dispensing unless the stall door is closed.
  • The device shall have a durable cover with a lock to prevent removal of the roll but allow refilling the roll.
  • The device is to be rugged enough to handle many uses throughout each day.
  • The cost of the unit should be sufficiently low so as to allow three units to be built.
  • Requirements Capture Document

Design

The system has ten main components. The device is battery powered to provide safer operation and allow installation in areas that do not have access to standard wall outlets. Since the device is powered by batteries, power consumption is a concern. To prevent unnecessary power consumption, the device is powered only when the stall is in use. To accomplish this, a magnetic reed switch and bar magnet are mounted to the stall door. When the door is open, the switch is open, breaking the circuit and cutting off power to all of the electronics. When the door is closed, the proximity of the bar magnet to the reed switch closes the circuit and powers the electronics. Since the electronic components and the motor require five volts to operate correctly, a voltage regulator is used to drop the input voltage from the batteries down to five volts. A low dropout voltage regulator was chosen to increase battery life by allowing the batteries to be used further into their charge cycle than a typical voltage regulator would allow. The estimated battery life is over 300 days for six D cell batteries.

Block Diagram

The dispenser uses a capacitive transducer to detect when the user wants more toilet paper. A capacitive transducer was chosen because it allows non-contact detection, which provides a more sanitary method of activation. To increase the sensing range, a metal sheet mounted to the side of the enclosure is used as a sensing electrode. The size of the electrode can be adjusted to increase or decrease the sensing range. Currently, a hand within three to four inches of the electrode will trigger a sense. Starting the motor could cause momentary changes in the output voltage of the voltage regulator that could cause false touches to be recorded by the sensor. To prevent this, the capacitive transducer runs off its own voltage regulator.

A microcontroller detects touches from the capacitive transducer and controls the stepping pattern used to drive the motor. This eliminates the need for a costly control board to manage the stepper motor. An internal counter is maintained to track the number of dispenses left. Once this counter reaches zero, the controller will no longer respond to touches signaled from the sensor. The microcontroller interfaces with an array of light emitting diodes (LED) indicating the number of dispenses left. The array also features an LED controlled by the voltage regulator that indicates when the batteries need to be replaced.

A stepper motor was chosen to drive the roller because it allows precise control of the amount of toilet paper to be dispensed and is easily controlled through a microcontroller. The toilet paper is unrolled by a pinch roller mechanism. Figure three details the operation of the pinch roller. The roller squeezes the toilet paper between two rubber rollers, the capstan and the idler. The capstan is driven by a motor and the idler is allowed to turn freely. As the capstan is turned, the roll of toilet paper turns and gravity feeds the sheets through a chute and out of the enclosure. The pinch roller is superior to turning the entire roll, because the amount dispensed per revolution stays constant as the roll is used and the diameter of the roll decreases.

The overall estimated cost of a single unit is $153.69. Significant cost reductions could be achieved if the unit were brought into full-scale production. For more information and a detailed design document please refer to the NDSU Electrical and Computer Engineering Senior Design Group SD0607 website.

Motor

We are using a stepper motor, which can be precisely controlled. This allows us to know exactly how much toilet paper is dispensed per time. It also allows us to control the speed of the motor based on how fast it is stepped. A stepper motor works by basic electromatics. On the main shaft of the motor (the rotor), permanent magnets are placed around the circumference. Around the outside of this (the stator), electromagnets are also distributed around the circumference. By controlling which electromagnets have what polarity, the motor is controlled.

Control

A 16F876 PIC controls the dispenser. Upon receiving a signal from the proximity sensor (the user 'pressing' the button), the PIC operates the motor. It does this by applying a voltage to two transistors, changing them from open circuits to shorts. This allows current to flow through electromagnets in the stepper motor. By controlling which lines to the electromagnet allow currennt, the PIC controlls which electromagnets are on. By varying the speed at which the PIC changes steps, the speed of the motor is varied. Another option which was available is to use a stand-alone stepper motor controller. This allows the PIC to simply pulse the controller every time it is to step. The stepper motor controller then changes the stepping of the motor. This has the advantage of simplicity as well as guaranteeing a constant current. Since we need a low cost solution and our PIC is not being used for other tasks, we elected to control our dispenser solely with the PIC and not to use a stepper motor controller.

Sensing

We are using a proximity sensor - the QT113 proximity/touch sensor - to sense a 'button press'. We chose to use a proximity sensor because allows us to sense the user waving a hand near the enclosure, rather than pressing a button. This is more hygenic since it does not require multiple people touching the same surface. The capacitance transducer works based on Kirchoff's current and voltage laws. When an object, such as a person's hand, comes near the sensing electrode, the change is capacitance is detected, and the proximity sensor changes its output from high to low. This edge is then detected by the PIC. We are using an RI-21 Series Dry Reed Switch and an HE-31 permanent magnet as a door sensor. This sensor detects when the stall door is open or shut by acting as a NO (normally open) switch that allows current to flow when actuated by a permanent magnet.

Power

The dispenser is powered by 6 D-cell batteries. These were chosen based on their low cost, long lifetime, availability, and safety (versus using AC power). Using 6 batteries, as much as 9V is provided. Although the design only requires slightly over 5V, using additional batteries allows them to be used further into their lifetime.

Pinch Roller

A pinch roller was chosen to dispense the toilet paper because the amount of toilet paper per revolution of the roll remains constant. The toilet paper is pinched between to rods, the capstan and the idler. The capstan is coupled to the motor and the idler is allowed to turn freely. As the motor rotates the idler, the toilet paper is pulled down of the roll, and gravity feeds down through the chute and out of the enclosure.

The pinch roller is constructed from neoprene rubber tubing and a garrolite rod. The inner diameter of the tube and the diameter of the plastic rod were matched, insuring a tight fit when the rod was placed inside the tube. Neoprene rubber was chosen because it is commonly available and provided sufficient sponginess so the paper fed through and did not tear at the roller.

Voltage Regulator

We are using a TPS7150 low-dropout voltage regulator to requlate the voltage at 5V. This is a highly efficient voltage requlator which has a very small dropout voltage (the additional voltage required above and beyond what is supplied by the regulator) and a very low quiescent current.

The low-dropout voltage regulator was chosen because the device is battery powered. The 7805, a typical voltage regulator has a dropout voltage of 2.5V, meaning that if the supply voltage drops below 7.5V, the output is not guaranteed to be 5V. The TPS7150QP has a dropout voltage much lower than this, 230V at the maximum current rating. In addition, the voltage regulator chosen has a very low quiescent current, so very little power while the circuit is inactive. The low dropout voltage and quiescent current allow use of the batteries much further into their charge cycle, increasing the time between battery changes.

The regulator chosen also features a power good pin that exhibits a logical high signal when the regulator output is within 92-98% of the nominal regulated value. When the output falls below this threshold, the pin exhibits a logical low signal. The output of this pin is connected to the gate of a PFET. When the pin turns off, the transistor turns on, supplying power to the low battery LED.

Enclosure

Our enclosure is a 10x10x10" cube, with a hinge on the top in back. One of the more difficult parts of our project was actually to build one prototype and three production enclosures. We built our prototype out of Lexan, but decided to have our other three enclosures made professionally by Standard Industries. This resulted in a more professional looking product. We mounted the main PCB to the rear of the enclosure, and the LED PCB on one side, along with the sensing electrode. Our motor was mounted on one side of the enclosure, attached to the capstan. The roller was supported by a bracket on the opposite side of the enclosure.

Side View
Inside View

On the top of the enclosure, on the hinged door, we mounted the toilet paper holder. On the front of the enclosure, again on the hinged door, we mounted our pinch roller. This was difficult, because if too much pressure was placed on the door, the motor could not spin properly. Without enough pressure, though, the rollers couldn't properly pinch the toilet paper.

On the bottom of the enclosure, a slot was cut to allow the toilet paper to exit. Metal and Lexan chutes helped feed the toilet paper out the bottom of the enclosure without getting stuck, and forced the toilet paper to tear off outside of the enclosure, rather than in the dispenser.

Schematics

Multisim Main PCB Schematic
Ultiboard Main PCB Layout
Multisim LED PCB Schematic
Ultiboard LED PCB Layout

Main PCB Schematic

We used Multisim from the Electronics Workbench to create our "Main PCB" and "LED PCB" schematics for our toilet paper dispenser.

Each header pin of our schematics are given any one of the following labels: Main Header and LED Header Pins:

  • Sensing_Electrode: refers to the wire connected to the sensing electrode
  • GND_In: refers to the common ground coming from the battery source
  • Sens_PWR: refers to the anode of the “touch indicator LED”
  • Sens_GND: refers to the cathode of the “touch indicator LED”
  • GND_Out: refers to the common ground going out to the “LED PCB”
  • Batt: refers to the anode of the “low battery indicator LED”
  • PWR: refers to the 9 volts of power coming in from the battery source

PORTB Pins 1-6: refer to the first six pins of PORTB as seen on the PIC MOTOR Pins 1-6: refer to the six wires connected to our stepper motor


Main PCB Layout

We used Ultiboard from the Electronics Workbench to create our "Main PCB" and "LED PCB" layouts for our toilet paper dispenser.


LED PCB Schematic

Our LED PCB was designed to tell the user when the device senses a touch, when the device is dispensing toilet paper, when the batteries are low, and the number of dispenses that the user has left.


LED PCB Layout

Our PCB layout for our LED PCB was designed so that the LED transparency lines up with the proper indicator names

Problems Encountered and Lessons Learned

Throughout the course of the project, we encountered a number of challenges, some of which we were able to overcome without much difficulty, and some which we are still grappling with. For example, our budget seems relatively large, at close to 750 dollars. However, our project required making four dispensers; one prototype and three final versions. Because of this, cost was a major issue for us. Four dispensers meant that eight PCBs were needed. Since we had a limited budget, we built all eight PCBs in-house. This saved us a good deal of money, but it took a great deal of time to make, assemble, and test all eight PCBs. We also needed four enclosures for our dispensers. We did not have the money to have all the enclosures professionally built the way we originally planned, but we were able to have three of them made by Standard Industries for a reasonable price. It was time consuming and difficult to build our prototype though, as well as to find a company that we could afford to make our enclosures. Making only one dispenser initially would have saved us a good deal of money and time, but our requirements capture stated that we needed three.

While making our PCBs, we encountered some problems with the PIC resetting, LEDs turning off and voltage regulators burning up. We had a problem with this on some PCBs, but not others, and had a lot of difficulty debugging the problem. In the end, it turned out that we were using a polarized capacitor with our voltage regulator, and we accidentally installed the capacitor backwards on some of the PCBs.

Another problem we ran into numerous times throughout the project was voltage drift causing issues with our capacitive transducer. When we ran our motor, especially during transitions from one speed to another, there was enough current draw that, even when we were using the CADET board for our power supply, the power would drop enough to cause a false reading from our capacitive transducer. In consulting the data sheets for the transducer, we verified that it is very sensitive to voltage changes, and should have a dedicated supply. We redesigned our circuit to use two voltage regulators, one for the capacitive transducer and one for the rest of the circuit. We also learned that when the motor must accelerate or decelerate, it consumes significantly more project. We realized this was contributing to the false readings on the capacitive transducer. Because the circuit consumed significantly less power when the motor ran at a steady, faster speed, and the speed changes were causing spikes in the power, we chose to turn off the speed stepping in our PIC code.

One of the problems we ran into near the end of our project was with the toilet paper being dispensed out of the enclosure. We knew from the beginning that we had to strike a balance between the toilet paper being able to exit the enclosure freely, and preventing the user from pulling additional toilet paper out or inadvertently tearing the toilet paper off too high into the enclosure. When we actually built the enclosure and tested our chute, though, we still had issues despite designing to avoid them. In the end, smoother material the chute, a piece of material to block the TP, forcing it to be torn outside the chute, and careful angling of the chute turned out to be the remedies for this problem.

Future Work

While the device is functional at its current state, a few modifications and improvements could be made to provide enhanced usability.

Currently, the amount of toilet paper dispensed and the number of dispenses is hard-coded in the software program. Having a potentiometer or other interface to allow manual adjusting of these values would be desirable.

Since part of the pinch roller is on the lid of the enclosure, pressure on the lid can cause failures. If, for example, someone placed a heavy textbook on the lid, the increased weight would cause increased roller pressure. This increased pressure could result in insufficient motor torque to turn the roller. Mounting the rollers separate from the lid and having a latching mechanism so toilet paper can be fed through could prevent this problem.

Although the estimated battery life is quite long, it could be improved through a number of power-saving features. The PIC currently checks for senses from the capacitive transducer at regularly scheduled times. Power could be conserved by scanning for touches less often and entering a low-power sleep mode when not scanning for touches. It is likely that a user will not be able to wave their hand in front of the transducer for less than 0.2 seconds, so scanning could be done.

Another possible power saving feature is a sleep mode. If the stall door is left open overnight, the device will remain powered even though the stall is not in use. One possible solution to this problem is having the PIC enter a sleep mode. Typically, nobody stays in a bathroom for more than an hour. Having the PIC enter a sleep mode, or having the PIC signal the voltage regulator to enter a sleep mode would provide significantly less power consumption.

Additionally, if the device were to go into full-scale production different oscillators could be investigated. The PIC offers an internal RC oscillator, which could decrease overall system cost by eliminating the need for a crystal oscillator. It is likely that the decreased accuracy of the clock signal introduced by using the RC oscillator would not result in degraded performance because the system is not time sensitive.

A device, electrical or mechanical, which could sense how much toilet paper remains, could be very useful. Currently, it is necessarily to peer through the window on the enclosure or manually unlock and open the enclosure in order to see how much toilet paper is left. An enclosure which could alert the user or maintenance staff would save time, reduce the risk of a user running out, and make the dispenser more appealing to install compared to conventional dispensers.

Finally, a more compact enclosure could be investigated. Currently, the enclosure is 10x10x10 inches. Having a ten inch wide enclosure can encroach on the space inside a small bathroom stall. In addition, the chute is currently outside the bottom of the enclosure. Making a smaller enclosure with the toilet paper chute internalized could significantly reduce the real estate required by the dispenser. This would make it cheaper, easier to install, and more appealing to clients who currently use small dispensers and don't have room to install a larger one.

Documents

Options Considered document

Requirements Capture document

Final Paper

Keywords

Personal tools