Temperature Selective Based Locomotive Water Dispenser

Trains are equipped with water lines in all compartments, but not drinkable. This new approach helps the water drinkable by purification of the water from the lines with a separate provision to purify it, the new system obtains the purified water and stores in an overhead tank. The consumer has the choice of choosing the quantity & temperature of water. Choosing the inputs by the consumer, the quantity & nature of water is decided and sent to the microcontroller. Then with multiples of Rs.5 as activation key for the process to start, the choice of temperature is chosen as warm or cold or plain & the respective tanks are opened and closed to obtain the preferred water temperature and quantity. The whole system of temperature preference is with the mixing of water at various temperatures. The heating & cooling process of the water is the same traditional methods but the attainment of specific temperature is by the heat & mass transfer principles of water. This system is motived to be implemented on railways because of surplus water availability, a good source of income to the government and to avoid the usage of plastics in any form to store water.


Introduction
In all the locomotives, Water provision is made available by the Indian government. The climatic conditions in train journey changes with location even at constant time periods of a year. 90% of diseases are waterborne in India, to avoid disease and to give a preference of warm and cold water in drinkable state in railways is highly recommended and a source of income for government if offered at affordable rates. So, to make use of the water available, a water purifier fit with the designed water dispenser 1 which offers warm and cold water. With the mere control of levers connected in with the stepper motors, the water is mixed in an appropriate quantity for the desired output. Also, the temperature is also checked for the right desired temperature fixed for warmness and the coldness 1 .

Coin Detection and Process Flow
This process is designed in such a way that, the consumer has the choice of choosing the desired temperature and the quantity of water 1,2 . First the temperature variant is chosen for Plain (or) Cold (or) Hot. Secondly the quantity is chosen with a choice of 500ml or 1 liter. Then, the coin has to be inserted in the coin insertion slot with the multiples of Rs.5. For 500ml of water Rs.5*1 and for 1 liter Rs.5*2 is inserted. With the detection of the coin 6,7 , the process starts and the final output is obtained in the output valve with a desired timing according to the quantity selected. The overall system outlay is shown in the Figure 1.
The system has the following components readily available 1. Water purifier, Purifies the water continuously from the main line of the locomotive 5 . 2. The water heater, the water heater continuously heats up the water with a saturation region prefixed to it 4 . The boiling point of the water is at 100°C with atmospheric pressure of 101.3 kPa (1 atm). Yet the water may reach the boiling point very soon, but the prevention of the water to heat continuously should be prevented. So, the breaker circuit is readily equipped to make and break the circuit before reaching the boiling point 3 . 3. Similarly, the cold water temperature is also preferred between 10-15°C. The refrigerator is also controlled in such a way that beyond the coolant temperature, the cooling process is stopped and activated again.
The above mentioned system is already existing, but the methodology to control the required amount of water temperature that a passenger expects is processed with the thermodynamics of the hot, cold and plain water.
 The objective of the process is to obtain the purified, Plain, Warm and cold water in a desired time at right temperature.
 The Desired temperature of the plain water is about 20-25°C. To obtain the desired degree of hotness or coldness, Plain water is mixed with the exact amount of hot or cold water at calculated timing with actuated valves of the storage tanks. The quantity of mixing the Hot or Cold water with the plain water is achieved with the thermodynamic process of heat exchange between the different temperature medium of the water.  Knowing the quantity from flow of the water, the time duration taken by the flow of the water is considerably important for the consumer. Hence, the desired time duration for the entire process to complete is taken as 10-12 Seconds or 5-7 Seconds for 1 liter and 500ml quantity respectively. So, the storage tank's output valve is designed with the measurement calculated from the laws of fluid mechanics. Knowing the width of the dissipating valve diameter and the quantity to flow, the desired quantity flow time of 5-7 or 10-12 seconds could be achieved.  Since all the quantities to be found are calculated, the electronics of the whole process is to control the stepper motor connected to the lever of the output flow valve.  Finally the temperature sensor looks for the right temperature programmed for warm and cold water in the microcontroller. If the temperature is fine enough with a degree gradient of ±5°C, the final mixed output valve is opened. Else, the mixture is sent back to the reservoir tank with a centrifugal motor, which is connected to the water source.
The overall block diagram of the system is shown in Figure 2. The electrical components of the whole system consists of an NPN optocoupler setup, Atmega16 Microcontroller, ULN2003A motor driving ICs, 12VDC motors, a LM-35 temperature sensor, Push-Pull button  type switches for selecting the quantity of water and the desired state of temperature.

Water Thermodynamics
The temperature of the various water temperatures are fixed with Cold as 15°C, warm as 75°C and the plain water is normally between 20-25°C. The quantity of mixing has to be calculated with the formula of heat transfer between two different fluids when mixed. The quantity of fluids to be mixed is denominated with X-Hot water, Y-Plain water and Z-Cold water.
The general equation to calculate the quantity of X, Y and Z is as follows A -Temperature of Hot water. B -Temperature expected for warm water. C -Temperature of Plain water. D -Temperature of cold water from refrigerant. E -Temperature of cold water expected to consume.
To calculate the quantity of Warm water, can be found by equation (1): Ex. For 500ml of consumer's water selection, X + Y = 500. The temperature is fixed for warm water as 70°C, Hot water at 100°C and since the plain water temperature has a difference of 20-25°C, the highest value is taken as 25°C. So, X(100 -70) = Y(70 -25) We know that Y = 500 -X  30X = (500 -X) 45  75X = 22500  X = 300 and Y = 200.
Hence the quantity to be mixed for 500ml of warm water at approximately 70°C has to be 300ml of hot water and 200ml of plain water. Since the temperatures are variable quantities, the generic equation has an influence to stay stable for the variances. Similarly, for the cold water at consumable temperature, the quantity of water to be mixed can be calculated with the similar equation (2).

Y(C -E) = Z(E -D)
(2) Hence the quantity of consumable mixed water with Hot or Cold or Plain water can be calculated.

Water Flow-Dynamics
Since, the quantity is decided and hence the container is designed in such a way that the mixed water flows at the rate of 5-7 seconds for 500ml and 10-12 seconds for 1liter of water. Since the whole process deals with the control of the stepper motor, the outlet valve diameter should be according to the flow, which is the waiting period of the consumer. The water passes through a level of stagnation to verify the defined level of temperature for the option selected.
For the first stage of water stagnation the flow of water is determined in such a way that the total time taken to dissipate from the first level is at 5-7 seconds and similarly the second level. So, the dissipation of water for 1 liter should be within the defined rate, can be found by the equation (3). Where 3 3 10 5 Where Q -Flow speed of water, g -Gravitational pull (9.8m/s 2 ), h -Height from which water dissipates, d -diameter of the orifice from which water dissipates, d -2cm. Implementing the dimensions, the height of the tank, h ≥ 5cm.
So, the height of the tank is fixed at a stage of 15cm, since the flow of water in various tanks is constant and continuous, this equation fits the process.
The second step of water stagnation also has a lower tank to store the water and check the temperature. Since the flow of water is continuous the formula to calculate the time of discharge of water is given by equation (4).
Where  A -Area of the tank  a -Area of the orifice  C -Orifice Discharge coefficient for rounded tip  Hi -Initial height of the water  Hf -Final height of the water  g -Gravitational force (9.8m/s 2 ).
Determining the orifice diameter as 2 cm. The time duration for discharging the final outlet of the water, temperature checked is 5-7 second. The design of the overall tank is determined with the first stage of the tank with 15 cm in height, 10 cm in diameter with a spacing between the tanks as 1 cm. The orifices for the tanks are 2 cm respectively for the timed flow of water. With a gap of 1 cm beneath the three mounted tanks, the second stage of the tank for checking the temperature has a diameter of 11.5 cm with a height of 10 cm, the orifice is of 2 cm in diameter. The overall flow of the system follows the flow chart shown in Figure 3.

Electronic Assembly of the System
The input lies with the selection of the temperature state and the quantity only, since, the inputs has to be selected only once, the push-pull switch (OR) is engaged to give the input. The input for the selected AtMega16 is given within the range of 3.5 to 4.5 VDC. So, the input is selected a 4 VDC with all the inputs to be given, a common source. After the selection of the input, a LED is connected in series with the button switch to make it glow and show the input selected. The inputs Warm, Plain and cold is connected to the Port A with the pins PA0, PA1 &PA3 respectively and the Quantity inputs of 500ml and 1liter is connected to PA3 and PA4 of the same port. The output of the system is to drive the stepper motors at a controlled driven time for a complete mix of water for the right temperature of water. For that, the stepper motors control IC ULN2003A is connected in 2 different ports of the Controller. Port C and port D engages the driver ICs of all the four stepper motors. Pins PC0, PC1, PC2 and PC3 are connected to the warm water control IC with pins 1B, 2B, 3B and 4B respectively and pins PC4, PC5, PC6 and PC7 are connected to plain water control IC pins 1B, 2B, 3B and 4B. Similarly with the port D pins PD0, PD1, PD2 and PD3 are connected to cold water control IC pins 1B, 2B, 3B and 4B respectively. The Final valve drive to engage the flow of water to the consumer is connected with the port D pins PD4, PD5, PD6 and PD7 connected to the pins 1B, 2B, 3B and 4B respectively with the same set up of the motor driving IC. The reason behind the use of stepper motor is to maintain the precise torque, Start/Stop preciseness & high reliability. With the lever connected to the outlet valve. The overall electrical simulation of the system is shown in Figure 4.

Future Enhancement
The Preference of Warmness or Coldness is prefixed, it is predefined by design. The option of choosing the temperature by right variance could be achieved. Instead of timely actuation of the motors, the algorithm to calculate the right amount of temperature and the quantity to dissipate could be programmed in the microcontroller. The accuracy in mixing the water and obtained water temperature could be precise, so that the need of reservoir tank is nil.

Result
The existence of water dispensing or vending machines are surplus. But this new approach is to make use of the existing traditional cooling & heating systems and thermodynamically mixing of the hot & cold temperature water. The heat & mass transfer of the two types of water by calculative means delivers the right amount of water with the user specific temperature. By the conclusion of the system, the railways operation department is at profit and the general public usage is feasible to use and get benefited as well.

Conclusion
The paid water dispenser system onboard a locomotive with the proposed plant on each compartment is definitely a win-win scenario for both the civilian as well as the railway operations department. The proposed system could be a standalone set-up for public usage as well.